| 
  • If you are citizen of an European Union member nation, you may not use this service unless you are at least 16 years old.

  • You already know Dokkio is an AI-powered assistant to organize & manage your digital files & messages. Very soon, Dokkio will support Outlook as well as One Drive. Check it out today!

View
 

Cargo

Page history last edited by Manuel Kueblboeck 12 years, 9 months ago

Cargo is a thin wrapper that allows you to manipulate Java EE containers in a standard way.

 

 

It may also be an issue with file locking (particularly on Windows) if you are accessing resources in a JAR library via a URL within your app.

I just had a similar issue and fixed it by modifying the following line in the

Apache Tomcat/conf/context.xml

file to:

<Context antiJARLocking="true" antiResourceLocking="true" >

(Note that there is some contention as to whether this is production safe since it creates copies of your webapp for each redeploy, but if you're on Windows and you can't fix the issue at the source, then this may provide a workable solution).

 

 

<properties>

<tomcat.server>tomcatserver</tomcat.server>

<tomcat.port>tomcatport</tomcat.port>

</properties>

 

<build>

<!-- Set Maven properties in maven.properties -->

<testResources>

<testResource>

<directory>src/test/resources</directory>

<filtering>true</filtering>

</testResource>

</testResources>

<plugins>

<!-- deploy und start webapps on tomcat -->

<plugin>

<groupId>org.codehaus.cargo</groupId>

<artifactId>cargo-maven2-plugin</artifactId>

<version>1.1.0</version>

<executions>

<execution>

<id>stop-webapps-on-container</id>

<phase>pre-integration-test</phase>

<goals>

<goal>deployer-stop</goal>

</goals>

</execution>

<execution>

<id>undeploy-webapps-on-container</id>

<phase>pre-integration-test</phase>

<goals>

<goal>undeploy</goal>

</goals>

</execution>

<execution>

<id>deploy-webapps-on-container</id>

<phase>pre-integration-test</phase>

<goals>

<goal>deploy</goal>

</goals>

</execution>

<execution>

<id>start-webapps-on-container</id>

<phase>pre-integration-test</phase>

<goals>

<goal>deployer-start</goal>

</goals>

</execution>

</executions>

<configuration>

<wait>true</wait>

<container>

<containerId>tomcat6x</containerId>

<type>remote</type>

</container>

<configuration>

<type>runtime</type>

<properties>

<cargo.remote.uri>http://${tomcat.server}:${tomcat.port}/manager</cargo.remote.uri>

<cargo.remote.username>TomcatAdmin</cargo.remote.username>

<cargo.remote.password>tcpass</cargo.remote.password>

</properties>

</configuration>

<deployer>

<type>remote</type>

<deployables>

<deployable>

<groupId>${project.groupId}</groupId>

<artifactId>webapp1</artifactId>

<type>war</type>

</deployable>

<deployable>

<groupId>${project.groupId}</groupId>

<artifactId>webapp2</artifactId>

<type>war</type>

</deployable>

</deployables>

</deployer>

</configuration>

</plugin>

<!-- Only run the tests in the integration-test phase -->

<plugin>

<artifactId>maven-surefire-plugin</artifactId>

<version>2.8.1</version>

<configuration>

<skip>true</skip>

</configuration>

</plugin>

<plugin>

<groupId>org.apache.maven.plugins</groupId>

<artifactId>maven-failsafe-plugin</artifactId>

<version>2.8.1</version>

<configuration>

<includes>

<include>**/*.java</include>

</includes>

</configuration>

<executions>

<execution>

<id>integration-test</id>

<goals>

<goal>integration-test</goal>

</goals>

</execution>

<execution>

<id>verify</id>

<goals>

<goal>verify</goal>

</goals>

</execution>

</executions>

</plugin>

</plugins>

</build>

 

<dependencies>

<dependency>

<groupId>org.seleniumhq.selenium</groupId>

<artifactId>selenium</artifactId>

<version>2.0b1</version> 

<!-- This is a hack to avoid an issue with version 2.0b1 where tests won't get picked up otherwise -->

<exclusions>

<exclusion>

<groupId>org.testng</groupId>

<artifactId>testng</artifactId>

</exclusion>

</exclusions>

</dependency>

<dependency>

<groupId>${project.groupId}</groupId>

<artifactId>webapp1</artifactId>

<version>${project.version}</version>

<type>war</type>

</dependency>

<dependency>

<groupId>${project.groupId}</groupId>

<artifactId>webapp2</artifactId>

<version>${project.version}</version>

<type>war</type>

</dependency>

</dependencies>

Comments (0)

You don't have permission to comment on this page.