| <?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 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/xsd/maven-4.0.0.xsd"> |
| <modelVersion>4.0.0</modelVersion> |
| |
| <parent> |
| <groupId>org.apache.rave</groupId> |
| <artifactId>rave-project</artifactId> |
| <version>0.20</version> |
| </parent> |
| |
| <artifactId>rave-custom-project-archetype</artifactId> |
| <packaging>maven-archetype</packaging> |
| |
| <name>Apache Rave :: rave-custom-project-archetype</name> |
| <description>An Archetype to create a custom Apache Rave project</description> |
| |
| <properties> |
| <customproject.app.groupId>org.apache.rave.custom</customproject.app.groupId> |
| <customproject.app.artifactId>myproject</customproject.app.artifactId> |
| <customproject.app.version>${project.version}</customproject.app.version> |
| <customproject.app.name>My Custom Rave Project</customproject.app.name> |
| </properties> |
| |
| <!-- |
| Replace some property values in the archetype pom upon generation of the archetype, see |
| http://stackoverflow.com/questions/7223031/how-to-embed-archetype-project-version-in-maven-archetype |
| --> |
| <build> |
| <resources> |
| <resource> |
| <directory>src/main/resources</directory> |
| <filtering>true</filtering> |
| <includes> |
| <include>archetype-resources/pom.xml</include> |
| </includes> |
| </resource> |
| <resource> |
| <directory>src/main/resources</directory> |
| <filtering>false</filtering> |
| <excludes> |
| <exclude>archetype-resources/pom.xml</exclude> |
| </excludes> |
| </resource> |
| </resources> |
| |
| <extensions> |
| <extension> |
| <groupId>org.apache.maven.archetype</groupId> |
| <artifactId>archetype-packaging</artifactId> |
| <version>2.2</version> |
| </extension> |
| </extensions> |
| |
| <pluginManagement> |
| <plugins> |
| <plugin> |
| <groupId>org.apache.maven.plugins</groupId> |
| <artifactId>maven-archetype-plugin</artifactId> |
| <version>2.2</version> |
| </plugin> |
| <plugin> |
| <groupId>org.apache.maven.plugins</groupId> |
| <artifactId>maven-resources-plugin</artifactId> |
| <version>2.6</version> |
| <configuration> |
| <escapeString>\</escapeString> |
| </configuration> |
| </plugin> |
| </plugins> |
| </pluginManagement> |
| <plugins> |
| <plugin> |
| <groupId>org.apache.maven.plugins</groupId> |
| <artifactId>maven-archetype-plugin</artifactId> |
| <version>2.2</version> |
| <extensions>true</extensions> |
| </plugin> |
| <plugin> |
| <groupId>org.apache.maven.plugins</groupId> |
| <artifactId>maven-antrun-plugin</artifactId> |
| <version>1.7</version> |
| <executions> |
| <execution> |
| <id>generate-and-install-custom-rave-project</id> |
| <phase>install</phase> |
| <configuration> |
| <target> |
| <echo message="$$$$$$$$$$ Deleting the existing custom Rave project if it exists. $$$$$$$$$$" /> |
| <delete dir="${project.build.directory}/${customproject.app.artifactId}" /> |
| |
| <echo message="$$$$$$$$$$ Generating a custom Rave project from the archetype $$$$$$$$$$" /> |
| <java classname="org.codehaus.classworlds.Launcher" dir="${project.build.directory}" fork="true" failonerror="true"> |
| <permissions> |
| <grant class="java.security.AllPermission" /> |
| <grant class="java.io.FilePermission" name="${maven.home}/bin/m2.conf" actions="read" /> |
| <grant class="java.util.PropertyPermission" name="*" actions="read,write" /> |
| </permissions> |
| <sysproperty key="classworlds.conf" value="${maven.home}/bin/m2.conf" /> |
| <sysproperty key="maven.home" value="${maven.home}" /> |
| <classpath> |
| <fileset dir="${maven.home}/boot"> |
| <include name="**/*.jar" /> |
| </fileset> |
| </classpath> |
| <arg value="-B" /> |
| <arg value="org.apache.maven.plugins:maven-archetype-plugin:2.2:generate" /> |
| <arg value="-DarchetypeCatalog=local" /> |
| <arg value="-DarchetypeGroupId=org.apache.rave" /> |
| <arg value="-DarchetypeArtifactId=rave-custom-project-archetype" /> |
| <arg value="-DarchetypeVersion=${project.version}" /> |
| <arg value="-DgroupId=${customproject.app.groupId}" /> |
| <arg value="-DartifactId=${customproject.app.artifactId}" /> |
| <arg value="-Dversion=${customproject.app.version}" /> |
| <arg value="-DprojectName=${customproject.app.name}" /> |
| <arg value="-Dmaven.repo.local=${settings.localRepository}" /> |
| </java> |
| |
| <echo message="$$$$$$$$$$ Installing custom Rave project $$$$$$$$$$" /> |
| <java classname="org.codehaus.classworlds.Launcher" dir="${project.build.directory}/${customproject.app.artifactId}" fork="true" failonerror="true"> |
| <permissions> |
| <grant class="java.security.AllPermission" /> |
| <grant class="java.io.FilePermission" name="${maven.home}/bin/m2.conf" actions="read" /> |
| <grant class="java.util.PropertyPermission" name="*" actions="read,write" /> |
| </permissions> |
| <sysproperty key="classworlds.conf" value="${maven.home}/bin/m2.conf" /> |
| <sysproperty key="maven.home" value="${maven.home}" /> |
| <classpath> |
| <fileset dir="${maven.home}/boot"> |
| <include name="**/*.jar" /> |
| </fileset> |
| </classpath> |
| <arg value="package" /> |
| <arg value="-Dmaven.repo.local=${settings.localRepository}" /> |
| </java> |
| </target> |
| </configuration> |
| <goals> |
| <goal>run</goal> |
| </goals> |
| </execution> |
| </executions> |
| <dependencies> |
| <dependency> |
| <groupId>org.apache.maven.plugins</groupId> |
| <artifactId>maven-archetype-plugin</artifactId> |
| <version>2.2</version> |
| <scope>runtime</scope> |
| </dependency> |
| </dependencies> |
| </plugin> |
| </plugins> |
| </build> |
| |
| </project> |