[ANN] Apache Maven Reporting API 3.1.1 released

2022-07-31 Thread Michael Osipov
The Apache Maven team is pleased to announce the release of the Maven 
Reporting API version 3.1.1.


https://maven.apache.org/shared/maven-reporting-api/


Release Notes - Maven Shared Components - Version maven-reporting-api-3.1.1

** Task
* [MSHARED-1118] - Restore binary compat for MavenReport (partially 
revert MSHARED-1024)



Enjoy,

-The Apache Maven team

-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



Re: testCompile with multiReleaseOutput main classes

2022-07-31 Thread Stanimir Stamenkov

Sat, 23 Jul 2022 19:28:50 +0300, /Stanimir Stamenkov/:

I want to produce a Java 8 compatible library that provides some Java 9+ 
classes, packaged as a Multi-Release JAR:


  * https://maven.apache.org/plugins/maven-compiler-plugin/multirelease.html


O.k.  From the very same page:


*Challenges*

  * The Multi-Release: true attribute is only recognized when the 
classes are in a jar. In other words, you cannot test the classes put in 
target/classes/META-INF/versions/${release}/.


I may try adding target/classes/META-INF/versions/${release}/ as a 
test-resource directory using the build-helper-maven-plugin and see how 
far I could get it.


I've taken a slimmed down _Multi-Release Parent_ 
 approach, and 
the main compilation and packaging seems just right:


The following may be of use to someone.  I've noticed the following 
shortcoming with the original configuration suggested in the given 
approach – the sources JAR and javadoc don't include the extra source 
compiled.  I've used the build-helper-maven-plugin [1] to add 
src/main/java9/ as source directory and adjusted the default-compile 
execution similarly to compile only the main sources:




default-compile

${base.java.version}


${project.build.sourceDirectory}





See: https://github.com/stanio/xbrz-java/commit/61b352e94

Also, I had to fix the javadoc tool version > base.java.version (which 
is fine):


  * https://github.com/stanio/xbrz-java/blob/da1264fbd/pom.xml#L131-L135


     
     maven-compiler-plugin
     3.10.1
     
     8
     8
     
     
     
     compile-java9
     compile
     
     compile
     
     
     9
     
     9
     
     
     
${project.basedir}/src/main/java9
     
     true
     
     
     
     
     
     maven-jar-plugin
     3.2.2
     
     
     
     true
     
     
     
     

Now I've added some test sources exercising the Java 9+ only classes, 
but the `testCompile` goal seems unable to find them.  Is it possible to 
configure the `default-testCompile` execution to see the classes from 
the `multiReleaseOutput` of the main compile?


[1] https://www.mojohaus.org/build-helper-maven-plugin/

--
Stanimir

Remove .INVALID from my address to reply directly to me, but it is 
probably best to reply just to the mailinig list.


-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



Re: Class defined on module path not found when running integration tests

2022-07-31 Thread Mantas Gridinas
I remember encountering something similar when I started out using modules.
Basically the error message claiming that class is not found is a bit
misleading because what it really means is "class failed to load". One of
the causes of such failures is improper configuration of one of that class
dependencies (atleast when i encountered it, hibernate validation config
was broken so it would error out).

As delany suggested, try running in classpath mode to figure out the error.
I do not understand why, but module system insists on swallowing the real
cause. If possible, it would be great to produce a minimum working sample
and report it to openjdk team because this is a serious issue with the
module system.

In my case I would introduce unnamed module as a dependency to my actual
modules, so that might have been the issue.


On Sun, Jul 31, 2022, 11:58 Delany  wrote:

