There is definitely something I don't understand with this configuration:
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<dependencies>
<dependency>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire-shadefire</artifactId>
<version>2.12.4</version> <!-- ${shadedVersion}, but resolved due to
https://issues.apache.org/jira/browse/MRELEASE-799 -->
</dependency>
<dependency>
<!-- todo remove in version 3.0. Hack only forces to download it into
an empty local repo. -->
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.7</version>
</dependency>
</dependencies>
<configuration>
<includes>
<include>**/JUnit4SuiteTest.java</include>
</includes>
<!--todo in version 3.0 remove old commons-lang3 and use 3.7+ -->
<classpathDependencyExcludes>
<classpathDependencyExclude>org.apache.commons:commons-lang3</
classpathDependencyExclude>
</classpathDependencyExcludes>
<additionalClasspathElements>
<additionalClasspathElement>${maven.repo.local}/org/apache/
commons/commons-lang3/3.7/commons-lang3-3.7.jar</additionalClasspathElement>
</additionalClasspathElements>
</configuration>
you don't need this hack to force download (commons-lang3 is a project
dependency so it will be downloaded.
Then you use classpathDependencyExcludes and additionalClasspathElements
for the same artifact
AFICS PpidChecker or SystemUtils use it.
Please can you explain?
On 18 February 2018 at 13:58, Olivier Lamy <[email protected]> wrote:
> locally
>
> mvn clean install
> -Djdk.home=/Library/Java/JavaVirtualMachines/jdk-10.jdk/Contents/Home
> -Djacoco.skip=true
>
> Caused by: java.lang.ClassNotFoundException: org.apache.commons.lang3.
> SystemUtils
>
> at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:466)
>
> at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:566)
>
> at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:499)
>
> at org.apache.maven.surefire.shadefire.booter.
> IsolatedClassLoader.loadClass(IsolatedClassLoader.java:97)
>
> ... 44 more
>
> Caused by: java.lang.ClassNotFoundException: org.apache.commons.lang3.
> SystemUtils
>
> at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:466)
>
> at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:566)
>
> at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:499)
>
> at org.apache.maven.surefire.shadefire.booter.
> IsolatedClassLoader.loadClass(IsolatedClassLoader.java:97)
>
>
>
>
> On 18 February 2018 at 13:44, Tibor Digana <[email protected]> wrote:
>
>> The Jenkins CI was shutdown for several hours. So the HEAD was not taken.
>> I can trigger the build manually.
>>
>> Cheers
>> Tibor
>>
>> On Sun, Feb 18, 2018 at 4:39 AM, Tibor Digana <[email protected]>
>> wrote:
>>
>> > I will explain again everything.
>> > Do not worry, please.
>> >
>> > The build won't fail if you use -Djdk.home=/path/to/jdk. We don't have
>> to
>> > force the users to change JDK if they are fine with 1.6.
>> > The library commons-lang3:3.7 was especially needed during our testing
>> but
>> > not in the main code, therefore Java 1.6 is still fine for this plugin
>> > because the "os.version" is not read from this library.
>> > It is also written in README.md on how to build the project. It is also
>> > safe for release plugin.
>> > The Jenkins CI passed: https://builds.apache.org/job/
>> > maven-wip/job/maven-surefire/job/SUREFIRE-1463/
>> > The information in master is old one - not related to current HEAD on
>> > master.
>> > The reason is that the libraries can still use javac compiler with
>> > "-source 1.6" but the integration tests are important, not the compiler.
>> > Did you see this job?
>> > https://builds.apache.org/job/maven-wip/job/maven-surefire/
>> > job/SUREFIRE-1463/
>> >
>> > Cheers
>> > Tibor
>> >
>> >
>> > On Sun, Feb 18, 2018 at 4:24 AM, Olivier Lamy <[email protected]> wrote:
>> >
>> >> and now master fail again with jdk10...
>> >> Why are you reverting my changes?
>> >> As said in an email I wanted to have something working with jdk10.
>> >> So please first discuss on the email thread if you are not happy with
>> my
>> >> changes...
>> >>
>> >>
>> >> On 18 February 2018 at 10:36, <[email protected]> wrote:
>> >>
>> >> > Revert "[SUREFIRE-1473] upgrade commons-lang3 to avoid NPE on jdk10"
>> >> >
>> >> > This reverts commit 8bcf1f14a8697ef3359d7598fbd8062a687f2d5a.
>> >> >
>> >> >
>> >> > Project: http://git-wip-us.apache.org/repos/asf/maven-surefire/repo
>> >> > Commit: http://git-wip-us.apache.org/repos/asf/maven-surefire/
>> >> > commit/5e732c6b
>> >> > Tree: http://git-wip-us.apache.org/repos/asf/maven-surefire/tree/5
>> >> e732c6b
>> >> > Diff: http://git-wip-us.apache.org/repos/asf/maven-surefire/diff/5
>> >> e732c6b
>> >> >
>> >> > Branch: refs/heads/master
>> >> > Commit: 5e732c6b2a87026ac56032cc8b2b7e8e92e6aa7e
>> >> > Parents: 3c41c55
>> >> > Author: Tibor17 <[email protected]>
>> >> > Authored: Sun Feb 18 00:13:42 2018 +0100
>> >> > Committer: Tibor17 <[email protected]>
>> >> > Committed: Sun Feb 18 00:13:42 2018 +0100
>> >> >
>> >> > ------------------------------------------------------------
>> ----------
>> >> > pom.xml | 2 +-
>> >> > 1 file changed, 1 insertion(+), 1 deletion(-)
>> >> > ------------------------------------------------------------
>> ----------
>> >> >
>> >> >
>> >> > http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/
>> >> > 5e732c6b/pom.xml
>> >> > ------------------------------------------------------------
>> ----------
>> >> > diff --git a/pom.xml b/pom.xml
>> >> > index 2bcb0d7..3592b31 100644
>> >> > --- a/pom.xml
>> >> > +++ b/pom.xml
>> >> > @@ -89,7 +89,7 @@
>> >> > <mavenVersion>2.2.1</mavenVersion>
>> >> > <!-- <shadedVersion>2.12.4</shadedVersion> commented out due to
>> >> > https://issues.apache.org/jira/browse/MRELEASE-799 -->
>> >> > <mavenPluginPluginVersion>3.5</mavenPluginPluginVersion>
>> >> > - <commonsLang3Version>3.7</commonsLang3Version>
>> >> > + <commonsLang3Version>3.5</commonsLang3Version>
>> >> > <commonsIoVersion>2.5</commonsIoVersion>
>> >> > <mavenSharedUtilsVersion>0.9</mavenSharedUtilsVersion>
>> >> > <powermockVersion>2.0.0-beta.5</powermockVersion>
>> >> >
>> >> >
>> >>
>> >>
>> >> --
>> >> Olivier Lamy
>> >> http://twitter.com/olamy | http://linkedin.com/in/olamy
>> >>
>> >
>> >
>>
>
>
>
> --
> Olivier Lamy
> http://twitter.com/olamy | http://linkedin.com/in/olamy
>
--
Olivier Lamy
http://twitter.com/olamy | http://linkedin.com/in/olamy