Skip to content

Commit a8fd4c8

Browse files
authored
Merge pull request #434 from apache/ARIES-2165-build-blueprint-plugin-with-java-11-17-21
ARIES-2165: Build blueprint plugin with java 11, 17 and 21
2 parents eef0715 + dc89d54 commit a8fd4c8

File tree

17 files changed

+129
-255
lines changed

17 files changed

+129
-255
lines changed
+52
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# Licensed under the Apache License, Version 2.0 (the "License");
2+
# you may not use this file except in compliance with the License.
3+
# You may obtain a copy of the License at
4+
#
5+
# http://www.apache.org/licenses/LICENSE-2.0
6+
#
7+
# Unless required by applicable law or agreed to in writing, software
8+
# distributed under the License is distributed on an "AS IS" BASIS,
9+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10+
# See the License for the specific language governing permissions and
11+
# limitations under the License.
12+
13+
name: Blueprint Plugin - CI Build
14+
# TODO ARIES-2165 remove the workflow when whole blueprint supports java 11, 17 and 21
15+
16+
on:
17+
pull_request:
18+
paths:
19+
- parent/**
20+
- blueprint/plugin/**
21+
- .github/workflows/blueprint-plugin.yml
22+
push:
23+
branches:
24+
- 'trunk'
25+
26+
env:
27+
LC_ALL: en_US.UTF-8
28+
29+
jobs:
30+
JDKxx_Matrix:
31+
timeout-minutes: 10
32+
strategy:
33+
fail-fast: false
34+
matrix:
35+
java: [ 8, 11, 17, 21 ]
36+
os: [ ubuntu-latest ]
37+
name: JDK${{ matrix.java }} ${{ matrix.os }}
38+
runs-on: ${{ matrix.os }}
39+
steps:
40+
- name: Git Checkout
41+
uses: actions/checkout@v4
42+
- name: Set up Java
43+
uses: actions/setup-java@v4
44+
with:
45+
distribution: 'temurin'
46+
java-version: ${{ matrix.java }}
47+
- name: Build parent
48+
shell: bash
49+
run: mvn -U -e -B -ntp clean install -f parent
50+
- name: Build blueprint plugin
51+
shell: bash
52+
run: mvn -U -e -B -ntp clean install -f blueprint/plugin

blueprint/plugin/blueprint-maven-plugin-annotation/pom.xml

+6-23
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@
2323
<modelVersion>4.0.0</modelVersion>
2424

2525
<parent>
26-
<groupId>org.apache.aries.blueprint</groupId>
27-
<artifactId>blueprint-parent</artifactId>
28-
<version>1.0.0</version>
29-
<relativePath>../../blueprint-parent/pom.xml</relativePath>
26+
<groupId>org.apache.aries</groupId>
27+
<artifactId>parent</artifactId>
28+
<version>2.1.2-SNAPSHOT</version>
29+
<relativePath>../../../parent/pom.xml</relativePath>
3030
</parent>
3131

3232
<groupId>org.apache.aries.blueprint</groupId>
@@ -42,10 +42,7 @@
4242
</scm>
4343

4444
<properties>
45-
<java.source.version>1.8</java.source.version>
46-
<java.target.version>1.8</java.target.version>
47-
48-
<bnd-maven-plugin.version>5.0.0</bnd-maven-plugin.version>
45+
<bnd-maven-plugin.version>6.4.0</bnd-maven-plugin.version>
4946
<osgi.annotation.version>7.0.0</osgi.annotation.version>
5047
</properties>
5148

@@ -60,21 +57,7 @@
6057

6158
<build>
6259
<plugins>
63-
<plugin>
64-
<artifactId>maven-compiler-plugin</artifactId>
65-
<configuration>
66-
<source>${java.source.version}</source>
67-
<target>${java.target.version}</target>
68-
</configuration>
69-
</plugin>
70-
<plugin>
71-
<groupId>org.apache.maven.plugins</groupId>
72-
<artifactId>maven-javadoc-plugin</artifactId>
73-
<configuration>
74-
<source>${java.source.version}</source>
75-
</configuration>
76-
</plugin>
77-
<plugin>
60+
<plugin>
7861
<groupId>biz.aQute.bnd</groupId>
7962
<artifactId>bnd-maven-plugin</artifactId>
8063
<version>${bnd-maven-plugin.version}</version>

blueprint/plugin/blueprint-maven-plugin-itest/pom.xml

+31-41
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@
2222
<modelVersion>4.0.0</modelVersion>
2323

2424
<parent>
25-
<groupId>org.apache.aries.blueprint</groupId>
26-
<artifactId>blueprint-parent</artifactId>
27-
<version>1.0.0</version>
28-
<relativePath>../../blueprint-parent/pom.xml</relativePath>
25+
<groupId>org.apache.aries</groupId>
26+
<artifactId>parent</artifactId>
27+
<version>2.1.2-SNAPSHOT</version>
28+
<relativePath>../../../parent/pom.xml</relativePath>
2929
</parent>
3030

3131
<groupId>org.apache.aries.blueprint</groupId>
@@ -35,11 +35,11 @@
3535
<name>Apache Aries Blueprint Maven Plugin iTest</name>
3636

3737
<properties>
38-
<java.target.version>1.7</java.target.version>
39-
<java.source.version>1.7</java.source.version>
38+
<aries.skip.version.check>true</aries.skip.version.check>
4039

41-
<blueprint-maven-plugin.version>1.9.1-SNAPSHOT</blueprint-maven-plugin.version>
40+
<blueprint-maven-plugin.version>1.10.1-SNAPSHOT</blueprint-maven-plugin.version>
4241
<maven-invoker-plugin.version>3.9.0</maven-invoker-plugin.version>
42+
<groovy.version>4.0.24</groovy.version>
4343
</properties>
4444

4545
<scm>
@@ -51,43 +51,33 @@
5151
<build>
5252
<plugins>
5353
<plugin>
54-
<artifactId>maven-compiler-plugin</artifactId>
54+
<groupId>org.apache.maven.plugins</groupId>
55+
<artifactId>maven-invoker-plugin</artifactId>
56+
<version>${maven-invoker-plugin.version}</version>
5557
<configuration>
56-
<target>${java.target.version}</target>
57-
<source>${java.source.version}</source>
58+
<projectsDirectory>src/it</projectsDirectory>
59+
<pomIncludes>
60+
<pomInclude>*/pom.xml</pomInclude>
61+
</pomIncludes>
62+
<postBuildHookScript>verify</postBuildHookScript>
63+
<cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo>
64+
<parallelThreads>4</parallelThreads>
5865
</configuration>
66+
<executions>
67+
<execution>
68+
<goals>
69+
<goal>run</goal>
70+
</goals>
71+
</execution>
72+
</executions>
73+
<dependencies>
74+
<dependency>
75+
<groupId>org.apache.groovy</groupId>
76+
<artifactId>groovy-xml</artifactId>
77+
<version>${groovy.version}</version>
78+
</dependency>
79+
</dependencies>
5980
</plugin>
6081
</plugins>
6182
</build>
62-
63-
<profiles>
64-
<profile>
65-
<id>integration-test</id>
66-
<build>
67-
<plugins>
68-
<plugin>
69-
<groupId>org.apache.maven.plugins</groupId>
70-
<artifactId>maven-invoker-plugin</artifactId>
71-
<version>${maven-invoker-plugin.version}</version>
72-
<configuration>
73-
<projectsDirectory>src/it</projectsDirectory>
74-
<pomIncludes>
75-
<pomInclude>*/pom.xml</pomInclude>
76-
</pomIncludes>
77-
<postBuildHookScript>verify</postBuildHookScript>
78-
<cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo>
79-
<parallelThreads>4</parallelThreads>
80-
</configuration>
81-
<executions>
82-
<execution>
83-
<goals>
84-
<goal>run</goal>
85-
</goals>
86-
</execution>
87-
</executions>
88-
</plugin>
89-
</plugins>
90-
</build>
91-
</profile>
92-
</profiles>
9383
</project>

