title: Configuration Issue with Tycho/Maven: "Tycho build extension not configured"
body: <p>I have been following Vogella's tutorial (<a href="http://www.vogella.com/articles/EclipseTycho/article.html" rel="nofollow">http://www.vogella.com/articles/EclipseTycho/article.html</a>) on using Tycho to set up a Maven build environment for my project. My project is already quite big with several plugins, features and an update site, however I managed to get <code>mvn clean</code> and <code>mvn compile</code> to work fine, and followed the tutorial all the way up to <code>mvn install</code>. The issue I am facing now is confusing. I consistently get the following error:</p>
  
  <pre><code>[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&gt;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 --&gt;
  [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]
  </code></pre>
  
  <p>Snipped the list of plugins from this stack trace. They were all skipped. Parent had the failure.</p>
  
  <pre><code>[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 -&gt; [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
  </code></pre>
  
  <p>I see that the root of the cause is that the Target Platform is somehow undefined. But when I look up Target Platform on the Eclipse wiki (<a href="http://wiki.eclipse.org/Tycho/Target_Platform" rel="nofollow">http://wiki.eclipse.org/Tycho/Target_Platform</a>)  it states:</p>
  
  <blockquote>
    <p>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.</p>
  </blockquote>
  
  <p>I have that section in my POM. In fact, here is the full content of my parent POM (defined in a seperate general project as per the tutorial). I omitted only the declaration of all my modules:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;project&gt;
      &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
      &lt;groupId&gt;com.micrium.configbuilder&lt;/groupId&gt;
      &lt;artifactId&gt;parent&lt;/artifactId&gt;
      &lt;version&gt;1.1.0-SNAPSHOT&lt;/version&gt;
      &lt;packaging&gt;pom&lt;/packaging&gt;
      &lt;modules&gt;
          ... bunch of modules ...
      &lt;/modules&gt;
  
      &lt;properties&gt;
          &lt;tycho-version&gt;0.16.0&lt;/tycho-version&gt;
      &lt;/properties&gt;
  
      &lt;repositories&gt;
          &lt;repository&gt;
              &lt;id&gt;helios&lt;/id&gt;
              &lt;layout&gt;p2&lt;/layout&gt;
              &lt;url&gt;http://download.eclipse.org/releases/helios&lt;/url&gt;
          &lt;/repository&gt;
      &lt;/repositories&gt;
  
  
      &lt;build&gt;
          &lt;plugins&gt;
  
              &lt;plugin&gt;
                  &lt;groupId&gt;org.eclipse.tycho&lt;/groupId&gt;
                  &lt;artifactId&gt;tycho-maven-plugin&lt;/artifactId&gt;
                  &lt;version&gt;0.16.0&lt;/version&gt;
                  &lt;extensions&gt;true&lt;/extensions&gt;
              &lt;/plugin&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.eclipse.tycho&lt;/groupId&gt;
                  &lt;artifactId&gt;tycho-p2-director-plugin&lt;/artifactId&gt;
                  &lt;version&gt;0.16.0&lt;/version&gt;
                  &lt;executions&gt;
                      &lt;execution&gt;
                          &lt;id&gt;materialize-products&lt;/id&gt;
                          &lt;goals&gt;
                              &lt;goal&gt;materialize-products&lt;/goal&gt;
                          &lt;/goals&gt;
                      &lt;/execution&gt;
                      &lt;execution&gt;
                          &lt;id&gt;archive-products&lt;/id&gt;
                          &lt;goals&gt;
                              &lt;goal&gt;archive-products&lt;/goal&gt;
                          &lt;/goals&gt;
                      &lt;/execution&gt;
                  &lt;/executions&gt;
              &lt;/plugin&gt;
          &lt;/plugins&gt;
  
      &lt;/build&gt;
  
  &lt;/project&gt;
  </code></pre>
  
  <p>Have I missed something? I seemed to have defined what the documentation addresses as the target platform. Am I even seeing the right issue?</p>