This repository has been archived by the owner on May 12, 2021. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
git-svn-id: https://svn.apache.org/repos/asf/rave/branches/mongo@1428516 13f79535-47bb-0310-9956-ffa450edef68
- Loading branch information
Showing
19 changed files
with
1,827 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,178 @@ | ||
<?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.19-SNAPSHOT</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> |
92 changes: 92 additions & 0 deletions
92
rave-custom-project-archetype/src/main/resources/META-INF/maven/archetype-metadata.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
<?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. | ||
--> | ||
<archetype-descriptor | ||
xsi:schemaLocation="http://maven.apache.org/plugins/maven-archetype-plugin/archetype-descriptor/1.0.0 http://maven.apache.org/xsd/archetype-descriptor-1.0.0.xsd" | ||
name="rave-custom-project" | ||
xmlns="http://maven.apache.org/plugins/maven-archetype-plugin/archetype-descriptor/1.0.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> | ||
<requiredProperties> | ||
<requiredProperty key="groupId"> | ||
<defaultValue>org.example</defaultValue> | ||
</requiredProperty> | ||
<requiredProperty key="artifactId"> | ||
<defaultValue>myraveproject</defaultValue> | ||
</requiredProperty> | ||
<requiredProperty key="version"> | ||
<defaultValue>1.01.00-SNAPSHOT</defaultValue> | ||
</requiredProperty> | ||
<requiredProperty key="projectName"> | ||
<defaultValue>My Rave Project</defaultValue> | ||
</requiredProperty> | ||
</requiredProperties> | ||
<modules> | ||
<module id="${rootArtifactId}-portal" dir="__rootArtifactId__-portal" name="${rootArtifactId}-portal"> | ||
<fileSets> | ||
<fileSet filtered="true" packaged="true" encoding="UTF-8"> | ||
<directory>src/main/java</directory> | ||
<includes> | ||
<include>**/*.java</include> | ||
</includes> | ||
</fileSet> | ||
<fileSet filtered="true" encoding="UTF-8"> | ||
<directory>src/main/dist</directory> | ||
<includes> | ||
<include>**/*.xml</include> | ||
</includes> | ||
</fileSet> | ||
<fileSet filtered="true" encoding="UTF-8"> | ||
<directory>src/main/webapp</directory> | ||
<includes> | ||
<include>**/*.xml</include> | ||
</includes> | ||
</fileSet> | ||
<fileSet encoding="UTF-8"> | ||
<directory>src/main/webapp</directory> | ||
<includes> | ||
<include>**/*.tag</include> | ||
<include>**/*.css</include> | ||
</includes> | ||
</fileSet> | ||
<fileSet filtered="true" packaged="true" encoding="UTF-8"> | ||
<directory>src/test/java</directory> | ||
<includes> | ||
<include>**/*.java</include> | ||
</includes> | ||
</fileSet> | ||
<fileSet filtered="true" encoding="UTF-8"> | ||
<directory>src/test/resources</directory> | ||
<includes> | ||
<include>**/*.xml</include> | ||
</includes> | ||
</fileSet> | ||
</fileSets> | ||
</module> | ||
<module id="${rootArtifactId}-shindig" dir="__rootArtifactId__-shindig" name="${rootArtifactId}-shindig"> | ||
<fileSets> | ||
<fileSet filtered="true" encoding="UTF-8"> | ||
<directory>src/main/webapp</directory> | ||
<includes> | ||
<include>**/*.xml</include> | ||
</includes> | ||
</fileSet> | ||
</fileSets> | ||
</module> | ||
</modules> | ||
</archetype-descriptor> |
Oops, something went wrong.