Skip to content
SimplyMe
Go back

java - Download WAR from snapshot-repository and deploy to local JBoss using mvn - Stack Overflow

Ideally you would want to set up Jenkins to deploy to your testing server as part of your CI build.

Alternatively, if you want to manually run a script on the server you are deploying to, you could set up a specific pom.xml to perform this task. First setup the dependency plugin to download your war:

org.apache.maven.plugins

maven-dependency-plugin

2.3

package

copy

my-group

my-web-archive

my-vesion

war

my-web-archive.war

${project.build.directory}

Substituting the group ID, artifact ID and version for the respective properties of your WAR file. Next configure the JBoss plugin to deploy the downloaded WAR:

org.codehaus.mojo

jboss-maven-plugin

1.5.0

/opt/jboss-6

all

${project.build.directory}/my-web-archive.war

You should then be able to download the artifact from your internal repository and deploy it in the locally running JBoss container with the following command:

mvn package jboss:hard-deploy

via java - Download WAR from snapshot-repository and deploy to local JBoss using mvn - Stack Overflow.


Share this post:

Previous Post
coderwall.com : establishing geek cred since 1305712800
Next Post
cFos Forum - cfosspeed prevent windows to sleep