> Can you try running it directly without maven/failsafe
> Use
>
> https://maven.apache.org/plugins/maven-dependency-plugin/usage.html#dependency:build-classpath
> Delany
>
> On Sun, 31 Jul 2022 at 08:11, Ryan Lubke  wrote:
>
> > Hey Folks,
> >
> > I’ve been looking into this issue for a couple of days now and have run
> > out of ideas.
> >
> > Maven Version:3.8.5
> > Maven Failsafe Version: 3.0.0-M7
> > Java Version:17.0.4
> > OS: MacOS   12.5/Apple Silicon
> >
> > The test compiles fine using the module path.
> > When running my test, however, I receive a failure stating that class
> > jakarta.annotation.Priority is not found.
> >
> > However, looking at the dependencies:
> >
> > <~/f/c/d/p/j/p/t/f/rest>-> mvn dependency:list -o | ag annotation
> > [INFO]jakarta.annotation:jakarta.annotation-api:jar:2.0.0:compile
> >
> > The jar is certainly there.  If I look at the failsafe generated XML, the
> > jar is present on the module path from the test run:
> >
> >  >
> value=“...:/Users/me/.m2/repository/jakarta/annotation/jakarta.annotation-api/2.0.0/jakarta.annotation-api-2.0.0.jar:…”/>
> >
> > Looking at the JAR itself, the class there"
> >
> > <~/f/c/d/p/j/p/t/f/r/t/failsafe-reports>-> jar tvf
> >
> /Users/me/.m2/repository/jakarta/annotation/jakarta.annotation-api/2.0.0/jakarta.annotation-api-2.0.0.jar
> > | ag Priority
> >457 Mon Oct 12 14:06:30 PDT 2020 jakarta/annotation/Priority.class
> > <~/f/c/d/p/j/p/t/f/r/t/failsafe-reports>->
> >
> > As the dependency is transitive, I’ve also tried adding a direct
> > dependency within the test module instead, but the result is the same.
> >
> > Not sure how to debug this further, thus my asking here.
> >
> > Any suggestions?
> >
> > Thanks,
> > -rl
> >
> >
> >
> > -
> > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> > For additional commands, e-mail: users-h...@maven.apache.org
> >
> >
>


Re: Class defined on module path not found when running integration tests

2022-07-31 Thread Delany
Can you try running it directly without maven/failsafe
Use
https://maven.apache.org/plugins/maven-dependency-plugin/usage.html#dependency:build-classpath
Delany

On Sun, 31 Jul 2022 at 08:11, Ryan Lubke  wrote:

> Hey Folks,
>
> I’ve been looking into this issue for a couple of days now and have run
> out of ideas.
>
> Maven Version:3.8.5
> Maven Failsafe Version: 3.0.0-M7
> Java Version:17.0.4
> OS: MacOS   12.5/Apple Silicon
>
> The test compiles fine using the module path.
> When running my test, however, I receive a failure stating that class
> jakarta.annotation.Priority is not found.
>
> However, looking at the dependencies:
>
> <~/f/c/d/p/j/p/t/f/rest>-> mvn dependency:list -o | ag annotation
> [INFO]jakarta.annotation:jakarta.annotation-api:jar:2.0.0:compile
>
> The jar is certainly there.  If I look at the failsafe generated XML, the
> jar is present on the module path from the test run:
>
>  value=“...:/Users/me/.m2/repository/jakarta/annotation/jakarta.annotation-api/2.0.0/jakarta.annotation-api-2.0.0.jar:…”/>
>
> Looking at the JAR itself, the class there"
>
> <~/f/c/d/p/j/p/t/f/r/t/failsafe-reports>-> jar tvf
> /Users/me/.m2/repository/jakarta/annotation/jakarta.annotation-api/2.0.0/jakarta.annotation-api-2.0.0.jar
> | ag Priority
>457 Mon Oct 12 14:06:30 PDT 2020 jakarta/annotation/Priority.class
> <~/f/c/d/p/j/p/t/f/r/t/failsafe-reports>->
>
> As the dependency is transitive, I’ve also tried adding a direct
> dependency within the test module instead, but the result is the same.
>
> Not sure how to debug this further, thus my asking here.
>
> Any suggestions?
>
> Thanks,
> -rl
>
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
>
>


Class defined on module path not found when running integration tests

2022-07-31 Thread Ryan Lubke
Hey Folks,

I’ve been looking into this issue for a couple of days now and have run out of 
ideas.

Maven Version:3.8.5
Maven Failsafe Version: 3.0.0-M7
Java Version:17.0.4
OS: MacOS   12.5/Apple Silicon

The test compiles fine using the module path.
When running my test, however, I receive a failure stating that class 
jakarta.annotation.Priority is not found.

However, looking at the dependencies:

<~/f/c/d/p/j/p/t/f/rest>-> mvn dependency:list -o | ag annotation
[INFO]jakarta.annotation:jakarta.annotation-api:jar:2.0.0:compile

The jar is certainly there.  If I look at the failsafe generated XML, the jar 
is present on the module path from the test run:



Looking at the JAR itself, the class there"

<~/f/c/d/p/j/p/t/f/r/t/failsafe-reports>-> jar tvf 
/Users/me/.m2/repository/jakarta/annotation/jakarta.annotation-api/2.0.0/jakarta.annotation-api-2.0.0.jar
 | ag Priority
   457 Mon Oct 12 14:06:30 PDT 2020 jakarta/annotation/Priority.class
<~/f/c/d/p/j/p/t/f/r/t/failsafe-reports>->

As the dependency is transitive, I’ve also tried adding a direct dependency 
within the test module instead, but the result is the same.

Not sure how to debug this further, thus my asking here.

Any suggestions?

Thanks,
-rl



-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org