如何执行两个maven版本插件?我尝试这样做,但在3.0.0-快照中执行所有
我有一个问题,因为V2.x.x使用V2 swagger文件,v3.0.0使用V3 swagger文件。
<plugin>
<groupId>io.swagger</groupId>
<artifactId>swagger-codegen-maven-plugin</artifactId>
<version>2.3.1</version>
<executions>
<execution>
<id>first in v2</id>
...
</execution>
</executions>
</plugin>
<plugin>
<groupId>io.swagger</groupId>
<artifactId>swagger-codegen-maven-plugin</artifactId>
<version>3.0.0-SNAPSHOT</version>
<executions>
<execution>
<id>second in v3</id>
...
</execution>
</executions>
</plugin>发布于 2018-07-16 16:02:51
我使用父/模块Maven特性。
MyProject-parent
<modules>
<module>foodle-importer-core</module>
<module>foodle-api</module>
<module>diffusion-api</module>
</modules> 体系结构:
MyProject-parent
---------ModuleA-SourceGeneratorV2 (contain swagger-codegen-maven-plugin v2.3.1)
---------ModuleB-SourceGeneratorV3 (contain swagger-codegen-maven-plugin v3.0.0-SNAPSHOT)
---------ModuleC-MyProject (contain `ModuleA-SourceGeneratorV2` and `ModuleB-SourceGeneratorV3` dependencies)发布于 2018-07-12 14:17:44
下面是
Can Maven 2 use two different versions of a build plugin in the same project?
做你想做的事是不可能的。我看到的唯一机会是获取源代码并以不同的名称编译插件。在你这么做之前,我真的会寻找另一种方法来实现你想要的。
https://stackoverflow.com/questions/51307458
复制相似问题