Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Oberlies2013-03-20 05:20:53 -0400
committerJan Sievers2013-03-20 08:35:18 -0400
commitc68e89b5d638dc23ad3cb01f09ac03abe1461a9e (patch)
tree5e430583e6409856ac7fffd9d8dad78eddad6c57
parentd79b43129a8dcb442316711fb96d1b492026b7cc (diff)
downloadorg.eclipse.tycho-tycho-0.17.x.tar.gz
org.eclipse.tycho-tycho-0.17.x.tar.xz
org.eclipse.tycho-tycho-0.17.x.zip
387796 Update default execution environment to JavaSE-1.6tycho-0.17.0tycho-0.17.x
- If no execution environment is specified in POM and Manifest, use JavaSE-1.6 as default so that the p2 dependency resolver doesn't report strange problems. - The execution environment also determines the compiler source/target level, so for projects which neither have an explicit execution environment nor an explicit compiler configuration, the default source/target is changed to 1.6. - Also set the last resort compiler source/target default to 1.6. This value is only used if a custom execution environment is used and there is no explicit compiler configuration. Bug: 387796 Change-Id: I442227534f7f9eae56894b79757886c76bdd738e
-rw-r--r--tycho-compiler-plugin/src/main/java/copied/org/apache/maven/plugin/AbstractCompilerMojo.java4
-rw-r--r--tycho-compiler-plugin/src/test/java/org/eclipse/tycho/osgicompiler/test/OsgiCompilerTest.java6
-rw-r--r--tycho-core/src/main/java/org/eclipse/tycho/core/ee/ExecutionEnvironmentConfigurationImpl.java2
-rw-r--r--tycho-core/src/test/java/org/eclipse/tycho/core/ee/ExecutionEnvironmentConfigurationTest.java4
4 files changed, 8 insertions, 8 deletions
diff --git a/tycho-compiler-plugin/src/main/java/copied/org/apache/maven/plugin/AbstractCompilerMojo.java b/tycho-compiler-plugin/src/main/java/copied/org/apache/maven/plugin/AbstractCompilerMojo.java
index a6ffdcd98..74ba22c4d 100644
--- a/tycho-compiler-plugin/src/main/java/copied/org/apache/maven/plugin/AbstractCompilerMojo.java
+++ b/tycho-compiler-plugin/src/main/java/copied/org/apache/maven/plugin/AbstractCompilerMojo.java
@@ -53,9 +53,9 @@ import org.codehaus.plexus.util.StringUtils;
*/
public abstract class AbstractCompilerMojo extends AbstractMojo {
- public static final String DEFAULT_SOURCE_VERSION = "1.5";
+ public static final String DEFAULT_SOURCE_VERSION = "1.6";
- public static final String DEFAULT_TARGET_VERSION = "1.5";
+ public static final String DEFAULT_TARGET_VERSION = "1.6";
// ----------------------------------------------------------------------
// Configurables
diff --git a/tycho-compiler-plugin/src/test/java/org/eclipse/tycho/osgicompiler/test/OsgiCompilerTest.java b/tycho-compiler-plugin/src/test/java/org/eclipse/tycho/osgicompiler/test/OsgiCompilerTest.java
index 374e2c043..825994087 100644
--- a/tycho-compiler-plugin/src/test/java/org/eclipse/tycho/osgicompiler/test/OsgiCompilerTest.java
+++ b/tycho-compiler-plugin/src/test/java/org/eclipse/tycho/osgicompiler/test/OsgiCompilerTest.java
@@ -36,7 +36,7 @@ import copied.org.apache.maven.plugin.CompilationFailureException;
public class OsgiCompilerTest extends AbstractTychoMojoTestCase {
private static final int TARGET_1_4 = 48;
- private static final int TARGET_1_5 = 49;
+ private static final int TARGET_1_6 = 50;
protected File storage;
@@ -227,10 +227,10 @@ public class OsgiCompilerTest extends AbstractTychoMojoTestCase {
List<MavenProject> projects = getSortedProjects(basedir, null);
MavenProject project;
// project with neither POM nor MANIFEST configuration => must fallback to
- // source/target level == 1.5
+ // source/target level == 1.6
project = projects.get(1);
getMojo(projects, project).execute();
- assertBytecodeMajorLevel(TARGET_1_5, new File(project.getBasedir(), "target/classes/Generic.class"));
+ assertBytecodeMajorLevel(TARGET_1_6, new File(project.getBasedir(), "target/classes/Generic.class"));
// project with multiple execution envs.
// Minimum source and target level must be taken
diff --git a/tycho-core/src/main/java/org/eclipse/tycho/core/ee/ExecutionEnvironmentConfigurationImpl.java b/tycho-core/src/main/java/org/eclipse/tycho/core/ee/ExecutionEnvironmentConfigurationImpl.java
index d14cb48a9..51c7a9818 100644
--- a/tycho-core/src/main/java/org/eclipse/tycho/core/ee/ExecutionEnvironmentConfigurationImpl.java
+++ b/tycho-core/src/main/java/org/eclipse/tycho/core/ee/ExecutionEnvironmentConfigurationImpl.java
@@ -18,7 +18,7 @@ import org.eclipse.tycho.core.ee.shared.ExecutionEnvironmentConfiguration;
import org.eclipse.tycho.core.ee.shared.SystemCapability;
public class ExecutionEnvironmentConfigurationImpl implements ExecutionEnvironmentConfiguration {
- private static final String DEFAULT_EXECUTION_ENVIRONMENT = "J2SE-1.5";
+ private static final String DEFAULT_EXECUTION_ENVIRONMENT = "JavaSE-1.6";
private static final int PRIMARY = 0;
private static final int SECONDARY = 1;
diff --git a/tycho-core/src/test/java/org/eclipse/tycho/core/ee/ExecutionEnvironmentConfigurationTest.java b/tycho-core/src/test/java/org/eclipse/tycho/core/ee/ExecutionEnvironmentConfigurationTest.java
index cafa333c6..c643bcee0 100644
--- a/tycho-core/src/test/java/org/eclipse/tycho/core/ee/ExecutionEnvironmentConfigurationTest.java
+++ b/tycho-core/src/test/java/org/eclipse/tycho/core/ee/ExecutionEnvironmentConfigurationTest.java
@@ -41,9 +41,9 @@ public class ExecutionEnvironmentConfigurationTest {
@Test
public void testDefaults() {
- assertThat(subject.getProfileName(), is("J2SE-1.5"));
+ assertThat(subject.getProfileName(), is("JavaSE-1.6"));
assertThat(subject.isCustomProfile(), is(false));
- assertThat(subject.getFullSpecification().getProfileName(), is("J2SE-1.5"));
+ assertThat(subject.getFullSpecification().getProfileName(), is("JavaSE-1.6"));
}
@Test

Back to the top