1

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

Maven repository I am using is https://mvnrepository.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 https://mvnrepository.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).

Zoe
  • 27,060
  • 21
  • 118
  • 148
John Maclein
  • 1,034
  • 3
  • 13
  • 24

1 Answers1

0

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.

Roman C
  • 49,761
  • 33
  • 66
  • 176
  • I tried this but after running mvn command its showing build success but when I put the struts2-showcase.war file, generated in the target, I got the error in jboss server and the struts2-showcase.war.failed is generated. – John Maclein Jul 06 '14 at 14:05
  • If you have another question, post it by the button [above](http://stackoverflow.com/questions/ask). – Roman C Jul 06 '14 at 14:24