2013-02-21 5 views
4

Tycho를 사용하여 프로젝트에 Maven 빌드 환경을 설정하는 방법에 대한 Vogella의 자습서 (http://www.vogella.com/articles/EclipseTycho/article.html)를 따라 왔습니다. 내 프로젝트는 이미 여러 플러그인, 기능 및 업데이트 사이트에서 상당히 큰 편 이었지만, mvn cleanmvn compile이 잘 작동하고 튜토리얼을 모두 mvn install까지 계속 수행했습니다. 내가 직면 한 문제는 혼란 스럽다. 다음 오류가 계속 발생합니다 :Tycho/Maven 구성 문제 : "Tycho 빌드 확장이 구성되지 않았습니다"

[INFO] --- tycho-p2-director-plugin:0.16.0:materialize-products (materialize-products) @ parent --- 
[DEBUG] Configuring mojo org.eclipse.tycho:tycho-p2-director-plugin:0.16.0:materialize-products from plugin realm ClassRealm[plugin>org.eclipse.tycho:tycho-p2-director-plugin:0.16.0, parent: [email protected]] 
[DEBUG] Configuring mojo 'org.eclipse.tycho:tycho-p2-director-plugin:0.16.0:materialize-products' with basic configurator --> 
[DEBUG] (f) directorRuntime = internal 
[DEBUG] (f) installFeatures = true 
[DEBUG] (f) profile = DefaultProfile 
[DEBUG] (f) project = MavenProject: com.micrium.configbuilder:parent:1.1.0-SNAPSHOT @ C:\Documents and Settings\Thomas Sylvester\git\plugin-suite\com.micrium.configbuilder.tycho.master\pom.xml 
[DEBUG] (f) session = [email protected] 
[DEBUG] (f) source = targetPlatform 
[DEBUG] -- end configuration -- 
[INFO] No product definitions found. Nothing to do. 
[INFO] ------------------------------------------------------------------------ 
[INFO] Reactor Summary: 
[INFO] 
[INFO] parent ............................................ FAILURE [0.201s] 

이 스택 추적에서 플러그인 목록을 Snipped했습니다. 그들은 모두 건너 뛰었습니다. 부모는 실패했습니다.

[INFO] ------------------------------------------------------------------------ 
[INFO] BUILD FAILURE 
[INFO] ------------------------------------------------------------------------ 
[INFO] Total time: 37.735s 
[INFO] Finished at: Thu Feb 21 06:42:47 PST 2013 
[INFO] Final Memory: 65M/158M 
[INFO] ------------------------------------------------------------------------ 
[ERROR] Failed to execute goal org.eclipse.tycho:tycho-p2-director-plugin:0.16.0:materialize-products (materialize-products) on project parent: Execution materialize-products of goal org.eclipse.tycho:tycho-p2-director-plugin:0.16.0:materialize-products failed: Tycho build extension not configured for MavenProject: com.micrium.configbuilder:parent:1.1.0-SNAPSHOT @ C:\Documents and Settings\Erika Redmark\git\plugin-suite\com.micrium.configbuilder.tycho.master\pom.xml -> [Help 1] 
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.eclipse.tycho:tycho-p2-director-plugin:0.16.0:materialize-products (materialize-products) on project parent: Execution materialize-products of goal org.eclipse.tycho:tycho-p2-director-plugin:0.16.0:materialize-products failed: Tycho build extension not configured for MavenProject: com.micrium.configbuilder:parent:1.1.0-SNAPSHOT @ C:\Documents and Settings\Erika Redmark\git\plugin-suite\com.micrium.configbuilder.tycho.master\pom.xml 
     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: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.apache.maven.plugin.PluginExecutionException: Execution materialize-products of goal org.eclipse.tycho:tycho-p2-director-plug 
in:0.16.0:materialize-products failed: Tycho build extension not configured for MavenProject: com.micrium.configbuilder:parent:1.1.0-SNAPSHO 
T @ C:\Documents and Settings\Erika Redmark\git\plugin-suite\com.micrium.configbuilder.tycho.master\pom.xml 
     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: java.lang.IllegalStateException: Tycho build extension not configured for MavenProject: com.micrium.configbuilder:parent:1.1.0-SN 
APSHOT @ C:\Documents and Settings\Erika Redmark\git\plugin-suite\com.micrium.configbuilder.tycho.master\pom.xml 
     at org.eclipse.tycho.core.utils.TychoProjectUtils.getTargetPlatform(TychoProjectUtils.java:63) 
     at org.eclipse.tycho.p2.facade.RepositoryReferenceTool.addTargetPlatformRepository(RepositoryReferenceTool.java:116) 
     at org.eclipse.tycho.p2.facade.RepositoryReferenceTool.getVisibleRepositories(RepositoryReferenceTool.java:97) 
     at org.eclipse.tycho.plugins.p2.director.DirectorMojo.getTargetPlatformRepositories(DirectorMojo.java:167) 
     at org.eclipse.tycho.plugins.p2.director.DirectorMojo.getSourceRepositories(DirectorMojo.java:145) 
     at org.eclipse.tycho.plugins.p2.director.DirectorMojo.execute(DirectorMojo.java:93) 
     at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101) 
     ... 20 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/PluginExecutionException 

