带有源代码和编译文件的exec maven插件
我正在尝试使用execgoal来编译一些不是使用pom.xml的java的东西。我使用的是一个专有的编译器,它既可以生成源文件,也可以生成已编译(模糊化)的文件 我使用两个独立的目录和execmaven插件。所以我有两次死刑:带有源代码和编译文件的exec maven插件,maven,Maven,我正在尝试使用execgoal来编译一些不是使用pom.xml的java的东西。我使用的是一个专有的编译器,它既可以生成源文件,也可以生成已编译(模糊化)的文件 我使用两个独立的目录和execmaven插件。所以我有两次死刑: <execution> <id>make-sources</id> <phase>generate-sources</phase> <goals> <go
<execution>
<id>make-sources</id>
<phase>generate-sources</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<workingDirectory>${basedir}/target-sources</workingDirectory>
<executable>makecode</executable>
<arguments>
..
<argument>is_source=1</argument>
</arguments>
</configuration>
</execution>
<execution>
<id>make-compiled</id>
<phase>compile</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<workingDirectory>${basedir}/target</workingDirectory>
<executable>makecode</executable>
<arguments>
..
<argument>is_source=0</argument>
</arguments>
</configuration>
</execution>
出处
生成源
执行官
${basedir}/目标源
生成代码
..
是_source=1吗
编撰
编译
执行官
${basedir}/目标
生成代码
..
是_source=0吗
这个pom然后从运行它的jenkins移动到artifactory。下一步是使用build helper maven插件:
<executions>
<execution>
<id>attach-base</id>
<phase>package</phase>
<goals>
<goal>attach-artifact</goal>
</goals>
<configuration>
<artifacts>
<!-- Add the main artifact -->
<artifact>
<file>${basedir}/target/product-${project.version}.tar.gz</file>
<type>tgz</type>
<classifier>compiled</classifier>
</artifact>
<artifact>
<file>${basedir}/target-sources/product-${project.version}.tar.gz</file>
<type>tgz</type>
<classifier>sources</classifier>
</artifact>
</artifacts>
</configuration>
</execution>
</executions>
附加基地
包裹
附加工件
${basedir}/target/product-${project.version}.tar.gz
tgz
汇编
${basedir}/target sources/product-${project.version}.tar.gz
tgz
来源
当jenkins完成作业时,它会创建两个工件,一个产品--{ver}-sources.tar.gz和一个产品--{ver}-compiled.tar.gz。虽然我认为tar.gz是不同的,但其中的文件是相同的。打包是我应该创建那些tar.gz文件的阶段,还是我应该为tar.gz使用不同的源代码