運行Windows 8版本預覽。我爲Jboss AS,Seam和Maven設置了相關路徑和變量。但是,當我嘗試運行一些示例時,如hotel booking maven無法正常工作。Maven(3.0.4)無法下載存儲庫
我的Maven版本日誌:
Microsoft Windows [Version 6.2.8400]
(c) 2012 Microsoft Corporation. All rights reserved.
C:\Users\Icemilk>mvn --version
Apache Maven 2.2.1 (r801777; 2009-08-07 00:46:01+0530)
Java version: 1.6.0_35
Java home: C:\jdk1.6.0_35\jre
Default locale: en_US, platform encoding: Cp1252
OS name: "windows nt (unknown)" version: "6.2" arch: "x86" Family: "windows"
C:\Users\Icemilk>
我想運行JBoss Seam的酒店預訂例如:
D:\Project\7th Semester\jboss-seam-2.3.0.CR1\examples\registration>mvn clean ins
tall
[INFO] Scanning for projects...
Downloading: http://repo1.maven.org/maven2/org/jboss/seam/bom/2.3.0.CR1/bom-2.3.
0.CR1.pom
[INFO] Unable to find resource 'org.jboss.seam:bom:pom:2.3.0.CR1' in repository
central (http://repo1.maven.org/maven2)
[INFO] ------------------------------------------------------------------------
[ERROR] FATAL ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Error building POM (may not be this project's POM).
Project ID: org.jboss.seam:bom
Reason: POM 'org.jboss.seam:bom' not found in repository: Unable to download the
artifact from any repository
org.jboss.seam:bom:pom:2.3.0.CR1
from the specified remote repositories:
central (http://repo1.maven.org/maven2)
for project org.jboss.seam:bom
和我的JBoss環境:
C:\jboss-6.1.0.Final>run.bat
Calling C:\jboss-6.1.0.Final\bin\run.conf.bat
===============================================================================
JBoss Bootstrap Environment
JBOSS_HOME: C:\jboss-6.1.0.Final
JAVA: C:\jdk1.6.0_35\bin\java
JAVA_OPTS: -Dprogram.name=run.bat -Dlogging.configuration=file:"C:\jboss-6.1.0
.Final\bin\logging.properties" -Xms128M -Xmx512M -XX:MaxPermSize=256M -Dsun.rmi.
dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Dorg.jbos
s.resolver.warning=true -server
CLASSPATH: C:\jdk1.6.0_35\lib\tools.jar;C:\jboss-6.1.0.Final\bin\run.jar
===============================================================================
14:27:05,650 INFO [AbstractJBossASServerBase] Server Configuration:
JBOSS_HOME URL: file:/C:/jboss-6.1.0.Final/
Bootstrap: $JBOSS_HOME\server/default/conf/bootstrap.xml
Common Base: $JBOSS_HOME\common/
Common Library: $JBOSS_HOME\common/lib/
Server Name: default
Server Base: $JBOSS_HOME\server/
Server Library: $JBOSS_HOME\server/default/lib/
Server Config: $JBOSS_HOME\server/default/conf/
Server Home: $JBOSS_HOME\server/default/
Server Data: $JBOSS_HOME\server/default/data/
Server Log: $JBOSS_HOME\server/default/log/
Server Temp: $JBOSS_HOME\server/default/tmp/
14:27:05,666 INFO [AbstractServer] Starting: JBossAS [6.1.0.Final "Neo"]
14:27:12,586 INFO [ServerInfo] Java version: 1.6.0_35,Sun Microsystems Inc.
14:27:12,586 INFO [ServerInfo] Java Runtime: Java(TM) SE Runtime Environment (b
uild 1.6.0_35-b10)
14:27:12,586 INFO [ServerInfo] Java VM: Java HotSpot(TM) Server VM 20.10-b01,Su
n Microsystems Inc.
14:27:12,586 INFO [ServerInfo] OS-System: Windows NT (unknown) 6.2,x86
14:27:12,586 INFO [ServerInfo] VM arguments: -Dprogram.name=run.bat -Dlogging.c
onfiguration=file:C:\jboss-6.1.0.Final\bin\logging.properties -Xms128M -Xmx512M
-XX:MaxPermSize=256M -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.serve
r.gcInterval=3600000 -Dorg.jboss.resolver.warning=true -Djava.endorsed.dirs=C:\j
boss-6.1.0.Final\lib\endorsed
14:27:12,742 INFO [JMXKernel] Legacy JMX core initialized
我卡住。我應該怎麼做才能讓示例運行?
更新:@ILLA我更改爲Maven 3,但問題在那裏。
D:\Project\7th Semester\jboss-seam-2.3.0.CR1\examples\registration>mvn --version
Apache Maven 3.0.4 (r1232337; 2012-01-17 14:14:56+0530)
Maven home: C:\apache-maven-3.0.4\bin\..
Java version: 1.6.0_35, vendor: Sun Microsystems Inc.
Java home: C:\jdk1.6.0_35\jre
Default locale: en_US, platform encoding: Cp1252
OS name: "windows nt (unknown)", version: "6.2", arch: "x86", family: "windows"
D:\Project\7th Semester\jboss-seam-2.3.0.CR1\examples\registration>mvn clean ins
tall
[INFO] Scanning for projects...
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR] The project org.jboss.seam.examples-ee6:registration:2.3.0.CR1 (D:\Pro
ject\7th Semester\jboss-seam-2.3.0.CR1\examples\registration\pom.xml) has 1 erro
r
[ERROR] Non-resolvable import POM: Failure to find org.jboss.seam:bom:pom:2.
3.0.CR1 in http://repo.maven.apache.org/maven2 was cached in the local repositor
y, resolution will not be reattempted until the update interval of central has e
lapsed or updates are forced @ org.jboss.seam:examples-ee6:2.3.0.CR1, D:\Project
\7th Semester\jboss-seam-2.3.0.CR1\examples\pom.xml, line 229, column 25 -> [Hel
p 2]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit
ch.
[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 rea
d the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildin
gException
[ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/UnresolvableMo
delException
D:\Project\7th Semester\jboss-seam-2.3.0.CR1\examples\registration>
很高興它的工作。我正要放棄。謝謝。 –