Skip to content

Commit

Permalink
Merge pull request #412 from apache/ARIES-2165-build-quiesce-with-jav…
Browse files Browse the repository at this point in the history
…a-11-17-21

ARIES-2165: Build testsupport, util and quiesce with java 11 17 21
  • Loading branch information
alien11689 authored Jan 31, 2025
2 parents 3676f1b + bdd8264 commit 342466f
Show file tree
Hide file tree
Showing 35 changed files with 377 additions and 1,316 deletions.
1 change: 1 addition & 0 deletions .github/workflows/blueprint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,6 @@ jobs:
- name: Build
shell: bash
run: |
mvn -U -e -B -ntp clean install -f parent/pom.xml
mvn -U -e -B -ntp clean install -f testsupport/pom.xml
mvn -U -e -B -ntp clean install -f blueprint/pom.xml
1 change: 1 addition & 0 deletions .github/workflows/ejb.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ jobs:
- name: Build
shell: bash
run: |
mvn -U -e -B -ntp clean install -f parent/pom.xml
mvn -U -e -B -ntp clean install -f testsupport/pom.xml
mvn -U -e -B -ntp clean install -f proxy/pom.xml
mvn -U -e -B -ntp clean install -f ejb/pom.xml
1 change: 1 addition & 0 deletions .github/workflows/jmx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,6 @@ jobs:
- name: Build
shell: bash
run: |
mvn -U -e -B -ntp clean install -f parent/pom.xml
mvn -U -e -B -ntp clean install -f testsupport/pom.xml
mvn -U -e -B -ntp clean install -f jmx/pom.xml
1 change: 1 addition & 0 deletions .github/workflows/jndi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,6 @@ jobs:
- name: Build
shell: bash
run: |
mvn -U -e -B -ntp clean install -f parent/pom.xml
mvn -U -e -B -ntp clean install -f testsupport/pom.xml
mvn -U -e -B -ntp clean install -f jndi/pom.xml
4 changes: 3 additions & 1 deletion .github/workflows/quiesce.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
strategy:
fail-fast: false
matrix:
java: [ 8 ]
java: [ 8, 11, 17, 21 ]
os: [ ubuntu-latest ]
name: JDK${{ matrix.java }} ${{ matrix.os }}
runs-on: ${{ matrix.os }}
Expand All @@ -47,5 +47,7 @@ jobs:
- name: Build
shell: bash
run: |
mvn -U -e -B -ntp clean install -f parent/pom.xml
mvn -U -e -B -ntp clean install -f testsupport/pom.xml
mvn -U -e -B -ntp clean install -f util/pom.xml
mvn -U -e -B -ntp clean install -f quiesce/pom.xml
1 change: 1 addition & 0 deletions .github/workflows/subsystem.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,6 @@ jobs:
- name: Build
shell: bash
run: |
mvn -U -e -B -ntp clean install -f parent/pom.xml
mvn -U -e -B -ntp clean install -f testsupport/pom.xml
mvn -U -e -B -ntp clean install -f subsystem/pom.xml
2 changes: 1 addition & 1 deletion .github/workflows/testsupport.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
strategy:
fail-fast: false
matrix:
java: [ 8 ]
java: [ 8, 11, 17, 21]
os: [ ubuntu-latest ]
name: JDK${{ matrix.java }} ${{ matrix.os }}
runs-on: ${{ matrix.os }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/util.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
strategy:
fail-fast: false
matrix:
java: [ 8 ]
java: [ 8, 11, 17, 21 ]
os: [ ubuntu-latest ]
name: JDK${{ matrix.java }} ${{ matrix.os }}
runs-on: ${{ matrix.os }}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/web.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,6 @@ jobs:
- name: Build
shell: bash
run: |
mvn -U -e -B -ntp clean install -f parent/pom.xml
mvn -U -e -B -ntp clean install -f testsupport/pom.xml
mvn -U -e -B -ntp clean install -f web/pom.xml
9 changes: 9 additions & 0 deletions jmx/jmx-itests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
<asm-debug-all.version>5.0.3</asm-debug-all.version>
<commons-jexl.version>2.1.1</commons-jexl.version>
<depends-maven-plugin.version>1.5.0</depends-maven-plugin.version>
<javax.inject.version>1</javax.inject.version>
<org.apache.aries.blueprint.jexl.evaluator.version>1.0.0</org.apache.aries.blueprint.jexl.evaluator.version>
<org.apache.aries.blueprint.sample.version>1.0.0</org.apache.aries.blueprint.sample.version>
<org.apache.aries.blueprint.version>1.0.0</org.apache.aries.blueprint.version>
Expand Down Expand Up @@ -103,12 +104,20 @@
<artifactId>org.osgi.compendium</artifactId>
<scope>provided</scope>
</dependency>
<!-- TODO ARIES-2165 restore dependency
<dependency>
<groupId>org.apache.aries.testsupport</groupId>
<artifactId>org.apache.aries.testsupport.unit</artifactId>
<version>${org.apache.aries.testsupport.unit.version}</version>
<scope>test</scope>
</dependency>
-->
<!-- TODO ARIES-2165 remove testsupport transitive dependency -->
<dependency>
<groupId>javax.inject</groupId>
<artifactId>javax.inject</artifactId>
<version>${javax.inject.version}</version>
</dependency>
<dependency>
<groupId>org.apache.aries.blueprint</groupId>
<artifactId>org.apache.aries.blueprint.sample</artifactId>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIESOR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.aries.itest;

import javax.inject.Inject;

import org.osgi.framework.Bundle;
import org.osgi.framework.BundleContext;
import org.osgi.framework.BundleException;

/**
* TODO ARIES-2165 Remove when testsupport is added in pom
*
* Base class for Pax Exam 1.2.x based unit tests
*
* Contains the injection point and various utilities used in most tests
*/
public abstract class AbstractIntegrationTest {

/** Gateway to the test OSGi framework */
@Inject
protected BundleContext bundleContext;

/**
* Get a richer version of {@link BundleContext}
*/
public RichBundleContext context() {
return new RichBundleContext(bundleContext);
}

public String getLocalRepo() {
String localRepo = System.getProperty("maven.repo.local");
if (localRepo == null) {
localRepo = System.getProperty("org.ops4j.pax.url.mvn.localRepository");
}
return localRepo;
}


/**
* Help to diagnose bundles that did not start
*
* @throws BundleException
*/
public void showBundles() throws BundleException {
Bundle[] bundles = bundleContext.getBundles();
for (Bundle bundle : bundles) {
System.out.println(bundle.getBundleId() + ":" + bundle.getSymbolicName() + ":" + bundle.getVersion() + ":" + bundle.getState());
}
}

/**
* Helps to diagnose bundles that are not resolved as it will throw a detailed exception
*
* @throws BundleException
*/
public void resolveBundles() throws BundleException {
Bundle[] bundles = bundleContext.getBundles();
for (Bundle bundle : bundles) {
if (bundle.getState() == Bundle.INSTALLED) {
System.out.println("Found non resolved bundle " + bundle.getBundleId() + ":" + bundle.getSymbolicName() + ":" + bundle.getVersion());
bundle.start();
}
}
}
}
Loading

0 comments on commit 342466f

Please sign in to comment.