Permalink
Browse files

Merge pull request #10 from manandbytes/archetype

Run integration test for archetype
  • Loading branch information...
2 parents 50b83d9 + c99b82c commit 301499cb8b01a377975bdc915d7119a62f931906 @caniszczyk committed Jun 21, 2011
Showing with 125 additions and 59 deletions.
  1. +77 −0 minerva-eclipse-project-archetype/pom.xml
  2. +7 −0 minerva-eclipse-project-archetype/src/it/projects/minerva/test.properties
  3. +4 −4 minerva-eclipse-project-archetype/src/main/resources/META-INF/maven/archetype-metadata.xml
  4. +1 −1 ...lipse-project-archetype/src/main/resources/archetype-resources/__rootArtifactId__-feature/pom.xml
  5. +1 −3 ...se-project-archetype/src/main/resources/archetype-resources/__rootArtifactId__-repository/pom.xml
  6. +3 −3 ...chetype/src/main/resources/archetype-resources/__rootArtifactId__.core.tests/META-INF/MANIFEST.MF
  7. +1 −1 ...se-project-archetype/src/main/resources/archetype-resources/__rootArtifactId__.core.tests/pom.xml
  8. +4 −4 ...-eclipse-project-archetype/src/main/resources/archetype-resources/__rootArtifactId__.core/pom.xml
  9. +1 −1 ...a-eclipse-project-archetype/src/main/resources/archetype-resources/__rootArtifactId__.doc/pom.xml
  10. +1 −1 ...roject-archetype/src/main/resources/archetype-resources/__rootArtifactId__.source-feature/pom.xml
  11. +5 −5 ...archetype/src/main/resources/archetype-resources/__rootArtifactId__.ui.tests/META-INF/MANIFEST.MF
  12. +5 −27 ...ipse-project-archetype/src/main/resources/archetype-resources/__rootArtifactId__.ui.tests/pom.xml
  13. +6 −0 ...pe-resources/__rootArtifactId__.ui.tests/src/org/aniszczyk/minerva/ui/tests/SimpleUITestCase.java
  14. +4 −4 ...oject-archetype/src/main/resources/archetype-resources/__rootArtifactId__.ui/META-INF/MANIFEST.MF
  15. +4 −4 ...va-eclipse-project-archetype/src/main/resources/archetype-resources/__rootArtifactId__.ui/pom.xml
  16. +1 −1 minerva-eclipse-project-archetype/src/main/resources/archetype-resources/pom.xml