blueprint/plugin/blueprint-maven-plugin-itest/src/it/custom-destination/verify.groovy

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
def file = new File(basedir, 'target/classes/custom/my/blueprint.xml')
2121
assert file.exists()
22-
def xml = new groovy.util.XmlSlurper().parse(file)
22+
def xml = new groovy.xml.XmlSlurper().parse(file)
2323
assert xml.name() == 'blueprint'
2424
assert xml.bean.@class == 'p1.T1'
2525
assert xml.bean.@id == 't1'

blueprint/plugin/blueprint-maven-plugin-itest/src/it/multiple-invocation/verify.groovy

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
def p1 = new File(basedir, 'target/generated-sources/blueprint/OSGI-INF/blueprint/p1.xml')
2121
assert p1.exists()
22-
def xmlP1 = new groovy.util.XmlSlurper().parse(p1)
22+
def xmlP1 = new groovy.xml.XmlSlurper().parse(p1)
2323
assert xmlP1.name() == 'blueprint'
2424
assert xmlP1.'@default-activation' == 'lazy'
2525
assert xmlP1.'@default-availability' == 'mandatory'
@@ -30,7 +30,7 @@ assert xmlP1.bean.@id == 't1'
3030

3131
def p2 = new File(basedir, 'target/generated-sources/blueprint/OSGI-INF/blueprint/p2.xml')
3232
assert p2.exists()
33-
def xmlP2 = new groovy.util.XmlSlurper().parse(p2)
33+
def xmlP2 = new groovy.xml.XmlSlurper().parse(p2)
3434
assert xmlP2.name() == 'blueprint'
3535
assert xmlP2.'@default-activation' == 'eager'
3636
assert xmlP2.'@default-availability' == 'optional'

