|
Re: [tycho] mvn package and NullPointerException [message #23115 is a reply to message #23071] |
Fri, 13 March 2009 20:33 |
Eclipse User |
|
|
|
Originally posted by: igor.ifedorenko.com
Documentation is not up-to-date, unfortunately... You need to move
product to a separate maven project with packaging=clipse-application,
otherwise tycho cannot properly order projects. You can find working
example (using during tycho integration tests) here
http://svn.sonatype.org/m2eclipse/tycho/trunk/tycho-its/proj ects/tycho109/feature-rcp/
Also, I opened https://issues.sonatype.org/browse/MNGECLIPSE-1272 to
provide better error message.
--
Regards,
Igor
Nicolas Bihan wrote:
> Hello,
>
> I just tried tycho with the last DEV build.
> I want to build a product based on a feature.
>
> I managed to generate pom.xml for my plugin and my feature with tycho.
> Now I tried to generate the product but it failed :
>
> C:\PROD\WorkspacesEclipse\TestMaven>c:\prod\tycho\bin\mvn
> -Dtycho.targetPlatform=c:\prod\eclipse64
> package -e
> + Error stacktraces are turned on.
> [INFO] Build target platform tycho.targetPlatform=c:\prod\eclipse64
> . This overrides target platform specified in pom.xml files, if any.
> [WARNING] Dependency at location
> c:\prod\eclipse64\plugins\org.eclipse.ui.workbench.compatibi lity_3.
> 2.0.I20080509-2000 can not be represented in Maven model and will not be
> visible to non-OSGi aware M
> aven plugins
> [WARNING] Dependency at location
> c:\prod\eclipse64\plugins\org.eclipse.core.runtime.compatibi lity.re
> gistry_3.2.200.v20080610 can not be represented in Maven model and will
> not be visible to non-OSGi a
> ware Maven plugins
> [INFO] Scanning for projects...
> [INFO] Reactor build order:
> [INFO] Unnamed - tycho.demo:TestMaven:pom:0.0.1-SNAPSHOT
> [INFO] Unnamed -
> tycho.demo:com.nbn.tutorial.rcp.withtycho:eclipse-plugin:1.0 .0
> [INFO] Unnamed - tycho.demo:withmaven.feature:eclipse-feature:1.0.0
> [INFO]
> ------------------------------------------------------------ ------------
> [INFO] Building Unnamed - tycho.demo:TestMaven:pom:0.0.1-SNAPSHOT
> [INFO]
> [INFO] Id: tycho.demo:TestMaven:pom:0.0.1-SNAPSHOT
> [INFO] task-segment: [package]
> [INFO]
> ------------------------------------------------------------ ------------
> [INFO] [site:attach-descriptor]
> [INFO]
> ------------------------------------------------------------ ------------
> [INFO] Building Unnamed -
> tycho.demo:com.nbn.tutorial.rcp.withtycho:eclipse-plugin:1.0 .0
> [INFO]
> [INFO] Id: tycho.demo:com.nbn.tutorial.rcp.withtycho:eclipse-plugin:1.0 .0
> [INFO] task-segment: [package]
> [INFO]
> ------------------------------------------------------------ ------------
> [INFO] [osgi-packaging:build-qualifier]
> [INFO] [resources:resources]
> [INFO] Using default encoding to copy filtered resources.
> [INFO] [osgi-compiler:compile]
> [INFO] Using compile source roots from build.properties
> [INFO] Nothing to compile - all classes are up to date
> [INFO] [resources:testResources]
> [INFO] Using default encoding to copy filtered resources.
> [INFO] [osgi-packaging:package-plugin]
> [INFO] Building jar:
> C:\PROD\WorkspacesEclipse\TestMaven\com.nbn.tutorial.rcp.wit htycho\target\com.n
>
> bn.tutorial.rcp.withtycho-1.0.0.jar
> [INFO] [osgi-packaging:product-export]
> ---------------------------------------------------
> constituent[0]:
> file:/c:/PROD/tycho/bin/../tycho/org.eclipse.osgi-3.4.0.v200 80605-1900.jar
> constituent[1]:
> file:/c:/PROD/tycho/bin/../tycho/tycho-osgi-components-0.3.0 -DEV-1819.jar
> constituent[2]: file:/c:/PROD/tycho/bin/../lib/aspectjrt-1.5.3.jar
> constituent[3]: file:/c:/PROD/tycho/bin/../lib/commons-cli-1.0.jar
> constituent[4]: file:/c:/PROD/tycho/bin/../lib/commons-logging-api-1.1.jar
> constituent[5]:
> file:/c:/PROD/tycho/bin/../lib/doxia-sink-api-1.0-alpha-9.ja r
> constituent[6]: file:/c:/PROD/tycho/bin/../lib/jsch-0.1.38.jar
> constituent[7]: file:/c:/PROD/tycho/bin/../lib/log4j-1.2.12.jar
> constituent[8]:
> file:/c:/PROD/tycho/bin/../lib/maven-artifact-3.0-alpha-2-TY CHO-695719.jar
> constituent[9]:
> file:/c:/PROD/tycho/bin/../lib/maven-core-3.0-TYCHO-698080.j ar
> constituent[10]:
> file:/c:/PROD/tycho/bin/../lib/maven-distribution-3.0-TYCHO- 698080.jar
> constituent[11]:
> file:/c:/PROD/tycho/bin/../lib/maven-embedder-3.0-TYCHO-6980 80.jar
> constituent[12]:
> file:/c:/PROD/tycho/bin/../lib/maven-lifecycle-3.0-TYCHO-698 080.jar
> constituent[13]:
> file:/c:/PROD/tycho/bin/../lib/maven-model-3.0-TYCHO-698080. jar
> constituent[14]:
> file:/c:/PROD/tycho/bin/../lib/maven-plugin-api-3.0-TYCHO-69 8080.jar
> constituent[15]:
> file:/c:/PROD/tycho/bin/../lib/maven-profile-3.0-TYCHO-69808 0.jar
> constituent[16]:
> file:/c:/PROD/tycho/bin/../lib/maven-project-3.0-TYCHO-69808 0.jar
> constituent[17]:
> file:/c:/PROD/tycho/bin/../lib/maven-reporting-api-3.0-TYCHO -698080.jar
> constituent[18]:
> file:/c:/PROD/tycho/bin/../lib/maven-shared-model-1.0-TYCHO- 698080.jar
> constituent[19]:
> file:/c:/PROD/tycho/bin/../lib/maven-toolchain-3.0-TYCHO-698 080.jar
> constituent[20]:
> file:/c:/PROD/tycho/bin/../lib/maven-workspace-3.0-TYCHO-698 080.jar
> constituent[21]: file:/c:/PROD/tycho/bin/../lib/nekohtml-1.9.6.2.jar
> constituent[22]:
> file:/c:/PROD/tycho/bin/../lib/plexus-container-default-1.0- alpha-48.jar
> constituent[23]:
> file:/c:/PROD/tycho/bin/../lib/plexus-interactivity-api-1.0- alpha-6.jar
> constituent[24]:
> file:/c:/PROD/tycho/bin/../lib/plexus-interpolation-1.1.jar
> constituent[25]: file:/c:/PROD/tycho/bin/../lib/plexus-utils-1.5.5.jar
> constituent[26]: file:/c:/PROD/tycho/bin/../lib/stax-api-1.0-2.jar
> constituent[27]: file:/c:/PROD/tycho/bin/../lib/stax-api-1.0.1.jar
> constituent[28]: file:/c:/PROD/tycho/bin/../lib/wagon-file-1.0-beta-4.jar
> constituent[29]:
> file:/c:/PROD/tycho/bin/../lib/wagon-http-lightweight-1.0-be ta-4.jar
> constituent[30]:
> file:/c:/PROD/tycho/bin/../lib/wagon-http-shared-1.0-beta-4. jar
> constituent[31]:
> file:/c:/PROD/tycho/bin/../lib/wagon-provider-api-1.0-beta-4 .jar
> constituent[32]: file:/c:/PROD/tycho/bin/../lib/wagon-ssh-1.0-beta-4.jar
> constituent[33]:
> file:/c:/PROD/tycho/bin/../lib/wagon-ssh-common-1.0-beta-4.j ar
> constituent[34]:
> file:/c:/PROD/tycho/bin/../lib/wagon-ssh-external-1.0-beta-4 .jar
> constituent[35]: file:/c:/PROD/tycho/bin/../lib/wstx-asl-3.2.6.jar
> constituent[36]: file:/c:/PROD/tycho/bin/../lib/xbean-reflect-3.4.jar
> constituent[37]: file:/c:/PROD/tycho/bin/../lib/xercesMinimal-1.9.6.2.jar
> ---------------------------------------------------
> java.lang.NullPointerException
> at de.schlichtherle.io.File.<init>(File.java:427)
> at de.schlichtherle.io.File.<init>(File.java:406)
> at
> org.codehaus.tycho.eclipsepackaging.ProductExportMojo.copyFe ature(ProductExportMojo.java:
>
> 292)
> at
> org.codehaus.tycho.eclipsepackaging.ProductExportMojo.copyFe atures(ProductExportMojo.java
>
> :267)
> at
> org.codehaus.tycho.eclipsepackaging.ProductExportMojo.execut e(ProductExportMojo.java:116)
>
>
> at
> org.apache.maven.plugin.DefaultPluginManager.executeMojo(Def aultPluginManager.java:623)
>
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeG oalAndHandleFailures(DefaultL
>
> ifecycleExecutor.java:521)
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeT askSegmentForProject(DefaultL
>
> ifecycleExecutor.java:288)
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeT askSegments(DefaultLifecycleE
>
> xecutor.java:214)
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute( DefaultLifecycleExecutor.java
>
> :172)
> at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:218)
> at
> org.apache.maven.embedder.MavenEmbedder.execute(MavenEmbedde r.java:899)
> at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:176)
> at org.apache.maven.cli.MavenCli.main(MavenCli.java:63)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
>
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
>
> at java.lang.reflect.Method.invoke(Method.java:597)
> at
> org.codehaus.plexus.classworlds.launcher.Launcher.launchEnha nced(Launcher.java:289)
>
> at
> org.codehaus.plexus.classworlds.launcher.Launcher.launch(Lau ncher.java:229)
> at
> org.codehaus.plexus.classworlds.launcher.Launcher.mainWithEx itCode(Launcher.java:408)
>
> at
> org.codehaus.plexus.classworlds.launcher.Launcher.main(Launc her.java:351)
> at org.codehaus.classworlds.Launcher.main(Launcher.java:31)
>
> Here is the pom.xml for my plugin
>
> <?xml version="1.0" encoding="UTF-8"?>
> <project>
> <modelVersion>4.0.0</modelVersion>
> <parent>
> <artifactId>TestMaven</artifactId>
> <groupId>tycho.demo</groupId>
> <version>0.0.1-SNAPSHOT</version>
> </parent>
> <groupId>tycho.demo</groupId>
> <artifactId>com.nbn.tutorial.rcp.withtycho</artifactId>
> <version>1.0.0</version>
> <packaging>eclipse-plugin</packaging>
> <build>
> <plugins>
> <plugin>
> <groupId>org.codehaus.tycho</groupId>
> <artifactId>maven-osgi-packaging-plugin</artifactId>
> <executions>
> <execution>
> <phase>package</phase>
> <id>product-export</id>
> <goals>
> <goal>product-export</goal>
> </goals>
> <configuration>
> <productConfigurationFile>withtycho.product</productConfigurationFile >
> <!-- replace to your real goal if you didn't use same namming -->
> </configuration>
> </execution>
> </executions>
> </plugin>
> </plugins>
> </build>
> </project>
>
>
> here is for my feature
> <?xml version="1.0" encoding="UTF-8"?>
> <project>
> <modelVersion>4.0.0</modelVersion>
> <parent>
> <artifactId>TestMaven</artifactId>
> <groupId>tycho.demo</groupId>
> <version>0.0.1-SNAPSHOT</version>
> </parent>
> <groupId>tycho.demo</groupId>
> <artifactId>withtycho.feature</artifactId>
> <version>1.0.0</version>
> <packaging>eclipse-feature</packaging>
> </project>
>
> And the parent pom :
> <?xml version="1.0" encoding="UTF-8"?>
> <project>
> <modelVersion>4.0.0</modelVersion>
> <groupId>tycho.demo</groupId>
> <artifactId>TestMaven</artifactId>
> <version>0.0.1-SNAPSHOT</version>
> <packaging>pom</packaging>
> <modules>
> <module>com.nbn.tutorial.rcp.withtycho</module>
> <module>withtycho.feature</module>
> </modules>
> </project>
>
> when I check my target directory I find the product directory but
> obviously it's not complete...
> I can find my plugin jar too. But not the feature jar.
>
> Any tip or idea ? :)
>
> Nicolas Bihan
|
|
|
Powered by
FUDForum. Page generated in 0.03243 seconds