Discussion:
Problem with tycho-surefire-plugin and include/exclude patterns
(too old to reply)
Michael Norman
2012-01-20 20:23:28 UTC
Permalink
Sievers, Jan
2012-01-25 09:14:19 UTC
Permalink
we would need a stripped down sample project demonstrating the issue to tell if this is a bug or just some configuration problem.

Regards
Jan

From: tycho-user-***@eclipse.org [mailto:tycho-user-***@eclipse.org] On Behalf Of Michael Norman
Sent: Freitag, 20. Januar 2012 21:23
To: tycho-***@eclipse.org
Subject: [tycho-user] Problem with tycho-surefire-plugin and include/exclude patterns

I am trying to get the tycho-surefire-plugin to run a specific test.

My directory layout:

${project.root}
|   .classpath
|   .project
|   build.properties
|   pom.xml
|   ...
|      
+---src
|   +---main
|   |   +---java
|   |   |   \---
|               ...
|   |                  
|   \---test
|       \---java
|           \---org
|               \---eclipse
|                   \---persistence
|                       \---tools
|                           \---oracleddl
|                               \---test
|                                   |   AllTests.java
|                                   |   TestHelper.java
|                                   |  
|                                   +---databasetypebuilder
|                                   |       DatabaseTypeBuilderTestSuite.java
|                                   |       IOTTableDDLTestSuite.java
|                                   |       ProcedureDDLTestSuite.java
|                                   |       TableDDLTestSuite.java
|                                   |       TransformsTestSuite.java
|                                   |       TypeResolutionTestSuite.java
|                                   |      
|                                   +---ddlparser
|                                   |       CaseSensitivePackageTestSuite.java
|                                   |       DDLParserTestSuite.java
|                                   |       FunctionDDLTestSuite.java
|                                   |       PackageDDLTestSuite.java
|                                   |       ProcedureDDLTestSuite.java
|                                   |       TableDDLTestSuite.java
|                                   |       TypeDDLTestSuite.java
|                                   |      
|                                   \---visit
|                                           FunctionTypeTest.java
|                                           FunctionTypeVisitor.java
|                                           IntervalTypeTest.java
|                                           IntervalVisitor.java
|                                           PrecisionTypeTest.java
|                                           PrecisionTypeVisitor.java
|                                           ProcedureTypeTest.java
|                                           ProcedureTypeVisitor.java
|                                           SizedTypeTest.java
|                                           SizedTypeVisitor.java
|                                           TableTypeTest.java
|                                           TableTypeVisitor.java
|                                           VisitorsTestSuite.java


The AllTests.java file is annotated with:

@RunWith(Suite.class)
@SuiteClasses({
    AdvancedJDBCPackageTestSuite.class,
    ComplexPLSQLSFTestSuite.class,
    ComplexPLSQLSPTestSuite.class,
    CustomSQLTestSuite.class,
    .
    .
    .
    VeryLongIdentifierTestSuite.class
  }
)

So my goal is to get the tycho-surefire-plugin to run AllTests and then the rest of the tests are run from there.

In my pom.xml file, I specify the following:
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.8.2</version>
<scope>test</scope>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-surefire-plugin</artifactId>
<configuration>
<testSuite>org.eclipse.persistence.tools.oracleddl.test</testSuite>
<testClass>org.eclipse.persistence.tools.oracleddl.test.AllTests</testClass>
<systemProperties combine.children="append">
<db.user>${db.user}</db.user>
<db.pwd>${db.pwd}</db.pwd>
<db.url>${db.url}</db.url>
<db.ddl.create>${db.ddl.create}</db.ddl.create>
<db.ddl.drop>${db.ddl.drop}</db.ddl.drop>
<db.ddl.debug>${db.ddl.debug}</db.ddl.debug>
</systemProperties>
</configuration>
</plugin>
</plugins>
</build>
The <testSuite> and <testClass> elements are ignored and the usual '**/*Test.java' pattern is being used.

I've tried various combinations of
<excludes>
<exclude>**/*</exclude>
</excludes>
<includes>
<include>**/AllTests.java</include>
</includes>
but nothing seems to work.

Any help would be greatly appreciated.
--

Mike Norman | Principal Software Designer
Phone: +6132884638 | Fax: +6132382818
Server Technologies | EclipseLink Product
Oracle Canada | 45 O'Connor St
Martin Röbert
2012-01-25 13:39:02 UTC
Permalink
Hi there,

I moved all builds of our projects to tycho and all was fine while running it from cmd line or from eclipse.

Today I set up a Jenkins server and tried to build all there - but now I am stuck. If the build process starts, Maven scans the projects and does that for an infinite amount of time while writing into /tmp/p2.generator[random]. I stopped when the size of this file exceeded 30GB.
This behavior is reproducible.

Any hints how to solve this?

Cheers,
Martin

Building in workspace /var/lib/jenkins/workspace/myworkspace
Checkout:ProBaTe.web / /var/lib/jenkins/workspace/myworkspace - ***@13a4071a
Using strategy: Default
Last Built Revision: Revision a48889bb84c8716b71e8eef314d26890ab05ab4a (origin/master)
Checkout:ProBaTe.web / /var/lib/jenkins/workspace/myworkspace - ***@13a4071a
Fetching changes from 1 remote Git repository
Fetching upstream changes from ***@localhost:myworkspace/myworkspace.git
Commencing build of Revision a48889bb84c8716b71e8eef314d26890ab05ab4a (origin/master)
Checking out Revision a48889bb84c8716b71e8eef314d26890ab05ab4a (origin/master)
Parsing POMs
Triggering groupid:parent-project
GCal: Preparing calendar update request...
GCal: Sending calendar update request...
GCal: Calendar updated.
[ProBaTe.web] $ /opt/maven/bin/mvn -f /var/lib/jenkins/workspace/myworkspace/eclipse/parent-project/pom.xml -e -B sonar:sonar ******** ******** -Dsonar.host.url=http://localhost:9000
[INFO] Error stacktraces are turned on.
[INFO] Scanning for projects...
Igor Fedorenko
2012-01-25 13:47:38 UTC
Permalink
Please provide a thread dump of the jvm when it is in this 'stuck' state.

FWIW, we use Tycho with Hudson quite extensively and everything just works.

