2015-07-11 97 views
2

我在做什么?为<some_project>丢失,不依赖现有信息的POM

我创建了一个maven项目,在那里我捆绑一些外部罐

project/pom.xml 
     /bin 
      /safebrowsing2_2.11-0.2.5.jar 
      /scala-http-client_2.11-1.0.jar 

的库safebrowsing2_2.11-0.2.5.jarscala-http-client_2.11-1.0.jar捆绑在一起,因为它们不是在Nexus提供,并且需要对传统的目的定制罐。

pom.xml使用以下plugins将其打包在一个罐子

  <plugins> 
      <plugin> 
       <groupId>com.googlecode.addjars-maven-plugin</groupId> 
       <artifactId>addjars-maven-plugin</artifactId> 
       <version>1.0.5</version> 
       <executions> 
        <execution> 
         <goals> 
          <goal>add-jars</goal> 
         </goals> 
         <configuration> 
          <resources> 
           <resource> 
            <directory>${basedir}/bin</directory> 
           </resource> 
          </resources> 
         </configuration> 
        </execution> 
       </executions> 
      </plugin> 
      <plugin> 
       <groupId>org.apache.maven.plugins</groupId> 
       <artifactId>maven-shade-plugin</artifactId> 
       <version>2.2</version> 
       <executions> 
        <execution> 
         <phase>package</phase> 
         <goals> 
          <goal>shade</goal> 
         </goals> 
        </execution> 
       </executions> 
      </plugin> 
     </plugins> 

当此基础上Jenkins运行失败与以下警告

[WARNING] The POM for com.shn:project-safebrowsing2_2.11-0.2.5.jar:jar:1.0-SNAPSHOT is missing, no dependency information available 
[WARNING] The POM for com.shn:project-scala-http-client_2.11-1.0.jar:jar:1.0-SNAPSHOT is missing, no dependency information available 

和错误是

[ERROR] Failed to execute goal on project project-installer: Could not resolve dependencies for project com.project-installer:war:0.19.0-SNAPSHOT: The following artifacts could not be resolved: com.shn:project-external-dependencies-safebrowsing2_2.11-0.2.5.jar:jar:1.0-SNAPSHOT, com.shn:project-scala-http-client_2.11-1.0.jar:jar:1.0-SNAPSHOT: Could not find artifact com.shn:project-safebrowsing2_2.11-0.2.5.jar:jar:1.0-SNAPSHOT in company (http://172.62.11.24:8080/nexus/content/groups/public) -> [Help 1] 
16:17:03 [ERROR] 
16:17:03 [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. 
16:17:03 [ERROR] Re-run Maven using the -X switch to enable full debug logging. 
16:17:03 [ERROR] 
16:17:03 [ERROR] For more information about the errors and possible solutions, please read the following articles: 
16:17:03 [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException 

问题

是的,我知道他们没有pom.xml,但我该如何让构建通过并生成工件?

+0

有些人会觉得警告和错误有些有趣之间的相关性,其他人仅仅注意到警告^^为了执行,你必须正确地安装2个错误的假象目标。 –

+0

将它们安装到你的连接中,并完成。或者开始使用存储库管理器。 – khmarbaise

回答