I'm trying to get my test-classes in a cactiefied war; actually getting them in 
is easy using libDependencies:
<plugin>
        <groupId>org.apache.cactus</groupId>
        <artifactId>cactus.integration.maven2</artifactId>
        <version>1.8.1</version>
        <configuration>
                <srcFile>${project.build.directory}/restutils.war</srcFile>
                
<destFile>${project.build.directory}/cactifiedByMaven2.war</destFile>
                <libDependencies>
                        <groupId>${pom.groupId}</groupId>
                        <artifactId>${pom.artifactId}</artifactId>
                        <version>${pom.version}</version>
                </libDependencies>
        </configuration>
        <executions>
                <execution>
                        <id>cactus-cactifywar</id>
                        <phase>pre-integration-test</phase>
                        <goals>
                                <goal>cactifywar</goal>
                        </goals>
                </execution>
        </executions>
</plugin>

The hard part is that this dependency should be declared as a regular 
dependency using:
<dependency>
        <groupId>${pom.groupId}</groupId>
        <artifactId>${pom.artifactId}</artifactId>
        <version>${pom.version}</version>
        <type>test-jar</type>
        <scope>test</scope>
        <optional>true</optional>
</dependency>

This fails with a cyclyc dependency error; I have the following for generating 
the .jar inside the build section:
<plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jar-plugin</artifactId>
        <version>2.2</version>
        <executions>
                <execution>
                        <goals>
                                <goal>test-jar</goal>
                        </goals>
                </execution>
        </executions>
</plugin>

I tried to play around with phases but this (ofcourse) doesn't take away the 
cyclic reference.
Is there any way of doing this? I'd like to stay away of using a parent (war) / 
child (tests jar) multi module solution if possible..



Met vriendelijke groet,
 
Mark Prins
applicatie ontwikkelaar Geo-Informatie Systemen

GIS Competence Center (een samenwerking van DLG en DR)
Dienst Landelijk Gebied
Kamer 11.23
Herman Gorterstraat 5
3511 EW Utrecht
Postbus 20021
3502 LA Utrecht
tel 030 275 6877
fax 030 275 6999

Dit bericht kan informatie bevatten die niet voor u is bestemd. Indien u niet 
de geadresseerde bent of dit bericht abusievelijk aan u is gezonden, wordt u 
verzocht dat aan de afzender te melden en het bericht te verwijderen. De Staat 
aanvaardt geen aansprakelijkheid voor schade, van welke aard ook, die verband 
houdt met risico's verbonden aan het elektronisch verzenden van berichten. 

This message may contain information that is not intended for you. If you are 
not the addressee or if this message was sent to you by mistake, you are 
requested to inform the sender and delete the message. The State accepts no 
liability for damage of any kind resulting from the risks inherent in the 
electronic transmission of messages.

Reply via email to