--
Regards,
Igor
Post by Martin Röbert
Hi there,
I moved all builds of our projects to tycho and all was fine while running it from cmd line or from eclipse.
Today I set up a Jenkins server and tried to build all there - but now I am stuck. If the build process starts, Maven scans the projects and does that for an infinite amount of time while writing into /tmp/p2.generator[random]. I stopped when the size of this file exceeded 30GB.
This behavior is reproducible.
Any hints how to solve this?
Cheers,
Martin
Building in workspace /var/lib/jenkins/workspace/myworkspace
Using strategy: Default
Last Built Revision: Revision a48889bb84c8716b71e8eef314d26890ab05ab4a (origin/master)
Fetching changes from 1 remote Git repository
Commencing build of Revision a48889bb84c8716b71e8eef314d26890ab05ab4a (origin/master)
Checking out Revision a48889bb84c8716b71e8eef314d26890ab05ab4a (origin/master)
Parsing POMs
Triggering groupid:parent-project
GCal: Preparing calendar update request...
GCal: Sending calendar update request...
GCal: Calendar updated.
[ProBaTe.web] $ /opt/maven/bin/mvn -f /var/lib/jenkins/workspace/myworkspace/eclipse/parent-project/pom.xml -e -B sonar:sonar ******** ******** -Dsonar.host.url=http://localhost:9000
[INFO] Error stacktraces are turned on.
[INFO] Scanning for projects...
_______________________________________________
tycho-user mailing list
https://dev.eclipse.org/mailman/listinfo/tycho-user
Martin Röbert
2012-01-25 14:02:57 UTC
Permalink
Hi Igor,

you'll find a thread dump attached to this mail.

Cheers,
Martin
Igor Fedorenko
2012-01-25 14:56:27 UTC
Permalink
I don't see anything extraordinary in the thread dump, sorry. Looks like
p2 does something, but I can't tell what it is or why it misbehaves.

--
Regards,
Igor
Post by Martin Röbert
Hi Igor,
you'll find a thread dump attached to this mail.
Cheers,
Martin
Michael Norman
2012-01-27 16:17:57 UTC
Permalink
<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Ok, I created an 'example project' based on some tutorials I read -
New Project - &gt; Maven Project -&gt; 'maven-archetype-quickstart'<br>
<br>
<tt>${project.root} <br>
|   .classpath<br>
|   .project                                     ...
&lt;projectDescription&gt;&lt;name&gt;example-project&lt;/name&gt;
...<br>
|   pom.xml<br>
|       <br>
+---src<br>
|   +---main<br>
|   |   \---java<br>
|   |       \---org<br>
|   |           \---example<br>
|   |                   SomeObject.java<br>
|   |                   <br>
|   \---test<br>
|       \---java<br>
|           \---org<br>
|               \---example<br>
|                   \---test<br>
|                       |   AllTests.java<br>
|                       |   <br>
|                       +---another<br>
|                       |       AnotherNestedTestSuite.java<br>
|                       |       <br>
|                       \---nested<br>
|                               NestedTestSuite.java</tt><br>
<br>
AllTests is a JUnit4 testsuite that points to nested testsuites that
in turn contain either more testsuites or actual tests:<br>
<pre style="color:#000000;background:#ffffff;"><span style="color:#7f0055; font-weight:bold; ">package</span><span style="color:#7f0055; "> org</span><span style="color:#7f0055; ">.</span><span style="color:#7f0055; ">example</span><span style="color:#7f0055; ">.</span><span style="color:#7f0055; ">test</span><span style="color:#7f0055; ">;</span>

<span style="color:#3f7f59; ">//JUnit4 imports</span>
<span style="color:#7f0055; font-weight:bold; ">import</span><span style="color:#7f0055; "> org</span><span style="color:#7f0055; ">.</span><span style="color:#7f0055; ">junit</span><span style="color:#7f0055; ">.</span><span style="color:#7f0055; ">runner</span><span style="color:#7f0055; ">.</span><span style="color:#7f0055; ">RunWith</span><span style="color:#7f0055; ">;</span>
<span style="color:#7f0055; font-weight:bold; ">import</span><span style="color:#7f0055; "> org</span><span style="color:#7f0055; ">.</span><span style="color:#7f0055; ">junit</span><span style="color:#7f0055; ">.</span><span style="color:#7f0055; ">runners</span><span style="color:#7f0055; ">.</span><span style="color:#7f0055; ">Suite</span><span style="color:#7f0055; ">;</span>
<span style="color:#7f0055; font-weight:bold; ">import</span><span style="color:#7f0055; "> org</span><span style="color:#7f0055; ">.</span><span style="color:#7f0055; ">junit</span><span style="color:#7f0055; ">.</span><span style="color:#7f0055; ">runners</span><span style="color:#7f0055; ">.</span><span style="color:#7f0055; ">Suite</span><span style="color:#7f0055; ">.</span><span style="color:#7f0055; ">SuiteClasses</span><span style="color:#7f0055; ">;</span>

<span style="color:#3f7f59; ">//test imports</span>
<span style="color:#7f0055; font-weight:bold; ">import</span><span style="color:#7f0055; "> org</span><span style="color:#7f0055; ">.</span><span style="color:#7f0055; ">example</span><span style="color:#7f0055; ">.</span><span style="color:#7f0055; ">test</span><span style="color:#7f0055; ">.</span><span style="color:#7f0055; ">another</span><span style="color:#7f0055; ">.</span><span style="color:#7f0055; ">AnotherNestedTestSuite</span><span style="color:#7f0055; ">;</span>
<span style="color:#7f0055; font-weight:bold; ">import</span><span style="color:#7f0055; "> org</span><span style="color:#7f0055; ">.</span><span style="color:#7f0055; ">example</span><span style="color:#7f0055; ">.</span><span style="color:#7f0055; ">test</span><span style="color:#7f0055; ">.</span><span style="color:#7f0055; ">nested</span><span style="color:#7f0055; ">.</span><span style="color:#7f0055; ">NestedTestSuite</span><span style="color:#7f0055; ">;</span>

<span style="color:#3f5fbf; ">/**</span>
<span style="color:#3f5fbf; "> </span><span style="color:#7f9fbf; font-weight:bold; ">*</span><span style="color:#3f5fbf; "> suite of tests for SomeObject</span>
<span style="color:#3f5fbf; "> */</span>
@RunWith(Suite.class)
@SuiteClasses({
NestedTestSuite.class,
AnotherNestedTestSuite.class
}
)
<span style="color:#7f0055; font-weight:bold; ">public</span> <span style="color:#7f0055; font-weight:bold; ">class</span> AllTests {
}

