2014-01-17 6 views
6

maven을 사용하여 project.so를 빌드 할 때 오류가 발생합니다. 받는다는 - 조립 플러그인 : 2.2.1 : 조립 (수 있도록 조립) 프로젝트 newstart-앱 ithelp에 는maven 빌드 오류 오류를 해결할 수 없습니다.

목표 org.apache.maven.plugins을 실행하지 못했습니다 도와 주셔서 감사합니다 : 실행 목표 만들기 - org.apache.maven.plugins : maven-assembly-plugin : 2.2.1 : 어셈블리 실패 : {null : null : null : jar} : groupId는 비워 둘 수 없습니다. 원인 : : 목표 실행 실행 - org.apache.maven.plugins : maven-assembly-plugin : 2.2.1 : 어셈블리 실패 : {null : null : null : jar} : groupId는 비워 둘 수 없습니다. 스택 추적 : org.apache.maven.lifecycle.LifecycleExecutionException : 목표를 실행하지 못했습니다. org.apache.maven.plugins : maven-assembly-plugin : 2.2.1 : 프로젝트 newstart-app에서 어셈블리 (make-assembly) -ithelp : 실행 목표 만들기 - org.apache.maven.plugins : maven-assembly-plugin : 2.2.1 : 어셈블리 실패 : {null : null : null : jar} : groupId는 비워 둘 수 없습니다. .

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 
<parent> 
    <groupId>com.feinno.app</groupId> 
    <artifactId>root-pom</artifactId> 
    <version>1.0.0</version> 
</parent> 
<modelVersion>4.0.0</modelVersion> 

<groupId>newstart.app</groupId> 
<artifactId>newstart-app-ithelp</artifactId> 
<version>0.0.1-SNAPSHOT</version> 
<packaging>jar</packaging> 

<name>newstart-app-ithelp</name> 
<url>http://maven.apache.org</url> 

<properties> 
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> 
</properties> 
<build> 
    <plugins> 
     <plugin> 
      <groupId>org.apache.maven.plugins</groupId> 
      <artifactId>maven-assembly-plugin</artifactId> 
      <version>2.2.1</version> 
      <configuration> 
       <appendAssemblyId>false</appendAssemblyId> 
       <descriptorRefs> 
        <descriptorRef>jar-with-dependencies</descriptorRef> 
       </descriptorRefs> 
       <archive> 
        <manifest> 
         <mainClass>com.newstart.app.ithelp.ITHelpBean</mainClass> 
        </manifest> 
       </archive> 
      </configuration> 
      <executions> 
       <execution> 
        <id>make-assembly</id> 
        <phase>package</phase> 
        <goals> 
         <goal>assembly</goal> 
        </goals> 
       </execution> 
      </executions> 
     </plugin> 
     <plugin> 
      <groupId>org.apache.maven.plugins</groupId> 
      <artifactId>maven-compiler-plugin</artifactId> 
      <version>2.3.2</version> 
      <configuration> 
       <verbose>true</verbose> 
       <fork>true</fork> 
       <source>1.6</source> 
       <target>1.6</target> 
      </configuration> 
     </plugin> 

     <plugin> 
      <groupId>org.apache.maven.plugins</groupId> 
      <artifactId>maven-surefire-plugin</artifactId> 
      <configuration> 
       <skip>true</skip> 
      </configuration> 
     </plugin> 
    </plugins> 
