سؤال

Running Windows 8 release preview. I have set up the relevant paths and variables for Jboss AS, Seam and Maven. However when I try to run some example, like hotel booking maven fails to work properly.

My maven version log:

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>

I'm trying to run Jboss seam hotel booking example:

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

and my JBoss environment:

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

I'm stuck. What should I do to make the example run?

UPDATE: @ILLA I changed to Maven 3, but the problem is there.

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>
هل كانت مفيدة؟

المحلول

The Seam Maven dependencies are not hosted by Maven Central but by the JBoss repository.
Maybe you forgot to declare a repository in your pom.xml. In that case :

<repositories>
    <repository>
        <id>JBoss repository</id>
        <url>http://repository.jboss.org/nexus/content/groups/public/</url>
    </repository>
</repositories>

See blog post : How to add remote repository in Maven

نصائح أخرى

This error indicates, you are using Maven 2. You need to use Maven 3 because Maven 2 has a nasty dependency resolution bug (discussed in SEAM-10.)

Maven 3 is completely backward compatible with Maven 2 and we strongly recommend that you upgrade.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top