@@ -26,7 +26,84 @@
<artifactId>maven-archetype-plugin</artifactId>
<version>2.0</version>
</plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-invoker-plugin</artifactId>
+ <configuration>
+ <localRepositoryPath>${project.build.directory}/it/repo</localRepositoryPath>
+ <debug>true</debug>
+ <showErrors>true</showErrors>
+ </configuration>
+ </plugin>
</plugins>
</pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-invoker-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>generate-projects</id>
+ <goals>
+ <goal>install</goal>
+ <goal>run</goal>
+ </goals>
+ <configuration>
+ <cloneProjectsTo>${project.build.directory}/it/projects</cloneProjectsTo>
+ <goals>
+ <goal>org.apache.maven.plugins:maven-archetype-plugin:generate</goal>
+ </goals>
+ <pomIncludes>
+ <pomInclude>*</pomInclude>
+ </pomIncludes>
+ <projectsDirectory>${basedir}/src/it/projects</projectsDirectory>
+ <properties>
+ <archetypeArtifactId>${project.artifactId}</archetypeArtifactId>
+ <archetypeGroupId>${project.groupId}</archetypeGroupId>
+ <archetypeRepository>local</archetypeRepository>
+ <archetypeVersion>${project.version}</archetypeVersion>
+ <interactiveMode>false</interactiveMode>
+ </properties>
+ </configuration>
+ </execution>
+ <execution>
+ <id>verify-projects</id>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ <configuration>
+ <goals>
+ <goal>verify</goal>
+ </goals>
+ <pomIncludes>
+ <pomInclude>*/*/pom.xml</pomInclude>
+ </pomIncludes>
+ <projectsDirectory>${project.build.directory}/it/projects</projectsDirectory>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
</build>
+
+ <profiles>
+ <profile>
+ <id>local</id>
+ <activation>
+ <activeByDefault>false</activeByDefault>
+ </activation>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-invoker-plugin</artifactId>
+ <configuration>
+ <localRepositoryPath>${settings.local.repository}</localRepositoryPath>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
+
</project>
@@ -0,0 +1,7 @@
+groupId=org.aniszczyk
+artifactId=minerva
+version=1.0.0
+package=org.aniszczyk.minerva
+projectName=Minerva
+bundleId=org.aniszczyk.minerva
+providerName=org.aniszczyk
@@ -30,7 +30,7 @@
<include>**/*.properties</include>
</includes>
</fileSet>
- <fileSet encoding="UTF-8">
+ <fileSet filtered="true" encoding="UTF-8">
<directory>META-INF</directory>
<includes>
<include>**/*.MF</include>
@@ -78,7 +78,7 @@
<include>**/*.gif</include>
</includes>
</fileSet>
- <fileSet encoding="UTF-8">
+ <fileSet filtered="true" encoding="UTF-8">
<directory>META-INF</directory>
<includes>
<include>**/*.MF</include>
@@ -233,7 +233,7 @@
<include>**/*.java</include>
</includes>
</fileSet>
- <fileSet encoding="UTF-8">
+ <fileSet filtered="true" encoding="UTF-8">
<directory>META-INF</directory>
<includes>
<include>**/*.MF</include>
@@ -263,7 +263,7 @@
<include>**/*.java</include>
</includes>
</fileSet>
- <fileSet encoding="UTF-8">
+ <fileSet filtered="true" encoding="UTF-8">
<directory>META-INF</directory>
<includes>
<include>**/*.MF</include>
@@ -13,7 +13,7 @@
<parent>
<groupId>${groupId}</groupId>
<artifactId>${rootArtifactId}</artifactId>
- <version>${version}</version>
+ <version>${version}-SNAPSHOT</version>
</parent>
<artifactId>${artifactId}</artifactId>
@@ -12,15 +12,13 @@
<parent>
<groupId>${groupId}</groupId>
<artifactId>${rootArtifactId}</artifactId>
- <version>${version}</version>
+ <version>${version}-SNAPSHOT</version>
</parent>
<artifactId>${artifactId}</artifactId>
<packaging>eclipse-repository</packaging>
<name>Minerva Repository</name>
- <!-- see http://issues.sonatype.org/browse/TYCHO-313 -->
- <version>${version}</version>
<build>
<plugins>
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Minerva
Bundle-Vendor: aniszczyk.org
-Bundle-SymbolicName: org.aniszczyk.minerva.core.tests
+Bundle-SymbolicName: ${bundleId}.core.tests
Bundle-Version: 1.0.0.qualifier
Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.4.0,4.0.0)",
org.eclipse.core.filesystem;bundle-version="[1.1.0,2.0.0)",
@@ -12,6 +12,6 @@ Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.4.0,4.0.0)",
org.eclipse.jdt.launching;bundle-version="[3.4.0,4.0.0)",
org.junit4;bundle-version="[4.3.0,5.0.0)"
Bundle-ActivationPolicy: lazy
-Import-Package: org.aniszczyk.minerva.core,
- org.aniszczyk.minerva.ui.views
+Import-Package: ${bundleId}.core,
+ ${bundleId}.ui.views
Bundle-RequiredExecutionEnvironment: J2SE-1.5
@@ -8,7 +8,7 @@
<parent>
<groupId>${groupId}</groupId>
<artifactId>${rootArtifactId}</artifactId>
- <version>${version}</version>
+ <version>${version}-SNAPSHOT</version>
</parent>
<artifactId>${artifactId}</artifactId>
@@ -12,10 +12,10 @@
<parent>
<groupId>${groupId}</groupId>
<artifactId>${rootArtifactId}</artifactId>
- <version>${version}</version>
+ <version>${version}-SNAPSHOT</version>
</parent>
- <artifactId>${artifactId}</artifactId>
+ <artifactId>${groupId}.${artifactId}</artifactId>
<packaging>eclipse-plugin</packaging>
<name>Minerva Core Plug-in</name>
@@ -32,8 +32,8 @@
</resources>
<plugins>
<plugin>
- <groupId>org.sonatype.tycho</groupId>
- <artifactId>maven-osgi-source-plugin</artifactId>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>tycho-source-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
@@ -5,7 +5,7 @@
<parent>
<groupId>${groupId}</groupId>
<artifactId>${rootArtifactId}</artifactId>
- <version>${version}</version>
+ <version>${version}-SNAPSHOT</version>
</parent>
<artifactId>${artifactId}</artifactId>
@@ -12,7 +12,7 @@
<parent>
<groupId>${groupId}</groupId>
<artifactId>${rootArtifactId}</artifactId>
- <version>${version}</version>
+ <version>${version}-SNAPSHOT</version>
</parent>
<artifactId>${artifactId}</artifactId>
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Minerva UI Tests
Bundle-Vendor: aniszczyk.org
-Bundle-SymbolicName: org.aniszczyk.minerva.ui.tests
+Bundle-SymbolicName: ${bundleId}.ui.tests
Bundle-Version: 1.0.0.qualifier
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: J2SE-1.5
@@ -12,8 +12,8 @@ Require-Bundle: org.apache.log4j,
org.eclipse.core.resources;version="[3.4.0,4.0.0)",
org.eclipse.ui;bundle-version="[3.4.0,4.0.0)",
org.hamcrest;bundle-version="[1.1.0,2.0.0)",
- org.aniszczyk.minerva.ui,
- org.aniszczyk.minerva.core
+ ${bundleId}.ui,
+ ${bundleId}.core
Import-Package: org.eclipse.swt.widgets,
org.eclipse.swtbot.eclipse.finder,
org.eclipse.swtbot.eclipse.finder.exceptions,
@@ -33,5 +33,5 @@ Import-Package: org.eclipse.swt.widgets,
org.junit.runner;version="[4.3.1,5.0.0)",
org.junit.runners;version="[4.3.1,5.0.0)",
org.osgi.framework;version="[1.4.0,2.0.0)"
-Fragment-Host: org.aniszczyk.minerva.core.tests;bundle-version="1.0.0.qualifier"
-Export-Package: org.aniszczyk.minerva.ui.tests
+Fragment-Host: ${bundleId}.ui;bundle-version="${version}"
+Export-Package: ${bundleId}.ui.tests
@@ -5,7 +5,7 @@
<parent>
<groupId>${groupId}</groupId>
<artifactId>${rootArtifactId}</artifactId>
- <version>${version}</version>
+ <version>${version}-SNAPSHOT</version>
</parent>
<artifactId>${artifactId}</artifactId>
@@ -14,7 +14,7 @@
<name>${projectName} UI Test Plug-in (Incubation)</name>
<properties>
- <local-p2-site>file:/${basedir}/../${rootArtifactId}.repository/target/site</local-p2-site>
+ <local-p2-site>file:/${basedir}/../${rootArtifactId}-repository/target/repository</local-p2-site>
<ui.test.vmargs>-Xmx512m -XX:MaxPermSize=256m</ui.test.vmargs>
</properties>
@@ -43,34 +43,12 @@
<build>
<plugins>
<plugin>
- <groupId>org.sonatype.tycho</groupId>
- <artifactId>maven-osgi-test-plugin</artifactId>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>tycho-surefire-plugin</artifactId>
<version>${tycho-version}</version>
<configuration>
- <testSuite>${package}.ui.tests</testSuite>
- <testClass>${package}.ui.tests.AllTests</testClass>
<useUIHarness>true</useUIHarness>
- <useUIThread>false</useUIThread>
- <product>org.eclipse.sdk.ide</product>
- <argLine>${ui.test.vmargs}</argLine>
- <application>org.eclipse.ui.ide.workbench</application>
- <dependencies>
- <dependency>
- <type>p2-installable-unit</type>
- <artifactId>org.eclipse.pde.feature.group</artifactId>
- <version>${platform-version}</version>
- </dependency>
- <dependency> --&gt;
- <type>p2-installable-unit</type>
- <artifactId>${bundleId}.feature.group</artifactId>
- <version>1.0.0</version>
- </dependency>
- <dependency>
- <type>p2-installable-unit</type>
- <artifactId>org.eclipse.cvs.feature.group</artifactId>
- <version>[1.1.2,2.0.0)</version>
- </dependency>
- </dependencies>
+ <useUIThread>true</useUIThread>
</configuration>
</plugin>
<plugin>
@@ -19,6 +19,7 @@
import org.eclipse.swtbot.swt.finder.junit.SWTBotJunit4ClassRunner;
import org.junit.After;
import org.junit.BeforeClass;
+import org.junit.Test;
import org.junit.runner.RunWith;
@RunWith(SWTBotJunit4ClassRunner.class)
@@ -36,6 +37,11 @@ public static void closeWelcomePage() {
}
}
+ @Test
+ public void someTest() {
+ // TODO
+ }
+
@After
public void clickButton() {
// TODO
@@ -1,12 +1,12 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %Bundle-Name
-Bundle-SymbolicName: org.aniszczyk.minerva.ui; singleton:=true
+Bundle-SymbolicName: ${bundleId}.ui; singleton:=true
Bundle-Version: 1.0.0.qualifier
-Bundle-Activator: org.aniszczyk.minerva.ui.Activator
+Bundle-Activator: ${bundleId}.ui.Activator
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: J2SE-1.5
-Export-Package: org.aniszczyk.minerva.ui,
- org.aniszczyk.minerva.ui.views
+Export-Package: ${bundleId}.ui,
+ ${bundleId}.ui.views
@@ -12,10 +12,10 @@
<parent>
<groupId>${groupId}</groupId>
<artifactId>${rootArtifactId}</artifactId>
- <version>${version}</version>
+ <version>${version}-SNAPSHOT</version>
</parent>
- <artifactId>${artifactId}</artifactId>
+ <artifactId>${groupId}.${artifactId}</artifactId>
<packaging>eclipse-plugin</packaging>
<name>${projectName} UI Plug-in</name>
@@ -32,8 +32,8 @@
</resources>
<plugins>
<plugin>
- <groupId>org.sonatype.tycho</groupId>
- <artifactId>maven-osgi-source-plugin</artifactId>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>tycho-source-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
@@ -8,7 +8,7 @@
<groupId>${groupId}</groupId>
<artifactId>${artifactId}</artifactId>
- <version>${version}</version>
+ <version>${version}-SNAPSHOT</version>
<packaging>pom</packaging>
<name>${projectName} Parent</name>

0 comments on commit 301499c

Please sign in to comment.