blueprint/plugin/blueprint-maven-plugin-itest/src/it/pax-cdi/verify.groovy

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
def file = new File(basedir, 'target/generated-sources/blueprint/OSGI-INF/blueprint/autowire.xml')
2121
assert file.exists()
22-
def xml = new groovy.util.XmlSlurper().parse(file)
22+
def xml = new groovy.xml.XmlSlurper().parse(file)
2323
assert xml.name() == 'blueprint'
2424
assert xml.bean.find{ it.@class == 'p1.T1'}.@id == 't1'
2525
assert xml.bean.find{ it.@class == 'p1.T1'}.argument.@ref == 'i2-a1234'

blueprint/plugin/blueprint-maven-plugin-itest/src/it/produced-bean-by-method-name/verify.groovy

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
def file = new File(basedir, 'target/generated-sources/blueprint/OSGI-INF/blueprint/autowire.xml')
2121
assert file.exists()
22-
def xml = new groovy.util.XmlSlurper().parse(file)
22+
def xml = new groovy.xml.XmlSlurper().parse(file)
2323
assert xml.name() == 'blueprint'
2424
assert xml.bean.find{ it.@class == 'p1.T1'}.@id == 't1'
2525
assert xml.bean.find{ it.@id == 'bla1'}.'@class' == 'java.lang.String'

blueprint/plugin/blueprint-maven-plugin-itest/src/it/scanpath-restrict/verify.groovy

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
def file = new File(basedir, 'target/generated-sources/blueprint/OSGI-INF/blueprint/autowire.xml')
2121
assert file.exists()
2222

23-
def xml = new groovy.util.XmlSlurper().parse(file)
23+
def xml = new groovy.xml.XmlSlurper().parse(file)
2424
assert xml.bean.find {it.@class == 'p1.T1'}.size() == 0
2525
assert xml.bean.find {it.@class == 'p2.T2'}.@id == 't2'
2626
assert xml.bean.find {it.@class == 'p2.inner.T3'}.@id == 'test3'

blueprint/plugin/blueprint-maven-plugin-itest/src/it/simple-project/verify.groovy

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
def file = new File(basedir, 'target/generated-sources/blueprint/OSGI-INF/blueprint/autowire.xml')
2121
assert file.exists()
22-
def xml = new groovy.util.XmlSlurper().parse(file)
22+
def xml = new groovy.xml.XmlSlurper().parse(file)
2323
assert xml.name() == 'blueprint'
2424
assert xml.bean.find{ it.@class == 'p1.T1'}.@id == 't1'
2525
assert xml.bean.find{ it.@class == 'p1.T2'}.size() == 0

blueprint/plugin/blueprint-maven-plugin-itest/src/it/spring/verify.groovy

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
def file = new File(basedir, 'target/generated-sources/blueprint/custom/my/blueprint.xml')
2121
assert file.exists()
22-
def xml = new groovy.util.XmlSlurper().parse(file)
22+
def xml = new groovy.xml.XmlSlurper().parse(file)
2323
assert xml.name() == 'blueprint'
2424
assert xml.bean.find {it.@id == 't1'}.@class == 'p1.T1'
2525
assert xml.bean.find {it.@id == 't2'}.@class == 'p1.T2'

blueprint/plugin/blueprint-maven-plugin-itest/src/it/transaction-annotation/verify.groovy

+3-3
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,17 @@
1919

2020
def fileP1 = new File(basedir, 'target/generated-sources/blueprint/OSGI-INF/blueprint/p1.xml')
2121
assert fileP1.exists()
22-
def xml1 = new groovy.util.XmlSlurper().parse(fileP1)
22+
def xml1 = new groovy.xml.XmlSlurper().parse(fileP1)
2323
assert xml1."enable-annotations".size() == 0
2424
assert xml1.bean.find{ it.@class == 'p1.T1'}.@id == 't1'
2525
assert xml1.bean.transaction.find{ it.name() == 'transaction' }.size() == 1
2626

2727
def fileP2 = new File(basedir, 'target/generated-sources/blueprint/OSGI-INF/blueprint/p2.xml')
2828
assert fileP2.exists()
29-
def xml2 = new groovy.util.XmlSlurper().parse(fileP2)
29+
def xml2 = new groovy.xml.XmlSlurper().parse(fileP2)
3030
assert xml2."enable-annotations".size() == 1
3131

