Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Maven Integration (M2E) » [tycho] build problem (org.eclipse.jdt.core)
[tycho] build problem (org.eclipse.jdt.core) [message #26914] Fri, 22 May 2009 13:23 Go to next message
Andras Milassin is currently offline Andras MilassinFriend
Messages: 4
Registered: July 2009
Junior Member
Hi!

I am currently experimenting with building Eclipse PDE components with
Tycho. I could easily run the example and do some of my own examples as
well. Now I want to build org.eclipse.jdt.core (checked out HEAD source
from dev.eclipse.org:/cvsroot/eclipse CVS).

My problem is with the ant "dependency". This dependency is added using
build.properties:
" jars.extra.classpath=platform:/plugin/org.apache.ant/lib/ant .jar " - not
using MANIFEST.MF. The "mvn package" command starts the process as it
should, but the compilation fails with "The import org.apache cannot be
resolved" error messages.

I've tried adding the ant dependency manually using dependencyManagement:

<dependency>
<groupId>org.apache.ant</groupId>
<artifactId>org.apache.ant</artifactId>
<version>1.7.0</version>
<type>eclipse-plugin</type>
</dependency>

But this doesn't help either. Can somebody help me how to add
dependencies manually?

Regards,
Andras.
Re: [tycho] build problem (org.eclipse.jdt.core) [message #26953 is a reply to message #26914] Fri, 22 May 2009 22:22 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: igor.ifedorenko.com

Andras,

This is what I use to build p2-related Tycho projects (see [1] for the
full pom)


<build>
<plugins>
<plugin>
<groupId>org.codehaus.tycho</groupId>
<artifactId>maven-osgi-compiler-plugin</artifactId>
<configuration>
<extraClasspathElements>
<extraClasspathElement>
<groupId>org.sonatype.tycho</groupId>
<artifactId>tycho-p2-facade</artifactId>
<version>${project.version}</version>
</extraClasspathElement>
</extraClasspathElements>
</configuration>
</plugin>
</plugins>
</build>


This works with (unannounced) 0.3.0-DEV-2146 and current 0.4.0 builds
but I am not sure we will keep this syntax long term.

Please open enhancement request in JIRA [2] if you need Tycho to honour
jars.extra.classpath from build.properties.

[1]
https://svn.sonatype.org/m2eclipse/tycho/trunk/tycho-p2/org. sonatype.tycho.p2.impl/pom.xml
[2] https://issues.sonatype.org/browse/MNGECLIPSE

--
Regards,
Igor


Andras Milasisn wrote:
> Hi!
>
> I am currently experimenting with building Eclipse PDE components with
> Tycho. I could easily run the example and do some of my own examples as
> well. Now I want to build org.eclipse.jdt.core (checked out HEAD source
> from dev.eclipse.org:/cvsroot/eclipse CVS).
>
> My problem is with the ant "dependency". This dependency is added using
> build.properties:
> " jars.extra.classpath=platform:/plugin/org.apache.ant/lib/ant .jar " - not
> using MANIFEST.MF. The "mvn package" command starts the process as it
> should, but the compilation fails with "The import org.apache cannot be
> resolved" error messages.
>
> I've tried adding the ant dependency manually using dependencyManagement:
>
> <dependency>
> <groupId>org.apache.ant</groupId>
> <artifactId>org.apache.ant</artifactId>
> <version>1.7.0</version>
> <type>eclipse-plugin</type>
> </dependency>
>
> But this doesn't help either. Can somebody help me how to add
> dependencies manually?
>
> Regards,
> Andras.
Re: [tycho] build problem (org.eclipse.jdt.core) [message #27074 is a reply to message #26953] Tue, 26 May 2009 11:56 Go to previous message
Andras Milassin is currently offline Andras MilassinFriend
Messages: 4
Registered: July 2009
Junior Member
Hi Igor,

I've tried you're suggestion. I've added the following lines to the pom:
<build>
<plugins>
<plugin>
<groupId>org.codehaus.tycho</groupId>
<artifactId>maven-osgi-compiler-plugin</artifactId>
<configuration>
<extraClasspathElements>
<extraClasspathElement>
<groupId>org.apache.ant</groupId>
<artifactId>ant</artifactId>
<version>1.7.0</version>
</extraClasspathElement>
</extraClasspathElements>
</configuration>
</plugin>
</plugins>
</build>


I've tried to run it, but got the following exception (it's missing the
parent pom file, it has no problem if I add ant as a dependency):

[DEBUG] Parent pom ids do not match: Parent File =
K:\DeepTest\Workspace\org.eclipse.jdt.core (head)\pom.xml, Parent ID =
dt:org.eclipse.jdt.core:3.5.0.qualifier, Child ID =
org.apache.ant:ant:1.7.0, Expected Parent ID =
org.apache.ant:ant-parent:pom:1.7.0
[ERROR]
Internal error in the plugin manager executing goal
'org.codehaus.tycho:maven-osgi-compiler-plugin:0.4.0-DEV-223 3:compile':
Mojo execution failed.

Any suggestion why does it want to use the jdt.core's pom as parent?
I've tried some tricks I could come up with, but nothing helped so far.
I've tried both 0.3.0-DEV-2146 and 0.4.0-DEV-2233 releases.

Regards,
Andras.

Igor Fedorenko wrote:
> Andras,
>
> This is what I use to build p2-related Tycho projects (see [1] for the
> full pom)
>
>
> <build>
> <plugins>
> <plugin>
> <groupId>org.codehaus.tycho</groupId>
> <artifactId>maven-osgi-compiler-plugin</artifactId>
> <configuration>
> <extraClasspathElements>
> <extraClasspathElement>
> <groupId>org.sonatype.tycho</groupId>
> <artifactId>tycho-p2-facade</artifactId>
> <version>${project.version}</version>
> </extraClasspathElement>
> </extraClasspathElements>
> </configuration>
> </plugin>
> </plugins>
> </build>
>
>
> This works with (unannounced) 0.3.0-DEV-2146 and current 0.4.0 builds
> but I am not sure we will keep this syntax long term.
>
> Please open enhancement request in JIRA [2] if you need Tycho to honour
> jars.extra.classpath from build.properties.
>
> [1]
> https://svn.sonatype.org/m2eclipse/tycho/trunk/tycho-p2/org. sonatype.tycho.p2.impl/pom.xml
>
> [2] https://issues.sonatype.org/browse/MNGECLIPSE
>
> --
> Regards,
> Igor
>
>
> Andras Milasisn wrote:
>> Hi!
>>
>> I am currently experimenting with building Eclipse PDE components with
>> Tycho. I could easily run the example and do some of my own examples
>> as well. Now I want to build org.eclipse.jdt.core (checked out HEAD
>> source from dev.eclipse.org:/cvsroot/eclipse CVS).
>>
>> My problem is with the ant "dependency". This dependency is added
>> using build.properties:
>> " jars.extra.classpath=platform:/plugin/org.apache.ant/lib/ant .jar " -
>> not using MANIFEST.MF. The "mvn package" command starts the process as
>> it should, but the compilation fails with "The import org.apache
>> cannot be resolved" error messages.
>>
>> I've tried adding the ant dependency manually using dependencyManagement:
>>
>> <dependency>
>> <groupId>org.apache.ant</groupId>
>> <artifactId>org.apache.ant</artifactId>
>> <version>1.7.0</version>
>> <type>eclipse-plugin</type>
>> </dependency>
>> But this doesn't help either. Can somebody help me how to add
>> dependencies manually?
>>
>> Regards,
>> Andras.
Previous Topic:Files from resource folders?
Next Topic:M2_REPO
Goto Forum:
  


Current Time: Fri Dec 19 22:49:42 GMT 2014

Powered by FUDForum. Page generated in 0.05438 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software