대상 플랫폼이 어떻게 든 정의되지 않는다는 것을 알았습니다. 나는 이클립스 위키 대상 플랫폼을 볼 때 (http://wiki.eclipse.org/Tycho/Target_Platform는) 그 상태 :

In order allow Tycho to resolve the project dependencies against anything from a specific p2 repository, add that repository in the section of the POM... In terms of the target platform, this means that the entire content of the p2 repositories specified in this way become part of the target platform.

내 POM에서 그 부분이있다. 사실, 여기에 부모 POM의 전체 내용이 있습니다 (이 튜토리얼에 따라 별도의 일반 프로젝트에서 정의 됨). 모든 모듈의 선언 만 생략했습니다.

<?xml version="1.0" encoding="UTF-8"?> 
<project> 
    <modelVersion>4.0.0</modelVersion> 
    <groupId>com.micrium.configbuilder</groupId> 
    <artifactId>parent</artifactId> 
    <version>1.1.0-SNAPSHOT</version> 
    <packaging>pom</packaging> 
    <modules> 
     ... bunch of modules ... 
    </modules> 

    <properties> 
     <tycho-version>0.16.0</tycho-version> 
    </properties> 

    <repositories> 
     <repository> 
      <id>helios</id> 
      <layout>p2</layout> 
      <url>http://download.eclipse.org/releases/helios</url> 
     </repository> 
    </repositories> 


    <build> 
     <plugins> 

      <plugin> 
       <groupId>org.eclipse.tycho</groupId> 
       <artifactId>tycho-maven-plugin</artifactId> 
       <version>0.16.0</version> 
       <extensions>true</extensions> 
      </plugin> 
      <plugin> 
       <groupId>org.eclipse.tycho</groupId> 
       <artifactId>tycho-p2-director-plugin</artifactId> 
       <version>0.16.0</version> 
       <executions> 
        <execution> 
         <id>materialize-products</id> 
         <goals> 
          <goal>materialize-products</goal> 
         </goals> 
        </execution> 
        <execution> 
         <id>archive-products</id> 
         <goals> 
          <goal>archive-products</goal> 
         </goals> 
        </execution> 
       </executions> 
      </plugin> 
     </plugins> 

    </build> 

</project> 

내가 놓친 부분이 있습니까? 문서가 대상 플랫폼으로 처리하는 내용을 정의한 것 같았습니다. 나는 올바른 문제를보고 있는가?

+0

예에서'resolver = p2' 설정을 제거 할 수 있다면 에리카, 고맙겠습니다. 이 매개 변수는'tycho-maven-plugin'과'tycho-p2-director-plugin'에 존재하지 않습니다. (언급하지 않은'target-platform-configuration' 플러그인의 경우'p2'는 연령대의 기본값입니다.). – oberlies

+0

예제와 함께 코드에서 제거했습니다. 나는 최근에 그 (것)들을 문제를 해결하는 것을 추가했다, 그러나 나가 볼 때 지금 그들은 무관했다. 고맙습니다. –

+0

감사합니다. 튜토리얼을 수정했습니다. – vogella

답변

11

문제는 부모 POM에서 tycho-p2-director-plugin을 실행하려고하는 것입니다. 이것은 작동하지 않습니다 – 플러그인은 eclipse-repository 패키징 유형의 모듈에서만 실행될 수 있습니다. 구성 tycho-p2-director-plugin 구성을 eclipse-repository 모듈로 이동하면 여기에 설명 된 문제가 해결됩니다.

불행히도 Tycho는 좋은 오류 메시지를 표시하지 않습니다. "Tycho 빌드 확장이 구성되지 않음"이라고 표시되어 있지만 사실 구성되어 있지만 포장 유형 pom에 대해서는 실행되지 않습니다.

+0

달콤한, 지금 일하는 것 같습니다. 모든 모듈은 성공했습니다. 고맙습니다. –

+0

저장된 내 삶 !!! 고마워요! –