Maven build failed for struts2 showcase

久未见 提交于 2019-12-11 07:09:32

问题


Hi I am new to Struts2 and Maven. 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).


回答1:


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.



来源:https://stackoverflow.com/questions/24594140/maven-build-failed-for-struts2-showcase

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!