<span style="color:#7f0055; font-weight:bold; ">package</span><span style="color:#7f0055; "> org</span><span style="color:#7f0055; ">.</span><span style="color:#7f0055; ">example</span><span style="color:#7f0055; ">.</span><span style="color:#7f0055; ">test</span><span style="color:#7f0055; ">.</span><span style="color:#7f0055; ">another</span><span style="color:#7f0055; ">;</span>

<span style="color:#7f0055; font-weight:bold; ">import</span><span style="color:#7f0055; "> org</span><span style="color:#7f0055; ">.</span><span style="color:#7f0055; ">junit</span><span style="color:#7f0055; ">.</span><span style="color:#7f0055; ">AfterClass</span><span style="color:#7f0055; ">;</span>
<span style="color:#7f0055; font-weight:bold; ">import</span><span style="color:#7f0055; "> org</span><span style="color:#7f0055; ">.</span><span style="color:#7f0055; ">junit</span><span style="color:#7f0055; ">.</span><span style="color:#7f0055; ">BeforeClass</span><span style="color:#7f0055; ">;</span>
<span style="color:#7f0055; font-weight:bold; ">import</span><span style="color:#7f0055; "> org</span><span style="color:#7f0055; ">.</span><span style="color:#7f0055; ">junit</span><span style="color:#7f0055; ">.</span><span style="color:#7f0055; ">Test</span><span style="color:#7f0055; ">;</span>

