Struts2展示的Maven构建失败 [英] Maven build failed for struts2 showcase
问题描述
我是Struts2和Maven的新手.我了解了struts2-showcase,并在 http://maven-repository.com
我正在使用的maven存储库是 http://maven-repository.com/artifact/org.apache.struts/struts2-showcase/2.3.16.3
我正在尝试使用Maven存储库中给定的pom.xml创建一个项目.但是,每当我运行mvn install时,它都会导致构建失败.首先,我通过使用
创建一个项目来做到这一点MVN原型:generate -DgroupId = struts -DartifactId = struts2-展示-DarchetypeArtifactId = maven-archetype-quickstart -DinteractiveMode = false
控制台中的
命令.然后我打开pom.xml并添加依赖项.
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-showcase</artifactId>
<version>2.3.16.3</version>
</dependency>
但是当我运行命令
mvn安装
我在测试中出错,最后一次构建失败.
但是后来我删除了所有文件并手动创建了一个目录,并在其中创建了一个pom.xml并粘贴了从解决方案
首先,您需要从源存储库源分发.完成后,使用pom.xml
导航到文件夹(${base_dir}\src\apps\showcase\
)并运行mvn
.它将从pom.xml
从install
项目.如果您需要其他信息,可以检查文档使用Maven构建.
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).
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.
这篇关于Struts2展示的Maven构建失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!