You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Natalie <ns...@cidc.com> on 2012/05/25 16:41:47 UTC
Is it possible to include test-jar in the ear?
I have a project "presentation" with the following structure:
presentation
src
main
test
In the target directory I am getting:
presentation-1.0.ear
presentation-1.0-tests.jar
What I would like to be able to do is to have test classes to be packages
inside the ear.
I was hoping that by specifying 'earSourceDirectory' it will put the test
files inside the ear, but it's not happening. Below is my pom.xml. Tnx!
<?xml version="1.0"?>
<project>
<parent>
<groupId>com.mycompany</groupId>
<artifactId>maven</artifactId>
<version>1.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>presentation</artifactId>
<name>Presentation</name>
<version>1.0</version>
<description>Generic presentation used to drive a Web-based
UI.</description>
<properties>
<resources.dir>${basedir}/src/main/resources</resources.dir>
</properties>
<packaging>ear</packaging>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-ear-plugin</artifactId>
<version>2.2</version>
<configuration>
<earSourceDirectory>${basedir}/src/test</earSourceDirectory>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
....
</dependencies>
</project>
--
View this message in context: http://maven.40175.n5.nabble.com/Is-it-possible-to-include-test-jar-in-the-ear-tp5709827.html
Sent from the Maven - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Is it possible to include test-jar in the ear?
Posted by Wayne Fay <wa...@gmail.com>.
> What I would like to be able to do is to have test classes to be packages
> inside the ear.
> I was hoping that by specifying 'earSourceDirectory' it will put the test
> files inside the ear, but it's not happening. Below is my pom.xml. Tnx!
Generally, ears do not contain source code themselves, instead they
simply aggregate other jars and wars into a single ear file.
Move your test source code to another module, construct the test-jar
there, and then add a dependency on it in the ear project.
Wayne
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org