<span style="color:#7f0055; font-weight:bold; ">public</span> <span style="color:#7f0055; font-weight:bold; ">class</span> AnotherNestedTestSuite {

@BeforeClass
<span style="color:#7f0055; font-weight:bold; ">static</span> <span style="color:#7f0055; font-weight:bold; ">public</span> <span style="color:#7f0055; font-weight:bold; ">void</span> setUp() {
<span style="color:#7f0055; font-weight:bold; ">System</span>.out.println(<span style="color:#2a00ff; ">"one-time setUp for AnotherNestedTestSuite"</span>);
}

@AfterClass
<span style="color:#7f0055; font-weight:bold; ">static</span> <span style="color:#7f0055; font-weight:bold; ">public</span> <span style="color:#7f0055; font-weight:bold; ">void</span> tearDown() {
<span style="color:#7f0055; font-weight:bold; ">System</span>.out.println(<span style="color:#2a00ff; ">"one-time tearDown for AnotherNestedTestSuite"</span>);
}

@Test
<span style="color:#7f0055; font-weight:bold; ">public</span> <span style="color:#7f0055; font-weight:bold; ">void</span> aTest() {
<span style="color:#7f0055; font-weight:bold; ">System</span>.out.println(<span style="color:#2a00ff; ">"This is another test"</span>);
}

}
</pre>
I added the following to the pom.xml file:<br> <div style="overflow:auto; height=200; width=100%;"> <pre style="color:#000000;background:#ffffff;"><span style="color:#7f0055; ">&lt;</span><span style="color:#7f0055; ">dependencies</span><span style="color:#7f0055; ">&gt;</span> <span style="color:#7f0055; ">&lt;</span><span style="color:#7f0055; ">dependency</span><span style="color:#7f0055; ">&gt;</span> <span style="color:#7f0055; ">&lt;</span><span style="color:#7f0055; ">groupId</span><span style="color:#7f0055; ">&gt;</span>junit<span style="color:#7f0055; ">&lt;/</span><span style="color:#7f0055; ">groupId</span><span style="color:#7f0055; ">&gt;</span> <span style="color:#7f0055; ">&lt;</span><span style="color:#7f0055; ">artifactId</span><span style="color:#7f0055; ">&gt;</span>junit<span style="color:#7f0055; ">&lt;/</span><span style="color:#7f0055; ">artifactId</span><span style="color:#7f0055; ">&gt;</span> <span style="color:#7f0055; ">&lt;</span><span style="color:#7f0055; ">version</span><span style="color:#7f0055; ">&gt;</span>4.8.2<span style="color:#7f0055; ">&lt;/</span><span style="color:#7f0055; ">version</span><span style="color:#7f0055; ">&gt;</span> <span style="color:#7f0055; ">&lt;</span><span style="color:#7f0055; ">scope</span><span style="color:#7f0055; ">&gt;</span>test<span style="color:#7f0055; ">&lt;/</span><span style="color:#7f0055; ">scope</span><span style="color:#7f0055; ">&gt;</span> <span style="color:#7f0055; ">&lt;/</span><span style="color:#7f0055; ">dependency</span><span style="color:#7f0055; ">&gt;</span> <span style="color:#7f0055; ">&lt;/</span><span style="color:#7f0055; ">dependencies</span><span style="color:#7f0055; ">&gt;</span> <span style="color:#7f0055; ">&lt;</span><span style="color:#7f0055; ">build</span><span style="color:#7f0055; ">&gt;</span> <span style="color:#7f0055; ">&lt;</span><span style="color:#7f0055; ">plugins</span><span style="color:#7f0055; ">&gt;</span> <span style="color:#7f0055; ">&lt;</span><span style="color:#7f0055; ">plugin</span><span style="color:#7f0055; ">&gt;</span> <span style="color:#7f0055; ">&lt;</span><span style="color:#7f0055; ">groupId</span><span style="color:#7f0055; ">&gt;</span>org.apache.maven.plugins<span style="color:#7f0055; ">&lt;/</span><span style="color:#7f0055; ">groupId</span><span style="color:#7f0055; ">&gt;</span> <span style="color:#7f0055; ">&lt;</span><span style="color:#7f0055; ">artifactId</span><span style="color:#7f0055; ">&gt;</span>maven-surefire-plugin<span style="color:#7f0055; ">&lt;/</span><span style="color:#7f0055; ">artifactId</span><span style="color:#7f0055; ">&gt;</span> <span style="color:#7f0055; ">&lt;</span><span style="color:#7f0055; ">version</span><span style="color:#7f0055; ">&gt;</span>2.9<span style="color:#7f0055; ">&lt;/</span><span style="color:#7f0055; ">version</span><span style="color:#7f0055; ">&gt;</span> <span style="color:#7f0055; ">&lt;</span><span style="color:#7f0055; ">executions</span><span style="color:#7f0055; ">&gt;</span> <span style="color:#7f0055; ">&lt;</span><span style="color:#7f0055; ">execution</span><span style="color:#7f0055; ">&gt;</span> <span style="color:#7f0055; ">&lt;</span><span style="color:#7f0055; ">id</span><span style="color:#7f0055; ">&gt;</span>test<span style="color:#7f0055; ">&lt;/</span><span style="color:#7f0055; ">id</span><span style="color:#7f0055; ">&gt;</span> <span style="color:#7f0055; ">&lt;</span><span style="color:#7f0055; ">phase</span><span style="color:#7f0055; ">&gt;</span>test<span style="color:#7f0055; ">&lt;/</span><span style="color:#7f0055; ">phase</span><span style="color:#7f0055; ">&gt;</span> <span style="color:#7f0055; ">&lt;</span><span style="color:#7f0055; ">configuration</span><span style="color:#7f0055; ">&gt;</span> <span style="color:#7f0055; ">&lt;</span><span style="color:#7f0055; ">redirectTestOutputToFile</span><span style="color:#7f0055; ">&gt;</span>true<span style="color:#7f0055; ">&lt;/</span><span style="color:#7f0055; ">redirectTestOutputToFile</span><span style="color:#7f0055; ">&gt;</span> <span style="color:#7f0055; ">&lt;</span><span style="color:#7f0055; ">includes</span><span style="color:#7f0055; ">&gt;</span> <span style="color:#7f0055; ">&lt;</span><span style="color:#7f0055; ">include</span><span style="color:#7f0055; ">&gt;</span>**/AllTests.java<span style="color:#7f0055; ">&lt;/</span><span style="color:#7f0055; ">include</span><span style="color:#7f0055; ">&gt;</span> <span style="color:#7f0055; ">&lt;/</span><span style="color:#7f0055; ">includes</span><span style="color:#7f0055; ">&gt;</span> <span style="color:#7f0055; ">&lt;/</span><span style="color:#7f0055; ">configuration</span><span style="color:#7f0055; ">&gt;</span> <span style="color:#7f0055; ">&lt;</span><span style="color:#7f0055; ">goals</span><span style="color:#7f0055; ">&gt;</span> <span style="color:#7f0055; ">&lt;</span><span style="color:#7f0055; ">goal</span><span style="color:#7f0055; ">&gt;</span>test<span style="color:#7f0055; ">&lt;/</span><span style="color:#7f0055; ">goal</span><span style="color:#7f0055; ">&gt;</span> <span style="color:#7f0055; ">&lt;/</span><span style="color:#7f0055; ">goals</span><span style="color:#7f0055; ">&gt;</span> <span style="color:#7f0055; ">&lt;/</span><span style="color:#7f0055; ">execution</span><span style="color:#7f0055; ">&gt;</span> <span style="color:#7f0055; ">&lt;/</span><span style="color:#7f0055; ">executions</span><span style="color:#7f0055; ">&gt;</span> <span style="color:#7f0055; ">&lt;/</span><span style="color:#7f0055; ">plugin</span><span style="color:#7f0055; ">&gt;</span> <span style="color:#7f0055; ">&lt;</span><span style="color:#7f0055; ">plugin</span><span style="color:#7f0055; ">&gt;</span> <span style="color:#7f0055; ">&lt;</span><span style="color:#7f0055; ">groupId</span><span style="color:#7f0055; ">&gt;</span>org.apache.maven.plugins<span style="color:#7f0055; ">&lt;/</span><span style="color:#7f0055; ">groupId</span><span style="color:#7f0055; ">&gt;</span> <span style="color:#7f0055; ">&lt;</span><span style="color:#7f0055; ">artifactId</span><span style="color:#7f0055; ">&gt;</span>maven-surefire-report-plugin<span style="color:#7f0055; ">&lt;/</span><span style="color:#7f0055; ">artifactId</span><span style="color:#7f0055; ">&gt;</span> <span style="color:#7f0055; ">&lt;</span><span style="color:#7f0055; ">executions</span><span style="color:#7f0055; ">&gt;</span> <span style="color:#7f0055; ">&lt;</span><span style="color:#7f0055; ">execution</span><span style="color:#7f0055; ">&gt;</span> <span style="color:#7f0055; ">&lt;</span><span style="color:#7f0055; ">id</span><span style="color:#7f0055; ">&gt;</span>generate-test-report<span style="color:#7f0055; ">&lt;/</span><span style="color:#7f0055; ">id</span><span style="color:#7f0055; ">&gt;</span> <span style="color:#7f0055; ">&lt;</span><span style="color:#7f0055; ">phase</span><span style="color:#7f0055; ">&gt;</span>test<span style="color:#7f0055; ">&lt;/</span><span style="color:#7f0055; ">phase</span><span style="color:#7f0055; ">&gt;</span> <span style="color:#7f0055; ">&lt;</span><span style="color:#7f0055; ">goals</span><span style="color:#7f0055; ">&gt;</span> <span style="color:#7f0055; ">&lt;</span><span style="color:#7f0055; ">goal</span><span style="color:#7f0055; ">&gt;</span>report<span style="color:#7f0055; ">&lt;/</span><span style="color:#7f0055; ">goal</span><span style="color:#7f0055; ">&gt;</span> <span style="color:#7f0055; ">&lt;/</span><span style="color:#7f0055; ">goals</span><span style="color:#7f0055; ">&gt;</span> <span style="color:#7f0055; ">&lt;/</span><span style="color:#7f0055; ">execution</span><span style="color:#7f0055; ">&gt;</span> <span style="color:#7f0055; ">&lt;/</span><span style="color:#7f0055; ">executions</span><span style="color:#7f0055; ">&gt;</span> <span style="color:#7f0055; ">&lt;/</span><span style="color:#7f0055; ">plugin</span><span style="color:#7f0055; ">&gt;</span> <span style="color:#7f0055; ">&lt;/</span><span style="color:#7f0055; ">plugins</span><span style="color:#7f0055; ">&gt;</span> <span style="color:#7f0055; ">&lt;/</span><span style="color:#7f0055; ">build</span><span style="color:#7f0055; ">&gt;</span> <span style="color:#7f0055; ">&lt;</span><span style="color:#7f0055; ">reporting</span><span style="color:#7f0055; ">&gt;</span> <span style="color:#7f0055; ">&lt;</span><span style="color:#7f0055; ">plugins</span><span style="color:#7f0055; ">&gt;</span> <span style="color:#7f0055; ">&lt;</span><span style="color:#7f0055; ">plugin</span><span style="color:#7f0055; ">&gt;</span> <span style="color:#7f0055; ">&lt;</span><span style="color:#7f0055; ">groupId</span><span style="color:#7f0055; ">&gt;</span>org.apache.maven.plugins<span style="color:#7f0055; ">&lt;/</span><span style="color:#7f0055; ">groupId</span><span style="color:#7f0055; ">&gt;</span> <span style="color:#7f0055; ">&lt;</span><span style="color:#7f0055; ">artifactId</span><span style="color:#7f0055; ">&gt;</span>maven-surefire-report-plugin<span style="color:#7f0055; ">&lt;/</span><span style="color:#7f0055; ">artifactId</span><span style="color:#7f0055; ">&gt;</span> <span style="color:#7f0055; ">&lt;/</span><span style="color:#7f0055; ">plugin</span><span style="color:#7f0055; ">&gt;</span> <span style="color:#7f0055; ">&lt;/</span><span style="color:#7f0055; ">plugins</span><span style="color:#7f0055; ">&gt;</span> <span style="color:#7f0055; ">&lt;/</span><span style="color:#7f0055; ">reporting</span><span style="color:#7f0055; ">&gt;</span>
</pre>
</div>
Everything works as expected when I run '<tt>mvn compile
compiler:testCompile test</tt>' - however, if I switch to<br>
'tycho-surefire-plugin' (instead of 'maven-surefire-plugin'), the <tt>&lt;include&gt;**/AllTests.java&lt;/include&gt;</tt>
does<br>
not work.<br>
<br>
For this type of simple project (not OSGi, not an Eclipse plugin),
should I stick with 'maven-surefire-plugin'?<br>
What advantages would 'tycho-surefire-plugin' have (if I could get
the include pattern to work)?<br>
---<br>
Mike Norman<br>
<br>
P.S. is there a way to get the 'compile' goal to include compiling
the tests?<br>
<br>
On 25/01/2012 4:14 AM, Sievers, Jan wrote:
<blockquote
cite="mid:***@DEWDFECCR08.wdf.sap.corp"
type="cite">
<pre wrap="">we would need a stripped down sample project demonstrating the issue to tell if this is a bug or just some configuration problem.

Regards
Jan

From: <a class="moz-txt-link-abbreviated" href="mailto:tycho-user-***@eclipse.org">tycho-user-***@eclipse.org</a> [<a class="moz-txt-link-freetext" href="mailto:tycho-user-***@eclipse.org">mailto:tycho-user-***@eclipse.org</a>] On Behalf Of Michael Norman
Sent: Freitag, 20. Januar 2012 21:23
To: <a class="moz-txt-link-abbreviated" href="mailto:tycho-***@eclipse.org">tycho-***@eclipse.org</a>
Subject: [tycho-user] Problem with tycho-surefire-plugin and include/exclude patterns

I am trying to get the tycho-surefire-plugin to run a specific test.

My directory layout:

${project.root}
|   .classpath
|   .project
|   build.properties
|   pom.xml
|   ...
|      
+---src
|   +---main
|   |   +---java
|   |   |   \---
|               ...
|   |                  
|   \---test
|       \---java
|           \---org
|               \---eclipse
|                   \---persistence
|                       \---tools
|                           \---oracleddl
|                               \---test
|                                   |   AllTests.java
|                                   |   TestHelper.java
|                                   |  
|                                   +---databasetypebuilder
|                                   |       DatabaseTypeBuilderTestSuite.java
|                                   |       IOTTableDDLTestSuite.java
|                                   |       ProcedureDDLTestSuite.java
|                                   |       TableDDLTestSuite.java
|                                   |       TransformsTestSuite.java
|                                   |       TypeResolutionTestSuite.java
|                                   |      
|                                   +---ddlparser
|                                   |       CaseSensitivePackageTestSuite.java
|                                   |       DDLParserTestSuite.java
|                                   |       FunctionDDLTestSuite.java
|                                   |       PackageDDLTestSuite.java
|                                   |       ProcedureDDLTestSuite.java
|                                   |       TableDDLTestSuite.java
|                                   |       TypeDDLTestSuite.java
|                                   |      
|                                   \---visit
|                                           FunctionTypeTest.java
|                                           FunctionTypeVisitor.java
|                                           IntervalTypeTest.java
|                                           IntervalVisitor.java
|                                           PrecisionTypeTest.java
|                                           PrecisionTypeVisitor.java
|                                           ProcedureTypeTest.java
|                                           ProcedureTypeVisitor.java
|                                           SizedTypeTest.java
|                                           SizedTypeVisitor.java
|                                           TableTypeTest.java
|                                           TableTypeVisitor.java
|                                           VisitorsTestSuite.java


The AllTests.java file is annotated with:

@RunWith(Suite.class)
@SuiteClasses({
    AdvancedJDBCPackageTestSuite.class,
    ComplexPLSQLSFTestSuite.class,
    ComplexPLSQLSPTestSuite.class,
    CustomSQLTestSuite.class,
    .
    .
    .
    VeryLongIdentifierTestSuite.class
  }
)

So my goal is to get the tycho-surefire-plugin to run AllTests and then the rest of the tests are run from there.

In my pom.xml file, I specify the following:
&lt;dependencies&gt;
&lt;dependency&gt;
&lt;groupId&gt;junit&lt;/groupId&gt;
&lt;artifactId&gt;junit&lt;/artifactId&gt;
&lt;version&gt;4.8.2&lt;/version&gt;
&lt;scope&gt;test&lt;/scope&gt;
&lt;/dependency&gt;
&lt;/dependencies&gt;

&lt;build&gt;
&lt;plugins&gt;
&lt;plugin&gt;
&lt;groupId&gt;org.eclipse.tycho&lt;/groupId&gt;
&lt;artifactId&gt;tycho-surefire-plugin&lt;/artifactId&gt;
&lt;configuration&gt;
&lt;testSuite&gt;org.eclipse.persistence.tools.oracleddl.test&lt;/testSuite&gt;
&lt;testClass&gt;org.eclipse.persistence.tools.oracleddl.test.AllTests&lt;/testClass&gt;
&lt;systemProperties combine.children="append"&gt;
&lt;db.user&gt;${db.user}&lt;/db.user&gt;
&lt;db.pwd&gt;${db.pwd}&lt;/db.pwd&gt;
&lt;db.url&gt;${db.url}&lt;/db.url&gt;
&lt;db.ddl.create&gt;${db.ddl.create}&lt;/db.ddl.create&gt;
&lt;db.ddl.drop&gt;${db.ddl.drop}&lt;/db.ddl.drop&gt;
&lt;db.ddl.debug&gt;${db.ddl.debug}&lt;/db.ddl.debug&gt;
&lt;/systemProperties&gt;
&lt;/configuration&gt;
&lt;/plugin&gt;
&lt;/plugins&gt;
&lt;/build&gt;
The &lt;testSuite&gt; and &lt;testClass&gt; elements are ignored and the usual '**/*Test.java' pattern is being used.

