diff --git a/tycho-compiler-plugin/pom.xml b/tycho-compiler-plugin/pom.xml index c99d3203ca..70cff57273 100644 --- a/tycho-compiler-plugin/pom.xml +++ b/tycho-compiler-plugin/pom.xml @@ -87,6 +87,11 @@ bcel test + + org.codehaus.plexus + plexus-compiler-javac + 2.14.2 + diff --git a/tycho-its/projects/tycho-compiler-plugin/javac/pom.xml b/tycho-its/projects/tycho-compiler-plugin/javac/pom.xml new file mode 100644 index 0000000000..c6de9f2183 --- /dev/null +++ b/tycho-its/projects/tycho-compiler-plugin/javac/pom.xml @@ -0,0 +1,36 @@ + + 4.0.0 + + org.eclipse.tycho.it + javac.parent + 1.0.0-SNAPSHOT + pom + + 5.0.0-SNAPSHOT + + + + + + org.eclipse.tycho + tycho-maven-plugin + ${tycho-version} + true + + + org.eclipse.tycho + tycho-compiler-plugin + ${tycho-version} + + javac + + + + + + + simple + + diff --git a/tycho-its/projects/tycho-compiler-plugin/javac/simple/META-INF/MANIFEST.MF b/tycho-its/projects/tycho-compiler-plugin/javac/simple/META-INF/MANIFEST.MF new file mode 100644 index 0000000000..ac88e3c0dc --- /dev/null +++ b/tycho-its/projects/tycho-compiler-plugin/javac/simple/META-INF/MANIFEST.MF @@ -0,0 +1,4 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-SymbolicName: simple +Bundle-Version: 1.0.0.qualifier diff --git a/tycho-its/projects/tycho-compiler-plugin/javac/simple/build.properties b/tycho-its/projects/tycho-compiler-plugin/javac/simple/build.properties new file mode 100644 index 0000000000..34d2e4d2da --- /dev/null +++ b/tycho-its/projects/tycho-compiler-plugin/javac/simple/build.properties @@ -0,0 +1,4 @@ +source.. = src/ +output.. = bin/ +bin.includes = META-INF/,\ + . diff --git a/tycho-its/projects/tycho-compiler-plugin/javac/simple/pom.xml b/tycho-its/projects/tycho-compiler-plugin/javac/simple/pom.xml new file mode 100644 index 0000000000..89b6ed014a --- /dev/null +++ b/tycho-its/projects/tycho-compiler-plugin/javac/simple/pom.xml @@ -0,0 +1,13 @@ + + 4.0.0 + + org.eclipse.tycho.it + javac.parent + 1.0.0-SNAPSHOT + + simple + + eclipse-plugin + + \ No newline at end of file diff --git a/tycho-its/projects/tycho-compiler-plugin/javac/simple/src/Test.java b/tycho-its/projects/tycho-compiler-plugin/javac/simple/src/Test.java new file mode 100644 index 0000000000..461755c786 --- /dev/null +++ b/tycho-its/projects/tycho-compiler-plugin/javac/simple/src/Test.java @@ -0,0 +1,19 @@ +/******************************************************************************* + * Copyright (c) 2012 SAP AG and others. + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * SAP AG - initial API and implementation + *******************************************************************************/ + +public class Test +{ + public static void main(String[] args) { + int a = 0; + } +} diff --git a/tycho-its/src/test/java/org/eclipse/tycho/test/CompilerPluginTest.java b/tycho-its/src/test/java/org/eclipse/tycho/test/CompilerPluginTest.java new file mode 100644 index 0000000000..fedcd0cce0 --- /dev/null +++ b/tycho-its/src/test/java/org/eclipse/tycho/test/CompilerPluginTest.java @@ -0,0 +1,30 @@ +/******************************************************************************* + * Copyright (c) 2024 Christoph Läubrich and others. + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Christoph Läubrich - initial API and implementation + *******************************************************************************/ +package org.eclipse.tycho.test; + +import org.apache.maven.it.Verifier; +import org.junit.Test; + +/** + * Test for the tycho-compiler-plugin + */ +public class CompilerPluginTest extends AbstractTychoIntegrationTest { + + @Test + public void testJavac() throws Exception { + Verifier verifier = getVerifier("tycho-compiler-plugin/javac", true, true); + verifier.executeGoal("compile"); + verifier.verifyErrorFreeLog(); + } + +}