Skip to content

org.apache.shiro:xxx:1.x versions not updated when using ...migrate.jakarta.JakartaEE10 #685

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

Closed
jepsar opened this issue Mar 19, 2025 · 7 comments · Fixed by #686
Closed
Labels
enhancement New feature or request

Comments

@jepsar
Copy link

jepsar commented Mar 19, 2025

I ran

mvn -U org.openrewrite.maven:rewrite-maven-plugin:run \
    -Drewrite.recipeArtifactCoordinates=org.openrewrite.recipe:rewrite-migrate-java:RELEASE \
    -Drewrite.activeRecipes=org.openrewrite.java.migrate.jakarta.JakartaEE10

and found that the dependencies

    <dependency>
      <groupId>org.apache.shiro</groupId>
      <artifactId>shiro-core</artifactId>
      <version>1.x</version>
    </dependency>
    <dependency>
      <groupId>org.apache.shiro</groupId>
      <artifactId>shiro-web</artifactId>
      <version>1.x</version>
    </dependency>

were not updated to the EE10 compatible version (you will need to add the classifier as well)

    <dependency>
      <groupId>org.apache.shiro</groupId>
      <artifactId>shiro-core</artifactId>
      <version>2.0.2</version>
      <classifier>jakarta</classifier>
    </dependency>
    <dependency>
      <groupId>org.apache.shiro</groupId>
      <artifactId>shiro-web</artifactId>
      <version>2.0.2</version>
      <classifier>jakarta</classifier>
    </dependency>

CC @melloware

Shiro has several artifactIds which can probably all be bumped to the same version

https://shiro.apache.org/jakarta-ee.html

@jepsar jepsar added the enhancement New feature or request label Mar 19, 2025
@jepsar
Copy link
Author

jepsar commented Mar 19, 2025

@melloware let me do some further testing first please. Using <classifier>jakarta</classifier> is also an option here. I'll first see if 2.0.2 works without migrating the config for example.

@melloware
Copy link
Contributor

ok let me know

@timtebeek timtebeek moved this to Backlog in OpenRewrite Mar 19, 2025
@jepsar
Copy link
Author

jepsar commented Mar 20, 2025

Strangely you will need to add the jakarta classifier, even on 2.x. I was not able to test my application yet (issue with EclipseLink), but at least it compiles now.

@melloware
Copy link
Contributor

so should i bump to 2X with the jakarta classifier?

@jepsar
Copy link
Author

jepsar commented Mar 20, 2025

I think that would be safe to do. As we discussed on Discord, maybe add the link https://shiro.apache.org/jakarta-ee.html in a comment. In my case some class was moved to a different package and dependency. So it's not a blind migration per se.

melloware added a commit to melloware/rewrite-migrate-java that referenced this issue Mar 20, 2025
@melloware
Copy link
Contributor

PR submitted

@melloware
Copy link
Contributor

Usually we upgrade the dependencies and developers fix that last 5% of changes.

@github-project-automation github-project-automation bot moved this from Backlog to Done in OpenRewrite Mar 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants