我需要MVN版本的默认属性:准备和MVN版本:执行要修改。我要构建的源代码具有WSDL文件。
生成的JAR文件是非Maven格式的,这是实现2步构建过程,使用此过程,我可以生成基于Maven的WSDL编译JAR文件。
mvn exec:exec
mvn install:install-file -DgroupId=com.stackoverflow.abc -DartifactId=xyz -Dversion=${BUILD_VERSION} -Dpackaging=jar -Dfile=path-of-jar -DpomFile=path-of-pom.xml
这将使用Just MainFest.mf构建JAR文件,并且没有pom.properties和pom.xml,我要做的就是将以非Maven格式生成的JAR转换为Maven Format。
。尝试使用版本:准备和发行:执行:我无法覆盖MVN安装中使用的默认属性:install-file,无法使用POM属性生成JAR
有没有一种方法可以覆盖MVN Release插件属性可以帮助我构建JAR文件?
用于构建WSDL的插件:
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<extensions>false</extensions>
<version>1.2.1</version>
<configuration>
<executable>java</executable>
<arguments>
<argument>-classpath</argument>
<classpath />
<argument>com.sforce.ws.tools.wsdlc</argument>
<argument>src/main/resources//Enterprise.wsdl</argument>
<argument>target/wsdl-${version}.jar</argument>
</arguments>
</configuration>
</plugin>
我尝试使用的是:
mvn -s settings.xml -Dusername=${svn_user} -Dpassword=${svn_password} release:prepare exec:exec release:perform -DgroupId=com.stackoverflow.abc -DartifactId=xyz -Dversion=${BUILD_VERSION} -Dpackaging=jar -Dfile=${WORKSPACE}/target/wsdl-${BUILD_VERSION}.jar -DpomFile=${WORKSPACE}/pom.xml
构建WSDL文件需要下面的插件,发布通常的MVN CLEAN INSTALL应该执行作业
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<extensions>false</extensions>
<version>1.2.1</version>
<executions>
<execution>
<id>custom-compile</id>
<phase>compile</phase>
<goals>
<goal>exec</goal>
</goals>
</execution>
</executions>
<configuration>
<executable>java</executable>
<arguments>
<argument>-classpath</argument>
<classpath />
<argument>com.sforce.ws.tools.wsdlc</argument>
<argument>src/main/resources/com/salesforce/wsdl/abc.wsdl</argument>
<!-- <argument>target/salesforce-wsdl-${project.version}.jar</argument> -->
<argument>target/salesforce-wsdl.jar</argument>
</arguments>
</configuration>
</plugin>