</build> 
<dependencies> 
    <dependency> 
     <groupId>org.apache.maven.plugins</groupId> 
     <artifactId>maven-resources-plugin</artifactId> 
     <version>2.4.3</version> 
    </dependency> 
    <dependency> 
     <groupId>junit</groupId> 
     <artifactId>junit</artifactId> 
     <version>3.8.1</version> 
     <scope>test</scope> 
    </dependency> 
    <dependency> 
     <groupId>log4j</groupId> 
     <artifactId>log4j</artifactId> 
     <version>1.2.16</version> 
    </dependency> 
    <dependency> 
     <groupId>org.apache.httpcomponents</groupId> 
     <artifactId>httpclient</artifactId> 
     <version>4.1.2</version> 
    </dependency> 
    <dependency> 
     <groupId>org.apache.httpcomponents</groupId> 
     <artifactId>httpmime</artifactId> 
     <version>4.1.2</version> 
    </dependency> 
    <dependency> 
     <groupId>com.google.code.gson</groupId> 
     <artifactId>gson</artifactId> 
     <version>2.0</version> 
    </dependency> 
    <dependency> 
     <groupId>com.feinno.app</groupId> 
     <artifactId>feinno-app-common</artifactId> 
     <version>0.0.1-SNAPSHOT</version> 
    </dependency> 
    <dependency> 
     <groupId>org.quartz-scheduler</groupId> 
     <artifactId>quartz</artifactId> 
     <version>2.2.0</version> 
    </dependency> 
    <dependency> 
     <groupId>mysql</groupId> 
     <artifactId>mysql-connector-java</artifactId> 
     <version>5.1.24</version> 
    </dependency> 
    <dependency> 
     <groupId>com.alibaba</groupId> 
     <artifactId>druid</artifactId> 
     <version>0.2.9</version> 
    </dependency> 
    <dependency> 
     <groupId>spring-aop</groupId> 
     <artifactId>spring-aop</artifactId> 
     <version>3.2.3</version> 
    </dependency> 
    <dependency> 
     <groupId>spring-beans</groupId> 
     <artifactId>spring-beans</artifactId> 
     <version>3.2.3</version> 
    </dependency> 
    <dependency> 
     <groupId>spring-context</groupId> 
     <artifactId>spring-context</artifactId> 
     <version>3.2.3</version> 
    </dependency> 
    <dependency> 
     <groupId>spring-core</groupId> 
     <artifactId>spring-core</artifactId> 
     <version>3.2.3</version> 
    </dependency> 
    <dependency> 
     <groupId>spring-jdbc</groupId> 
     <artifactId>spring-jdbc</artifactId> 
     <version>3.2.3</version> 
    </dependency> 
    <dependency> 
     <groupId>spring-tx</groupId> 
     <artifactId>spring-tx</artifactId> 
     <version>3.2.3</version> 
    </dependency> 
    <dependency> 
     <groupId>spring-expression</groupId> 
     <artifactId>spring-expression</artifactId> 
     <version>3.2.3</version> 
    </dependency> 
    <dependency> 
     <groupId>IKAnalyzer</groupId> 
     <artifactId>IKAnalyzer</artifactId> 
     <version>6</version> 
    </dependency> 
    <dependency> 
     <groupId>commons-logging</groupId> 
     <artifactId>commons-logging</artifactId> 
     <version>1.1.2</version> 
    </dependency> 
    <dependency> 
     <groupId>org.apache.lucene</groupId> 
     <artifactId>lucene-core</artifactId> 
     <version>3.6.0</version> 
    </dependency> 
    <dependency> 
     <groupId>net.sf.ehcache</groupId> 
     <artifactId>ehcache-core</artifactId> 
     <version>2.6.0</version> 
    </dependency> 
    <dependency> 
     <groupId>linq4j</groupId> 
     <artifactId>linq4j</artifactId> 
     <version>1.0</version> 
    </dependency> 
</dependencies> 
<distributionManagement> 
    <snapshotRepository> 
     <id>snapshots</id> 
     <url>http://10.10.208.92:8081/content/repositories/snapshots</url> 
    </snapshotRepository> 
</distributionManagement> 

+5

그것은 말합니다, groupId는 비워 둘 수 없습니다. 'pom.xml' 게시 –

+0

정확히 무엇을하려 했습니까? 어떤 명령? 또한 오류 메시지를 읽었습니까? –

+0

mvn 새로 설치를 실행 하시겠습니까? – vikingsteve

답변

17

나는 지역 .m2/repository 폴더를 삭제하여이 문제를 해결했습니다. 빌드가 성공적입니다.

+1

나는이 같은 inscrutable 오류를 싫어 ... 이것은 나를 위해 일했습니다. 창을 돌리고 어디에 있는지 알지 못한다면'% username % \. m2'로 가십시오. –

+0

이것은 나를 위해 일했습니다. 내 내부 연결 문제 때문에 mvn 빌드가 체크섬 오류로 인해 이전에 실패했습니다. 그 실패한 빌드 후에, 나는 "org.apache.maven.plugins의 실행 - 어셈블리를 만들었다. : maven-assembly-plugin : 2.2.1 : 어셈블리 실패 : artifact {null : null : null : jar} : groupId는 비어있어 라. " 오류. –

1

