Skip to content

Commit

Permalink
Fix #51 enhance testcase to show jdk8 usage.
Browse files Browse the repository at this point in the history
  • Loading branch information
laeubi committed Apr 6, 2022
1 parent 48bf1f8 commit 755d2dd
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 34 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@ Bundle-Name: Bundle Plug-in
Bundle-SymbolicName: c.j.b.j.bundle
Bundle-Version: 1.0.0
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Import-Package: javax.xml.bind,
javax.xml.bind.annotation
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
package org.eclipse.tycho.test.compiler;
import javax.xml.bind.annotation.XmlEnum;

public class Main {
public static void main(String[] args) {
// String join is Java 8
System.out.println(String.join("-", "Tycho", "is", "cool"));
//this is to ensure javax.xml.bind.annotation is not only resolved by P2 but also by compiler!
XmlEnum xmlEnum = null;
}
}
84 changes: 50 additions & 34 deletions tycho-its/projects/compiler.jdt.bree.java8/pom.xml
Original file line number Diff line number Diff line change
@@ -1,37 +1,53 @@
<?xml version="1.0" encoding="UTF-8"?>
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>tycho-its-project.compiler.jdt.bree.java8</groupId>
<artifactId>c.j.b.j.parent</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>pom</packaging>
<!-- TODO Remove -->
<properties>
<tycho-version>2.1.0-SNAPSHOT</tycho-version>
</properties>
<modules>
<module>c.j.b.j.bundle</module>
</modules>
<build>
<plugins>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-maven-plugin</artifactId>
<version>${tycho-version}</version>
<extensions>true</extensions>
</plugin>
</plugins>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-compiler-plugin</artifactId>
<version>${tycho-version}</version>
<configuration>
<useJDK>BREE</useJDK>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
<modelVersion>4.0.0</modelVersion>
<groupId>tycho-its-project.compiler.jdt.bree.java8</groupId>
<artifactId>c.j.b.j.parent</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>pom</packaging>
<!-- TODO Remove -->
<properties>
<tycho-version>3.0.0-SNAPSHOT</tycho-version>
</properties>
<modules>
<module>c.j.b.j.bundle</module>
</modules>
<build>
<plugins>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-maven-plugin</artifactId>
<version>${tycho-version}</version>
<extensions>true</extensions>
</plugin>
</plugins>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-compiler-plugin</artifactId>
<version>${tycho-version}</version>
<configuration>
<useJDK>BREE</useJDK>
<deriveReleaseCompilerArgumentFromTargetLevel>false</deriveReleaseCompilerArgumentFromTargetLevel>
</configuration>
</plugin>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>target-platform-configuration</artifactId>
<version>${tycho-version}</version>
<configuration>
<environments>
<environment>
<os>linux</os>
<ws>gtk</ws>
<arch>x86_64</arch>
</environment>
</environments>
<executionEnvironment>JavaSE-1.8</executionEnvironment>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
</project>

0 comments on commit 755d2dd

Please sign in to comment.