-
Notifications
You must be signed in to change notification settings - Fork 194
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix pom.model properties read for bundle-projects and add it-tests
The TychoBundleMapping tried to look up the buiild.properties of a 'eclipse-plugin' project in its 'META-INF' folder instead of the project root. This change fixes that. + Add extensive integration tests to ensure all pom.model attributes are correctly read + Remove DefaultTychoResolver.setBuildProperties() because its functionality is already handled by AbstractTychoMapping and it is currently not working Backport of commit: 4c2db22 See #1090
- Loading branch information
1 parent
451c50a
commit 7df3c27
Showing
41 changed files
with
613 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<extensions> | ||
<extension> | ||
<groupId>org.eclipse.tycho</groupId> | ||
<artifactId>tycho-build</artifactId> | ||
<version>2.7.4-SNAPSHOT</version> | ||
</extension> | ||
</extensions> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
-Dtycho-version=3.0.0-SNAPSHOT | ||
-Dtycho.pomless.aggregator.names=bundles,bundles-with-enhanced-parents |
16 changes: 16 additions & 0 deletions
16
tycho-its/projects/pomless-model/alternative-parent/pom.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<parent> | ||
<groupId>foo.bar</groupId> | ||
<artifactId>simple</artifactId> | ||
<version>1.0.0</version> | ||
</parent> | ||
<groupId>foo.other</groupId> | ||
<artifactId>another-parent</artifactId> | ||
<packaging>pom</packaging> | ||
<name>Alternative Parent 2 from pomXML</name> | ||
<properties> | ||
<custom.user.property>alternative-parent-from-pomXML</custom.user.property> | ||
</properties> | ||
</project> |
6 changes: 6 additions & 0 deletions
6
tycho-its/projects/pomless-model/bundles-2/foo.bar.bundle-5/META-INF/MANIFEST.MF
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
Manifest-Version: 1.0 | ||
Bundle-ManifestVersion: 2 | ||
Bundle-Name: Plugin | ||
Bundle-SymbolicName: foo.bar.bundle-5 | ||
Bundle-Version: 1.0.0 | ||
Bundle-RequiredExecutionEnvironment: JavaSE-11 |
3 changes: 3 additions & 0 deletions
3
tycho-its/projects/pomless-model/bundles-2/foo.bar.bundle-5/build.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
bin.includes = META-INF/ | ||
pom.model.name = Bundle 5 pomless | ||
# Inherit pom.model.property.custom.user.property from parent |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<parent> | ||
<groupId>foo.bar</groupId> | ||
<artifactId>simple</artifactId> | ||
<version>1.0.0</version> | ||
</parent> | ||
<artifactId>bundles-2</artifactId> | ||
<version>1.1.0</version> | ||
<packaging>pom</packaging> | ||
<name>Aggregator 2 from pomXML</name> | ||
<properties> | ||
<custom.user.property>aggregator2-from-pomXML</custom.user.property> | ||
</properties> | ||
<modules> | ||
<module>foo.bar.bundle-5</module> | ||
</modules> | ||
</project> |
4 changes: 4 additions & 0 deletions
4
tycho-its/projects/pomless-model/bundles-with-enhanced-parents/build.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
pom.model.groupId = bundles-enhanced-pomless | ||
pom.model.version = 1.2.0 | ||
pom.model.name = Aggregator 3 pomless | ||
pom.model.property.custom.user.property = aggregator3-pomless |
6 changes: 6 additions & 0 deletions
6
...rojects/pomless-model/bundles-with-enhanced-parents/foo.bar.bundle-3/META-INF/MANIFEST.MF
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
Manifest-Version: 1.0 | ||
Bundle-ManifestVersion: 2 | ||
Bundle-Name: Plugin | ||
Bundle-SymbolicName: foo.bar.bundle-3 | ||
Bundle-Version: 1.0.0 | ||
Bundle-RequiredExecutionEnvironment: JavaSE-11 |
4 changes: 4 additions & 0 deletions
4
...ts/projects/pomless-model/bundles-with-enhanced-parents/foo.bar.bundle-3/build.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
bin.includes = META-INF/ | ||
tycho.pomless.parent = ../../alternative-parent | ||
pom.model.name = Bundle 3 pomless | ||
# Inherit pom.model.property.custom.user.property from parent |
7 changes: 7 additions & 0 deletions
7
...rojects/pomless-model/bundles-with-enhanced-parents/foo.bar.bundle-4/META-INF/MANIFEST.MF
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
Manifest-Version: 1.0 | ||
Bundle-ManifestVersion: 2 | ||
Bundle-Name: Plugin | ||
Bundle-SymbolicName: foo.bar.bundle-4 | ||
Bundle-Version: 1.0.0 | ||
Automatic-Module-Name: foo.bar.plugin | ||
Bundle-RequiredExecutionEnvironment: JavaSE-11 |
6 changes: 6 additions & 0 deletions
6
...ts/projects/pomless-model/bundles-with-enhanced-parents/foo.bar.bundle-4/build.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
source.. = src/ | ||
output.. = bin/ | ||
bin.includes = META-INF/,\ | ||
. | ||
pom.model.name = Bundle 4 pomless | ||
# Inherit pom.model.property.custom.user.property from parent |
7 changes: 7 additions & 0 deletions
7
tycho-its/projects/pomless-model/bundles/foo.bar.bundle-2/META-INF/MANIFEST.MF
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
Manifest-Version: 1.0 | ||
Bundle-ManifestVersion: 2 | ||
Bundle-Name: Plugin | ||
Bundle-SymbolicName: foo.bar.bundle-2 | ||
Bundle-Version: 1.0.0 | ||
Automatic-Module-Name: foo.bar.plugin | ||
Bundle-RequiredExecutionEnvironment: JavaSE-11 |
4 changes: 4 additions & 0 deletions
4
tycho-its/projects/pomless-model/bundles/foo.bar.bundle-2/build.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
bin.includes = META-INF/ | ||
tycho.pomless.parent = ../../alternative-parent | ||
pom.model.name = Bundle 2 pomless | ||
pom.model.property.custom.user.property = bundle2-pomless |
16 changes: 16 additions & 0 deletions
16
tycho-its/projects/pomless-model/bundles/foo.bar.bundle-2/pom.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<parent> | ||
<groupId>foo.bar</groupId> | ||
<artifactId>simple</artifactId> | ||
<version>1.0.0</version> | ||
<relativePath>../..</relativePath> | ||
</parent> | ||
<artifactId>foo.bar.bundle-2</artifactId> | ||
<packaging>eclipse-plugin</packaging> | ||
<name>Bundle 2 from pom.xml</name> | ||
<properties> | ||
<custom.user.property>bundle2-from-pomXML</custom.user.property> | ||
</properties> | ||
</project> |
6 changes: 6 additions & 0 deletions
6
tycho-its/projects/pomless-model/bundles/foo.bar.bundle/META-INF/MANIFEST.MF
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
Manifest-Version: 1.0 | ||
Bundle-ManifestVersion: 2 | ||
Bundle-Name: Plugin | ||
Bundle-SymbolicName: foo.bar.bundle | ||
Bundle-Version: 1.0.0 | ||
Bundle-RequiredExecutionEnvironment: JavaSE-11 |
3 changes: 3 additions & 0 deletions
3
tycho-its/projects/pomless-model/bundles/foo.bar.bundle/build.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
bin.includes = META-INF/ | ||
pom.model.name = Bundle 1 pomless | ||
pom.model.property.custom.user.property = bundle1-pomless |
3 changes: 3 additions & 0 deletions
3
tycho-its/projects/pomless-model/foo.bar.feature-2/build.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
bin.includes = feature.xml | ||
pom.model.name = Feature 2 pomless | ||
pom.model.property.custom.user.property = feature2-pomless |
27 changes: 27 additions & 0 deletions
27
tycho-its/projects/pomless-model/foo.bar.feature-2/feature.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<feature | ||
id="foo.bar.feature-2" | ||
label="Feature" | ||
version="1.0.0"> | ||
|
||
<description url="http://www.example.com/description"> | ||
[Enter Feature Description here.] | ||
</description> | ||
|
||
<copyright url="http://www.example.com/copyright"> | ||
[Enter Copyright Description here.] | ||
</copyright> | ||
|
||
<license url="http://www.example.com/license"> | ||
[Enter License Description here.] | ||
</license> | ||
|
||
<plugin | ||
id="foo.bar.plugin-2" | ||
download-size="0" | ||
install-size="0" | ||
version="0.0.0" | ||
fragment="true" | ||
unpack="false"/> | ||
|
||
</feature> |
15 changes: 15 additions & 0 deletions
15
tycho-its/projects/pomless-model/foo.bar.feature-2/pom.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<parent> | ||
<groupId>foo.bar</groupId> | ||
<artifactId>simple</artifactId> | ||
<version>1.0.0</version> | ||
</parent> | ||
<artifactId>foo.bar.feature-2</artifactId> | ||
<packaging>eclipse-feature</packaging> | ||
<name>Feature 2 from pom.xml</name> | ||
<properties> | ||
<custom.user.property>feature2-from-pomXML</custom.user.property> | ||
</properties> | ||
</project> |
3 changes: 3 additions & 0 deletions
3
tycho-its/projects/pomless-model/foo.bar.feature/build.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
bin.includes = feature.xml | ||
pom.model.name = Feature 1 pomless | ||
pom.model.property.custom.user.property = feature1-pomless |
27 changes: 27 additions & 0 deletions
27
tycho-its/projects/pomless-model/foo.bar.feature/feature.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<feature | ||
id="foo.bar.feature" | ||
label="Feature" | ||
version="1.0.0"> | ||
|
||
<description url="http://www.example.com/description"> | ||
[Enter Feature Description here.] | ||
</description> | ||
|
||
<copyright url="http://www.example.com/copyright"> | ||
[Enter Copyright Description here.] | ||
</copyright> | ||
|
||
<license url="http://www.example.com/license"> | ||
[Enter License Description here.] | ||
</license> | ||
|
||
<plugin | ||
id="foo.bar.plugin" | ||
download-size="0" | ||
install-size="0" | ||
version="0.0.0" | ||
fragment="true" | ||
unpack="false"/> | ||
|
||
</feature> |
6 changes: 6 additions & 0 deletions
6
tycho-its/projects/pomless-model/foo.bar.plugin-2/META-INF/MANIFEST.MF
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
Manifest-Version: 1.0 | ||
Bundle-ManifestVersion: 2 | ||
Bundle-Name: Plugin | ||
Bundle-SymbolicName: foo.bar.plugin-2 | ||
Bundle-Version: 1.0.0 | ||
Bundle-RequiredExecutionEnvironment: JavaSE-11 |
3 changes: 3 additions & 0 deletions
3
tycho-its/projects/pomless-model/foo.bar.plugin-2/build.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
bin.includes = META-INF/ | ||
pom.model.name = Plugin 2 pomless | ||
pom.model.property.custom.user.property = plugin2-pomless |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<parent> | ||
<groupId>foo.bar</groupId> | ||
<artifactId>simple</artifactId> | ||
<version>1.0.0</version> | ||
</parent> | ||
<artifactId>foo.bar.plugin-2</artifactId> | ||
<packaging>eclipse-plugin</packaging> | ||
<name>Plugin 2 from pom.xml</name> | ||
<properties> | ||
<custom.user.property>plugin2-from-pomXML</custom.user.property> | ||
</properties> | ||
</project> |
6 changes: 6 additions & 0 deletions
6
tycho-its/projects/pomless-model/foo.bar.plugin/META-INF/MANIFEST.MF
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
Manifest-Version: 1.0 | ||
Bundle-ManifestVersion: 2 | ||
Bundle-Name: Plugin | ||
Bundle-SymbolicName: foo.bar.plugin | ||
Bundle-Version: 1.0.0 | ||
Bundle-RequiredExecutionEnvironment: JavaSE-11 |
3 changes: 3 additions & 0 deletions
3
tycho-its/projects/pomless-model/foo.bar.plugin/build.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
bin.includes = META-INF/ | ||
pom.model.name = Plugin 1 pomless | ||
pom.model.property.custom.user.property = plugin1-pomless |
2 changes: 2 additions & 0 deletions
2
tycho-its/projects/pomless-model/foo.bar.product-2/build.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
pom.model.name = Product 2 pomless | ||
pom.model.property.custom.user.property = product2-pomless |
19 changes: 19 additions & 0 deletions
19
tycho-its/projects/pomless-model/foo.bar.product-2/foo.bar.product
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<?pde version="3.5"?> | ||
|
||
<product name="Product" uid="foo.bar.product-2" id="org.eclipse.platform.ide" application="org.eclipse.ui.ide.workbench" version="1.0.0" useFeatures="true" includeLaunchers="false" autoIncludeRequirements="true"> | ||
|
||
<configIni use="default"> | ||
</configIni> | ||
|
||
<launcherArgs> | ||
<vmArgsMac>-XstartOnFirstThread -Dorg.eclipse.swt.internal.carbon.smallFonts | ||
</vmArgsMac> | ||
</launcherArgs> | ||
|
||
<features> | ||
<feature id="foo.bar.feature-2"/> | ||
</features> | ||
|
||
|
||
</product> |
Oops, something went wrong.