使用maven构建sitebricks

时间:2013-01-09 20:08:16

标签: maven sitebricks

我在使用maven为Sitebricks生成罐子。我使用以下命令从git下载了存储库:

git clone https://github.com/dhanji/sitebricks.git sitebricks

使用“mvn package”时一切正常。因为我需要依赖项,我尝试了“mvn install”并得到以下错误:

[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO] 
[INFO] Sitebricks :: Parent
[INFO] Sitebricks :: Type Conversion
[INFO] Sitebricks :: Client
[INFO] Sitebricks :: Annotations
[INFO] Sitebricks :: Core
[INFO] Sitebricks :: Test Support
[INFO] Sitebricks :: Easy Client
[INFO] Sitebricks :: Statistics
[INFO] Sitebricks :: Channel
[INFO] Sitebricks :: Acceptance Tests
[INFO] Sitebricks :: Options
[INFO] Sitebricks :: Cloud
[INFO] Sitebricks :: SLF4J Module
[INFO] Sitebricks :: Persistence
[INFO] Sitebricks :: Persistence Module (Disk)
[INFO] Sitebricks :: Persistence Module (Redis)
[INFO] Sitebricks :: Persistence Module (SQL)
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building Sitebricks :: Parent 0.8.8-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-clean-plugin:2.3:clean (default-clean) @ sitebricks-parent ---
[INFO] 
[INFO] --- maven-enforcer-plugin:1.0-beta-1:enforce (enforce-maven) @ sitebricks-parent ---
[INFO] 
[INFO] --- maven-install-plugin:2.3:install (default-install) @ sitebricks-parent ---
[INFO] Installing /home/dimi/local/sdks/maven/sitebricks/pom.xml to /home/dimi/.m2/repository/com/google/sitebricks/sitebricks-parent/0.8.8-SNAPSHOT/sitebricks-parent-0.8.8-SNAPSHOT.pom
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] 
[INFO] Sitebricks :: Parent .............................. FAILURE [2.880s]
[INFO] Sitebricks :: Type Conversion ..................... SKIPPED
[INFO] Sitebricks :: Client .............................. SKIPPED
[INFO] Sitebricks :: Annotations ......................... SKIPPED
[INFO] Sitebricks :: Core ................................ SKIPPED
[INFO] Sitebricks :: Test Support ........................ SKIPPED
[INFO] Sitebricks :: Easy Client ......................... SKIPPED
[INFO] Sitebricks :: Statistics .......................... SKIPPED
[INFO] Sitebricks :: Channel ............................. SKIPPED
[INFO] Sitebricks :: Acceptance Tests .................... SKIPPED
[INFO] Sitebricks :: Options ............................. SKIPPED
[INFO] Sitebricks :: Cloud ............................... SKIPPED
[INFO] Sitebricks :: SLF4J Module ........................ SKIPPED
[INFO] Sitebricks :: Persistence ......................... SKIPPED
[INFO] Sitebricks :: Persistence Module (Disk) ........... SKIPPED
[INFO] Sitebricks :: Persistence Module (Redis) .......... SKIPPED
[INFO] Sitebricks :: Persistence Module (SQL) ............ SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4.226s
[INFO] Finished at: Wed Jan 09 20:57:48 CET 2013
[INFO] Final Memory: 5M/69M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-install-plugin:2.3:install (default-install) on project sitebricks-parent: Failed to install metadata com.google.sitebricks:sitebricks-parent/maven-metadata.xml: Could not parse metadata /home/dimi/.m2/repository/com/google/sitebricks/sitebricks-parent/maven-metadata-local.xml: only whitespace content allowed before start tag and not F (position: START_DOCUMENT seen F... @1:1) -> [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

我该如何解决?我试图让sitebricks现在好几天了,开始成为一个沮丧的人......

2 个答案:

答案 0 :(得分:1)

最简单的解决方案是删除整个本地存储库,只需重新构建或更具体一点,只需删除文件夹

/home/dimi/.m2/repository/com/google/sidebricks

只是做

mvn clean package 

答案 1 :(得分:0)

请在这个帖子上尝试答案:

https://github.com/dhanji/sitebricks/issues/51

正在发生的事情是您的项目没有使用自己的pom.xml正确配置,因此您缺少Guice(aopalliance.jar)的传递依赖关系,它没有明确定义(但是maven知道如何设置)

我不确定你是如何生成Eclipse项目的,但是这部分难题有一个缺陷=)

Dhanji (sitebricks的创建者)