Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Tycho » Need to link a plugin against Java 1.4
Need to link a plugin against Java 1.4 [message #641916] Mon, 29 November 2010 08:54 Go to next message
Bernd Vogt is currently offline Bernd VogtFriend
Messages: 34
Registered: July 2009
Member
Hello,

sadly, I have the need to link one of our plugins against the rt.jar of
Java 1.4. Is there a way with Tycho to do this?

I tried to configure the maven-osgi-compiler-plugin like in the snippet
below... without success. I tried it via the plugin and via the parent pom.

<pluginManagement>
<plugins>
<plugin>
<groupId>org.codehaus.tycho</groupId>
<artifactId>maven-osgi-compiler-plugin</artifactId>
<version>0.10.0</version>
<configuration>
<source>1.4</source>
<target>1.4</target>
<fork>true</fork>

<executable>D:\bin\java\x86\j2sdk1.4.2_12\bin\javac.exe</executable >
</configuration>
</plugin>
</plugins>
</pluginManagement>

Kind regards,
Bernd Vogt
Re: Need to link a plugin against Java 1.4 [message #641935 is a reply to message #641916] Mon, 29 November 2010 09:22 Go to previous messageGo to next message
Jan Sievers is currently offline Jan SieversFriend
Messages: 23
Registered: July 2009
Junior Member
you picked the wrong groupId.

It should be org.sonatype.tycho (since tycho 0.6.0)

Apart from that your configuration should be OK.

Regards^,
Jan


"Bernd Vogt" <bernd.vogt@innovations.de> wrote in message
news:icvpgm$522$1@news.eclipse.org...
> Hello,
>
> sadly, I have the need to link one of our plugins against the rt.jar of
> Java 1.4. Is there a way with Tycho to do this?
>
> I tried to configure the maven-osgi-compiler-plugin like in the snippet
> below... without success. I tried it via the plugin and via the parent
> pom.
>
> <pluginManagement>
> <plugins>
> <plugin>
> <groupId>org.codehaus.tycho</groupId>
> <artifactId>maven-osgi-compiler-plugin</artifactId>
> <version>0.10.0</version>
> <configuration>
> <source>1.4</source>
> <target>1.4</target>
> <fork>true</fork>
>
> <executable>D:\bin\java\x86\j2sdk1.4.2_12\bin\javac.exe</executable >
> </configuration>
> </plugin>
> </plugins>
> </pluginManagement>
>
> Kind regards,
> Bernd Vogt
Re: Need to link a plugin against Java 1.4 [message #641967 is a reply to message #641935] Mon, 29 November 2010 12:17 Go to previous messageGo to next message
Bernd Vogt is currently offline Bernd VogtFriend
Messages: 34
Registered: July 2009
Member
> It should be org.sonatype.tycho (since tycho 0.6.0)

Thanks for the hint! Unfortunately, this leads to the next problem:

[ERROR] Failed to execute goal
org.sonatype.tycho:maven-osgi-compiler-plugin:0.10.0:compile
(default-compile) on project de.visualrules.runtime: Fatal error
compiling: compileoutOfProcess not supported -> [Help 1]

A short code review has confirmed that Tycho 0.10.0 (JDT compiler mojo)
doesn't support forking.

As a workaround I have tried to configure the maven-osgi-compiler-plugin
in a way that it uses the javac compiler from the maven-compiler-plugin.
With the result that javac couldn't resolve any class from my dependencies.

Is there any way to tell the maven-osgi-compiler-plugin against which
rt.jar he has to compile?

In PDE build I have to map specific jars to an execution environment:

J2SE-1.4=/home/var/j2sdk1.4.2_19/jre/lib/rt.jar
J2SE-1.5=/home/var/jdk1.5.0_22/jre/lib/rt.jar
JavaSE-1.6=/home/var/jdk1.6.0_18/jre/lib/rt.jar

Kind regards,
Bernd
Re: Need to link a plugin against Java 1.4 [message #641999 is a reply to message #641916] Mon, 29 November 2010 13:45 Go to previous messageGo to next message
Bernd Vogt is currently offline Bernd VogtFriend
Messages: 34
Registered: July 2009
Member
I got it! Configuring the bootclasspath argument of the JDT compiler
does the trick:

<pluginManagement>
<plugins>
<plugin>
<groupId>org.sonatype.tycho</groupId>
<artifactId>maven-osgi-compiler-plugin</artifactId>
<version>${tychoVersion}</version>
<configuration>
<compilerId>jdt</compilerId>
<compilerArguments>

<bootclasspath>D:\bin\java\x86\j2sdk1.4.2_12\jre\lib\rt.jar </bootclasspath>
</compilerArguments>
</configuration>
</plugin>
</plugins>
</pluginManagement>
Re: Need to link a plugin against Java 1.4 [message #642058 is a reply to message #641916] Mon, 29 November 2010 17:15 Go to previous message
Bernd Vogt is currently offline Bernd VogtFriend
Messages: 34
Registered: July 2009
Member
FYI: https://issues.sonatype.org/browse/TYCHO-547
Previous Topic:Where are the JDT Core compiler logs or how do I have them created?
Next Topic:Aggregator pom?
Goto Forum:
  


Current Time: Fri Mar 29 12:23:38 GMT 2024

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

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

Back to the top