3232
def fileP3 = new File(basedir, 'target/generated-sources/blueprint/OSGI-INF/blueprint/p3.xml')
3333
assert fileP3.exists()
34-
def xml3 = new groovy.util.XmlSlurper().parse(fileP3)
34+
def xml3 = new groovy.xml.XmlSlurper().parse(fileP3)
3535
assert xml3."enable-annotations".size() == 0

blueprint/plugin/blueprint-maven-plugin-itest/src/it/with-provide/verify.groovy

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
def file = new File(basedir, 'a/target/classes/custom/my/blueprint.xml')
2121
assert file.exists()
22-
def xml = new groovy.util.XmlSlurper().parse(file)
22+
def xml = new groovy.xml.XmlSlurper().parse(file)
2323
assert xml.name() == 'blueprint'
2424
assert xml.bean.@class == 'a.A'
2525
assert xml.bean.@id == 'a'

blueprint/plugin/blueprint-maven-plugin-pax-cdi-handlers/pom.xml

+4-29
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@
2222
<modelVersion>4.0.0</modelVersion>
2323

2424
<parent>
25-
<groupId>org.apache.aries.blueprint</groupId>
26-
<artifactId>blueprint-parent</artifactId>
27-
<version>1.0.0</version>
28-
<relativePath>../../blueprint-parent/pom.xml</relativePath>
25+
<groupId>org.apache.aries</groupId>
26+
<artifactId>parent</artifactId>
27+
<version>2.1.2-SNAPSHOT</version>
28+
<relativePath>../../../parent/pom.xml</relativePath>
2929
</parent>
3030

3131
<groupId>org.apache.aries.blueprint</groupId>
@@ -34,42 +34,17 @@
3434
<name>Apache Aries Blueprint Maven Plugin Pax Cdi Handlers</name>
3535

3636
<properties>
37-
<java.target.version>1.7</java.target.version>
38-
<java.source.version>1.7</java.source.version>
39-
4037
<blueprint-maven-plugin-spi.version>1.0.0</blueprint-maven-plugin-spi.version>
4138
<guava.version>19.0</guava.version>
4239
<pax-cdi-api.version>0.8.0</pax-cdi-api.version>
4340
</properties>
4441

45-
<profiles>
46-
<profile>
47-
<id>dev</id>
48-
<properties>
49-
<blueprint-maven-plugin-spi.version>${blueprint-maven-plugin-spi.dev-version}</blueprint-maven-plugin-spi.version>
50-
</properties>
51-
</profile>
52-
</profiles>
53-
5442
<scm>
5543
<connection>scm:git:https://gitbox.apache.org/repos/asf/aries.git</connection>
5644
<developerConnection>scm:git:https://gitbox.apache.org/repos/asf/aries.git</developerConnection>
5745
<url>https://gitbox.apache.org/repos/asf?p=aries.git;a=summary</url>
5846
</scm>
5947

60-
<build>
61-
<plugins>
62-
<plugin>
63-
<artifactId>maven-compiler-plugin</artifactId>
64-
<configuration>
65-
<target>${java.target.version}</target>
66-
<source>${java.source.version}</source>
67-
</configuration>
68-
</plugin>
69-
</plugins>
70-
</build>
71-
72-
7348
<dependencies>
7449
<dependency>
7550
<groupId>org.apache.aries.blueprint</groupId>

blueprint/plugin/blueprint-maven-plugin-spi/pom.xml

+4-22
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@
2222
<modelVersion>4.0.0</modelVersion>
2323

2424
<parent>
25-
<groupId>org.apache.aries.blueprint</groupId>
26-
<artifactId>blueprint-parent</artifactId>
27-
<version>1.0.0</version>
28-
<relativePath>../../blueprint-parent/pom.xml</relativePath>
25+
<groupId>org.apache.aries</groupId>
26+
<artifactId>parent</artifactId>
27+
<version>2.1.2-SNAPSHOT</version>
28+
<relativePath>../../../parent/pom.xml</relativePath>
2929
</parent>
3030

3131
<groupId>org.apache.aries.blueprint</groupId>
@@ -38,22 +38,4 @@
3838
<developerConnection>scm:git:https://gitbox.apache.org/repos/asf/aries.git</developerConnection>
3939
<url>https://gitbox.apache.org/repos/asf?p=aries.git;a=summary</url>
4040
</scm>
41-
42-
<properties>
43-
<java.target.version>1.7</java.target.version>
44-
<java.source.version>1.7</java.source.version>
45-
</properties>
46-
47-
<build>
48-
<plugins>
49-
<plugin>
50-
<artifactId>maven-compiler-plugin</artifactId>
51-
<configuration>
52-
<target>${java.target.version}</target>
53-
<source>${java.source.version}</source>
54-
</configuration>
55-
</plugin>
56-
</plugins>
57-
</build>
58-
5941
</project>

0 commit comments

Comments
 (0)