Mercurial > hg > Blog
diff content/Maven/cross-jdk-project-files-continued.md @ 0:4cd9b65e10e4
initial import of the pelican based blog
author | Dirk Olmes <dirk@xanthippe.ping.de> |
---|---|
date | Fri, 28 Jun 2013 08:48:58 +0200 |
parents | |
children | 1d9382b0329b |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/content/Maven/cross-jdk-project-files-continued.md Fri Jun 28 08:48:58 2013 +0200 @@ -0,0 +1,50 @@ +Title: Cross JDK project files with Maven (continued) +Date: 2008-03-21 +Lang: en + +In [my last blog entry](|filename|./cross-jdk-project-files.md) I described the steps for cross-JDK Eclipse project files. + +Unfortunately there's more Eclipse internals involved when dealing with cross platform issues. It turns out that the correct JRE_CONTAINER for Linux and Windows is + + org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jdk + +but that doesn't work for Mac where it needs to be like this: + + org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.launching.macosx.MacOSXType/jdk + +So for real cross platform project files you need to put the launcher type into a property and override that in a mac specific profile. The final pom will look similar to this + + :::xml + <project ...> + <properties> + <vmtype>org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType</vmtype> + <jdkName>jdk1.4</jdkName> + </properties> + + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-eclipse-plugin</artifactId> + <version>2.5</version> + <configuration> + <classpathContainers> + <classpathContainer> + org.eclipse.jdt.launching.JRE_CONTAINER/${vmtype}/${jdkName} + </classpathContainer> + </classpathContainers> + </configuration> + </plugin> + + <profiles> + <profile> + <id>mac</id> + <activation> + <os> + <family>mac</family> + </os> + </activation> + <properties> + <vmtype>org.eclipse.jdt.internal.launching.macosx.MacOSXType</vmtype> + </properties> + </profile> + </profiles> + </project>