-
Notifications
You must be signed in to change notification settings - Fork 22
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
[MEAR-267] - Fixed detection if JAR module is included into classpath of particular EAR module manifest #19
[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 WFLYSRV0059 and 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
src/test/java/org/apache/maven/plugins/ear/it/AbstractEarPluginIT.java
Outdated
Show resolved
Hide resolved
src/test/java/org/apache/maven/plugins/ear/it/AbstractEarPluginIT.java
Outdated
Show resolved
Hide resolved
…matting of JavaDoc, inlined simple single-line code.
# Conflicts: # pom.xml
What's pending / required for merging this pull request? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let me push this through Jenkins
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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):
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 |
@@ -461,7 +461,7 @@ private void copyModules( final JavaEEVersion javaEEVersion, | |||
getLog().info( "Copying artifact [" + module + "] to [" + module.getUri() + "]" ); | |||
FileUtils.copyFile( sourceFile, destinationFile ); | |||
|
|||
if ( skinnyWars && module.changeManifestClasspath() ) | |||
if ( module.changeManifestClasspath() && ( skinnyWars || module.getLibDir() == null ) ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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).
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-SNAPSHOT
where 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: