<?xml version="1.0"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
  <parent>
    <artifactId>melati-parent</artifactId>
    <groupId>org.melati</groupId>
    <version>0.7.8</version>
  </parent>
  <modelVersion>4.0.0</modelVersion>
  <artifactId>melati-webapp</artifactId>
  <packaging>war</packaging>
  <name>Melati Webapp</name>
  <url>http://melati.org/webapp</url>
  <build>
    <finalName>melati-webapp</finalName>
     <plugins>
      <plugin>
        <groupId>org.mortbay.jetty</groupId>
        <artifactId>maven-jetty-plugin</artifactId>
        <configuration>
          <contextPath>/</contextPath>
          <scanIntervalSeconds>2</scanIntervalSeconds>
          <scanTargets>
            <scanTarget>
             ${basedir}/src/main/java
            </scanTarget>
          </scanTargets>
        </configuration>
      </plugin>
     </plugins>
  </build>
  <dependencies>
    <dependency>
      <groupId>org.melati</groupId>
      <artifactId>melati</artifactId>
      <version>${project.version}</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>org.melati</groupId>
      <artifactId>courteouspoem</artifactId>
      <version>${project.version}</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
     <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
     <version>1.5.8</version>
      <scope>compile</scope>
    </dependency>    
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-log4j12</artifactId>
      <version>1.5.8</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>log4j</groupId>
      <artifactId>log4j</artifactId>
      <version>1.2.12</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>mysql</groupId>
      <artifactId>mysql-connector-java</artifactId>
      <version>5.0.4</version>
      <scope>runtime</scope>
    </dependency>

    <dependency>
      <groupId>org.melati</groupId>
      <artifactId>melati-example-odmg</artifactId>
      <version>${project.version}</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>org.melati</groupId>
      <artifactId>melati-example-contacts</artifactId>
      <version>${project.version}</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>3.8.1</version>
      <scope>test</scope>
    </dependency>
  </dependencies>
  <profiles>
    <profile>
<!--
Modify catalina.sh if running tomcat as local user :

   export CATALINA_PID=/var/run/tomcat6.pid

   shift
  
  "$_RUNJAVA" $JAVA_OPTS \
    -Djava.endorsed.dirs="$JAVA_ENDORSED_DIRS" -classpath "$CLASSPATH" \
    -Dcatalina.base="$CATALINA_BASE" \
    -Dcatalina.home="$CATALINA_HOME" \
    -Djava.io.tmpdir="$CATALINA_TMPDIR" \
    org.apache.catalina.startup.Bootstrap "$@" stop

  if [ ! -z "$CATALINA_PID" ]; then
     echo "Killing: `cat $CATALINA_PID`"
     kill -9 `cat $CATALINA_PID`
     echo rm $CATALINA_PID
     rm $CATALINA_PID
  else
     echo "Kill failed: \$CATALINA_PID not set"
  fi

-->
    
      <id>tomcatRunning</id>
      <activation>
        <file>
          <exists>/var/run/tomcat6.pid</exists>
        </file>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>org.codehaus.cargo</groupId>
            <artifactId>cargo-maven2-plugin</artifactId>
            <configuration>
              <wait>true</wait>
              <container>
                <containerId>tomcat6x</containerId>
                <type>remote</type>
              </container>
              <configuration>
                <type>runtime</type> 
                <properties>
                    <cargo.tomcat.manager.url>http://localhost:8080/manager</cargo.tomcat.manager.url>
                    <cargo.remote.username>admin</cargo.remote.username>
                    <cargo.remote.password />
                </properties>
              </configuration>
              <deployer>
               <type>remote</type>
               <deployables>
                 <deployable>
                    <groupId>${project.groupId}</groupId>
                    <artifactId>${project.artifactId}</artifactId>
                    <properties>
                      <context>/</context>
                    </properties>
                    <type>war</type>
                  </deployable>
                </deployables>
              </deployer>
            </configuration>
            <executions>
               <execution>
                 <id>do</id>
                 <phase>pre-integration-test</phase>
                 <goals>
                    <goal>deployer-redeploy</goal>
                 </goals>
               </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>
