Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
<?xml version="1.0" encoding="UTF-8"?>
<!--
    * Licensed to the Apache Software Foundation (ASF) under one
    * or more contributor license agreements.  See the NOTICE file
    * distributed with this work for additional information
    * regarding copyright ownership.  The ASF licenses this file
    * to you under the Apache License, Version 2.0 (the
    * "License"); you may not use this file except in compliance
    * with the License.  You may obtain a copy of the License at
    * 
    *   http://www.apache.org/licenses/LICENSE-2.0
    * 
    * Unless required by applicable law or agreed to in writing,
    * software distributed under the License is distributed on an
    * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    * KIND, either express or implied.  See the License for the
    * specific language governing permissions and limitations
    * under the License.    
-->
<project>
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>org.apache.tuscany.sca</groupId>
        <artifactId>tuscany-sca</artifactId>
        <version>1.2-incubating-SNAPSHOT</version>
        <relativePath>../../pom.xml</relativePath>
    </parent>
    <artifactId>sample-calculator-webapp</artifactId>
    <packaging>war</packaging>
    <name>Apache Tuscany SCA Calculator Sample in a WebApp</name>

    <repositories>
        <repository>
            <id>apache.incubator</id>
            <url>http://people.apache.org/repo/m2-incubating-repository</url>
        </repository>
    </repositories>

    <dependencies>
        <dependency>
            <groupId>org.apache.tuscany.sca</groupId>
            <artifactId>tuscany-host-webapp</artifactId>
            <version>1.2-incubating-SNAPSHOT</version>
        </dependency>

        <dependency>
            <groupId>org.apache.tuscany.sca</groupId>
            <artifactId>tuscany-implementation-java-runtime</artifactId>
            <version>1.2-incubating-SNAPSHOT</version>
            <scope>runtime</scope>
        </dependency>

        <!-- marking dependency as provided to exclude from war file -->
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>servlet-api</artifactId>
            <version>2.3</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.2</version>
            <scope>compile</scope>
        </dependency>

    </dependencies>

    <build>
        <finalName>${artifactId}</finalName>

        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <version>2.2</version>
                <executions>
                    <execution>
                        <configuration>
                            <finalName>web</finalName>
                        </configuration>
                        <phase>test</phase>
                        <goals>
                            <goal>test-jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-war-plugin</artifactId>
                <version>2.0.2</version>
                <configuration>
                    <webResources>
                        <resource>
                            <!-- this is relative to the pom.xml directory -->
                            <directory>target</directory>
                            <includes>
                                <include>*-tests.jar</include>
                            </includes>
                            <targetPath>WEB-INF/test-lib</targetPath>
                        </resource>
                    </webResources>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.codehausapache.tuscany.cargo<sca</groupId>
                <artifactId>cargo<artifactId>tuscany-maven-maven2web-plugin<unittest</artifactId>
                <version>1.2-incubating-SNAPSHOT</version>
                <executions>
                    <execution>
                        <id>start-container<<configuration></id>configuration>
                        <phase>pre-integration<phase>integration-test</phase>
                        <goals>
                            <goal>start<<goal>test</goal>
                        </goals>
                    </execution>
                    <execution></executions>
            </plugin>
            <id>stop-container</id><plugin>
                <groupId>org.apache.tuscany.sca</groupId>
        <phase>post-integration-test</phase>
        <artifactId>tuscany-maven-ant-generator</artifactId>
                <goals><version>1.2-incubating-SNAPSHOT</version>
                <executions>
            <goal>stop</goal>
        <execution>
                </goals>
        <goals>
            </execution>
                <<goal>generate</executions>goal>
                <configuration>
        </goals>
            <container>
        </execution>
                <containerId>jetty6x<</containerId>executions>
            </plugin>
        </plugins>
    <type>embedded<</type>build>

    <profiles>
        <profile>
            <systemProperties><id>jetty</id>
            <activation>
                <org.apache.commons.logging.Log><activeByDefault />
            </activation>
            <build>
        org.apache.commons.logging.impl.SimpleLog
        <plugins>
                    </org.apache.commons.logging.Log><plugin>
                        </systemProperties>