I've tried various combinations of
&lt;excludes&gt;
&lt;exclude&gt;**/*&lt;/exclude&gt;
&lt;/excludes&gt;
&lt;includes&gt;
&lt;include&gt;**/AllTests.java&lt;/include&gt;
&lt;/includes&gt;
but nothing seems to work.

Any help would be greatly appreciated.
</pre>
</blockquote>
</body>
</html>
Igor Fedorenko
2012-01-27 20:46:23 UTC
Permalink
Please attach a zip/tar of the example project.

--
Regards,
Igor
Ok, I created an 'example project' based on some tutorials I read - New
Project - > Maven Project -> 'maven-archetype-quickstart'
${project.root}
| .classpath
| .project ...
<projectDescription><name>example-project</name> ...
| pom.xml
|
+---src
| +---main
| | \---java
| | \---org
| | \---example
| | SomeObject.java
| |
| \---test
| \---java
| \---org
| \---example
| \---test
| | AllTests.java
| |
| +---another
| | AnotherNestedTestSuite.java
| |
| \---nested
| NestedTestSuite.java
AllTests is a JUnit4 testsuite that points to nested testsuites that in
package org.example.test;
//JUnit4 imports
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
import org.junit.runners.Suite.SuiteClasses;
//test imports
import org.example.test.another.AnotherNestedTestSuite;
import org.example.test.nested.NestedTestSuite;
/**
* suite of tests for SomeObject
*/
@RunWith(Suite.class)
@SuiteClasses({
NestedTestSuite.class,
AnotherNestedTestSuite.class
}
)
public class AllTests {
}
package org.example.test.another;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;
public class AnotherNestedTestSuite {
@BeforeClass
static public void setUp() {
System.out.println("one-time setUp for AnotherNestedTestSuite");
}
@AfterClass
static public void tearDown() {
System.out.println("one-time tearDown for AnotherNestedTestSuite");
}
@Test
public void aTest() {
System.out.println("This is another test");
}
}
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.8.2</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.9</version>
<executions>
<execution>
<id>test</id>
<phase>test</phase>
<configuration>
<redirectTestOutputToFile>true</redirectTestOutputToFile>
<includes>
<include>**/AllTests.java</include>
</includes>
</configuration>
<goals>
<goal>test</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-report-plugin</artifactId>
<executions>
<execution>
<id>generate-test-report</id>
<phase>test</phase>
<goals>
<goal>report</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-report-plugin</artifactId>
</plugin>
</plugins>
</reporting>
Everything works as expected when I run 'mvn compile
compiler:testCompile test' - however, if I switch to
'tycho-surefire-plugin' (instead of 'maven-surefire-plugin'), the
<include>**/AllTests.java</include> does
not work.
For this type of simple project (not OSGi, not an Eclipse plugin),
should I stick with 'maven-surefire-plugin'?
What advantages would 'tycho-surefire-plugin' have (if I could get the
include pattern to work)?
---
Mike Norman
P.S. is there a way to get the 'compile' goal to include compiling the
tests?
Post by Sievers, Jan
we would need a stripped down sample project demonstrating the issue to tell if this is a bug or just some configuration problem.
Regards
Jan
Sent: Freitag, 20. Januar 2012 21:23
Subject: [tycho-user] Problem with tycho-surefire-plugin and include/exclude patterns
I am trying to get the tycho-surefire-plugin to run a specific test.
${project.root}
| .classpath
| .project
| build.properties
| pom.xml
| ...
|
+---src
| +---main
| | +---java
| | | \---
| ...
| |
| \---test
| \---java
| \---org
| \---eclipse
| \---persistence
| \---tools
| \---oracleddl
| \---test
| | AllTests.java
| | TestHelper.java
| |
| +---databasetypebuilder
| | DatabaseTypeBuilderTestSuite.java
| | IOTTableDDLTestSuite.java
| | ProcedureDDLTestSuite.java
| | TableDDLTestSuite.java
| | TransformsTestSuite.java
| | TypeResolutionTestSuite.java
| |
| +---ddlparser
| | CaseSensitivePackageTestSuite.java
| | DDLParserTestSuite.java
| | FunctionDDLTestSuite.java
| | PackageDDLTestSuite.java
| | ProcedureDDLTestSuite.java
| | TableDDLTestSuite.java
| | TypeDDLTestSuite.java
| |
| \---visit
| FunctionTypeTest.java
| FunctionTypeVisitor.java
| IntervalTypeTest.java
| IntervalVisitor.java
| PrecisionTypeTest.java
| PrecisionTypeVisitor.java
| ProcedureTypeTest.java
| ProcedureTypeVisitor.java
| SizedTypeTest.java
| SizedTypeVisitor.java
| TableTypeTest.java
| TableTypeVisitor.java
| VisitorsTestSuite.java
@RunWith(Suite.class)
@SuiteClasses({
AdvancedJDBCPackageTestSuite.class,
ComplexPLSQLSFTestSuite.class,
ComplexPLSQLSPTestSuite.class,
CustomSQLTestSuite.class,
.
.
.
VeryLongIdentifierTestSuite.class
}
)
So my goal is to get the tycho-surefire-plugin to run AllTests and then the rest of the tests are run from there.
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.8.2</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-surefire-plugin</artifactId>
<configuration>
<testSuite>org.eclipse.persistence.tools.oracleddl.test</testSuite>
<testClass>org.eclipse.persistence.tools.oracleddl.test.AllTests</testClass>
<systemProperties combine.children="append">
<db.user>${db.user}</db.user>
<db.pwd>${db.pwd}</db.pwd>
<db.url>${db.url}</db.url>
<db.ddl.create>${db.ddl.create}</db.ddl.create>
<db.ddl.drop>${db.ddl.drop}</db.ddl.drop>
<db.ddl.debug>${db.ddl.debug}</db.ddl.debug>
</systemProperties>
</configuration>
</plugin>
</plugins>
</build>
The<testSuite> and<testClass> elements are ignored and the usual '**/*Test.java' pattern is being used.
I've tried various combinations of
<excludes>
<exclude>**/*</exclude>
</excludes>
<includes>
<include>**/AllTests.java</include>
</includes>
but nothing seems to work.
Any help would be greatly appreciated.
_______________________________________________
tycho-user mailing list
https://dev.eclipse.org/mailman/listinfo/tycho-user
Michael Norman
2012-01-27 21:21:57 UTC
Permalink
As requested
---
MikeN
Post by Igor Fedorenko
Please attach a zip/tar of the example project.
--
Regards,
Igor
Ok, I created an 'example project' based on some tutorials I read - New
Project - > Maven Project -> 'maven-archetype-quickstart'
${project.root}
| .classpath
| .project ...
<projectDescription><name>example-project</name> ...
| pom.xml
|
+---src
| +---main
| | \---java
| | \---org
| | \---example
| | SomeObject.java
| |
| \---test
| \---java
| \---org
| \---example
| \---test
| | AllTests.java
| |
| +---another
| | AnotherNestedTestSuite.java
| |
| \---nested
| NestedTestSuite.java
AllTests is a JUnit4 testsuite that points to nested testsuites that in
package org.example.test;
//JUnit4 imports
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
import org.junit.runners.Suite.SuiteClasses;
//test imports
import org.example.test.another.AnotherNestedTestSuite;
import org.example.test.nested.NestedTestSuite;
/**
* suite of tests for SomeObject
*/
@RunWith(Suite.class)
@SuiteClasses({
NestedTestSuite.class,
AnotherNestedTestSuite.class
}
)
public class AllTests {
}
package org.example.test.another;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;
public class AnotherNestedTestSuite {
@BeforeClass
static public void setUp() {
System.out.println("one-time setUp for
AnotherNestedTestSuite");
}
@AfterClass
static public void tearDown() {
System.out.println("one-time tearDown for
AnotherNestedTestSuite");
}
@Test
public void aTest() {
System.out.println("This is another test");
}
}
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.8.2</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.9</version>
<executions>
<execution>
<id>test</id>
<phase>test</phase>
<configuration>
<redirectTestOutputToFile>true</redirectTestOutputToFile>
<includes>
<include>**/AllTests.java</include>
</includes>
</configuration>
<goals>
<goal>test</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-report-plugin</artifactId>
<executions>
<execution>
<id>generate-test-report</id>
<phase>test</phase>
<goals>
<goal>report</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-report-plugin</artifactId>
</plugin>
</plugins>
</reporting>
Everything works as expected when I run 'mvn compile
compiler:testCompile test' - however, if I switch to
'tycho-surefire-plugin' (instead of 'maven-surefire-plugin'), the
<include>**/AllTests.java</include> does
not work.
For this type of simple project (not OSGi, not an Eclipse plugin),
should I stick with 'maven-surefire-plugin'?
What advantages would 'tycho-surefire-plugin' have (if I could get the
include pattern to work)?
---
Mike Norman
P.S. is there a way to get the 'compile' goal to include compiling the
tests?
Post by Sievers, Jan
we would need a stripped down sample project demonstrating the issue
to tell if this is a bug or just some configuration problem.
Regards
Jan
Sent: Freitag, 20. Januar 2012 21:23
Subject: [tycho-user] Problem with tycho-surefire-plugin and
include/exclude patterns
I am trying to get the tycho-surefire-plugin to run a specific test.
${project.root}
| .classpath
| .project
| build.properties
| pom.xml
| ...
|
+---src
| +---main
| | +---java
| | | \---
| ...
| |
| \---test
| \---java
| \---org
| \---eclipse
| \---persistence
| \---tools
| \---oracleddl
| \---test
| | AllTests.java
| | TestHelper.java
| |
| +---databasetypebuilder
| |
DatabaseTypeBuilderTestSuite.java
| | IOTTableDDLTestSuite.java
| | ProcedureDDLTestSuite.java
| | TableDDLTestSuite.java
| | TransformsTestSuite.java
| |
TypeResolutionTestSuite.java
| |
| +---ddlparser
| |
CaseSensitivePackageTestSuite.java
| | DDLParserTestSuite.java
| | FunctionDDLTestSuite.java
| | PackageDDLTestSuite.java
| | ProcedureDDLTestSuite.java
| | TableDDLTestSuite.java
| | TypeDDLTestSuite.java
| |
| \---visit
| FunctionTypeTest.java
| FunctionTypeVisitor.java
| IntervalTypeTest.java
| IntervalVisitor.java
| PrecisionTypeTest.java
| PrecisionTypeVisitor.java
| ProcedureTypeTest.java
| ProcedureTypeVisitor.java
| SizedTypeTest.java
| SizedTypeVisitor.java
| TableTypeTest.java
| TableTypeVisitor.java
| VisitorsTestSuite.java
@RunWith(Suite.class)
@SuiteClasses({
AdvancedJDBCPackageTestSuite.class,
ComplexPLSQLSFTestSuite.class,
ComplexPLSQLSPTestSuite.class,
CustomSQLTestSuite.class,
.
.
.
VeryLongIdentifierTestSuite.class
}
)
So my goal is to get the tycho-surefire-plugin to run AllTests and
then the rest of the tests are run from there.
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.8.2</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-surefire-plugin</artifactId>
<configuration>
<testSuite>org.eclipse.persistence.tools.oracleddl.test</testSuite>
<testClass>org.eclipse.persistence.tools.oracleddl.test.AllTests</testClass>
<systemProperties combine.children="append">
<db.user>${db.user}</db.user>
<db.pwd>${db.pwd}</db.pwd>
<db.url>${db.url}</db.url>
<db.ddl.create>${db.ddl.create}</db.ddl.create>
<db.ddl.drop>${db.ddl.drop}</db.ddl.drop>
<db.ddl.debug>${db.ddl.debug}</db.ddl.debug>
</systemProperties>
</configuration>
</plugin>
</plugins>
</build>
The<testSuite> and<testClass> elements are ignored and the usual
'**/*Test.java' pattern is being used.
I've tried various combinations of
<excludes>
<exclude>**/*</exclude>
</excludes>
<includes>
<include>**/AllTests.java</include>
</includes>
but nothing seems to work.
Any help would be greatly appreciated.
_______________________________________________
tycho-user mailing list
https://dev.eclipse.org/mailman/listinfo/tycho-user
_______________________________________________
tycho-user mailing list
https://dev.eclipse.org/mailman/listinfo/tycho-user
Igor Fedorenko
2012-01-31 02:39:16 UTC
Permalink
The provided project has nothing to do with Tycho. Please use
maven-users mailing list to ask generic maven user question.

--
Regards,
Igor
Post by Michael Norman
As requested
---
MikeN
Post by Igor Fedorenko
Please attach a zip/tar of the example project.
--
Regards,
Igor
Ok, I created an 'example project' based on some tutorials I read - New
Project - > Maven Project -> 'maven-archetype-quickstart'
${project.root}
| .classpath
| .project ...
<projectDescription><name>example-project</name> ...
| pom.xml
|
+---src
| +---main
| | \---java
| | \---org
| | \---example
| | SomeObject.java
| |
| \---test
| \---java
| \---org
| \---example
| \---test
| | AllTests.java
| |
| +---another
| | AnotherNestedTestSuite.java
| |
| \---nested
| NestedTestSuite.java
AllTests is a JUnit4 testsuite that points to nested testsuites that in
package org.example.test;
//JUnit4 imports
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
import org.junit.runners.Suite.SuiteClasses;
//test imports
import org.example.test.another.AnotherNestedTestSuite;
import org.example.test.nested.NestedTestSuite;
/**
* suite of tests for SomeObject
*/
@RunWith(Suite.class)
@SuiteClasses({
NestedTestSuite.class,
AnotherNestedTestSuite.class
}
)
public class AllTests {
}
package org.example.test.another;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;
public class AnotherNestedTestSuite {
@BeforeClass
static public void setUp() {
System.out.println("one-time setUp for AnotherNestedTestSuite");
}
@AfterClass
static public void tearDown() {
System.out.println("one-time tearDown for AnotherNestedTestSuite");
}
@Test
public void aTest() {
System.out.println("This is another test");
}
}
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.8.2</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.9</version>
<executions>
<execution>
<id>test</id>
<phase>test</phase>
<configuration>
<redirectTestOutputToFile>true</redirectTestOutputToFile>
<includes>
<include>**/AllTests.java</include>
</includes>
</configuration>
<goals>
<goal>test</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-report-plugin</artifactId>
<executions>
<execution>
<id>generate-test-report</id>
<phase>test</phase>
<goals>
<goal>report</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-report-plugin</artifactId>
</plugin>
</plugins>
</reporting>
Everything works as expected when I run 'mvn compile
compiler:testCompile test' - however, if I switch to
'tycho-surefire-plugin' (instead of 'maven-surefire-plugin'), the
<include>**/AllTests.java</include> does
not work.
For this type of simple project (not OSGi, not an Eclipse plugin),
should I stick with 'maven-surefire-plugin'?
What advantages would 'tycho-surefire-plugin' have (if I could get the
include pattern to work)?
---
Mike Norman
P.S. is there a way to get the 'compile' goal to include compiling the
tests?
Post by Sievers, Jan
we would need a stripped down sample project demonstrating the issue
to tell if this is a bug or just some configuration problem.
Regards
Jan
Sent: Freitag, 20. Januar 2012 21:23
Subject: [tycho-user] Problem with tycho-surefire-plugin and include/exclude patterns
I am trying to get the tycho-surefire-plugin to run a specific test.
${project.root}
| .classpath
| .project
| build.properties
| pom.xml
| ...
|
+---src
| +---main
| | +---java
| | | \---
| ...
| |
| \---test
| \---java
| \---org
| \---eclipse
| \---persistence
| \---tools
| \---oracleddl
| \---test
| | AllTests.java
| | TestHelper.java
| |
| +---databasetypebuilder
| | DatabaseTypeBuilderTestSuite.java
| | IOTTableDDLTestSuite.java
| | ProcedureDDLTestSuite.java
| | TableDDLTestSuite.java
| | TransformsTestSuite.java
| | TypeResolutionTestSuite.java
| |
| +---ddlparser
| | CaseSensitivePackageTestSuite.java
| | DDLParserTestSuite.java
| | FunctionDDLTestSuite.java
| | PackageDDLTestSuite.java
| | ProcedureDDLTestSuite.java
| | TableDDLTestSuite.java
| | TypeDDLTestSuite.java
| |
| \---visit
| FunctionTypeTest.java
| FunctionTypeVisitor.java
| IntervalTypeTest.java
| IntervalVisitor.java
| PrecisionTypeTest.java
| PrecisionTypeVisitor.java
| ProcedureTypeTest.java
| ProcedureTypeVisitor.java
| SizedTypeTest.java
| SizedTypeVisitor.java
| TableTypeTest.java
| TableTypeVisitor.java
| VisitorsTestSuite.java
@RunWith(Suite.class)
@SuiteClasses({
AdvancedJDBCPackageTestSuite.class,
ComplexPLSQLSFTestSuite.class,
ComplexPLSQLSPTestSuite.class,
CustomSQLTestSuite.class,
.
.
.
VeryLongIdentifierTestSuite.class
}
)
So my goal is to get the tycho-surefire-plugin to run AllTests and
then the rest of the tests are run from there.
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.8.2</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-surefire-plugin</artifactId>
<configuration>
<testSuite>org.eclipse.persistence.tools.oracleddl.test</testSuite>
<testClass>org.eclipse.persistence.tools.oracleddl.test.AllTests</testClass>
<systemProperties combine.children="append">
<db.user>${db.user}</db.user>
<db.pwd>${db.pwd}</db.pwd>
<db.url>${db.url}</db.url>
<db.ddl.create>${db.ddl.create}</db.ddl.create>
<db.ddl.drop>${db.ddl.drop}</db.ddl.drop>
<db.ddl.debug>${db.ddl.debug}</db.ddl.debug>
</systemProperties>
</configuration>
</plugin>
</plugins>
</build>
The<testSuite> and<testClass> elements are ignored and the usual
'**/*Test.java' pattern is being used.
I've tried various combinations of
<excludes>
<exclude>**/*</exclude>
</excludes>
<includes>
<include>**/AllTests.java</include>
</includes>
but nothing seems to work.
Any help would be greatly appreciated.
_______________________________________________
tycho-user mailing list
https://dev.eclipse.org/mailman/listinfo/tycho-user
_______________________________________________
tycho-user mailing list
https://dev.eclipse.org/mailman/listinfo/tycho-user
_______________________________________________
tycho-user mailing list
https://dev.eclipse.org/mailman/listinfo/tycho-user
Continue reading on narkive:
Loading...