1
我創建了jboss-javaee-webapp-ear-blank-archtype項目並且在版本7.1.3.Final中,並且在Eclipse Kepler中創建後,我做了maven clean & maven install並安裝後把錯誤下:無法在maven上執行項目目標
[***@localhost ear]$ mvn -X clean install
Apache Maven 3.2.2 (45f7c06d68e745d05611f7fd14efb6594181933e; 2014-06-17T18:21:42+04:30)
Maven home: /home/aryana/Documents/Maven/apache-maven-3.2.2
Java version: 1.7.0, vendor: Oracle Corporation
Java home: /home/aryana/Documents/Software-Portable/jdk1.7.0/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "3.15.5-200.fc20.x86_64", arch: "amd64", family: "unix"
[INFO] Error stacktraces are turned on.
[DEBUG] Reading global settings from /home/aryana/Documents/Maven/apache-maven-3.2.2/conf/settings.xml
[DEBUG] Reading user settings from /home/aryana/.m2/settings.xml
[DEBUG] Using local repository at /home/aryana/.m2/repository
[DEBUG] Using manager EnhancedLocalRepositoryManager with priority 10.0 for /home/aryana/.m2/repository
[INFO] Scanning for projects...
[DEBUG] Extension realms for project com:IBM-ear:ear:1.0-SNAPSHOT: (none)
[DEBUG] Looking up lifecyle mappings for packaging ear from ClassRealm[plexus.core, parent: null]
[DEBUG] === REACTOR BUILD PLAN ================================================
[DEBUG] Project: com:IBM-ear:ear:1.0-SNAPSHOT
[DEBUG] Tasks: [install]
[DEBUG] Style: Regular
[DEBUG] =======================================================================
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building IBM - ear 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[DEBUG] Lifecycle default -> [validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resources, test-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy]
[DEBUG] Lifecycle clean -> [pre-clean, clean, post-clean]
[DEBUG] Lifecycle site -> [pre-site, site, post-site, site-deploy]
[DEBUG] Lifecycle default -> [validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resources, test-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy]
[DEBUG] Lifecycle clean -> [pre-clean, clean, post-clean]
[DEBUG] Lifecycle site -> [pre-site, site, post-site, site-deploy]
[DEBUG] Lifecycle default -> [validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resources, test-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy]
[DEBUG] Lifecycle clean -> [pre-clean, clean, post-clean]
[DEBUG] Lifecycle site -> [pre-site, site, post-site, site-deploy]
[DEBUG] Lifecycle default -> [validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resources, test-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy]
[DEBUG] Lifecycle clean -> [pre-clean, clean, post-clean]
[DEBUG] Lifecycle site -> [pre-site, site, post-site, site-deploy]
[DEBUG] Lifecycle default -> [validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resources, test-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy]
[DEBUG] Lifecycle clean -> [pre-clean, clean, post-clean]
[DEBUG] Lifecycle site -> [pre-site, site, post-site, site-deploy]
[DEBUG] === PROJECT BUILD PLAN ================================================
[DEBUG] Project: com:IBM-ear:1.0-SNAPSHOT
[DEBUG] Dependencies (collect): []
[DEBUG] Dependencies (resolve): [test]
[DEBUG] Repositories (dependencies): [central (http://repo.maven.apache.org/maven2, releases)]
[DEBUG] Repositories (plugins) : [central (http://repo.maven.apache.org/maven2, releases)]
[DEBUG] -----------------------------------------------------------------------
[DEBUG] Goal: org.apache.maven.plugins:maven-ear-plugin:2.6:generate-application-xml (default-generate-application-xml)
[DEBUG] Style: Regular
[DEBUG] Configuration: <?xml version="1.0" encoding="UTF-8"?>
<configuration>
<defaultLibBundleDir>lib</defaultLibBundleDir>
<description default-value="${project.description}"/>
<displayName default-value="${project.artifactId}"/>
<encoding default-value="UTF-8"/>
<fileNameMapping>no-version</fileNameMapping>
<generateApplicationXml default-value="true"/>
<generateModuleId default-value="false"/>
<generatedDescriptorLocation default-value="${project.build.directory}"/>
<includeLibInApplicationXml default-value="false"/>
<modules></modules>
<project default-value="${project}"/>
<version default-value="1.3">6</version>
<workDirectory default-value="${project.build.directory}/${project.build.finalName}"/>
</configuration>
[DEBUG] -----------------------------------------------------------------------
[DEBUG] Goal: org.apache.maven.plugins:maven-resources-plugin:2.4.3:resources (default-resources)
[DEBUG] Style: Regular
[DEBUG] Configuration: <?xml version="1.0" encoding="UTF-8"?>
<configuration>
<buildFilters default-value="${project.build.filters}"/>
<encoding default-value="${project.build.sourceEncoding}">${encoding}</encoding>
<escapeString default-value="${maven.resources.escapeString}"/>
<escapeWindowsPaths default-value="true">${maven.resources.escapeWindowsPaths}</escapeWindowsPaths>
<includeEmptyDirs default-value="false">${maven.resources.includeEmptyDirs}</includeEmptyDirs>
<outputDirectory default-value="${project.build.outputDirectory}"/>
<overwrite default-value="false">${maven.resources.overwrite}</overwrite>
<project default-value="${project}"/>
<resources default-value="${project.resources}"/>
<session default-value="${session}"/>
<useBuildFilters default-value="true"/>
<useDefaultDelimiters default-value="true"/>
</configuration>
[DEBUG] -----------------------------------------------------------------------
[DEBUG] Goal: org.apache.maven.plugins:maven-ear-plugin:2.6:ear (default-ear)
[DEBUG] Style: Regular
[DEBUG] Configuration: <?xml version="1.0" encoding="UTF-8"?>
<configuration>
<defaultLibBundleDir>lib</defaultLibBundleDir>
<earSourceDirectory default-value="${basedir}/src/main/application"/>
<earSourceIncludes default-value="**"/>
<encoding default-value="UTF-8"/>
<escapeString>${maven.ear.escapeString}</escapeString>
<escapedBackslashesInFilePath default-value="false">${maven.ear.escapedBackslashesInFilePath}</escapedBackslashesInFilePath>
<fileNameMapping>no-version</fileNameMapping>
<filtering default-value="false"/>
<finalName default-value="${project.build.finalName}"/>
<generatedDescriptorLocation default-value="${project.build.directory}"/>
<includeLibInApplicationXml default-value="false"/>
<modules></modules>
<outputDirectory default-value="${project.build.directory}"/>
<project default-value="${project}"/>
<session>${session}</session>
<version default-value="1.3">6</version>
<workDirectory default-value="${project.build.directory}/${project.build.finalName}"/>
</configuration>
[DEBUG] -----------------------------------------------------------------------
[DEBUG] Goal: org.apache.maven.plugins:maven-install-plugin:2.4:install (default-install)
[DEBUG] Style: Regular
[DEBUG] Configuration: <?xml version="1.0" encoding="UTF-8"?>
<configuration>
<artifact default-value="${project.artifact}"/>
<attachedArtifacts default-value="${project.attachedArtifacts}"/>
<createChecksum default-value="false">${createChecksum}</createChecksum>
<localRepository>${localRepository}</localRepository>
<packaging default-value="${project.packaging}"/>
<pomFile default-value="${project.file}"/>
<skip default-value="false">${maven.install.skip}</skip>
<updateReleaseInfo default-value="false">${updateReleaseInfo}</updateReleaseInfo>
</configuration>
[DEBUG] =======================================================================
[DEBUG] Could not find metadata com:IBM-web:1.0-SNAPSHOT/maven-metadata.xml in local (/home/aryana/.m2/repository)
[DEBUG] Could not find metadata com:IBM-web:1.0-SNAPSHOT/maven-metadata.xml in local (/home/aryana/.m2/repository)
[WARNING] The POM for com:IBM-web:war:1.0-SNAPSHOT is missing, no dependency information available
[DEBUG] Could not find metadata com:IBM-ejb:1.0-SNAPSHOT/maven-metadata.xml in local (/home/aryana/.m2/repository)
[DEBUG] Could not find metadata com:IBM-ejb:1.0-SNAPSHOT/maven-metadata.xml in local (/home/aryana/.m2/repository)
[WARNING] The POM for com:IBM-ejb:jar:1.0-SNAPSHOT is missing, no dependency information available
[DEBUG] Dependency collection stats: {ConflictMarker.analyzeTime=1, ConflictMarker.markTime=0, ConflictMarker.nodeCount=3, ConflictIdSorter.graphTime=0, ConflictIdSorter.topsortTime=1, ConflictIdSorter.conflictIdCount=2, ConflictIdSorter.conflictIdCycleCount=0, ConflictResolver.totalTime=2, ConflictResolver.conflictItemCount=2, DefaultDependencyCollector.collectTime=8, DefaultDependencyCollector.transformTime=5}
[DEBUG] com:IBM-ear:ear:1.0-SNAPSHOT
[DEBUG] com:IBM-web:war:1.0-SNAPSHOT:compile
[DEBUG] com:IBM-ejb:jar:1.0-SNAPSHOT:compile
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.226 s
[INFO] Finished at: 2014-07-20T16:24:00+04:30
[INFO] Final Memory: 7M/301M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project IBM-ear: Could not resolve dependencies for project com:IBM-ear:ear:1.0-SNAPSHOT: The following artifacts could not be resolved: com:IBM-web:war:1.0-SNAPSHOT, com:IBM-ejb:jar:1.0-SNAPSHOT: Could not find artifact com:IBM-web:war:1.0-SNAPSHOT -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal on project IBM-ear: Could not resolve dependencies for project com:IBM-ear:ear:1.0-SNAPSHOT: The following artifacts could not be resolved: com:IBM-web:war:1.0-SNAPSHOT, com:IBM-ejb:jar:1.0-SNAPSHOT: Could not find artifact com:IBM-web:war:1.0-SNAPSHOT
at org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.getDependencies(LifecycleDependencyResolver.java:220)
at org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.resolveProjectDependencies(LifecycleDependencyResolver.java:127)
at org.apache.maven.lifecycle.internal.MojoExecutor.ensureDependenciesAreResolved(MojoExecutor.java:257)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:200)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:120)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:347)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:154)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:584)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:213)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:157)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.apache.maven.project.DependencyResolutionException: Could not resolve dependencies for project com:IBM-ear:ear:1.0-SNAPSHOT: The following artifacts could not be resolved: com:IBM-web:war:1.0-SNAPSHOT, com:IBM-ejb:jar:1.0-SNAPSHOT: Could not find artifact com:IBM-web:war:1.0-SNAPSHOT
at org.apache.maven.project.DefaultProjectDependenciesResolver.resolve(DefaultProjectDependenciesResolver.java:198)
at org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.getDependencies(LifecycleDependencyResolver.java:195)
... 22 more
Caused by: org.eclipse.aether.resolution.DependencyResolutionException: The following artifacts could not be resolved: com:IBM-web:war:1.0-SNAPSHOT, com:IBM-ejb:jar:1.0-SNAPSHOT: Could not find artifact com:IBM-web:war:1.0-SNAPSHOT
at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveDependencies(DefaultRepositorySystem.java:384)
at org.apache.maven.project.DefaultProjectDependenciesResolver.resolve(DefaultProjectDependenciesResolver.java:192)
... 23 more
Caused by: org.eclipse.aether.resolution.ArtifactResolutionException: The following artifacts could not be resolved: com:IBM-web:war:1.0-SNAPSHOT, com:IBM-ejb:jar:1.0-SNAPSHOT: Could not find artifact com:IBM-web:war:1.0-SNAPSHOT
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:459)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:262)
at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveDependencies(DefaultRepositorySystem.java:367)
... 24 more
Caused by: org.eclipse.aether.transfer.ArtifactNotFoundException: Could not find artifact com:IBM-web:war:1.0-SNAPSHOT
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:449)
... 26 more
[ERROR]
[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/DependencyResolutionException
但是,NetBeans的不要這個問題,伊斯利創建使用Maven一個項目。 我該怎麼辦?
這個問題是基於'[警告] POM for com:IBM-web:war:1.0-SNAPSHOT丟失,沒有依賴信息可用'... – khmarbaise
我今天發現了這個問題,但是Past項目也有這個問題。 – Silent
該項目中的依賴關係不正確。如果這是多模塊構建,則您的依賴關係也不正確。 – khmarbaise