mvn deploy:deploy-file -DgroupId=com.somecompany -DartifactId=project -Dversion=1.0.0 -DgeneratePom=false -Dpackaging=jar -DrepositoryId=nexus -Durl=http://localhost:8081/nexus/content/repositories/releases -DpomFile=pom.xml -Dfile=target/project-1.0.0.jar
martes, 17 de octubre de 2017
Deploy to Nexus
With the following snippet you can deploy anything to Nexus.
Ant as a script director
Hi,
this entry on the blog is for using Ant as a scripting integration together with Groovy.
<project>
<property name="groovy.home" value="/home/vagrant/.sdkman/candidates/groovy/current/"/>
<property name="groovy.version" value="X.Y.Z"/>
<path id="groovy.classpath">
<fileset dir="${groovy.home}/lib">
<include name="**/*.jar"/>
</fileset>
</path>
<target name="targetSample">
<taskdef name="groovy" classname="org.codehaus.groovy.ant.Groovy" classpathref="groovy.classpath"/>
ant.ant(antfile:'build.xml'){ // you antfile name
target(name:'targetTest') // your targetName
property(name:'param1',value:'theParamValue') // your params name and values
}
def salutation="Hello World"
print(salutation)
</groovy>
</target>
<target name="targetTest">
<echo>Hola mundo Groovy! </echo>
</target>
</project>
Output
Buildfile: /home/vagrant/ant-tests/build.xml
targetSample:
targetTest:
[echo] Hola mundo Groovy!
Hello World
BUILD SUCCESSFUL
Total time: 1 second
Suscribirse a:
Comentarios (Atom)