首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >用Maven从头开始构建CAS战争

用Maven从头开始构建CAS战争
EN

Stack Overflow用户
提问于 2015-01-10 19:07:05
回答 1查看 2.4K关注 0票数 0

我是Maven的新手,但我已经使用Ant多年了,最近,我还广泛地使用了Gradle。

我正在尝试克隆和构建(本地)一个名为Apereo (以前的Jasig) 中央认证服务(CAS)的Maven项目。这是一个Java应用程序,它在SSO服务中扮演票务存储(类似于Kerberos)的角色。通常,要使用CAS作为SSO服务器,默认情况下使用Maven Overlay方法拉入它们的JAR/WAR,如果要提供自己的自定义文件,只需覆盖这些默认值。

但这不是我想要的。我希望在本地构建CAS项目,并对其进行自己的更改/调整。因此,我从GitHub克隆了它,并在它的根目录"cas/“目录中发出了一个mvn war:war。我看到了很多输出,结尾是:

代码语言:javascript
复制
Downloaded: http://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-utils/3.0.8/plexus-utils-3.0.8.jar (227 KB at 1423.8 KB/sec)
Downloaded: http://repo.maven.apache.org/maven2/com/thoughtworks/xstream/xstream/1.4.3/xstream-1.4.3.jar (471 KB at 804.2 KB/sec)
[INFO] Packaging webapp
[INFO] Assembling webapp [cas-server] in [D:\ih8windows\cas\target\cas-server-4.1.0-SNAPSHOT]
[INFO] Processing war project
[INFO] Webapp assembled in [213 msecs]
[INFO] Building war: D:\ih8windows\cas\target\cas-server-4.1.0-SNAPSHOT.war
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Apereo Central Authentication Service ............. FAILURE [ 11.779 s]
[INFO] Apereo CAS Core ................................... SKIPPED
[INFO] Apereo CAS Generic Support ........................ SKIPPED
[INFO] Apereo CAS Web Application support ................ SKIPPED
[INFO] Apereo CAS Web Application ........................ SKIPPED
[INFO] Apereo CAS JDBC Support ........................... SKIPPED
[INFO] Apereo CAS LDAP Support ........................... SKIPPED
[INFO] Apereo CAS Legacy Support ......................... SKIPPED
[INFO] Apereo CAS OpenId Server Support .................. SKIPPED
[INFO] Apereo CAS RADIUS Support ......................... SKIPPED
[INFO] Apereo CAS SPNEGO/NTLM Support .................... SKIPPED
[INFO] Apereo CAS Trusted User Support ................... SKIPPED
[INFO] Apereo CAS X.509 Client Certificate Support ....... SKIPPED
[INFO] Apereo CAS OAuth Server Support ................... SKIPPED
[INFO] Apereo CAS Client Protocols Support using pac4j ... SKIPPED
[INFO] Apereo CAS SAML Server and Validation Support ..... SKIPPED
[INFO] Apereo CAS JBoss Cache Integration - DEPRECATED ... SKIPPED
[INFO] Apereo CAS Memcached Integration .................. SKIPPED
[INFO] Apereo CAS Ehcache Integration .................... SKIPPED
[INFO] Apereo CAS Restlet Integration - DEPRECATED ....... SKIPPED
[INFO] Apereo CAS - Uber WAR - DEPRECATED ................ SKIPPED
[INFO] Apereo CAS ClearPass Extension .................... SKIPPED
[INFO] Apereo CAS Management Web Application ............. SKIPPED
[INFO] Apereo CAS REST Implementation .................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 34.142 s
[INFO] Finished at: 2015-01-10T13:56:35-05:00
[INFO] Final Memory: 24M/225M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-war-plugin:2.3:war (default-cli) on project cas-server: Error assembling WAR: webxml attribute is required (or pre-existing WEB-INF/web.xml if executing in update mode) -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

当我去target/时,我看到一个cas-server-4.1.0-SNAPSHOT.war,但它是空的!

理想情况下,我希望它的所有子项目都捆绑在同一个工件(JAR/WAR)中。但是如果这是不可能的,那么我需要构建&打包cas-server-webappcas-server-core子项目,这样我就可以激发它们并在本地对它们进行更改。所以我问:如果mvn war:war不是实现这一目标的方法,那么是什么呢?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2015-01-10 19:20:02

而不是mvn war:war尝试在主目录中运行mvn package。它将允许Maven为每个cas模块选择适当的打包类型。该项目由许多模块组成,并不是所有模块都应该打包为WAR。例如,父项目(失败的项目)具有pom打包类型,这意味着它不构建任何东西,而是调用子模块。

mvn package完成时,您应该能够找到组装好的cas-server-webapp/target/cas.war文件。

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/27880114

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档