Let ITs use java.specification.version as release, so the build will break in case ASM needs to be updated
diff --git a/src/it/mini-jar-jdk11/invoker.properties b/src/it/mini-jar-jdk11+/invoker.properties
similarity index 100%
rename from src/it/mini-jar-jdk11/invoker.properties
rename to src/it/mini-jar-jdk11+/invoker.properties
diff --git a/src/it/mini-jar-jdk11/pom.xml b/src/it/mini-jar-jdk11+/pom.xml
similarity index 91%
rename from src/it/mini-jar-jdk11/pom.xml
rename to src/it/mini-jar-jdk11+/pom.xml
index 1b1db8b..be669d3 100644
--- a/src/it/mini-jar-jdk11/pom.xml
+++ b/src/it/mini-jar-jdk11+/pom.xml
@@ -30,9 +30,8 @@
</parent>
<groupId>org.apache.maven.its.shade.mj</groupId>
- <artifactId>testmini-jdk11</artifactId>
+ <artifactId>testmini</artifactId>
<version>1.0</version>
- <packaging>jar</packaging>
<name>MSHADE-302</name>
<description>
@@ -52,11 +51,9 @@
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
- <version>3.8.0</version>
+ <version>3.8.1</version>
<configuration>
- <source>11</source>
- <target>11</target>
- <release>11</release>
+ <release>${java.specification.version}</release>
</configuration>
</plugin>
<plugin>
diff --git a/src/it/mini-jar-jdk11/src/main/java/Main.java b/src/it/mini-jar-jdk11+/src/main/java/Main.java
similarity index 100%
rename from src/it/mini-jar-jdk11/src/main/java/Main.java
rename to src/it/mini-jar-jdk11+/src/main/java/Main.java
diff --git a/src/it/mini-jar-jdk11/verify.bsh b/src/it/mini-jar-jdk11+/verify.bsh
similarity index 98%
rename from src/it/mini-jar-jdk11/verify.bsh
rename to src/it/mini-jar-jdk11+/verify.bsh
index abd8c66..ea670dd 100644
--- a/src/it/mini-jar-jdk11/verify.bsh
+++ b/src/it/mini-jar-jdk11+/verify.bsh
@@ -33,7 +33,7 @@
"junit/swingui/TestRunner.class",
};
-JarFile jarFile = new JarFile( new File( basedir, "target/testmini-jdk11-1.0.jar" ) );
+JarFile jarFile = new JarFile( new File( basedir, "target/testmini-1.0.jar" ) );
for ( String path : wanted )
{
diff --git a/src/it/shading-with-java-10-sources/pom.xml b/src/it/shading-with-java-10-sources/pom.xml
deleted file mode 100644
index b96ba5e..0000000
--- a/src/it/shading-with-java-10-sources/pom.xml
+++ /dev/null
@@ -1,114 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
-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 WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied. See the License for the
-specific language governing permissions and limitations
-under the License.
--->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
-
- <groupId>org.apache.maven.plugins.shade.its</groupId>
- <artifactId>shading-with-java-10-sources</artifactId>
- <version>1.0-SNAPSHOT</version>
-
- <name>users-shader-impl</name>
-
-
- <dependencies>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>4.7</version>
- <scope>test</scope>
- </dependency>
- </dependencies>
-
- <build>
- <pluginManagement>
- <plugins>
- <plugin>
- <artifactId>maven-compiler-plugin</artifactId>
- <version>3.8.0</version>
- <configuration>
- <release>10</release>
- </configuration>
- </plugin>
- </plugins>
- </pluginManagement>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-shade-plugin</artifactId>
- <version>@project.version@</version>
- <dependencies>
- <dependency>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-shade-plugin</artifactId>
- <version>@project.version@</version>
- <classifier>tests</classifier>
- </dependency>
- </dependencies>
- <executions>
- <execution>
- <id>create-shaded-artifact</id>
- <phase>package</phase>
- <goals>
- <goal>shade</goal>
- </goals>
- <configuration>
- <shadedArtifactAttached>true</shadedArtifactAttached>
- <shadedClassifierName>shaded</shadedClassifierName>
- <createDependencyReducedPom>false</createDependencyReducedPom>
- <relocations>
- <relocation>
- <pattern>org.apache.maven.plugins.shade.its</pattern>
- <shadedPattern>hidden</shadedPattern>
- </relocation>
- </relocations>
- </configuration>
- </execution>
- </executions>
- </plugin>
-
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>exec-maven-plugin</artifactId>
- <version>1.6.0</version>
- <executions>
- <execution>
- <id>run</id>
- <phase>verify</phase>
- <goals>
- <goal>exec</goal>
- </goals>
- <configuration>
- <executable>${java.home}/bin/java</executable>
- <arguments>
- <argument>-classpath</argument>
- <argument>${project.build.directory}/shading-with-java-10-sources-1.0-SNAPSHOT-shaded.jar</argument>
- <argument>hidden.App</argument>
- </arguments>
- </configuration>
- </execution>
- </executions>
- </plugin>
-
- </plugins>
- </build>
-</project>
diff --git a/src/it/shading-with-java-11-sources/invoker.properties b/src/it/shading-with-java-11-sources/invoker.properties
deleted file mode 100644
index eb74a63..0000000
--- a/src/it/shading-with-java-11-sources/invoker.properties
+++ /dev/null
@@ -1,19 +0,0 @@
-# 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 WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-invoker.java.version = 11+
-invoker.goals=clean verify
diff --git a/src/it/shading-with-java-11-sources/src/main/java/org/apache/maven/plugins/shade/its/App.java b/src/it/shading-with-java-11-sources/src/main/java/org/apache/maven/plugins/shade/its/App.java
deleted file mode 100644
index a92156e..0000000
--- a/src/it/shading-with-java-11-sources/src/main/java/org/apache/maven/plugins/shade/its/App.java
+++ /dev/null
@@ -1,50 +0,0 @@
-package org.apache.maven.plugins.shade.its;
-
-/*
- * 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 WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-
-/**
- * Hello world!
- */
-public class App
-{
- public static void main( String[] args )
- {
- System.out.println( "=== RunnableTest ===" );
-
- // Anonymous Runnable
- Runnable r1 = new Runnable()
- {
-
- @Override
- public void run()
- {
- System.out.println( "Hello world one!" );
- }
- };
-
- // Lambda Runnable
- Runnable r2 = () -> System.out.println( "Hello world two!" );
-
- // Run em!
- r1.run();
- r2.run();
- }
-}
diff --git a/src/it/shading-with-java-11-sources/verify.groovy b/src/it/shading-with-java-11-sources/verify.groovy
deleted file mode 100644
index 453e8bd..0000000
--- a/src/it/shading-with-java-11-sources/verify.groovy
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * 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 WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-assert new File(basedir, 'build.log').exists();
-
-content = new File(basedir, 'build.log').text;
-assert content.contains( '=== RunnableTest ===');
-assert content.contains( 'Hello world one!');
-assert content.contains( 'Hello world two!');
diff --git a/src/it/shading-with-java-10-sources/invoker.properties b/src/it/shading-with-release-sources/invoker.properties
similarity index 96%
rename from src/it/shading-with-java-10-sources/invoker.properties
rename to src/it/shading-with-release-sources/invoker.properties
index 24c05c5..01e3ff4 100644
--- a/src/it/shading-with-java-10-sources/invoker.properties
+++ b/src/it/shading-with-release-sources/invoker.properties
@@ -15,5 +15,5 @@
# specific language governing permissions and limitations
# under the License.
-invoker.java.version = 10+
+invoker.java.version = 9+
invoker.goals=clean verify
diff --git a/src/it/shading-with-java-11-sources/pom.xml b/src/it/shading-with-release-sources/pom.xml
similarity index 96%
rename from src/it/shading-with-java-11-sources/pom.xml
rename to src/it/shading-with-release-sources/pom.xml
index 0ea23fe..65b2545 100644
--- a/src/it/shading-with-java-11-sources/pom.xml
+++ b/src/it/shading-with-release-sources/pom.xml
@@ -44,11 +44,9 @@
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
- <version>3.8.0</version>
+ <version>3.8.1</version>
<configuration>
- <source>11</source>
- <target>11</target>
- <release>11</release>
+ <release>${java.specification.version}</release>
</configuration>
</plugin>
</plugins>
diff --git a/src/it/shading-with-java-10-sources/src/main/java/org/apache/maven/plugins/shade/its/App.java b/src/it/shading-with-release-sources/src/main/java/org/apache/maven/plugins/shade/its/App.java
similarity index 100%
rename from src/it/shading-with-java-10-sources/src/main/java/org/apache/maven/plugins/shade/its/App.java
rename to src/it/shading-with-release-sources/src/main/java/org/apache/maven/plugins/shade/its/App.java
diff --git a/src/it/shading-with-java-10-sources/verify.groovy b/src/it/shading-with-release-sources/verify.groovy
similarity index 100%
rename from src/it/shading-with-java-10-sources/verify.groovy
rename to src/it/shading-with-release-sources/verify.groovy