Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot run verify twice without clean - build complains about split packages #245

Open
aalmiray opened this issue Mar 23, 2024 · 4 comments

Comments

@aalmiray
Copy link
Contributor

aalmiray commented Mar 23, 2024

With v1.2.0 one cannot run mvn verify && mvn verify as the Hibernate Validator example complains about split packages. This may be a configuration issue. @antoinesd did you notice something like this?

[INFO] --- moditect:1.3.0-SNAPSHOT:add-module-info (add-module-info-to-dependencies) @ moditect-integrationtest-vertx ---
[INFO] Running jdeps --generate-module-info /Users/aalmiray/dev/github/moditect/integrationtest/vert.x/target/moditect --module-path /Users/aalmiray/dev/github/moditect/integrationtest/vert.x/target/modules --ignore-missing-deps /Users/aalmiray/.m2/repository/com/fasterxml/jackson/core/jackson-core/2.9.0/jackson-core-2.9.0.jar
[WARNING] split package: com.fasterxml.jackson.core file:///Users/aalmiray/dev/github/moditect/integrationtest/vert.x/target/modules/jackson-core-2.9.0.jar /Users/aalmiray/.m2/repository/com/fasterxml/jackson/core/jackson-core/2.9.0/jackson-core-2.9.0.jar
[WARNING] split package: com.fasterxml.jackson.core.async file:///Users/aalmiray/dev/github/moditect/integrationtest/vert.x/target/modules/jackson-core-2.9.0.jar /Users/aalmiray/.m2/repository/com/fasterxml/jackson/core/jackson-core/2.9.0/jackson-core-2.9.0.jar
[WARNING] split package: com.fasterxml.jackson.core.base file:///Users/aalmiray/dev/github/moditect/integrationtest/vert.x/target/modules/jackson-core-2.9.0.jar /Users/aalmiray/.m2/repository/com/fasterxml/jackson/core/jackson-core/2.9.0/jackson-core-2.9.0.jar
[WARNING] split package: com.fasterxml.jackson.core.filter file:///Users/aalmiray/dev/github/moditect/integrationtest/vert.x/target/modules/jackson-core-2.9.0.jar /Users/aalmiray/.m2/repository/com/fasterxml/jackson/core/jackson-core/2.9.0/jackson-core-2.9.0.jar
[WARNING] split package: com.fasterxml.jackson.core.format file:///Users/aalmiray/dev/github/moditect/integrationtest/vert.x/target/modules/jackson-core-2.9.0.jar /Users/aalmiray/.m2/repository/com/fasterxml/jackson/core/jackson-core/2.9.0/jackson-core-2.9.0.jar
[WARNING] split package: com.fasterxml.jackson.core.io file:///Users/aalmiray/dev/github/moditect/integrationtest/vert.x/target/modules/jackson-core-2.9.0.jar /Users/aalmiray/.m2/repository/com/fasterxml/jackson/core/jackson-core/2.9.0/jackson-core-2.9.0.jar
[WARNING] split package: com.fasterxml.jackson.core.json file:///Users/aalmiray/dev/github/moditect/integrationtest/vert.x/target/modules/jackson-core-2.9.0.jar /Users/aalmiray/.m2/repository/com/fasterxml/jackson/core/jackson-core/2.9.0/jackson-core-2.9.0.jar
[WARNING] split package: com.fasterxml.jackson.core.json.async file:///Users/aalmiray/dev/github/moditect/integrationtest/vert.x/target/modules/jackson-core-2.9.0.jar /Users/aalmiray/.m2/repository/com/fasterxml/jackson/core/jackson-core/2.9.0/jackson-core-2.9.0.jar
[WARNING] split package: com.fasterxml.jackson.core.sym file:///Users/aalmiray/dev/github/moditect/integrationtest/vert.x/target/modules/jackson-core-2.9.0.jar /Users/aalmiray/.m2/repository/com/fasterxml/jackson/core/jackson-core/2.9.0/jackson-core-2.9.0.jar
[WARNING] split package: com.fasterxml.jackson.core.type file:///Users/aalmiray/dev/github/moditect/integrationtest/vert.x/target/modules/jackson-core-2.9.0.jar /Users/aalmiray/.m2/repository/com/fasterxml/jackson/core/jackson-core/2.9.0/jackson-core-2.9.0.jar
[WARNING] split package: com.fasterxml.jackson.core.util file:///Users/aalmiray/dev/github/moditect/integrationtest/vert.x/target/modules/jackson-core-2.9.0.jar /Users/aalmiray/.m2/repository/com/fasterxml/jackson/core/jackson-core/2.9.0/jackson-core-2.9.0.jar
writing to /Users/aalmiray/dev/github/moditect/integrationtest/vert.x/target/moditect/jackson.core/module-info.java
@antoinesd
Copy link
Contributor

Well, without clean phase I got the same warnings but more than that, the build fails with:

[ERROR] Failed to execute goal org.moditect:moditect-maven-plugin:1.3.0-SNAPSHOT:add-module-info (add-module-info-to-dependencies) on project moditect-integrationtest-hibernate-validator: Execution add-module-info-to-dependencies of goal org.moditect:moditect-maven-plugin:1.3.0-SNAPSHOT:add-module-info failed: Couldn't copy JAR file: /Users/antoine/dev/moditect/integrationtest/hibernate-validator/target/modules/joda-time-2.12.7.jar

Seems that moditect plugin can't replace existing jar in my temp module file...
I will look in split warnings . Question is: what config flag makes the module looks in maven local repo and the temp module directory?

@aalmiray
Copy link
Contributor Author

The error when copying the JAR is fixed with PR #246 which is still in review.

@antoinesd
Copy link
Contributor

Yes I saw that error for jar copying was fixed after my comment.
Regarding the split package warning pb is that jdeps uses working module directory and local maven repo path as module path at the same time. When the same jar is in the working directory and local repo path, it should ignore one of them....

@aalmiray
Copy link
Contributor Author

@antoinesd PR #246 has been merged. Please rebase and try again with your branch to see if the problem when copying the JAR has indeed gone away. Duplicate modules will likely still remain. I believe the cause is in the configuration and copying of dependencies to a given location.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants