我从https://github.com/seam/examples/tree/master/booking
下载了预订示例我还安装了jboss。我尝试运行它并且运行良好。
然后我尝试运行此评论
mvn clean package arquillian:run -Darquillian=jbossas-managed-7
在cmd中,如上页所述。
但是我收到以下错误:
C:\seam_example>mvn clean package arquillian:run -Darquillian=jbossas-managed-7 -X
Apache Maven 3.0.4 (r1232337; 2012-01-17 14:14:56+0530)
Maven home: C:\Program Files (x86)\apache\apache-maven-3.0.4
Java version: 1.6.0, vendor: Sun Microsystems Inc.
Java home: C:\Program Files (x86)\Java\jdk1.6.0\jre
Default locale: en_US, platform encoding: Cp1252
OS name: "windows vista", version: "6.1", arch: "x86", family: "windows"
[INFO] Error stacktraces are turned on.
[DEBUG] Reading global settings from C:\Program Files (x86)\apache\apache-maven-3.0.4\conf\settings.xml
[DEBUG] Reading user settings from C:\Users\SANJAY\.m2\settings.xml
[DEBUG] Using local repository at C:\Users\SANJAY\.m2\repository
[DEBUG] Using manager EnhancedLocalRepositoryManager with priority 10 for C:\Users\SANJAY\.m2\repository
[INFO] Scanning for projects...
[DEBUG] **Could not find metadata org.jboss.seam:seam-parent:20-SNAPSHOT/maven-metadata.xml in local (C:\Users\SANJAY\.m2\repository)**
[ERROR] **The build could not read 1 project** -> [Help 1]
**org.apache.maven.project.ProjectBuildingException: Some problems were encountered while processing the POMs**:
[WARNING] '**parent.relativePath' points at org.jboss.seam.examples:seam-examples-parent instead of org.jboss.seam:seam-parent, please verify your project structure @ line 4, column 12**
[FATAL] **Non-resolvable parent POM: Could not find artifact org.jboss.seam:seam-parent:pom:20-SNAPSHOT and 'parent.relativePath' points at wrong local POM @ line 4, column 12**
at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:363)
at org.apache.maven.DefaultMaven.collectProjects(DefaultMaven.java:636)
at org.apache.maven.DefaultMaven.getProjectsForMavenReactor(DefaultMaven.java:585)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:234)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
[ERROR]
[ERROR] The project org.jboss.seam.examples:seam-examples-parent:3.2.0-SNAPSHOT (C:\seam_example\pom.xml) has 1 error
[ERROR] Non-resolvable parent POM: Could not find artifact org.jboss.seam:seam-parent:pom:20-SNAPSHOT and 'parent.relativePath' points at wrong local POM @ line 4, column 12 -> [Help 2]
org.apache.maven.model.resolution.UnresolvableModelException: Could not find artifact org.jboss.seam:seam-parent:pom:20-SNAPSHOT
at org.apache.maven.project.ProjectModelResolver.resolveModel(ProjectModelResolver.java:159)
at org.apache.maven.model.building.DefaultModelBuilder.readParentExternally(DefaultModelBuilder.java:813)
at org.apache.maven.model.building.DefaultModelBuilder.readParent(DefaultModelBuilder.java:664)
at org.apache.maven.model.building.DefaultModelBuilder.build(DefaultModelBuilder.java:310)
at org.apache.maven.model.building.DefaultModelBuilder.build(DefaultModelBuilder.java:232)
at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:410)
at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:379)
at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:343)
at org.apache.maven.DefaultMaven.collectProjects(DefaultMaven.java:636)
at org.apache.maven.DefaultMaven.getProjectsForMavenReactor(DefaultMaven.java:585)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:234)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: org.sonatype.aether.resolution.ArtifactResolutionException: Could not find artifact org.jboss.seam:seam-parent:pom:20-SNAPSHOT
at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:538)
at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:216)
at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:193)
at org.sonatype.aether.impl.internal.DefaultRepositorySystem.resolveArtifact(DefaultRepositorySystem.java:286)
at org.apache.maven.project.ProjectModelResolver.resolveModel(ProjectModelResolver.java:155)
... 22 more
Caused by: org.sonatype.aether.transfer.ArtifactNotFoundException: Could not find artifact org.jboss.seam:seam-parent:pom:20-SNAPSHOT
at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:528)
... 26 more
[ERROR]
[ERROR]
有人可以帮忙吗?
答案 0 :(得分:0)
将pom.xml中的父版本从20-SNAPSHOT更改为19