Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'tycho-pomless/src/test')
-rw-r--r--tycho-pomless/src/test/java/org/eclipse/tycho/pomless/TychoMappingTest.java41
-rw-r--r--tycho-pomless/src/test/java/org/eclipse/tycho/pomless/TychoModelReaderTest.java165
-rw-r--r--tycho-pomless/src/test/resources/mapping/precedence/build.properties0
-rw-r--r--tycho-pomless/src/test/resources/mapping/precedence/pom.xml0
-rw-r--r--tycho-pomless/src/test/resources/mapping/simple/build.properties0
-rw-r--r--tycho-pomless/src/test/resources/modelreader/features/illFormed/build.properties0
-rw-r--r--tycho-pomless/src/test/resources/modelreader/features/illFormed/feature.xml6
-rw-r--r--tycho-pomless/src/test/resources/modelreader/features/missingId/build.properties0
-rw-r--r--tycho-pomless/src/test/resources/modelreader/features/missingId/feature.xml6
-rw-r--r--tycho-pomless/src/test/resources/modelreader/features/missingVersion/build.properties0
-rw-r--r--tycho-pomless/src/test/resources/modelreader/features/missingVersion/feature.xml6
-rw-r--r--tycho-pomless/src/test/resources/modelreader/features/pom.xml11
-rw-r--r--tycho-pomless/src/test/resources/modelreader/grandparentInheritance/bundle/META-INF/MANIFEST.MF5
-rw-r--r--tycho-pomless/src/test/resources/modelreader/grandparentInheritance/bundle/build.properties0
-rw-r--r--tycho-pomless/src/test/resources/modelreader/grandparentInheritance/pom.xml15
-rw-r--r--tycho-pomless/src/test/resources/modelreader/missingManifestOrFeature/build.properties0
-rw-r--r--tycho-pomless/src/test/resources/modelreader/noParent/bundle/META-INF/MANIFEST.MF5
-rw-r--r--tycho-pomless/src/test/resources/modelreader/noParent/bundle/build.properties0
-rw-r--r--tycho-pomless/src/test/resources/modelreader/plugins/missingBsn/META-INF/MANIFEST.MF5
-rw-r--r--tycho-pomless/src/test/resources/modelreader/plugins/missingBsn/build.properties0
-rw-r--r--tycho-pomless/src/test/resources/modelreader/plugins/missingVersion/META-INF/MANIFEST.MF5
-rw-r--r--tycho-pomless/src/test/resources/modelreader/plugins/missingVersion/build.properties0
-rw-r--r--tycho-pomless/src/test/resources/modelreader/plugins/pom.xml11
-rw-r--r--tycho-pomless/src/test/resources/testpomless/bundle1.tests/META-INF/MANIFEST.MF5
-rw-r--r--tycho-pomless/src/test/resources/testpomless/bundle1.tests/build.properties2
-rw-r--r--tycho-pomless/src/test/resources/testpomless/bundle1.tests/src/DummyTest.java21
-rw-r--r--tycho-pomless/src/test/resources/testpomless/bundle1/META-INF/MANIFEST.MF5
-rw-r--r--tycho-pomless/src/test/resources/testpomless/bundle1/build.properties2
-rw-r--r--tycho-pomless/src/test/resources/testpomless/feature/build.properties1
-rw-r--r--tycho-pomless/src/test/resources/testpomless/feature/feature.xml20
-rw-r--r--tycho-pomless/src/test/resources/testpomless/pom.xml22
31 files changed, 359 insertions, 0 deletions
diff --git a/tycho-pomless/src/test/java/org/eclipse/tycho/pomless/TychoMappingTest.java b/tycho-pomless/src/test/java/org/eclipse/tycho/pomless/TychoMappingTest.java
new file mode 100644
index 0000000..9cc5007
--- /dev/null
+++ b/tycho-pomless/src/test/java/org/eclipse/tycho/pomless/TychoMappingTest.java
@@ -0,0 +1,41 @@
+/*******************************************************************************
+ * Copyright (c) 2015 SAP SE and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * SAP SE - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tycho.pomless;
+
+import java.io.File;
+
+import org.codehaus.plexus.PlexusTestCase;
+import org.sonatype.maven.polyglot.PolyglotModelManager;
+
+public class TychoMappingTest extends PlexusTestCase {
+
+ private PolyglotModelManager polyglotModelManager;
+
+ @Override
+ protected void setUp() throws Exception {
+ polyglotModelManager = lookup(PolyglotModelManager.class);
+ }
+
+ public void testLocateBuildProperties() throws Exception {
+ File pom = polyglotModelManager.locatePom(new File(getMappingTestDir(), "simple"));
+ assertEquals("build.properties", pom.getName());
+ }
+
+ public void testPriority() throws Exception {
+ File pom = polyglotModelManager.locatePom(new File(getMappingTestDir(), "precedence"));
+ assertEquals("pom.xml must win over build.properties", "pom.xml", pom.getName());
+ }
+
+ private File getMappingTestDir() {
+ return new File(getBasedir(), "src/test/resources/mapping/");
+ }
+
+}
diff --git a/tycho-pomless/src/test/java/org/eclipse/tycho/pomless/TychoModelReaderTest.java b/tycho-pomless/src/test/java/org/eclipse/tycho/pomless/TychoModelReaderTest.java
new file mode 100644
index 0000000..da61919
--- /dev/null
+++ b/tycho-pomless/src/test/java/org/eclipse/tycho/pomless/TychoModelReaderTest.java
@@ -0,0 +1,165 @@
+/*******************************************************************************
+ * Copyright (c) 2015 SAP SE and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * SAP SE - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tycho.pomless;
+
+import static org.junit.Assert.assertThat;
+import static org.junit.matchers.JUnitMatchers.containsString;
+
+import java.io.File;
+import java.io.IOException;
+import java.io.Reader;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.apache.maven.model.Model;
+import org.apache.maven.model.Parent;
+import org.apache.maven.model.building.ModelProcessor;
+import org.apache.maven.model.io.ModelParseException;
+import org.apache.maven.model.io.ModelReader;
+import org.codehaus.plexus.PlexusTestCase;
+
+public class TychoModelReaderTest extends PlexusTestCase {
+
+ private TychoModelReader tychoModelReader;
+
+ @Override
+ protected void setUp() throws Exception {
+ tychoModelReader = (TychoModelReader) lookup(ModelReader.class, "tycho");
+ }
+
+ public void testReadBundle() throws Exception {
+ File buildProperties = new File(getPolyglotTestDir(), "bundle1/build.properties");
+ Model model = tychoModelReader.read((Reader) null, createReaderOptions(buildProperties));
+ assertEquals("4.0.0", model.getModelVersion());
+ assertEquals("pomless.bundle", model.getArtifactId());
+ assertEquals("0.1.0-SNAPSHOT", model.getVersion());
+ assertEquals("eclipse-plugin", model.getPackaging());
+ assertParent(model.getParent());
+ }
+
+ public void testReadTestBundle() throws Exception {
+ File buildProperties = new File(getPolyglotTestDir(), "bundle1.tests/build.properties");
+ Model model = tychoModelReader.read((Reader) null, createReaderOptions(buildProperties));
+ assertEquals("pomless.bundle.tests", model.getArtifactId());
+ assertEquals("1.0.1", model.getVersion());
+ assertEquals("eclipse-test-plugin", model.getPackaging());
+ assertParent(model.getParent());
+ }
+
+ public void testReadFeature() throws Exception {
+ File buildProperties = new File(getPolyglotTestDir(), "feature/build.properties");
+ Model model = tychoModelReader.read((Reader) null, createReaderOptions(buildProperties));
+ assertEquals("pomless.feature", model.getArtifactId());
+ assertEquals("1.0.0-SNAPSHOT", model.getVersion());
+ assertEquals("eclipse-feature", model.getPackaging());
+ assertParent(model.getParent());
+ }
+
+ public void testMissingManifestOrFeature() throws Exception {
+ File buildProperties = new File(getTestResourcesDir(), "modelreader/missingManifestOrFeature/build.properties");
+ try {
+ tychoModelReader.read((Reader) null, createReaderOptions(buildProperties));
+ fail();
+ } catch (IOException e) {
+ // expected
+ }
+ }
+
+ public void testIllFormedFeature() throws Exception {
+ File buildProperties = new File(getTestResourcesDir(), "modelreader/features/illFormed/build.properties");
+ try {
+ tychoModelReader.read((Reader) null, createReaderOptions(buildProperties));
+ fail();
+ } catch (ModelParseException e) {
+ // expected
+ }
+ }
+
+ public void testFeatureWithoutId() throws Exception {
+ File buildProperties = new File(getTestResourcesDir(), "modelreader/features/missingId/build.properties");
+ try {
+ tychoModelReader.read((Reader) null, createReaderOptions(buildProperties));
+ fail();
+ } catch (ModelParseException e) {
+ assertThat(e.getMessage(), containsString("missing feature id in"));
+ }
+ }
+
+ public void testFeatureWithoutVersion() throws Exception {
+ File buildProperties = new File(getTestResourcesDir(), "modelreader/features/missingVersion/build.properties");
+ try {
+ tychoModelReader.read((Reader) null, createReaderOptions(buildProperties));
+ fail();
+ } catch (ModelParseException e) {
+ assertThat(e.getMessage(), containsString("missing feature version in"));
+ }
+ }
+
+ public void testBundleWithoutSymbolicName() throws Exception {
+ File buildProperties = new File(getTestResourcesDir(), "modelreader/plugins/missingBsn/build.properties");
+ try {
+ tychoModelReader.read((Reader) null, createReaderOptions(buildProperties));
+ fail();
+ } catch (ModelParseException e) {
+ assertThat(e.getMessage(), containsString("Bundle-SymbolicName missing in"));
+ }
+ }
+
+ public void testBundleWithoutVersion() throws Exception {
+ File buildProperties = new File(getTestResourcesDir(), "modelreader/plugins/missingVersion/build.properties");
+ try {
+ tychoModelReader.read((Reader) null, createReaderOptions(buildProperties));
+ fail();
+ } catch (ModelParseException e) {
+ assertThat(e.getMessage(), containsString("Bundle-Version missing in"));
+ }
+ }
+
+ public void testNoParent() throws Exception {
+ File buildProperties = new File(getTestResourcesDir(), "modelreader/noParent/bundle/build.properties");
+ try {
+ tychoModelReader.read((Reader) null, createReaderOptions(buildProperties));
+ fail();
+ } catch (IOException e) {
+ assertThat(e.getMessage(), containsString("No parent pom file found in"));
+ }
+ }
+
+ public void testFindParent() throws Exception {
+ Parent parentReference = tychoModelReader.findParent(new File(getTestResourcesDir(),
+ "modelreader/grandparentInheritance/bundle/"));
+ assertEquals("bundle-parent", parentReference.getArtifactId());
+ assertEquals("grandparent.groupid", parentReference.getGroupId());
+ assertEquals("1.2.3", parentReference.getVersion());
+ }
+
+ private void assertParent(Parent parent) {
+ assertNotNull(parent);
+ assertEquals("testParent.groupId", parent.getGroupId());
+ assertEquals("testparent", parent.getArtifactId());
+ assertEquals("0.0.1-SNAPSHOT", parent.getVersion());
+ }
+
+ private Map<String, String> createReaderOptions(File buildProperties) {
+ Map<String, String> options = new HashMap<String, String>();
+ options.put(ModelProcessor.SOURCE, buildProperties.getAbsolutePath());
+ return options;
+ }
+
+ private File getPolyglotTestDir() {
+ return new File(getTestResourcesDir(), "testpomless/");
+ }
+
+ private File getTestResourcesDir() {
+ return new File(getBasedir(), "src/test/resources/");
+ }
+
+}
diff --git a/tycho-pomless/src/test/resources/mapping/precedence/build.properties b/tycho-pomless/src/test/resources/mapping/precedence/build.properties
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tycho-pomless/src/test/resources/mapping/precedence/build.properties
diff --git a/tycho-pomless/src/test/resources/mapping/precedence/pom.xml b/tycho-pomless/src/test/resources/mapping/precedence/pom.xml
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tycho-pomless/src/test/resources/mapping/precedence/pom.xml
diff --git a/tycho-pomless/src/test/resources/mapping/simple/build.properties b/tycho-pomless/src/test/resources/mapping/simple/build.properties
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tycho-pomless/src/test/resources/mapping/simple/build.properties
diff --git a/tycho-pomless/src/test/resources/modelreader/features/illFormed/build.properties b/tycho-pomless/src/test/resources/modelreader/features/illFormed/build.properties
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tycho-pomless/src/test/resources/modelreader/features/illFormed/build.properties
diff --git a/tycho-pomless/src/test/resources/modelreader/features/illFormed/feature.xml b/tycho-pomless/src/test/resources/modelreader/features/illFormed/feature.xml
new file mode 100644
index 0000000..898757a
--- /dev/null
+++ b/tycho-pomless/src/test/resources/modelreader/features/illFormed/feature.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<feature
+ id="pomless.feature"
+ version="1.0.0.qualifier">
+
+</feature_NOT_WELL_FORMED>
diff --git a/tycho-pomless/src/test/resources/modelreader/features/missingId/build.properties b/tycho-pomless/src/test/resources/modelreader/features/missingId/build.properties
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tycho-pomless/src/test/resources/modelreader/features/missingId/build.properties
diff --git a/tycho-pomless/src/test/resources/modelreader/features/missingId/feature.xml b/tycho-pomless/src/test/resources/modelreader/features/missingId/feature.xml
new file mode 100644
index 0000000..1374081
--- /dev/null
+++ b/tycho-pomless/src/test/resources/modelreader/features/missingId/feature.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<feature
+ MISSING_ID="pomless.feature"
+ version="1.0.0.qualifier">
+
+</feature>
diff --git a/tycho-pomless/src/test/resources/modelreader/features/missingVersion/build.properties b/tycho-pomless/src/test/resources/modelreader/features/missingVersion/build.properties
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tycho-pomless/src/test/resources/modelreader/features/missingVersion/build.properties
diff --git a/tycho-pomless/src/test/resources/modelreader/features/missingVersion/feature.xml b/tycho-pomless/src/test/resources/modelreader/features/missingVersion/feature.xml
new file mode 100644
index 0000000..803d921
--- /dev/null
+++ b/tycho-pomless/src/test/resources/modelreader/features/missingVersion/feature.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<feature
+ id="pomless.feature"
+ MISSING_VERSION="1.0.0.qualifier">
+
+</feature>
diff --git a/tycho-pomless/src/test/resources/modelreader/features/pom.xml b/tycho-pomless/src/test/resources/modelreader/features/pom.xml
new file mode 100644
index 0000000..5a8d2eb
--- /dev/null
+++ b/tycho-pomless/src/test/resources/modelreader/features/pom.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <groupId>testParent.groupId</groupId>
+ <artifactId>feature-testparent</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ <packaging>pom</packaging>
+
+</project>
diff --git a/tycho-pomless/src/test/resources/modelreader/grandparentInheritance/bundle/META-INF/MANIFEST.MF b/tycho-pomless/src/test/resources/modelreader/grandparentInheritance/bundle/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..ce659e2
--- /dev/null
+++ b/tycho-pomless/src/test/resources/modelreader/grandparentInheritance/bundle/META-INF/MANIFEST.MF
@@ -0,0 +1,5 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-SymbolicName: pomless.bundle
+Bundle-Version: 0.1.0.qualifier
+
diff --git a/tycho-pomless/src/test/resources/modelreader/grandparentInheritance/bundle/build.properties b/tycho-pomless/src/test/resources/modelreader/grandparentInheritance/bundle/build.properties
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tycho-pomless/src/test/resources/modelreader/grandparentInheritance/bundle/build.properties
diff --git a/tycho-pomless/src/test/resources/modelreader/grandparentInheritance/pom.xml b/tycho-pomless/src/test/resources/modelreader/grandparentInheritance/pom.xml
new file mode 100644
index 0000000..8c5dca9
--- /dev/null
+++ b/tycho-pomless/src/test/resources/modelreader/grandparentInheritance/pom.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>grandparent.groupid</groupId>
+ <artifactId>grandparent.artifactId</artifactId>
+ <version>1.2.3</version>
+ </parent>
+ <!-- groupId and version inherited from grandparent -->
+ <artifactId>bundle-parent</artifactId>
+ <packaging>pom</packaging>
+
+</project>
diff --git a/tycho-pomless/src/test/resources/modelreader/missingManifestOrFeature/build.properties b/tycho-pomless/src/test/resources/modelreader/missingManifestOrFeature/build.properties
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tycho-pomless/src/test/resources/modelreader/missingManifestOrFeature/build.properties
diff --git a/tycho-pomless/src/test/resources/modelreader/noParent/bundle/META-INF/MANIFEST.MF b/tycho-pomless/src/test/resources/modelreader/noParent/bundle/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..390c98c
--- /dev/null
+++ b/tycho-pomless/src/test/resources/modelreader/noParent/bundle/META-INF/MANIFEST.MF
@@ -0,0 +1,5 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-SymbolicName: pomless.bundle;singleton:=true
+Bundle-Version: 0.1.0.qualifier
+
diff --git a/tycho-pomless/src/test/resources/modelreader/noParent/bundle/build.properties b/tycho-pomless/src/test/resources/modelreader/noParent/bundle/build.properties
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tycho-pomless/src/test/resources/modelreader/noParent/bundle/build.properties
diff --git a/tycho-pomless/src/test/resources/modelreader/plugins/missingBsn/META-INF/MANIFEST.MF b/tycho-pomless/src/test/resources/modelreader/plugins/missingBsn/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..7db3cad
--- /dev/null
+++ b/tycho-pomless/src/test/resources/modelreader/plugins/missingBsn/META-INF/MANIFEST.MF
@@ -0,0 +1,5 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Missing-Bundle-SymbolicName: pomless.bundle;singleton:=true
+Bundle-Version: 0.1.0.qualifier
+
diff --git a/tycho-pomless/src/test/resources/modelreader/plugins/missingBsn/build.properties b/tycho-pomless/src/test/resources/modelreader/plugins/missingBsn/build.properties
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tycho-pomless/src/test/resources/modelreader/plugins/missingBsn/build.properties
diff --git a/tycho-pomless/src/test/resources/modelreader/plugins/missingVersion/META-INF/MANIFEST.MF b/tycho-pomless/src/test/resources/modelreader/plugins/missingVersion/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..7681299
--- /dev/null
+++ b/tycho-pomless/src/test/resources/modelreader/plugins/missingVersion/META-INF/MANIFEST.MF
@@ -0,0 +1,5 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-SymbolicName: pomless.bundle;singleton:=true
+Missing-Bundle-Version: 0.1.0.qualifier
+
diff --git a/tycho-pomless/src/test/resources/modelreader/plugins/missingVersion/build.properties b/tycho-pomless/src/test/resources/modelreader/plugins/missingVersion/build.properties
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tycho-pomless/src/test/resources/modelreader/plugins/missingVersion/build.properties
diff --git a/tycho-pomless/src/test/resources/modelreader/plugins/pom.xml b/tycho-pomless/src/test/resources/modelreader/plugins/pom.xml
new file mode 100644
index 0000000..210c387
--- /dev/null
+++ b/tycho-pomless/src/test/resources/modelreader/plugins/pom.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <groupId>testParent.groupId</groupId>
+ <artifactId>plugins-testparent</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ <packaging>pom</packaging>
+
+</project>
diff --git a/tycho-pomless/src/test/resources/testpomless/bundle1.tests/META-INF/MANIFEST.MF b/tycho-pomless/src/test/resources/testpomless/bundle1.tests/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..1252600
--- /dev/null
+++ b/tycho-pomless/src/test/resources/testpomless/bundle1.tests/META-INF/MANIFEST.MF
@@ -0,0 +1,5 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-SymbolicName: pomless.bundle.tests
+Bundle-Version: 1.0.1
+Require-Bundle: org.junit;bundle-version="4.0.0"
diff --git a/tycho-pomless/src/test/resources/testpomless/bundle1.tests/build.properties b/tycho-pomless/src/test/resources/testpomless/bundle1.tests/build.properties
new file mode 100644
index 0000000..c45bfb5
--- /dev/null
+++ b/tycho-pomless/src/test/resources/testpomless/bundle1.tests/build.properties
@@ -0,0 +1,2 @@
+bin.includes = META-INF/,.
+source.. = src/
diff --git a/tycho-pomless/src/test/resources/testpomless/bundle1.tests/src/DummyTest.java b/tycho-pomless/src/test/resources/testpomless/bundle1.tests/src/DummyTest.java
new file mode 100644
index 0000000..56495fe
--- /dev/null
+++ b/tycho-pomless/src/test/resources/testpomless/bundle1.tests/src/DummyTest.java
@@ -0,0 +1,21 @@
+/*******************************************************************************
+ * Copyright (c) 2015 SAP SE and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * SAP SE - initial API and implementation
+ *******************************************************************************/
+import org.junit.Assert;
+import org.junit.Test;
+
+public class DummyTest {
+
+ @Test
+ public void test() {
+ Assert.assertTrue(true);
+ }
+
+}
diff --git a/tycho-pomless/src/test/resources/testpomless/bundle1/META-INF/MANIFEST.MF b/tycho-pomless/src/test/resources/testpomless/bundle1/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..390c98c
--- /dev/null
+++ b/tycho-pomless/src/test/resources/testpomless/bundle1/META-INF/MANIFEST.MF
@@ -0,0 +1,5 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-SymbolicName: pomless.bundle;singleton:=true
+Bundle-Version: 0.1.0.qualifier
+
diff --git a/tycho-pomless/src/test/resources/testpomless/bundle1/build.properties b/tycho-pomless/src/test/resources/testpomless/bundle1/build.properties
new file mode 100644
index 0000000..c45bfb5
--- /dev/null
+++ b/tycho-pomless/src/test/resources/testpomless/bundle1/build.properties
@@ -0,0 +1,2 @@
+bin.includes = META-INF/,.
+source.. = src/
diff --git a/tycho-pomless/src/test/resources/testpomless/feature/build.properties b/tycho-pomless/src/test/resources/testpomless/feature/build.properties
new file mode 100644
index 0000000..64f93a9
--- /dev/null
+++ b/tycho-pomless/src/test/resources/testpomless/feature/build.properties
@@ -0,0 +1 @@
+bin.includes = feature.xml
diff --git a/tycho-pomless/src/test/resources/testpomless/feature/feature.xml b/tycho-pomless/src/test/resources/testpomless/feature/feature.xml
new file mode 100644
index 0000000..da903db
--- /dev/null
+++ b/tycho-pomless/src/test/resources/testpomless/feature/feature.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<feature
+ id="pomless.feature"
+ version="1.0.0.qualifier">
+
+ <plugin
+ id="pomless.bundle"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="pomless.bundle.tests"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+</feature>
diff --git a/tycho-pomless/src/test/resources/testpomless/pom.xml b/tycho-pomless/src/test/resources/testpomless/pom.xml
new file mode 100644
index 0000000..acd2d1f
--- /dev/null
+++ b/tycho-pomless/src/test/resources/testpomless/pom.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ - Copyright (c) 2015 SAP SE and others.
+ - All rights reserved. This program and the accompanying materials
+ - are made available under the terms of the Eclipse Public License v1.0
+ - which accompanies this distribution, and is available at
+ - http://www.eclipse.org/legal/epl-v10.html
+ -
+ - Contributors:
+ - SAP SE - initial API and implementation
+ -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <groupId>testParent.groupId</groupId>
+ <artifactId>testparent</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ <packaging>pom</packaging>
+
+</project>

Back to the top