최근에 같은 문제가 발생했습니다. 내가 어셈블리 플러그인에서 알아 낸 전부

[DEBUG] Resolving project dependencies transitively. 
[DEBUG] com.g.....0.4-SNAPSHOT (selected for null) 
[DEBUG]   org.springframework:spring-expression:jar:3.1.4.RELEASE:compile (selected for compile) 
[DEBUG]   org.springframework:spring-asm:jar:3.1.4.RELEASE:compile (selected for compile) 
[DEBUG]   trove:trove:jar:1.0.2:compile (selected for compile) 
[INFO] ------------------------------------------------------------------------ 
[INFO] Reactor Summary: 
.... 
[INFO] p.....mo ....................................... FAILURE [57.144s] 
[INFO] BUILD FAILURE 

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-assembly-plugin:2.5.4:single (full) on project p...o: Execution full of goal org.apache.maven.plugins:maven-assembly-plugin:2.5.4:single failed: For artifact {null:null:null:jar}: The groupId cannot be empty. -> [Help 1] 

을 : 그 어셈블리 플러그인 종속성/보고서 오류를 전파되지 않습니다집니다. 예. 컴파일러는 깨진 물건에 대해 경고 :

[WARNING] error reading /var/lib/jenkins/...org/hyperic/sigar/1.6.3.82/sigar-1.6.3.82.jar; error in opening zip file 
[WARNING] error reading /var/lib/jenkins/.../org/hyperic/sigar/1.6.3.82/sigar-1.6.3.82.jar; error in opening zip file 

을 따라서, 당신은 의존성 문제를 해결하기 위해 mvn dependency:tree를 호출,이 문제에 갇혀 한 경우.

+0

Codehaus를 중지하면 발생합니다. https://www.codehaus.org/termination.html – mkhludnev

+0

게시 해 주셔서 감사합니다. 당신의 솔루션은 제 문제였습니다. 이제 나는 그렇게 할 때 에너지를 소비하도록 선택해야한다고 생각합니다. [MASSEMBLY-664] (https://issues.apache.org/jira/browse/MASSEMBLY-664)를 재현 할 수 있다고 생각합니다. –

5

광산에는 다른 해결책이 있습니다. 나는 어떤 <version>, 하고<version>와 항아리 에 대한 <dependencies> 항목을했다없이 단지 에 대한 <dependencyManagement> 항목을 가진 POM했다. 또한 부모 POM은 <dependencyManagement> 항목이 이고이 같음 <version>입니다. 분명히 이것은 Maven (3.3)을 혼란스럽게 만들었습니다. 빌드는 잘 작동했지만 패키지는 그렇지 않았습니다.

수정 : 자식 POM에서 <dependencyManagement> 항목을 제거하고 하위 POM의 <dependencies> 항목에서 <version>을 제거하십시오.

Parent pom.xml: 
<dependencyManagement> 
    <dependencies> 
     <dependency> 
      <groupId>org.apache.httpcomponents</groupId> 
      <artifactId>httpclient</artifactId> 
      <version>${httpclient.version}</version> 
     </dependency> 
    </dependencies> 
</dependencyManagement> 

Child pom.xml: 
<dependencyManagement> 
    <dependencies> 
     <dependency> 
      <groupId>org.apache.httpcomponents</groupId> 
      <artifactId>httpclient</artifactId> 
     </dependency> 
    </dependencies> 
</dependencyManagement> 
... 
<dependencies> 
    <dependency> 
     <groupId>org.apache.httpcomponents</groupId> 
     <artifactId>httpclient</artifactId> 
     <version>${httpclient.version}</version> 
    </dependency> 
</dependencies> 

포스트 수정 :

코드에서, 여기에 깨진 상황 부모 POM이 같은 아동 치어는이 단지이

<dependencies> 
    <dependency> 
     <groupId>org.apache.httpcomponents</groupId> 
     <artifactId>httpclient</artifactId> 
    </dependency> 
</dependencies> 
1

당신이 출력을 구축하여 받는다는 보면, 말하는 몇 가지 경고가 있어야합니다.pom이 유효하지 않으면 전 이적 종속성 (있는 경우)을 사용할 수 없습니다. 해당 poms에 해당하는 모든 이슈를 삭제하고 다시 작성하면 전체 저장소를 삭제할 필요가 없습니다.

관련 문제