-
Notifications
You must be signed in to change notification settings - Fork 101
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
When trying to apply the recipe Migrate to Java 11, there is no recipe for adding missing dependencies for Common Annotations (JSR-250).
This dependency contains classes like javax.annotation.Generated
or javax.annotation.security.RolesAllowed
.
It's also mentioned in JEP 320, for your information.
What version of OpenRewrite are you using?
I am using
- Maven plugin v5.28.0
- rewrite-migrate-java v2.11.0
How are you running OpenRewrite?
With Maven plugin, like :
mvn -U org.openrewrite.maven:rewrite-maven-plugin:run -Drewrite.recipeArtifactCoordinates=org.openrewrite.recipe:rewrite-migrate-java:RELEASE -Drewrite.activeRecipes=org.openrewrite.java.migrate.Java8toJava11
What is the smallest, simplest way to reproduce the problem?
This code should compile with a JDK 11 :
import javax.annotation.Generated;
@Generated("xxx")
public class A {
}
What did you expect to see?
In Maven pom.xml :
<!-- Common Annotations -->
<dependency>
<groupId>javax.annotation</groupId>
<artifactId>javax.annotation-api</artifactId>
<version>1.3.2</version>
</dependency>
Or rather the jakarta variant :
<dependency>
<groupId>jakarta.annotation</groupId>
<artifactId>jakarta.annotation-api</artifactId>
<version>1.3.5</version>
</dependency>
What did you see instead?
Previous dependency declaration is absent.
Are you interested in [contributing a fix to OpenRewrite]
Why not
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working
Type
Projects
Status
Done