Tychoを使用してプロジェクトのMavenビルド環境をセットアップする方法について、Vogellaのチュートリアル(http://www.vogella.com/articles/EclipseTycho/article.html )に従っています。私のプロジェクトはすでにいくつかのプラグイン、機能、更新サイトでかなり大きくなっていますが、なんとかうまく機能し、チュートリアルを最後まで実行しましmvn clean
た。私が今直面している問題は紛らわしいです。私は一貫して次のエラーを受け取ります:mvn compile
mvn install
[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: sun.misc.Launcher$AppClassLoader@35ce36]
[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 = org.apache.maven.execution.MavenSession@1335332
[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]
このスタックトレースからプラグインのリストを削除しました。それらはすべてスキップされました。親は失敗しました。
[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
原因の根本は、ターゲットプラットフォームがどういうわけか未定義であることがわかります。しかし、Eclipse wiki(http://wiki.eclipse.org/Tycho/Target_Platform)でターゲットプラットフォームを検索すると、次のように表示されます。
Tychoが特定のp2リポジトリからのプロジェクトの依存関係を解決できるようにするには、そのリポジトリをPOMのセクションに追加します...ターゲットプラットフォームに関しては、これは、このように指定されたp2リポジトリのコンテンツ全体を意味します。ターゲットプラットフォームの一部になります。
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>
私は何かを逃したことがありますか?ドキュメントがターゲットプラットフォームとして何を扱っているかを定義したようです。私も正しい問題を見ていますか?