简体   繁体   中英

How to deploy ear file in to artifactory non maven application

We are trying to deploy the ear file in to my artifactory for non maven Java project. here we are building the application using apache ant. please any one can suggest how can i deploy the my ear file in to artifactory using any scripts.writing something in to build.xml.

You can use the old maven-ant-tasks package to do the upload of the artifact and the pom file. Check this: http://maven.apache.org/ant-tasks/

You can use the writepom function to define the pom and than create a target to execute the artifact:deploy task from the package.

It's really an easy setup approach.

Example:

<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>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM