test-war-scm
Used in:
components
- OverviewOverview
- VersionsVersions
- DependentsDependents
- DependenciesDependencies
<dependency> <groupId>org.mortbay.jetty.testwars</groupId> <artifactId>test-war-scm</artifactId> <version>8.1.0.RC0</version> </dependency>
<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"> <modelVersion>4.0.0</modelVersion> <parent> <groupId>org.mortbay.jetty.testwars</groupId> <artifactId>testwars-parent</artifactId> <version>8.1.0.RC0</version> </parent> <artifactId>test-war-scm</artifactId> <!-- POM is correct, we build up the war manually below --> <packaging>pom</packaging> <name>Jetty :: Webapp Verifier :: Dummy SCM Webapp</name> <dependencies> <dependency> <groupId>org.mortbay.jetty.testwars</groupId> <artifactId>dummy-scm-lib</artifactId> <version>${project.version}</version> </dependency> </dependencies> <properties> <war_work_dir>${project.build.directory}/generated-webapp</war_work_dir> </properties> <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-antrun-plugin</artifactId> <executions> <execution> <!-- Create Various SCM files, works even if project is forked, or uses git-svn, or is even compiled via a tarball distribution --> <id>create-scm-files</id> <phase>generate-resources</phase> <goals> <goal>run</goal> </goals> <configuration> <tasks> <mkdir dir="${war_work_dir}/CVS" /> <touch file="${war_work_dir}/.cvsignore" /> <mkdir dir="${war_work_dir}/.svn" /> <mkdir dir="${war_work_dir}/_svn" /> <mkdir dir="${war_work_dir}/.git" /> <touch file="${war_work_dir}/.gitignore" /> <mkdir dir="${war_work_dir}/RCS" /> <mkdir dir="${war_work_dir}/SCCS" /> <touch file="${war_work_dir}/vssver.scc" /> <mkdir dir="${war_work_dir}/.arch-ids" /> <mkdir dir="${war_work_dir}/.bzr" /> <touch file="${war_work_dir}/.MySCMServerInfo" /> <mkdir dir="${war_work_dir}/.hg" /> <mkdir dir="${war_work_dir}/BitKeeper" /> <mkdir dir="${war_work_dir}/ChangeSet" /> <mkdir dir="${war_work_dir}/_darcs" /> <mkdir dir="${war_work_dir}/.darcs" /> <mkdir dir="${war_work_dir}/.darcsrepo" /> <touch file="${war_work_dir}/.darcs-temp-mail" /> <copy todir="${war_work_dir}"> <fileset dir="${basedir}/src/main/webapp" /> </copy> <mkdir dir="${war_work_dir}/WEB-INF/lib" /> </tasks> </configuration> </execution> <execution> <!-- Create WAR File --> <id>create-war</id> <phase>package</phase> <goals> <goal>run</goal> </goals> <configuration> <tasks> <jar destfile="${project.build.directory}/${project.artifactId}-${project.version}.war" basedir="${war_work_dir}" includes="**/*" defaultexcludes="false" /> </tasks> </configuration> </execution> </executions> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-dependency-plugin</artifactId> <executions> <execution> <!-- Copy and Dependencies to WEB-INF/lib --> <id>copy-deps</id> <phase>process-resources</phase> <goals> <goal>copy-dependencies</goal> </goals> <configuration> <outputDirectory>${war_work_dir}/WEB-INF/lib</outputDirectory> <stripVersion>true</stripVersion> </configuration> </execution> </executions> </plugin> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>build-helper-maven-plugin</artifactId> <version>1.5</version> <executions> <execution> <!-- Make sure Manually build WAR is attached to the project so that it can get deployed and/or released to a repo --> <id>attach-scm-lib</id> <phase>process-resources</phase> <goals> <goal>attach-artifact</goal> </goals> <configuration> <artifacts> <artifact> <file>${project.build.directory}/${project.artifactId}-${project.version}.war</file> <type>war</type> </artifact> </artifacts> </configuration> </execution> </executions> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-assembly-plugin</artifactId> <executions> <execution> <phase>package</phase> <goals> <goal>single</goal> </goals> <configuration> <descriptorRefs> <descriptorRef>config</descriptorRef> </descriptorRefs> </configuration> </execution> </executions> </plugin> </plugins> </build> </project>