[ 
https://issues.apache.org/jira/browse/COMMONSSITE-166?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17748797#comment-17748797
 ] 

Alex Herbert commented on COMMONSSITE-166:
------------------------------------------

The docs modules in these projects have the <packaging> type set to jar. This 
is required for the project to act as an aggregator project for the javadoc 
tool. However there is no source code in the module and thus no output jar.

The moditect plugin is trying to add information to the non-existent output 
jar. I would say this is a bug in the moditect plugin. It should gracefully 
fail, or at least provide the option to gracefully fail, if it has nothing to 
do.

I see that CP activates the moditect plugin if the JDK is 9+. So a build on JDK 
8 should be fine, which I confirm does work.

To get the module to build would require a moditect skip flag. The only docs I 
can find for it are [the GH homepage|https://github.com/moditect/moditect]. A 
skip flag is not mentioned. I downloaded the source code and there is a 
moditect.skip property set to false by default. I used:
{code:java}
mvn -Dmoditect.skip
{code}
This allowed the docs module to build under JDK 11+. To proceed with updating 
to CP 59 in these projects would require adding the skip property to the 
special aggregator modules for the docs.

 

> CP 59 breaks the build
> ----------------------
>
>                 Key: COMMONSSITE-166
>                 URL: https://issues.apache.org/jira/browse/COMMONSSITE-166
>             Project: Apache Commons All
>          Issue Type: Bug
>          Components: Commons Parent Pom
>            Reporter: Gilles Sadowski
>            Priority: Major
>
> Running (default goal) in the "Commons Math" project:
> {noformat}
> $ mvn
> [...]
> [INFO] Apache Commons Math ................................ SUCCESS [  6.032 
> s]
> [INFO] Miscellaneous core classes ......................... SUCCESS [ 13.118 
> s]
> [INFO] Artificial neural networks ......................... SUCCESS [  6.032 
> s]
> [INFO] Transforms ......................................... SUCCESS [  4.970 
> s]
> [INFO] Exception classes (Legacy) ......................... SUCCESS [  5.137 
> s]
> [INFO] Miscellaneous core classes (Legacy) ................ SUCCESS [ 13.605 
> s]
> [INFO] Apache Commons Math (Legacy) ....................... SUCCESS [01:19 
> min]
> [INFO] Apache Commons Math Documentation .................. FAILURE [  0.311 
> s]
> [INFO] Example applications ............................... SKIPPED
> [INFO] SOFM ............................................... SKIPPED
> [INFO] SOFM: Chinese Rings ................................ SKIPPED
> [INFO] SOFM: Traveling Salesman Problem ................... SKIPPED
> [INFO] K-Means ............................................ SKIPPED
> [INFO] K-Means: Image Clustering .......................... SKIPPED
> [INFO] 
> ------------------------------------------------------------------------
> [INFO] BUILD FAILURE
> [INFO] 
> ------------------------------------------------------------------------
> [INFO] Total time:  02:08 min
> [INFO] Finished at: 2023-07-29T08:35:27+02:00
> [INFO] 
> ------------------------------------------------------------------------
> [ERROR] Failed to execute goal 
> org.moditect:moditect-maven-plugin:1.0.0.Final:add-module-info 
> (add-module-infos) on project commons-math-docs: Couldn't find file 
> /home/gilles/gilles/devel/java/apache/commons-math/trunk/commons-math-docs/target/commons-math-docs-4.0-SNAPSHOT.jar.
>  Run this goal for the project's JAR only after the maven-jar-plugin. -> 
> [Help 1]
> [...]
> {noformat}
> CP 58 worked fine.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to