<?xml version="1.0"?><project>
  <parent>
    <artifactId>pom</artifactId>
    <groupId>org.jvnet.hudson.main</groupId>
    <version>1.95</version>
  </parent>
  <modelVersion>4.0.0</modelVersion>
  <artifactId>hudson-war</artifactId>
  <packaging>war</packaging>
  <name>Hudson war</name>
  <version>1.95</version>
  <build>
    <directory>target</directory>
    <finalName>hudson</finalName>
    <plugins>
      <plugin>
        <artifactId>maven-war-plugin</artifactId>
        <version>2.0</version>
        <configuration>
          <webResources>
            <resource>
              <directory>${basedir}/resources</directory>
            </resource>
            <resource>
              <directory>${basedir}/target/generated-resources</directory>
            </resource>
          </webResources>
          <archive>
            <manifest>
              <mainClass>Main</mainClass>
            </manifest>
          </archive>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-antrun-plugin</artifactId>
        <executions>
          <execution>
            <phase>generate-resources</phase>
            <goals>
              <goal>run</goal>
            </goals>
            <configuration>
              <tasks>
                <mkdir dir="target/generated-resources"></mkdir>
                <javac destdir="target/generated-resources" fork="true" source="1.4" target="1.4" debug="on" srcdir="src/launcher/java" includes="*.java"></javac>
              </tasks>
            </configuration>
          </execution>
          <execution>
            <id>signWar</id>
            <phase>verify</phase>
            <goals>
              <goal>run</goal>
            </goals>
            <configuration>
              <tasks>
                <signjar storepass="${hudson.sign.storepass}" keystore="${hudson.sign.keystore}" alias="${hudson.sign.alias}" jar="target/hudson.war"></signjar>
              </tasks>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>dependency-maven-plugin</artifactId>
        <executions>
          <execution>
            <id>copy-slave.jar</id>
            <phase>generate-resources</phase>
            <goals>
              <goal>copy</goal>
            </goals>
            <configuration>
              <artifactItems>
                <artifactItem>
                  <groupId>org.jvnet.hudson.main</groupId>
                  <artifactId>remoting</artifactId>
                  <version>1.95</version>
                  <classifier>${hudsonRemotingClassifier}</classifier>
                  <destFileName>slave.jar</destFileName>
                </artifactItem>
              </artifactItems>
              <outputDirectory>${basedir}/target/generated-resources/WEB-INF</outputDirectory>
            </configuration>
          </execution>
          <execution>
            <id>copy-remoting.jar</id>
            <phase>generate-resources</phase>
            <goals>
              <goal>copy</goal>
            </goals>
            <configuration>
              <artifactItems>
                <artifactItem>
                  <groupId>org.jvnet.hudson.main</groupId>
                  <artifactId>remoting</artifactId>
                  <version>1.95</version>
                  <classifier>${hudsonRemotingClassifier}</classifier>
                  <destFileName>remoting.jar</destFileName>
                </artifactItem>
              </artifactItems>
              <outputDirectory>${basedir}/target/generated-resources/WEB-INF</outputDirectory>
            </configuration>
          </execution>
          <execution>
            <id>copy-jnlp-agent.jar</id>
            <phase>generate-resources</phase>
            <goals>
              <goal>copy</goal>
            </goals>
            <configuration>
              <artifactItems>
                <artifactItem>
                  <groupId>org.jvnet.hudson.main</groupId>
                  <artifactId>jnlp-agent</artifactId>
                  <version>1.95</version>
                  <destFileName>jnlp-agent.jar</destFileName>
                </artifactItem>
              </artifactItems>
              <outputDirectory>${basedir}/target/generated-resources/WEB-INF</outputDirectory>
            </configuration>
          </execution>
          <execution>
            <id>copy-winstone.jar</id>
            <phase>generate-resources</phase>
            <goals>
              <goal>copy</goal>
            </goals>
            <configuration>
              <artifactItems>
                <artifactItem>
                  <groupId>winstone</groupId>
                  <artifactId>winstone</artifactId>
                  <version>0.9.6</version>
                  <destFileName>winstone.jar</destFileName>
                </artifactItem>
              </artifactItems>
              <outputDirectory>${basedir}/target/generated-resources</outputDirectory>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.mortbay.jetty</groupId>
        <artifactId>maven-jetty-plugin</artifactId>
        <version>6.1.1</version>
        <configuration>
          <contextPath>/</contextPath>
          <classesDirectory>../core/target/classes</classesDirectory>
          <webAppSourceDirectory>${basedir}/resources</webAppSourceDirectory>
          <systemProperties>
            <systemProperty>
              <name>HUDSON_HOME</name>
              <value>${basedir}/work</value>
            </systemProperty>
            <systemProperty>
              <name>stapler.jelly.noCache</name>
              <value>true</value>
            </systemProperty>
            <systemProperty>
              <name>hudson.maven</name>
              <value>true</value>
            </systemProperty>
            <systemProperty>
              <name>stapler.resourcePath</name>
              <value>../core/src/main/resources</value>
            </systemProperty>
          </systemProperties>
        </configuration>
      </plugin>
    </plugins>
  </build>
  <profiles>
    <profile>
      <id>debug</id>
      <activation>
        <activeByDefault>true</activeByDefault>
      </activation>
      <properties>
        <hudsonClassifier></hudsonClassifier>
        <hudsonRemotingClassifier></hudsonRemotingClassifier>
      </properties>
    </profile>
    <profile>
      <id>release</id>
      <properties>
        <hudsonClassifier>jdk14</hudsonClassifier>
        <hudsonRemotingClassifier>jdk14-jar-with-dependencies</hudsonRemotingClassifier>
      </properties>
    </profile>
  </profiles>
  <dependencies>
    <dependency>
      <groupId>org.jvnet.hudson.main</groupId>
      <artifactId>jnlp-agent</artifactId>
      <version>1.95</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.jvnet.hudson.main</groupId>
      <artifactId>hudson-core</artifactId>
      <version>1.95</version>
      <classifier>${hudsonClassifier}</classifier>
      <exclusions>
        <exclusion>
          <artifactId>servlet-api</artifactId>
          <groupId>javax.servlet</groupId>
        </exclusion>
        <exclusion>
          <artifactId>xalan</artifactId>
          <groupId>xalan</groupId>
        </exclusion>
        <exclusion>
          <artifactId>xercesImpl</artifactId>
          <groupId>xerces</groupId>
        </exclusion>
        <exclusion>
          <artifactId>xml-apis</artifactId>
          <groupId>xml-apis</groupId>
        </exclusion>
        <exclusion>
          <artifactId>xmlParserAPIs</artifactId>
          <groupId>xerces</groupId>
        </exclusion>
        <exclusion>
          <artifactId>xsdlib</artifactId>
          <groupId>msv</groupId>
        </exclusion>
        <exclusion>
          <artifactId>relaxngDatatype</artifactId>
          <groupId>msv</groupId>
        </exclusion>
        <exclusion>
          <artifactId>forehead</artifactId>
          <groupId>forehead</groupId>
        </exclusion>
        <exclusion>
          <artifactId>jdom</artifactId>
          <groupId>jdom</groupId>
        </exclusion>
        <exclusion>
          <artifactId>xom</artifactId>
          <groupId>xom</groupId>
        </exclusion>
        <exclusion>
          <artifactId>commons-cli</artifactId>
          <groupId>commons-cli</groupId>
        </exclusion>
        <exclusion>
          <artifactId>commons-discovery</artifactId>
          <groupId>commons-discovery</groupId>
        </exclusion>
        <exclusion>
          <artifactId>commons-jelly-tags-junit</artifactId>
          <groupId>commons-jelly</groupId>
        </exclusion>
        <exclusion>
          <artifactId>jaxme-api</artifactId>
          <groupId>jaxme</groupId>
        </exclusion>
        <exclusion>
          <artifactId>junit</artifactId>
          <groupId>junit</groupId>
        </exclusion>
        <exclusion>
          <artifactId>stax-api</artifactId>
          <groupId>stax</groupId>
        </exclusion>
        <exclusion>
          <artifactId>pull-parser</artifactId>
          <groupId>pull-parser</groupId>
        </exclusion>
      </exclusions>
    </dependency>
  </dependencies>
  <distributionManagement>
    <status>deployed</status>
  </distributionManagement>
</project>