• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

[Maven 2] Issue Running Tests

 
Ranch Hand
Posts: 167
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello everyone,

I'm trying to change the whole architecture structure I've got to get it working along Maven 2, following the best practices (http://maven.apache.org/guides/mini/guide-using-one-source-directory.html). So, currently I've got a project with a structure like this:

/
+- pom.xml
+- src/
...+- main/
......+- java/
..........+- /mypack/
..............+- core/
..............+- gui/
...+- test/
......+- java/
..........+- /mypack/
..............+- core/
..............+- gui/
+- core/
...+- pom.xml
...+- target/
......+- my-core-1.0.jar
+- gui/
...+- pom.xml
...+- target/
......+- my-module-1.0.jar

It's building ok when I don't tell Maven to run the test cases, but when turning it on, maven-surefire-plugin gets confused for some reason. The issue is: when testing only the core module, surefire's plugin is trying to run also the tests from the gui module. That's an absurd, since in core/pom.xml I'm including ONLY core's tests:

<testSourceDirectory>../src/test/java/</testSourceDirectory>
...
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<includes>
<include>**/core/**</include>
</includes>
</configuration>
</plugin>

Did anybody already experience this problem?

Thanks a lot.
[ April 15, 2006: Message edited by: Tiago Fernandez ]
 
Tiago Fernandez
Ranch Hand
Posts: 167
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ok, I quit. I'll use another layout:

> /
> +- pom.xml
> +- core/
> ...+- pom.xml
> ...+- src/
> ......+- main/
> .........+- java/
> .............+- /mypack/
> ................+- core/
> ...+- test/
> ......+- java/
> ..........+- /mypack/
> ..............+- core/
> ...+- target/
> ......+- my-core-1.0.jar
> +- gui/
> ...+- pom.xml
> ...+- src/
> ......+- main/
> .........+- java/
> .............+- /mypack/
> ................+- gui/
> ...+- test/
> ......+- java/
> ..........+- /mypack/
> ..............+- gui/
> ...+- target/
> ......+- my-module-1.0.jar
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic