2016-06-17 2 views
-1

моя система конфигурации являетсяMaven Сбой сборки. Обновляя maven (без исправления), он строит, почему?

Apache Maven 3.0.5
Maven home: D:\Program Files\NetBeans 8.1\java\maven
Java version: 1.7.0_79, vendor: Oracle Corporation
Java home: D:\Java\jdk1.7.0_79\jre
Default locale: it_IT, platform encoding: Cp1252
OS name: "windows 8.1", version: "6.3", arch: "amd64", family: "windows"

, когда я построить свой Maven проект возвращает эту ошибку:

------------------------------------------------------------------------ 
BUILD FAILURE 
------------------------------------------------------------------------ 
Total time: 8.678s 
Finished at: Fri Jun 17 20:27:43 CEST 2016 
Final Memory: 31M/312M 
------------------------------------------------------------------------ 
Failed to execute goal org.apache.maven.plugins:maven-war-plugin:2.3:war (default-war) on project eWheel: Execution default-war of goal org.apache.maven.plugins:maven-war-plugin:2.3:war failed: For artifact {org.jboss.shrinkwrap.resolver:shrinkwrap-resolver-impl-maven:null:jar}: The version cannot be empty. -> [Help 1] 
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-war-plugin:2.3:war (default-war) on project eWheel: Execution default-war of goal org.apache.maven.plugins:maven-war-plugin:2.3:war failed: For artifact {org.jboss.shrinkwrap.resolver:shrinkwrap-resolver-impl-maven:null:jar}: The version cannot be empty. 
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:225) 
    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:84) 
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59) 
    at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183) 
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161) 
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320) 
    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:57) 
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 
    at java.lang.reflect.Method.invoke(Method.java:606) 
    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.apache.maven.plugin.PluginExecutionException: Execution default-war of goal org.apache.maven.plugins:maven-war-plugin:2.3:war failed: For artifact {org.jboss.shrinkwrap.resolver:shrinkwrap-resolver-impl-maven:null:jar}: The version cannot be empty. 
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:110) 
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209) 
    ... 19 more 
Caused by: org.apache.maven.artifact.InvalidArtifactRTException: For artifact {org.jboss.shrinkwrap.resolver:shrinkwrap-resolver-impl-maven:null:jar}: The version cannot be empty. 
    at org.apache.maven.artifact.DefaultArtifact.validateIdentity(DefaultArtifact.java:148) 
    at org.apache.maven.artifact.DefaultArtifact.<init>(DefaultArtifact.java:123) 
    at org.apache.maven.artifact.factory.DefaultArtifactFactory.createArtifact(DefaultArtifactFactory.java:157) 
    at org.apache.maven.artifact.factory.DefaultArtifactFactory.createDependencyArtifact(DefaultArtifactFactory.java:57) 
    at org.apache.maven.repository.legacy.LegacyRepositorySystem.createDependencyArtifact(LegacyRepositorySystem.java:149) 
    at org.apache.maven.project.MavenProject.getManagedVersionMap(MavenProject.java:1624) 
    at org.apache.maven.project.MavenProject.deepCopy(MavenProject.java:1992) 
    at org.apache.maven.project.MavenProject.<init>(MavenProject.java:216) 
    at org.apache.maven.archiver.MavenArchiver.createArchive(MavenArchiver.java:501) 
    at org.apache.maven.plugin.war.WarMojo.performPackaging(WarMojo.java:244) 
    at org.apache.maven.plugin.war.WarMojo.execute(WarMojo.java:175) 
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101) 
    ... 20 more 


For more information about the errors and possible solutions, please read the following articles: 
[Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException 

я не понимаю, почему ...

это мой pom.xml

<properties> 
     <endorsed.dir>${project.build.directory}/endorsed</endorsed.dir> 
     <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> 
    </properties> 

    <!-- clip --> 
    <dependencyManagement> 
     <dependencies> 
      <dependency> 
       <groupId>org.jboss.shrinkwrap.resolver</groupId> 
       <artifactId>shrinkwrap-resolver-impl-maven</artifactId> 
       <scope>test</scope> 
      </dependency> 
      <dependency> 
       <groupId>org.jboss.arquillian</groupId> 
       <artifactId>arquillian-bom</artifactId> 
       <version>1.1.11.Final</version> 
       <scope>import</scope> 
       <type>pom</type> 
      </dependency> 
     </dependencies> 
    </dependencyManagement> 
    <!-- clip --> 

    <dependencies> 
     <dependency> 
      <groupId>org.eclipse.persistence</groupId> 
      <artifactId>eclipselink</artifactId> 
      <version>2.5.2</version> 
      <scope>provided</scope> 
     </dependency> 
     <dependency> 
      <groupId>org.eclipse.persistence</groupId> 
      <artifactId>org.eclipse.persistence.jpa.modelgen.processor</artifactId> 
      <version>2.5.2</version> 
      <scope>provided</scope> 
     </dependency> 
     <dependency> 
      <groupId>javax</groupId> 
      <artifactId>javaee-web-api</artifactId> 
      <version>7.0</version> 
      <scope>provided</scope> 
     </dependency> 
     <dependency> 
      <groupId>org.primefaces</groupId> 
      <artifactId>primefaces</artifactId> 
      <version>6.0</version> 
     </dependency> 
     <dependency> 
      <groupId>junit</groupId> 
      <artifactId>junit</artifactId> 
      <version>4.8.1</version> 
      <scope>test</scope> 
     </dependency> 
     <!-- clip --> 
     <dependency> 
      <groupId>org.jboss.arquillian.junit</groupId> 
      <artifactId>arquillian-junit-container</artifactId> 
      <scope>test</scope> 
     </dependency> 
     <!-- clip --> 
    </dependencies> 

    <profiles> 
     <!-- Weld EE embedded profile --> 
     <profile> 
      <id>arquillian-weld-ee-embedded</id> 
      <dependencies> 
       <dependency> 
        <groupId>org.jboss.spec</groupId> 
        <artifactId>jboss-javaee-6.0</artifactId> 
        <version>1.0.0.Final</version> 
        <type>pom</type> 
        <scope>provided</scope> 
       </dependency> 
       <dependency> 
        <groupId>org.jboss.arquillian.container</groupId> 
        <artifactId>arquillian-weld-ee-embedded-1.1</artifactId> 
        <version>1.0.0.CR3</version> 
        <scope>test</scope> 
       </dependency> 
       <dependency> 
        <groupId>org.jboss.weld</groupId> 
        <artifactId>weld-core</artifactId> 
        <version>1.1.5.Final</version> 
        <scope>test</scope> 
       </dependency> 
       <dependency> 
        <groupId>org.slf4j</groupId> 
        <artifactId>slf4j-simple</artifactId> 
        <version>1.6.4</version> 
        <scope>test</scope> 
       </dependency> 
      </dependencies> 
     </profile> 
     <!-- Weld EE embedded profile --> 
     <!-- Glassfish embedded profile --> 
     <profile> 
      <id>arquillian-glassfish-embedded</id> 
      <dependencies> 
       <dependency> 
        <groupId>org.jboss.arquillian.container</groupId> 
        <artifactId>arquillian-glassfish-embedded-3.1</artifactId> 
        <version>1.0.0.CR3</version> 
        <scope>test</scope> 
       </dependency> 
       <dependency> 
        <groupId>org.glassfish.main.extras</groupId> 
        <artifactId>glassfish-embedded-all</artifactId> 
        <version>3.1.2</version> 
        <scope>provided</scope> 
       </dependency> 
      </dependencies> 
     </profile> 
     <profile> 
      <id>arquillian-payara-embedded</id> 
      <dependencies> 
       <dependency> 
        <groupId>org.jboss.arquillian.container</groupId> 
        <artifactId>arquillian-glassfish-embedded-3.1</artifactId> 
        <version>1.0.0.CR4</version> 
        <scope>test</scope> 
       </dependency> 
       <dependency> 
        <groupId>fish.payara.extras</groupId> 
        <artifactId>payara-embedded-all</artifactId> 
        <version>4.1.1.161</version> 
        <scope>test</scope> 
       </dependency> 
      </dependencies> 
     </profile> 
     <!-- Glassfish embedded profile --> 
     <!-- JBoss AS profile --> 
     <profile> 
      <id>arquillian-jbossas-managed</id> 
      <dependencies> 
       <dependency> 
        <groupId>org.jboss.spec</groupId> 
        <artifactId>jboss-javaee-6.0</artifactId> 
        <version>1.0.0.Final</version> 
        <type>pom</type> 
        <scope>provided</scope> 
       </dependency> 
       <dependency> 
        <groupId>org.jboss.as</groupId> 
        <artifactId>jboss-as-arquillian-container-managed</artifactId> 
        <version>7.1.1.Final</version> 
        <scope>test</scope> 
       </dependency> 
       <dependency> 
        <groupId>org.jboss.arquillian.protocol</groupId> 
        <artifactId>arquillian-protocol-servlet</artifactId> 
        <scope>test</scope> 
       </dependency> 
      </dependencies> 
     </profile> 
     <!-- JBoss AS profile --> 
     <!-- remote container Boss AS 7.1 --> 
     <profile> 
      <id>arquillian-jbossas-remote</id> 
      <dependencies> 
       <dependency> 
        <groupId>org.jboss.spec</groupId> 
        <artifactId>jboss-javaee-6.0</artifactId> 
        <version>1.0.0.Final</version> 
        <type>pom</type> 
        <scope>provided</scope> 
       </dependency> 
       <dependency> 
        <groupId>org.jboss.as</groupId> 
        <artifactId>jboss-as-arquillian-container-remote</artifactId> 
        <version>7.1.1.Final</version> 
        <scope>test</scope> 
       </dependency> 
       <dependency> 
        <groupId>org.jboss.arquillian.protocol</groupId> 
        <artifactId>arquillian-protocol-servlet</artifactId> 
        <scope>test</scope> 
       </dependency> 
      </dependencies> 
     </profile> 
     <!-- remote container Boss AS 7.1 --> 
     <!-- remote container Glassfish 3.1.2 --> 
     <profile> 
      <id>arquillian-glassfish-remote</id> 
      <dependencies> 
       <dependency> 
        <groupId>org.jboss.spec</groupId> 
        <artifactId>jboss-javaee-6.0</artifactId> 
        <version>1.0.0.Final</version> 
        <type>pom</type> 
        <scope>provided</scope> 
       </dependency> 
       <dependency> 
        <groupId>org.jboss.weld</groupId> 
        <artifactId>weld-api</artifactId> 
        <version>1.1.Final</version> 
        <scope>test</scope> 
       </dependency> 
       <dependency> 
        <groupId>org.jboss.arquillian.container</groupId> 
        <artifactId>arquillian-glassfish-remote-3.1</artifactId> 
        <version>1.0.0.CR3</version> 
        <scope>test</scope> 
       </dependency> 
      </dependencies> 
     </profile> 
     <!-- remote container Glassfish 3.1.2 --> 
     <!-- remote container Payara --> 
     <profile> 
      <id>arquillian-payara-remote</id> 
      <dependencies> 
       <dependency> 
        <groupId>org.jboss.spec</groupId> 
        <artifactId>jboss-javaee-6.0</artifactId> 
        <version>1.0.0.Final</version> 
        <type>pom</type> 
        <scope>provided</scope> 
       </dependency> 
       <dependency> 
        <groupId>org.jboss.weld</groupId> 
        <artifactId>weld-api</artifactId> 
        <version>1.1.Final</version> 
        <scope>test</scope> 
       </dependency> 
       <dependency> 
        <groupId>org.jboss.arquillian.container</groupId> 
        <artifactId>arquillian-glassfish-remote-3.1</artifactId> 
        <version>1.0.0.CR4</version> 
        <scope>test</scope> 
       </dependency> 
      </dependencies> 
     </profile> 
     <!-- remote container payara--> 
    </profiles> 

    <build> 
     <plugins> 
      <plugin> 
       <groupId>org.apache.maven.plugins</groupId> 
       <artifactId>maven-compiler-plugin</artifactId> 
       <version>3.1</version> 
       <configuration> 
        <source>1.7</source> 
        <target>1.7</target> 
        <compilerArguments> 
         <endorseddirs>${endorsed.dir}</endorseddirs> 
        </compilerArguments> 
       </configuration> 
      </plugin> 
      <plugin> 
       <groupId>org.apache.maven.plugins</groupId> 
       <artifactId>maven-war-plugin</artifactId> 
       <version>2.3</version> 
       <configuration> 
        <failOnMissingWebXml>false</failOnMissingWebXml> 
       </configuration> 
      </plugin> 
      <plugin> 
       <groupId>org.apache.maven.plugins</groupId> 
       <artifactId>maven-dependency-plugin</artifactId> 
       <version>2.6</version> 
       <executions> 
        <execution> 
         <phase>validate</phase> 
         <goals> 
          <goal>copy</goal> 
         </goals> 
         <configuration> 
          <outputDirectory>${endorsed.dir}</outputDirectory> 
          <silent>true</silent> 
          <artifactItems> 
           <artifactItem> 
            <groupId>javax</groupId> 
            <artifactId>javaee-endorsed-api</artifactId> 
            <version>7.0</version> 
            <type>jar</type> 
           </artifactItem> 
          </artifactItems> 
         </configuration> 
        </execution> 
       </executions> 
      </plugin> 
     </plugins> 
    </build> 

</project> 

проблема в отсутствующей версии в зависимости, но ... , если я использую maven 3.3.9 без фиксации его сборки ...

Может кто-нибудь помочь мне понять причину?

+0

Можете ли вы разместить свой ПОМ? – Tunaki

+0

извините, я забыл – Marco

+0

Ну, ошибка четкая: зависимость 'shrinkwrap-resolver-impl-maven' не имеет' '(она находится внутри раздела' '). Вы должны указать версию. [Может быть, 2.2.2] (http://mvnrepository.com/artifact/org.jboss.shrinkwrap.resolver/shrinkwrap-resolver-impl-maven/2.2.2)? – Tunaki

ответ

1

Вы забыли версию на одной из ваших зависимостей?

For artifact {org.jboss.shrinkwrap.resolver:shrinkwrap-resolver-impl-maven:null:jar}: The version cannot be empty.

Я прокомментировал неправильный пост, извините armadinho.

Возможно, это - Запретить программную инъекцию зависимостей проекта MNG-5818.

+0

да, но это не мой настоящий вопрос – Marco

1

Попробуйте добавить номер версии в рамках управления зависимостями.

<dependencyManagement> 
    <dependencies> 
     <dependency> 
      <groupId>org.jboss.shrinkwrap.resolver</groupId> 
      <artifactId>shrinkwrap-resolver-impl-maven</artifactId> 

      <!-- Try adding version here --> 
      <version>...</version> 

      <scope>test</scope> 
     </dependency> 
    </dependencies> 
</dependencyManagement> 
+0

вот в чем проблема, но почему это работает с maven 3.3.9? – Marco

+0

это исправить проблему, но не говорит мне, почему она строит обновление maven – Marco

Смежные вопросы