Open HelloDhero opened 2 weeks ago
Hi @HelloDhero ; Could you explain in what circumstance you saw this issue? We normally have a format for that when you open a new issue. I've tried to replicate your issue but have so far failed, as these two tests pass:
@Test
@Issue("https://github.com/openrewrite/rewrite/issues/4495")
void shouldNotOverrideManagedVersion() {
rewriteRun(
pomXml(
"""
<project>
<groupId>com.mycompany.app</groupId>
<artifactId>my-app</artifactId>
<version>1</version>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>>
<version>3.8.0</version>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
</plugins>
</build>
</project>
"""
)
);
}
when plugin is locked version by pluginManagement , it is no need to add ''