First article Creation project: here can refer to: http://maven.apache.org/guides/mini/guide-webapp.html
MVN archetype:generate-dgroupid=com.mycompany.app-dartifactid=my-webapp-darchetypeartifactid= Maven-archetype-webapp
To switch directories to My-webapp, compile and package:
Package
At this point, start the JBoss server (mine is jboss-as-7.1.1) and run MVN clean Jboss-as:deploy to deploy the Web project to JBoss. The problem comes, the terminal error, the information is as follows:
for ' Jboss-as ' inch inch groups [Org.apache.maven.plugins, Org.codehaus.mojo] available from the repositories [local (d:/maven/m2/repository), Central (http://repo.maven.apache.org/maven2)]
Solution: Refer to http://stackoverflow.com/questions/13956193/ Moving-to-jboss-as7-from-tomcat-mvn-jboss-asdeploy-does-not-work-on-my-maven-p
In the pom.xml of the project, add:
<Plugins> <plugin> <groupId>Org.jboss.as.plugins</groupId> <Artifactid>Jboss-as-maven-plugin</Artifactid> <version>7.2.Final</version> </plugin></Plugins>
Compile the package again, and then start with the results such as:
Note: Open source China maven Source configuration http://maven.oschina.net/help.html