[MEAR-267] - Fixed detection if JAR module is included into classpath of particular EAR module manifest#19
Conversation
717110f to
bb67e63
Compare
…path of particular EAR module manifest
bb67e63 to
968d1f2
Compare
|
Taking into account enhancements in |
|
Hmm... I made one more test: $ git clone --branch MEAR-267_Manifest_classpath_modification https://github.com/mabrarov/MEAR-267-issue-demo.git && \
mvn -q -B -f MEAR-267-issue-demo/pom.xml verify -Dmaven-ear-plugin.version=3.1.1-SNAPSHOT 2>&1 | grep WFLYSRV0059and it demonstrates: that MEAR-267 has multiple root causes and I fixed in this pull request just one of them. In MEAR-267-issue-demo we have skinnyWars option turned off and it looks like this makes Maven EAR Plugin skipping modification of manifest of EJB JAR. |
…try of EAR module manifest
|
I fixed 2nd root cause of MEAR-267 in 89816ae: $ git clone --branch MEAR-267_Manifest_classpath_modification https://github.com/mabrarov/MEAR-267-issue-demo.git && \
mvn -q -B -f MEAR-267-issue-demo/pom.xml verify -Dmaven-ear-plugin.version=3.1.1-SNAPSHOT 2>&1 | grep -c WFLYSRV0059
...
0 |
…nifest has no Class-Path entry
|
I added some integration tests but they do not cover all permutations (i.e. all changed branches) of options like:
|
7c253b8 to
c926ab0
Compare
446206e to
81d28e2
Compare
…ifest entry as used for removal of JAR modules from EAR modules
81d28e2 to
3c34038
Compare
418447d to
b5a54dc
Compare
b5a54dc to
a8e5826
Compare
…matting of JavaDoc, inlined simple single-line code.
# Conflicts: # pom.xml
|
What's pending / required for merging this pull request? |
elharo
left a comment
There was a problem hiding this comment.
Let me push this through Jenkins
Looks like issue of Jenkins with checkout of pull request (https://ci-builds.apache.org/job/Maven/job/maven-box/job/maven-ear-plugin/job/mear-267/1/console): |
elharo
left a comment
There was a problem hiding this comment.
https://ci-builds.apache.org/job/Maven/job/maven-box/job/maven-ear-plugin/job/19/1/testReport/
merging to master might help
|
Merge conflicts were fixed |
|
I just found an error during "dirty" build. Let me try to fix it before proceeding with this PR. |
…R modules when doing "dirty" build, i.e. when element with desired path already exists in target manifest Class-Path entry
That was fixed in f070e47. This PR is ready for testing and review now. |
|
@elharo, could you please trigger one more Jenkins build? |
|
Test failure when building with JDK 11 - refer to https://ci-builds.apache.org/job/Maven/job/maven-box/job/maven-ear-plugin/job/19/2/testReport/ - was fixed in e5ea347 |
| FileUtils.copyFile( sourceFile, destinationFile ); | ||
|
|
||
| if ( skinnyWars && module.changeManifestClasspath() ) | ||
| if ( module.changeManifestClasspath() && ( skinnyWars || module.getLibDir() == null ) ) |
There was a problem hiding this comment.
It looks that this change introduces non backward compatible behavior - modification of Class-Path entry of manifest - for SAR and HAR modules. Refer to pull request #24 which is going to fix that (with false default value of skinnyModules option).
|
Resolve #431 |
1 similar comment
|
Resolve #431 |
Fixed detection if JAR module is included into classpath of particular EAR module manifest (like WAR or EJB module manifest). This is required for correct modification of Class-Path entry of manifest of EAR modules when skinnyWars option is turned on.
Note that this PR has no tests (yet) but I tested it manually with feature/MEAR-267_test branch of https://github.com/mabrarov/dockerfile-test:
$ git clone --branch feature/MEAR-267_test https://github.com/mabrarov/dockerfile-test.git && \ mvn -f dockerfile-test/pom.xml clean package -Ddocker.skip -Dmaven-ear-plugin.version=3.1.1-SNAPSHOTwhere expected manifest of WAR inside built EAR, i.e. dockerfile-test/ear/target/ear-1.1.7-SNAPSHOT.ear/org.mabrarov.dockerfile-test-war-1.1.7-SNAPSHOT.war/META-INF/MANIFEST.MF looks like:
while original manifest of WAR, i.e. dockerfile-test/war/target/war-1.1.7-SNAPSHOT.war/META-INF/MANIFEST.MF looks like: