简体   繁体   中英

Maven build failed for struts2 showcase

I read about the struts2-showcase and found the maven repository at http://maven-repository.com

maven repository I am using is http://maven-repository.com/artifact/org.apache.struts/struts2-showcase/2.3.16.3

I am trying to create one project using the given pom.xml given in the maven repo. But whenever I run mvn install , its giving build failure. Firstly I was doing this by creating one project using

mvn archetype:generate -DgroupId=struts -DartifactId=struts2-showcase -DarchetypeArtifactId=maven-archetype-quickstart -DinteractiveMode=false

command in console. Then I opened the pom.xml and added the dependency.

<dependency>
  <groupId>org.apache.struts</groupId>
  <artifactId>struts2-showcase</artifactId>
  <version>2.3.16.3</version>
</dependency>

But when I run the command

mvn install

I got error in test and at last Build failure.

But Later I deleted all and created a directory manually and inside that I created one pom.xml and pasted all the contents got from http://maven-repository.com/artifact/org.apache.struts/struts2-showcase/2.3.16.3/pom

Then all worked perfectly but nothing to compile and nothing to test and got build successful. But when I deployed it got the error and build failed.

I know I am doing something terribly wrong. Someone please show me the way to make it work. As application server I used JBoss (wildfly).

First you need to download or checkout from the source repository a source distribution. Once done, navigate to the folder ( ${base_dir}\\src\\apps\\showcase\\ ) with pom.xml and run mvn . It will install the project from pom.xml . If you need additional info you can check docs Building with Maven .

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