<groupId>org.codehaus.cargo</groupId>
                     </container>   <artifactId>cargo-maven2-plugin</artifactId>
                    <wait>false</wait>
    <executions>
                <configuration>
            <execution>
            <properties>
                    <id>start-container</id>
        <cargo.servlet.port>8080</cargo.servlet.port>
                        </properties><phase>pre-integration-test</phase>
                        <deployables>        <goals>
                            <deployable>
        <goal>start</goal>
                        <location>
        </goals>
                            ${project.build.directory}/${project.build.finalName}.${project.packaging}
</execution>
                            <execution>
    </location>
                            <id>stop-container</id>
    <pingURL>http://localhost:8080/${project.build.finalName}/junit</pingURL>
                            </deployable><phase>post-integration-test</phase>
                        </deployables>
        <goals>
            </configuration>
                </configuration>
            </plugin><goal>stop</goal>
                                </goals>
                            </execution>
                        </executions>
                        <configuration>
                            <container>
                                <containerId>jetty6x</containerId>
                                <type>embedded</type>
                                <systemProperties>
                                    <org.apache.commons.logging.Log>
                                        org.apache.commons.logging.impl.SimpleLog
                                    </org.apache.commons.logging.Log>
                                </systemProperties>
                            </container>
                            <wait>false</wait>
                            <configuration>
                                <properties>
                                    <cargo.servlet.port>8080</cargo.servlet.port>
                                </properties>
                                <deployables>
                                    <deployable>
                                        <location>
                                            ${project.build.directory}/${project.build.finalName}.${project.packaging}
                                        </location>
                                        <pingURL>http://localhost:8080/${project.build.finalName}/junit</pingURL>
                                    </deployable>
                                </deployables>
                            </configuration>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>geronimo</id>
            <properties>
                <geronimo.home>C:\Apache\geronimo-tomcat6-jee5-2.0.2</geronimo.home>
            </properties>

            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.geronimo.plugins</groupId>
                        <artifactId>geronimo-maven-plugin</artifactId>
                        <version>2.0.2</version>
                        <configuration>
                            <geronimoHome>${geronimo.home}</geronimoHome>
                        </configuration>
                        <executions>
                            <execution>
                                <id>start-container</id>
                                <phase>pre-integration-test</phase>
                                <goals>
                                    <goal>start</goal>
                                </goals>
                                <configuration>
                                    <background>true</background>
                                </configuration>

                            </execution>
                            <execution>
                                <id>deploy-war</id>
                                <phase>pre-integration-test</phase>
                                <goals>
                                    <goal>deploy</goal>
                                </goals>
                                <configuration>
                                    <moduleArchive>
                                        ${project.build.directory}/${project.build.finalName}.${project.packaging}
                                    </moduleArchive>
                                </configuration>
                            </execution>
                            <execution>
                                <id>undeploy-war</id>
                                <phase>post-integration-test</phase>
                                <goals>
                                    <goal>undeploy</goal>
                                </goals>
                                <configuration>
            <plugin>
                        <groupId>org<moduleId>org.apache.tuscany.sca</groupId>
sca/sample-calculator-webapp/1.2-incubating-SNAPSHOT/war</moduleId> 
                                <artifactId>tuscany-maven-web-unittest</artifactId>
</configuration>
                      <version>1.2-incubating-SNAPSHOT</version>      </execution>
                <executions>
            <execution>
        <execution>
                        <configuration><<id>stop-container</configuration>id>
                        <phase>integration-test</phase>
        <phase>post-integration-test</phase>
                <goals>
                <goals>
            <goal>test</goal>
                        <<goal>stop</goals>goal>
                    </execution>
                </executions>goals>
               </plugin>
             <plugin>
    <configuration>
            <groupId>org.apache.tuscany.sca</groupId>
                <artifactId>tuscany-maven-ant-generator</artifactId>
        <username>system</username>
        <version>1.2-incubating-SNAPSHOT</version>
                <executions>
            <password>manager</password>
        <execution>
                        <goals></configuration>
                            <goal>generate<</goal>execution>
                        </goals>executions>
                    </execution>plugin>
                </executions>plugins>
            </plugin>build>
        </plugins>profile>
    </build>profiles>
</project>