Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tycho-user] Support for Java 1.8

Tycho parent pom has pretty verbose explanation how to do this [1], but
here is a shorter version


Assuming you are on OSX or Linux, have 'mvn' command on PATH and eclipse
with java8 support is in /tmp/eclipse, the following snippet will
install JDT compiler and APT compiler to your local maven repository
(obviously replace JDT*VERSION with actual version your have)


    PLUGINS=/tmp/eclipse/plugins

    CMD="mvn install:install-file -Dpackaging=jar"

    JDT_VERSION=3.9.2.v20140119-0104_BETA_JAVA8
    JDT_APT_VERSION=1.0.600.v20140119-0104_BETA_JAVA8

    $CMD -DgroupId=org.eclipse.tycho \
      -DartifactId=org.eclipse.jdt.core \
      -Dversion=$JDT_VERSION \
      -Dfile=$PLUGINS/org.eclipse.jdt.core_$JDT_VERSION.jar

    $CMD -DgroupId=org.eclipse.tycho \
      -DartifactId=org.eclipse.jdt.compiler.apt \
      -Dversion=$JDT_APT_VERSION \
      -Dfile=$PLUGINS/org.eclipse.jdt.compiler.apt_$JDT_APT_VERSION.jar


In your Tycho project, add the following xml snippet to
build/pluginManagement/plugins sections (again, make sure version
matches what you have)


    <plugin>
      <groupId>org.eclipse.tycho</groupId>
      <artifactId>tycho-compiler-plugin</artifactId>
      <version>${tycho-version}</version>
      <dependencies>
        <dependency>
          <groupId>org.eclipse.tycho</groupId>
          <artifactId>org.eclipse.jdt.core</artifactId>
          <version>3.9.2.v20140119-0104_BETA_JAVA8</version>
        </dependency>
        <dependency>
          <groupId>org.eclipse.tycho</groupId>
          <artifactId>org.eclipse.jdt.compiler.apt</artifactId>
          <version>1.0.600.v20140119-0104_BETA_JAVA8</version>
        </dependency>
      </dependencies>
    </plugin>



Then you will likely need to fix your code to actually compile under
java8. For example, m2e gave me tons of errors about
Comparator.thenComparingDouble not implemented... almost looks like a
bug in jdt compiler ;-)


[1] http://git.eclipse.org/c/tycho/org.eclipse.tycho.git/tree/pom.xml#n92


--
Regards,
Igor


On 1/19/2014, 15:48, Doug Schaefer wrote:
I think we¹re getting close to needing this. Igor can you provide
instructions how we can do this?

Thanks!
Doug.

On 12/30/2013, 3:15 PM, "Igor Fedorenko" <igor@xxxxxxxxxxxxxx> wrote:

JDT compiler is a regular Maven dependency of tycho-compiler-plugin.
Assuming JDT compiler API has changed, you can use newer/different
compiler version without changing Tycho. You'll need to deploy/install
new JDT compiler to a maven repository yourself, however. I can show how
to do this, if you want.

--
Regards,
Igor

On 12/30/2013, 11:45, Doug Schaefer wrote:
Hey gang,

We¹ve started work on porting Eclipse to JavaFX and want to use the 1.8
early release bits to work against to give us the latest Java 1.8.
That¹ll require an update to the JDT compiler that tycho is using. Does
anyone have that working or working on it?

Thanks,
Doug.


_______________________________________________
tycho-user mailing list
tycho-user@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/tycho-user

_______________________________________________
tycho-user mailing list
tycho-user@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/tycho-user

_______________________________________________
tycho-user mailing list
tycho-user@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/tycho-user



Back to the top