Skip to content

Commit 1aaebd7

Browse files
authored
[MSHADE-301] jdk11 support upgrade asm version 7.0-beta
* [MSHADE-301] add jdk11 to Jenkinsfile build Signed-off-by: olivier lamy <olamy@apache.org> * [MSHADE-301] jdk11 support upgrade asm version 7.0-beta Signed-off-by: olivier lamy <olamy@apache.org>
1 parent fe0729b commit 1aaebd7

File tree

8 files changed

+216
-7
lines changed

8 files changed

+216
-7
lines changed

Jenkinsfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@
1717
* under the License.
1818
*/
1919

20-
asfMavenTlpPlgnBuild()
20+
asfMavenTlpPlgnBuild(jdk:['7','8','9','10','11'])

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868
<mavenVersion>3.0</mavenVersion>
6969
<javaVersion>7</javaVersion>
7070
<currentVersion>${project.version}</currentVersion>
71-
<asmVersion>6.2.1</asmVersion>
71+
<asmVersion>7.0-beta</asmVersion>
7272
</properties>
7373

7474
<contributors>

src/it/shading-with-java-10-sources/pom.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ under the License.
4444
<plugins>
4545
<plugin>
4646
<artifactId>maven-compiler-plugin</artifactId>
47-
<version>3.7.0</version>
47+
<version>3.8.0</version>
4848
<configuration>
4949
<release>10</release>
5050
</configuration>
@@ -98,10 +98,10 @@ under the License.
9898
<goal>exec</goal>
9999
</goals>
100100
<configuration>
101-
<executable>java</executable>
101+
<executable>${java.home}/bin/java</executable>
102102
<arguments>
103103
<argument>-classpath</argument>
104-
<argument>${project.build.directory}/shading-with-java-10-sources-1.0-SNAPSHOT-shaded.jar </argument>
104+
<argument>${project.build.directory}/shading-with-java-10-sources-1.0-SNAPSHOT-shaded.jar</argument>
105105
<argument>hidden.App</argument>
106106
</arguments>
107107
</configuration>
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
18+
invoker.java.version = 11+
19+
invoker.goals=clean verify
Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
3+
<!--
4+
Licensed to the Apache Software Foundation (ASF) under one
5+
or more contributor license agreements. See the NOTICE file
6+
distributed with this work for additional information
7+
regarding copyright ownership. The ASF licenses this file
8+
to you under the Apache License, Version 2.0 (the
9+
"License"); you may not use this file except in compliance
10+
with the License. You may obtain a copy of the License at
11+
12+
http://www.apache.org/licenses/LICENSE-2.0
13+
14+
Unless required by applicable law or agreed to in writing,
15+
software distributed under the License is distributed on an
16+
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17+
KIND, either express or implied. See the License for the
18+
specific language governing permissions and limitations
19+
under the License.
20+
-->
21+
22+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
23+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
24+
<modelVersion>4.0.0</modelVersion>
25+
26+
<groupId>org.apache.maven.plugins.shade.its</groupId>
27+
<artifactId>shading-with-java-11-sources</artifactId>
28+
<version>1.0-SNAPSHOT</version>
29+
30+
<name>users-shader-impl</name>
31+
32+
33+
<dependencies>
34+
<dependency>
35+
<groupId>junit</groupId>
36+
<artifactId>junit</artifactId>
37+
<version>4.7</version>
38+
<scope>test</scope>
39+
</dependency>
40+
</dependencies>
41+
42+
<build>
43+
<pluginManagement>
44+
<plugins>
45+
<plugin>
46+
<artifactId>maven-compiler-plugin</artifactId>
47+
<version>3.8.0</version>
48+
<configuration>
49+
<source>11</source>
50+
<target>11</target>
51+
<release>11</release>
52+
</configuration>
53+
</plugin>
54+
</plugins>
55+
</pluginManagement>
56+
<plugins>
57+
<plugin>
58+
<groupId>org.apache.maven.plugins</groupId>
59+
<artifactId>maven-shade-plugin</artifactId>
60+
<version>@project.version@</version>
61+
<dependencies>
62+
<dependency>
63+
<groupId>org.apache.maven.plugins</groupId>
64+
<artifactId>maven-shade-plugin</artifactId>
65+
<version>@project.version@</version>
66+
<classifier>tests</classifier>
67+
</dependency>
68+
</dependencies>
69+
<executions>
70+
<execution>
71+
<id>create-shaded-artifact</id>
72+
<phase>package</phase>
73+
<goals>
74+
<goal>shade</goal>
75+
</goals>
76+
<configuration>
77+
<shadedArtifactAttached>true</shadedArtifactAttached>
78+
<shadedClassifierName>shaded</shadedClassifierName>
79+
<createDependencyReducedPom>false</createDependencyReducedPom>
80+
<relocations>
81+
<relocation>
82+
<pattern>org.apache.maven.plugins.shade.its</pattern>
83+
<shadedPattern>hidden</shadedPattern>
84+
</relocation>
85+
</relocations>
86+
</configuration>
87+
</execution>
88+
</executions>
89+
</plugin>
90+
91+
<plugin>
92+
<groupId>org.codehaus.mojo</groupId>
93+
<artifactId>exec-maven-plugin</artifactId>
94+
<version>1.6.0</version>
95+
<executions>
96+
<execution>
97+
<id>run</id>
98+
<phase>verify</phase>
99+
<goals>
100+
<goal>exec</goal>
101+
</goals>
102+
<configuration>
103+
<executable>${java.home}/bin/java</executable>
104+
<arguments>
105+
<argument>-classpath</argument>
106+
<argument>${project.build.directory}/shading-with-java-11-sources-1.0-SNAPSHOT-shaded.jar</argument>
107+
<argument>hidden.App</argument>
108+
</arguments>
109+
</configuration>
110+
</execution>
111+
</executions>
112+
</plugin>
113+
114+
</plugins>
115+
</build>
116+
</project>
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
package org.apache.maven.plugins.shade.its;
2+
3+
/*
4+
* Licensed to the Apache Software Foundation (ASF) under one
5+
* or more contributor license agreements. See the NOTICE file
6+
* distributed with this work for additional information
7+
* regarding copyright ownership. The ASF licenses this file
8+
* to you under the Apache License, Version 2.0 (the
9+
* "License"); you may not use this file except in compliance
10+
* with the License. You may obtain a copy of the License at
11+
*
12+
* http://www.apache.org/licenses/LICENSE-2.0
13+
*
14+
* Unless required by applicable law or agreed to in writing,
15+
* software distributed under the License is distributed on an
16+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17+
* KIND, either express or implied. See the License for the
18+
* specific language governing permissions and limitations
19+
* under the License.
20+
*/
21+
22+
23+
/**
24+
* Hello world!
25+
*/
26+
public class App
27+
{
28+
public static void main( String[] args )
29+
{
30+
System.out.println( "=== RunnableTest ===" );
31+
32+
// Anonymous Runnable
33+
Runnable r1 = new Runnable()
34+
{
35+
36+
@Override
37+
public void run()
38+
{
39+
System.out.println( "Hello world one!" );
40+
}
41+
};
42+
43+
// Lambda Runnable
44+
Runnable r2 = () -> System.out.println( "Hello world two!" );
45+
46+
// Run em!
47+
r1.run();
48+
r2.run();
49+
}
50+
}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
/*
2+
* Licensed to the Apache Software Foundation (ASF) under one
3+
* or more contributor license agreements. See the NOTICE file
4+
* distributed with this work for additional information
5+
* regarding copyright ownership. The ASF licenses this file
6+
* to you under the Apache License, Version 2.0 (the
7+
* "License"); you may not use this file except in compliance
8+
* with the License. You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing,
13+
* software distributed under the License is distributed on an
14+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
* KIND, either express or implied. See the License for the
16+
* specific language governing permissions and limitations
17+
* under the License.
18+
*/
19+
assert new File(basedir, 'build.log').exists();
20+
21+
content = new File(basedir, 'build.log').text;
22+
assert content.contains( '=== RunnableTest ===');
23+
assert content.contains( 'Hello world one!');
24+
assert content.contains( 'Hello world two!');

src/it/shading-with-java-8-sources/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,10 +98,10 @@ under the License.
9898
<goal>exec</goal>
9999
</goals>
100100
<configuration>
101-
<executable>java</executable>
101+
<executable>${java.home}/bin/java</executable>
102102
<arguments>
103103
<argument>-classpath</argument>
104-
<argument>${project.build.directory}/shading-with-java-8-sources-1.0-SNAPSHOT-shaded.jar </argument>
104+
<argument>${project.build.directory}/shading-with-java-8-sources-1.0-SNAPSHOT-shaded.jar</argument>
105105
<argument>hidden.App</argument>
106106
</arguments>
107107
</configuration>

0 commit comments

Comments
 (0)