-
-
Notifications
You must be signed in to change notification settings - Fork 271
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
Bug: package org.simplejavamail.internal.modules causes split package problem in Java9+ #378
Comments
What is the situation, context and how do I fix this? |
situation is said in the code and the title, context is in the code. idk how to fix it that's why I'm asking you. |
You're not giving me much to go on here, friend. What version of maven and Simple Java Mail are you on. What dependencies do you have if you do I suspect you are using JDK 11 or above, but I don't know much about modules. There have been issues about this before, which are still open, but frankly I don't get many bug reports about this so I'm not sure. |
apache version: Apache Maven 3.8.4 (9b656c72d54e5bacbed989b64718c159fe39b537) SimpleJavaMail: 7.0.0 man dependency:tree: quimo@Evans-MacBook-Air sendemailaction % mvn dependency:tree |
So I just did a |
I finally get it, it's the split package problem caused by the same package occurring in multiple modules. |
Thank you for the example, that was very helpful. I released a fix in 7.0.2. |
absolute legend! |
quimo@Evans-Air sendemailaction % mvn clean package
[INFO] Scanning for projects...
[INFO]
[INFO] -------------------< com.stream-pi:sendemailaction >--------------------
[INFO] Building sendemailaction 1.0.0
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ sendemailaction ---
[INFO] Deleting /Users/quimo/Documents/GitHub/essential-actions/sendemailaction/target
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ sendemailaction ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /Users/quimo/Documents/GitHub/essential-actions/sendemailaction/src/main/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.8.1:compile (default-compile) @ sendemailaction ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 2 source files to /Users/quimo/Documents/GitHub/essential-actions/sendemailaction/target/classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] the unnamed module reads package org.simplejavamail.internal.modules from both org.simplejavamail.core and org.simplejavamail
[ERROR] module org.simplejavamail.core reads package org.simplejavamail.internal.modules from both org.simplejavamail and org.simplejavamail.core
[ERROR] module org.simplejavamail reads package org.simplejavamail.internal.modules from both org.simplejavamail.core and org.simplejavamail
[ERROR] /Users/quimo/Documents/GitHub/essential-actions/sendemailaction/src/main/java/module-info.java:[1,1] module com.quimodotcom.sendemailaction reads package org.simplejavamail.internal.modules from both org.simplejavamail and org.simplejavamail.core
[INFO] 4 errors
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 5.316 s
[INFO] Finished at: 2022-01-20T11:14:49Z
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project sendemailaction: Compilation failure: Compilation failure:
[ERROR] the unnamed module reads package org.simplejavamail.internal.modules from both org.simplejavamail.core and org.simplejavamail
[ERROR] module org.simplejavamail.core reads package org.simplejavamail.internal.modules from both org.simplejavamail and org.simplejavamail.core
[ERROR] module org.simplejavamail reads package org.simplejavamail.internal.modules from both org.simplejavamail.core and org.simplejavamail
[ERROR] /Users/quimo/Documents/GitHub/essential-actions/sendemailaction/src/main/java/module-info.java:[1,1] module com.quimodotcom.sendemailaction reads package org.simplejavamail.internal.modules from both org.simplejavamail and org.simplejavamail.core
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
The text was updated successfully, but these errors were encountered: