Skip to content

Commit

Permalink
Add integration test for tycho-apitools-plugin:verify mojo
Browse files Browse the repository at this point in the history
Co-authored-by: Christoph Läubrich <laeubi@laeubi-soft.de>
  • Loading branch information
HannesWell and laeubi committed Mar 24, 2023
1 parent 29fde8b commit 672552e
Show file tree
Hide file tree
Showing 25 changed files with 613 additions and 8 deletions.
1 change: 1 addition & 0 deletions tycho-its/projects/api-tools/.mvn/maven.config
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
-Dtycho-version=4.0.0-SNAPSHOT
5 changes: 5 additions & 0 deletions tycho-its/projects/api-tools/api-repo/category.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<site>
<bundle id="api-bundle-1"/>
<bundle id="api-bundle-2"/>
</site>
11 changes: 11 additions & 0 deletions tycho-its/projects/api-tools/api-repo/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<project>
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.eclipse.tycho.tycho-its</groupId>
<artifactId>apitools-parent</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>
<artifactId>api-repo</artifactId>
<packaging>eclipse-repository</packaging>
</project>
7 changes: 7 additions & 0 deletions tycho-its/projects/api-tools/bundle1/.classpath
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src/"/>
<classpathentry kind="output" path="bin"/>
</classpath>
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>api-bundle</name>
<name>api-bundle-1</name>
<comment></comment>
<projects>
</projects>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Plugin with API
Bundle-SymbolicName: api-bundle
Bundle-SymbolicName: api-bundle-1
Bundle-Version: 0.0.1.qualifier
Bundle-RequiredExecutionEnvironment: JavaSE-11
Export-Package: bundle
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
<artifactId>apitools-parent</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>
<artifactId>api-bundle</artifactId>
<artifactId>api-bundle-1</artifactId>
<packaging>eclipse-plugin</packaging>
</project>
16 changes: 16 additions & 0 deletions tycho-its/projects/api-tools/bundle1/src/bundle/ClassA.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package bundle;

import java.util.Collection;
import java.util.List;

public class ClassA {

public String getGreetings() { // originally getString()
return "Hello World";
}

public Collection<String> getCollection() { // originally returned List
return List.of();
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package bundle;

public interface InterfaceB { // originally named 'InterfaceA'

}
7 changes: 7 additions & 0 deletions tycho-its/projects/api-tools/bundle2/.classpath
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src/"/>
<classpathentry kind="output" path="bin"/>
</classpath>
40 changes: 40 additions & 0 deletions tycho-its/projects/api-tools/bundle2/.project
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>api-bundle-2</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.ManifestBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.SchemaBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
</natures>
</projectDescription>
8 changes: 8 additions & 0 deletions tycho-its/projects/api-tools/bundle2/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Plugin with API
Bundle-SymbolicName: api-bundle-2
Bundle-Version: 0.0.1.qualifier
Require-Capability: osgi.ee;filter:="(&(osgi.ee=JavaSE)(version=11))"
Export-Package: bundle
Automatic-Module-Name: bundle
4 changes: 4 additions & 0 deletions tycho-its/projects/api-tools/bundle2/build.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
source.. = src/
output.. = bin/
bin.includes = .,\
META-INF/
11 changes: 11 additions & 0 deletions tycho-its/projects/api-tools/bundle2/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<project>
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.eclipse.tycho.tycho-its</groupId>
<artifactId>apitools-parent</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>
<artifactId>api-bundle-2</artifactId>
<packaging>eclipse-plugin</packaging>
</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package bundle;

public interface ApiInterface2 {

void sayHello();

}
12 changes: 9 additions & 3 deletions tycho-its/projects/api-tools/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,13 @@
<modules>
<!--module>api-repo</module-->
<!-- Used to build the baseline repo -->
<module>bundle</module>
<module>bundle1</module>
<module>bundle2</module>
</modules>
<properties>
<tycho-version>4.0.0-SNAPSHOT</tycho-version>
<target-platform>https://download.eclipse.org/releases/2022-06/</target-platform>
<!-- required until 2023-06 release! -->
<eclipserun-repo>https://download.eclipse.org/eclipse/updates/4.28-I-builds/</eclipserun-repo>
</properties>
<repositories>
<repository>
Expand All @@ -34,9 +36,13 @@
<artifactId>tycho-apitools-plugin</artifactId>
<version>${tycho-version}</version>
<configuration>
<apiToolsRepository>
<url>${eclipserun-repo}</url>
</apiToolsRepository>
<baselines>
<repository>
<url>file:/home/christoph/git/laeubi/tycho/tycho-its/projects/api-tools/api-repo/target/repository</url>
<id>baseline</id>
<url>${baselineRepo}</url>
</repository>
</baselines>
</configuration>
Expand Down
44 changes: 44 additions & 0 deletions tycho-its/repositories/api-tools/artifacts.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<?xml version='1.0' encoding='UTF-8'?>
<?artifactRepository version='1.1.0'?>
<repository name='api-repo' type='org.eclipse.equinox.p2.artifact.repository.simpleRepository' version='1'>
<properties size='3'>
<property name='publishPackFilesAsSiblings' value='true'/>
<property name='p2.compressed' value='true'/>
<property name='p2.timestamp' value='1664006024508'/>
</properties>
<mappings size='5'>
<rule filter='(&amp; (classifier=osgi.bundle) (format=packed))' output='${repoUrl}/plugins/${id}_${version}.jar.pack.gz'/>
<rule filter='(&amp; (classifier=osgi.bundle))' output='${repoUrl}/plugins/${id}_${version}.jar'/>
<rule filter='(&amp; (classifier=binary))' output='${repoUrl}/binary/${id}_${version}'/>
<rule filter='(&amp; (classifier=org.eclipse.update.feature) (format=packed))' output='${repoUrl}/features/${id}_${version}.jar.pack.gz'/>
<rule filter='(&amp; (classifier=org.eclipse.update.feature))' output='${repoUrl}/features/${id}_${version}.jar'/>
</mappings>
<artifacts size='2'>
<artifact classifier='osgi.bundle' id='api-bundle-1' version='0.0.1.202209240753'>
<properties size='9'>
<property name='artifact.size' value='2685'/>
<property name='download.size' value='2685'/>
<property name='maven-groupId' value='org.eclipse.tycho.tycho-its'/>
<property name='maven-artifactId' value='api-bundle-1'/>
<property name='maven-version' value='0.0.1-SNAPSHOT'/>
<property name='maven-type' value='eclipse-plugin'/>
<property name='download.md5' value='2afbcdbbd860f8484c545df630b085e2'/>
<property name='download.checksum.md5' value='2afbcdbbd860f8484c545df630b085e2'/>
<property name='download.checksum.sha-256' value='d84c769d0c4fd25e38d6e3aa1b4e5c1df303f538cc42dd955be9cd715c377cbf'/>
</properties>
</artifact>
<artifact classifier='osgi.bundle' id='api-bundle-2' version='0.0.1.202209240753'>
<properties size='9'>
<property name='artifact.size' value='2050'/>
<property name='download.size' value='2050'/>
<property name='maven-groupId' value='org.eclipse.tycho.tycho-its'/>
<property name='maven-artifactId' value='api-bundle-2'/>
<property name='maven-version' value='0.0.1-SNAPSHOT'/>
<property name='maven-type' value='eclipse-plugin'/>
<property name='download.md5' value='8e3644cf78638da63cd35a6db5e93407'/>
<property name='download.checksum.md5' value='8e3644cf78638da63cd35a6db5e93407'/>
<property name='download.checksum.sha-256' value='780ebdadec5d49c4ba4805fa4166b58b9e823924f066970cb57709a94ad31baf'/>
</properties>
</artifact>
</artifacts>
</repository>
Loading

0 comments on commit 672552e

Please sign in to comment.