simple-java-mail: multi-release jar for jdk11+ missing
I am using the lib for a javafx application which I have ported from javafx8 to javafx11 and openjdk 11.
In order to use the lib I had to modularize the lib myself and therefore the question if it is possible to get a multi-release jar which can be used in java8 and java 9+ ?
Here is my config to use the lib (I have used moditec to modularize the lib):
<dependency>
<groupId>com.github.bbottema</groupId>
<artifactId>emailaddress-rfc2822</artifactId>
<version>2.1.3</version>
<exclusions>
<exclusion>
<groupId>*</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.sun.activation</groupId>
<artifactId>jakarta.activation</artifactId>
<version>1.2.1</version>
</dependency>
<dependency>
<groupId>com.sun.mail</groupId>
<artifactId>jakarta.mail</artifactId>
<version>1.6.4</version>
<exclusions>
<exclusion>
<groupId>*</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.simplejavamail</groupId>
<artifactId>simple-java-mail</artifactId>
<version>5.5.1</version>
<exclusions>
<exclusion>
<groupId>*</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency>
Moditec config file or input for module-info.java
<module>
<artifact>
<groupId>org.simplejavamail</groupId>
<artifactId>simple-java-mail</artifactId>
</artifact>
<moduleInfoSource>
open module simple.java.mail {
requires java.desktop;
requires jakarta.mail;
requires jakarta.activation;
requires emailaddress.rfc2822;
requires org.slf4j;
exports org.simplejavamail;
exports org.simplejavamail.converter;
exports org.simplejavamail.email;
exports org.simplejavamail.internal.util;
exports org.simplejavamail.mailer;
exports org.simplejavamail.outlookmessageparser.simplejavamail;
exports org.simplejavamail.outlookmessageparser.simplejavamail.model;
exports org.simplejavamail.outlookmessageparser.simplejavamail.rtf;
exports org.simplejavamail.outlookmessageparser.simplejavamail.rtf.util;
exports org.simplejavamail.springsupport;
exports org.simplejavamail.util;
}
</moduleInfoSource>
</module>
About this issue
- Original URL
- State: open
- Created 5 years ago
- Comments: 15 (7 by maintainers)
Sorry I was too fast. The problem is that actually your lib is treated as an automatic module in java 9 or newer which means that it is not possible to use jlink to create a distributable java app on any platform.
For a java-ee app on an application server this is not a problem, but for a desktop app it is.
So the files I added before are just adding the necessary information so that the lib is a valid named module with a defined interface for java beyond 9 and that the lib is in parallel useable under java 7 / 8.
Hopefully that clarified the issue a bit. Do you have any questions ?
Hi, same problem here with release 7.0.0 and java 17
I’m using 6.5, and cannot compile using java 15:
java: module org.simplejavamail reads package org.simplejavamail.internal.modules from both org.simplejavamail and org.simplejavamail.core