I'm now using the latest svn url for tycho, not the m2eclipse one. I now manage to get the syncrhonize pom to output a list of dependencies, but I still need to manually add the swt stuff and also the dependencies that aren't osgi bundles. I also forgot to set the packaging to <packaging>osgi-bundle</packaging>. So it now gets further when building the drools-ide project, i.e. I don't get unresolved issues when compiling, but I do now get a null pointer.

...
[WARNING] Could not add artifact C:\Documents and Settings\mproctor\.m2\repository\xml-apis\xml-apis\1.0.b2\xml-apis-1.0.b2.jar
[WARNING] Could not add artifact C:\Documents and Settings\mproctor\.m2\repository\xerces\xercesImpl\2.4.0\xercesImpl-2.4.0.jar
[DEBUG] Added artifact to osgi state: C:\Documents and Settings\mproctor\.m2\repository\org\eclipse\org.eclipse.ui\3.2.1.M20060913-0800\org.eclipse.ui-3.2.1.M20060913-0800.jar
[DEBUG] Added artifact to osgi state: C:\Documents and Settings\mproctor\.m2\repository\org\eclipse\org.eclipse.jdt.ui\3.2.1.r321_v20060907\org.eclipse.jdt.ui-3.2.1.r321_v20060907.
jar
[DEBUG] Added artifact to osgi state: C:\Documents and Settings\mproctor\.m2\repository\org\eclipse\org.eclipse.ui.views.properties.tabbed\3.2.1.M20060830-0800\org.eclipse.ui.views
.properties.tabbed-3.2.1.M20060830-0800.jar
[WARNING] Could not add artifact C:\Documents and Settings\mproctor\.m2\repository\org\antlr\antlr\3.0b5\antlr-3.0b5.jar
[DEBUG] Added artifact to osgi state: C:\Documents and Settings\mproctor\.m2\repository\org\eclipse\org.eclipse.core.resources.win32\3.2.0.v20060603\org.eclipse.core.resources.win3
2-3.2.0.v20060603.jar
[INFO] ------------------------------------------------------------------------
[ERROR] FATAL ERROR
[INFO] ------------------------------------------------------------------------
[INFO] null
[INFO] ------------------------------------------------------------------------
[DEBUG] Trace
java.lang.NullPointerException
        at org.codehaus.tycho.osgitools.OsgiStateController.getRelevantErrors(OsgiStateController.java:480)
        at org.codehaus.tycho.osgicompiler.OSGiStateHelper.createOSGiState(OSGiStateHelper.java:146)
        at org.codehaus.tycho.osgicompiler.AbstractOsgiCompilerMojo.computeClassPath(AbstractOsgiCompilerMojo.java:88)
        at org.codehaus.tycho.osgicompiler.AbstractOsgiCompilerMojo.execute(AbstractOsgiCompilerMojo.java:70)
        at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:420)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:539)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:480)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:459)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:311)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:278)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:143)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:330)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:123)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:272)
        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:585)
        at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
        at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
        at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
        at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3 seconds
[INFO] Finished at: Sun Mar 18 19:37:27 GMT 2007
[INFO] Final Memory: 5M/9M
[INFO] ------------------------------------------------------------------------

Tom Huybrechts wrote:


On 3/18/07, Mark Proctor <[EMAIL PROTECTED]> wrote:
I've since found that m2eclipse does not handle nested OSGi jars, so I can't use it to build our eclipse ide plugin :(

I just tried it myself, and I could compile against a nested lib.
What problems did you have ?

Tom

 

I'm currently investigating maven-pst, but for some reason it keeps on insisting on 3.1.0 version dependencies for eclipse when only 3.2.0 and 3.2.1 are the only ones available on the ibiblio site, any ideas?

Mark
Mark Proctor wrote:
I'm going through the readme at http://svn.codehaus.org/m2eclipse/tycho/trunk/readme.txt

But have had a number of issues logged at http://jira.codehaus.org/browse/MNGECLIPSE-303 the first one is simple, org.codehaus.tycho is not in the standard plugin search space, easily solved. The second one trying to get org.drools.core.variables to "mvn clean install" has me stumped, here is a paste from the jira showing the problem:

I ran "mvn org.codehaus.tycho:maven-tycho-plugin:synchronize-plugin-pom -DtargetPlatform=c:\eclipse" and got the output:
C:\dev\workspace\org.eclipse.core.variables>mvn org.codehaus.tycho:maven-tycho-plugin:synchronize-plugin-pom -DtargetPlatform=c:\eclipse
[INFO] Scanning for projects...
[INFO] ----------------------------------------------------------------------------
[INFO] Building Unnamed - org.eclipse:org.eclipse.core.variables:osgi-bundle:1.0-SNAPSHOT
[INFO] task-segment: [org.codehaus.tycho:maven-tycho-plugin:synchronize-plugin-pom]
[INFO] ----------------------------------------------------------------------------
[INFO] [tycho:synchronize-plugin-pom]
[ERROR] Errors for bundle: org.eclipse.core.variables
[ERROR] Another singleton version selected: org.eclipse.core.variables_3.1.100.v20060605
[INFO] Dependent bundles:
<?xml version="1.0" encoding="UTF-8"?><project>
<modelVersion>4.0.0</modelVersion>
<groupId>org.eclipse</groupId>
<artifactId>org.eclipse.core.variables</artifactId>
<packaging>osgi-bundle</packaging>
<version>1.0-SNAPSHOT</version>
<build>
<sourceDirectory>src</sourceDirectory>
<plugins>
<plugin>
<groupId>org.codehaus.tycho</groupId>
<artifactId>maven-osgi-lifecycle-plugin</artifactId>
<extensions>true</extensions>
</plugin>
</plugins>
</build>
</project>[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3 seconds
[INFO] Finished at: Sat Mar 17 22:51:21 GMT 2007
[INFO] Final Memory: 5M/10M
[INFO] ------------------------------------------------------------------------

The pom information is the same as in the readme.txt:
<?xml version="1.0" encoding="UTF-8"?>
<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/maven-v4_0_0.xsd ">
<modelVersion>4.0.0</modelVersion>
<groupId>org.eclipse</groupId>
<artifactId>org.eclipse.core.variables</artifactId>
<packaging>osgi-bundle</packaging>
<version>1.0-SNAPSHOT</version>
<build>
<sourceDirectory>src</sourceDirectory>
<plugins>
<plugin>
<groupId>org.codehaus.tycho</groupId>
<artifactId>maven-osgi-lifecycle-plugin</artifactId>
<extensions>true</extensions>
</plugin>
</plugins>
</build>
</project>

Yet the docs say "This will print out a pom with dependencies for the project. Copy/paste the dependencies into the POM".

Assuming the pom.xml is correct "mvn clean install" isn't working:

C:\dev\workspace\org.eclipse.core.variables>mvn clean install
[INFO] Scanning for projects...
[INFO] ----------------------------------------------------------------------------
[INFO] Building Unnamed - org.eclipse:org.eclipse.core.variables:osgi-bundle:1.0-SNAPSHOT
[INFO] task-segment: [clean, install]
[INFO] ----------------------------------------------------------------------------
[INFO] [clean:clean]
[INFO] Deleting directory C:\dev\workspace\org.eclipse.core.variables\target
[INFO] Deleting directory C:\dev\workspace\org.eclipse.core.variables\target\classes
[INFO] Deleting directory C:\dev\workspace\org.eclipse.core.variables\target\test-classes
[INFO] [resources:resources]
[INFO] Using default encoding to copy filtered resources.
[INFO] [osgi-compiler:compile]
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Could not find system artifact!
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2 seconds
[INFO] Finished at: Sat Mar 17 22:53:24 GMT 2007
[INFO] Final Memory: 4M/8M
[INFO] ------------------------------------------------------------------------

[ Show » ]
Mark Proctor [17/Mar/07 05:58 PM] assuming the pom.xml is correct "mvn clean install" isn't working: C:\dev\workspace\org.eclipse.core.variables>mvn clean install [INFO] Scanning for projects... [INFO] ---------------------------------------------------------------------------- [INFO] Building Unnamed - org.eclipse:org.eclipse.core.variables:osgi-bundle:1.0-SNAPSHOT [INFO] task-segment: [clean, install] [INFO] ---------------------------------------------------------------------------- [INFO] [clean:clean] [INFO] Deleting directory C:\dev\workspace\org.eclipse.core.variables\target [INFO] Deleting directory C:\dev\workspace\org.eclipse.core.variables\target\classes [INFO] Deleting directory C:\dev\workspace\org.eclipse.core.variables\target\test-classes [INFO] [resources:resources] [INFO] Using default encoding to copy filtered resources. [INFO] [osgi-compiler:compile] [INFO] ------------------------------------------------------------------------ [ERROR] BUILD ERROR [INFO] ------------------------------------------------------------------------ [INFO] Could not find system artifact! [INFO] ------------------------------------------------------------------------ [INFO] For more information, run Maven with the -e switch [INFO] ------------------------------------------------------------------------ [INFO] Total time: 2 seconds [INFO] Finished at: Sat Mar 17 22:53:24 GMT 2007 [INFO] Final Memory: 4M/8M [INFO] ------------------------------------------------------------------------



Reply via email to