Skip to content

upgrade jakarta.mail to 2.0.0 (rename javax.mail -> jakarta.mail)#37

Merged
davidmoten merged 1 commit intodavidmoten:masterfrom
gitmotte:master
Feb 28, 2021
Merged

upgrade jakarta.mail to 2.0.0 (rename javax.mail -> jakarta.mail)#37
davidmoten merged 1 commit intodavidmoten:masterfrom
gitmotte:master

Conversation

@gitmotte
Copy link

@gitmotte gitmotte commented Jan 19, 2021

  • upgrade jakarta.mail to 2.0.0 (rename javax.mail -> jakarta.mail)
  • push version to 6.0.0 (breaking change)

* package rename javax.mail -> jakarta.mail
@diegosalvi
Copy link

This is a very frightening update. Every project using subetha will have to cope with dependency upgrade.. and packages renames :(

@gitmotte
Copy link
Author

gitmotte commented Feb 1, 2021

there is a transformer plugin, which might be a good solution for the transition phase from javax to jakarta

<plugin>
        <groupId>org.eclipse.transformer</groupId>
        <artifactId>org.eclipse.transformer.maven</artifactId>
        <version>0.2.0</version>
        <executions>
          <execution>
            <id>jakarta-ee</id>
            <goals>
              <goal>run</goal>
            </goals>
            <phase>package</phase>
            <configuration>
              <classifier>jakarta</classifier>
            </configuration>
          </execution>
        </executions>
</plugin>

i'm not that happy with it, because afaik there is no depencency/compile-check against the new api-version, but the new API should be binary compatible with the previous version.

see #38

@davidmoten
Copy link
Owner

I've got no objection to the breaking change to jakarta.mail. Updating package names in a few classes is not a big deal for me. Can you be more specific @diegosalvi about the problems this causes for you?

@gitmotte
Copy link
Author

gitmotte commented Feb 2, 2021

I've got no objection to the breaking change to jakarta.mail. Updating package names in a few classes is not a big deal for me. Can you be more specific @diegosalvi about the problems this causes for you?

@diegosalvi is right that this is a breaking change for dependent projects.
i mentioned this at the beginning and that is why i increased the version number to 6.0.0.

the solution would be to publish both versions using the transformer plugin. btw. there is an invert - option (don't know exactly how it works, but it looks like transformation jakarta -> javax. tested it with invert option = true, but did not work for me)

@davidmoten
Copy link
Owner

@diegosalvi is right that this is a breaking change for dependent projects.
i mentioned this at the beginning and that is why i increased the version number to 6.0.0.

Yes indeed, but the breaking change is not difficult to adapt to as far as I can see. I'm in favour of migrating to jakarta.mail myself without transformer plugin but I'll wait for @diegosalvi to argue his case.

@diegosalvi
Copy link

@davidmoten Sooner or later this change must be done (... before that jackarta mail drifts too much from javamail).
Projects that embed subethamail and then have javamail object in his public api will have to keep both implementations and in some cases cope with conversion from and to javamail and jackarta.

Could be a good thing to keep alive for some time a 5.2 branch running for some time at least for bugfixes

@davidmoten
Copy link
Owner

Could be a good thing to keep alive for some time a 5.2 branch running for some time at least for bugfixes.

Fine by me.

@middagj
Copy link

middagj commented Feb 26, 2021

I am now facing the problem that subethasmtp is still on 1.x, but we are using other libraries that did upgrade to Jakarta 2.x

I think a bump in major to warn users is probably the best, next to keeping 5.x around for a while.

@davidmoten
Copy link
Owner

Excuse the delay, I'll get on to this shortly.

@davidmoten davidmoten merged commit 2cad3b8 into davidmoten:master Feb 28, 2021
@davidmoten
Copy link
Owner

This has been merged and the jakarta.mail version 6.0.0 is now on Maven Central

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

Successfully merging this pull request may close these issues.

4 participants