2017-06-06 78 views

回答

0

您可以使用舊的maven-ant-tasks包來上傳工件和pom文件。 選中此項:http://maven.apache.org/ant-tasks/

您可以使用writepom函數來定義pom,並創建一個目標來執行工件:從包中部署任務。

這真的是一個簡單的設置方法。

例子:

<target name="artifactory-deployment"> 
<artifact_jf:pom id="tmp.pom" groupid="${artifact.groupid}" artifactid="${artifact.name}" version="1.0" packaging="ear" name="${artifact.name}"   /> 
<artifact_jf:writepom pomRefId="tmp.pom" file="pom.xml"/> 
<artifact_jf:deploy file="build/ears/artifact.ear"> 
    <remoteRepository url="http://localhost:8081/artifactory/libs-release-local"> 
     <authentication username="artifactory-username" password="artifactory-password" /> 
    </remoteRepository> 
    <pom file="pom.xml" /> 
</artifact_jf:deploy> 

+0

目前我buiuld.xml文件只創建耳朵。如果你有部署到artifactory的示例build.xml文件,請給我建議。在這裏,我不明白什麼是mypom refid和所有。 –

+0

shuild我在哪裏寫groupid和artifactId? –

+0

請檢查並給我這個 暗示這裏它正在安裝ear filein到m2文件夾 [artifact:deploy]處理Maven工件任務時發生錯誤。 [工件:部署]診斷: [工件:部署] [工件:部署]一種POM元素是必需的,以部署到存儲庫 [工件:部署] BUILD FAILED C:\ RAD \ WorkspacesV75 \ WAS70 \ IafDeploymentSTS9 .0 \ BuildScript \ build.xml:50:需要POM元素才能部署到存儲庫 –

相關問題