MPGENAPP-24:added property maven.genapp.basedir
git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@328133 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
e35e0c1c79
commit
ba29a35444
@ -33,6 +33,10 @@
|
||||
|
|
||||
-->
|
||||
<define:tag name="generate">
|
||||
|
||||
<!-- Where the files will be created -->
|
||||
<j:set var="generatedBasedir" value="${maven.genapp.basedir}"/>
|
||||
|
||||
<!-- If a template directory is provided directly, then use it (and don't ask)! -->
|
||||
<j:set var="currenttemplatedir" value="${maven.genapp.template.dir}"/>
|
||||
<j:if test="${empty(currenttemplatedir)}">
|
||||
@ -127,14 +131,14 @@
|
||||
|
||||
<!-- copy resources that need repackaged, eg java files -->
|
||||
<j:forEach var="res" items="${maven.genapp.repackage.split}">
|
||||
<ant:copy todir="${basedir}/src/${res}/${appPath}"
|
||||
<ant:copy todir="${generatedBasedir}/src/${res}/${appPath}"
|
||||
filtering="true">
|
||||
<ant:fileset dir="${maven.genapp.resources}/src/${res}" />
|
||||
</ant:copy>
|
||||
</j:forEach>
|
||||
|
||||
<!-- copy resources that just need filtered, eg project.xml -->
|
||||
<ant:copy todir="${basedir}" filtering="true">
|
||||
<ant:copy todir="${generatedBasedir}" filtering="true">
|
||||
<ant:fileset dir="${maven.genapp.resources}">
|
||||
<j:forEach var="res" items="${maven.genapp.filter.split}">
|
||||
<ant:include name="${res}"/>
|
||||
@ -143,7 +147,7 @@
|
||||
</ant:copy>
|
||||
|
||||
<!-- copy rest of app unfiltered -->
|
||||
<ant:copy todir="${basedir}">
|
||||
<ant:copy todir="${generatedBasedir}">
|
||||
<ant:fileset dir="${maven.genapp.resources}">
|
||||
<ant:exclude name="src/java"/>
|
||||
<ant:exclude name="src/test"/>
|
||||
@ -157,7 +161,7 @@
|
||||
</ant:copy>
|
||||
|
||||
<!-- copy config files normally excluded by Ant default excludes -->
|
||||
<ant:copy todir="${basedir}">
|
||||
<ant:copy todir="${generatedBasedir}">
|
||||
<ant:fileset dir="${maven.genapp.resources}" defaultexcludes="no">
|
||||
<ant:include name="**/.*"/>
|
||||
<ant:exclude name="**/.svn/**"/>
|
||||
|
||||
@ -29,3 +29,6 @@ maven.genapp.default.package=example.app
|
||||
maven.genapp.prompt.package=Please specify the package for your application:
|
||||
|
||||
maven.genapp.default.user=${user.name}
|
||||
|
||||
# directory where the artefacts will be created
|
||||
maven.genapp.basedir=${basedir}
|
||||
|
||||
36
genapp/src/plugin-test/basedirTest/maven.xml
Normal file
36
genapp/src/plugin-test/basedirTest/maven.xml
Normal file
@ -0,0 +1,36 @@
|
||||
<!--
|
||||
/*
|
||||
* Copyright 2001-2004 The Apache Software Foundation.
|
||||
*
|
||||
* Licensed 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:j="jelly:core"
|
||||
xmlns:u="jelly:util"
|
||||
xmlns:x="jelly:xml"
|
||||
xmlns:assert="assert"
|
||||
xmlns:j2ee="j2ee"
|
||||
default="testPlugin">
|
||||
|
||||
<goal name="testPlugin" prereqs="test-genapp">
|
||||
<attainGoal name="clean"/>
|
||||
</goal>
|
||||
|
||||
<goal name="test-genapp" prereqs="clean">
|
||||
<j:set var="maven.genapp.prompt.id" value="" scope="parent"/>
|
||||
<!-- TODO: figure it out how to not ask for stuff... -->
|
||||
<attainGoal name="genapp"/>
|
||||
<assert:assertFileExists file="${maven.genapp.basedir}"/>
|
||||
</goal>
|
||||
|
||||
</project>
|
||||
16
genapp/src/plugin-test/basedirTest/project.properties
Normal file
16
genapp/src/plugin-test/basedirTest/project.properties
Normal file
@ -0,0 +1,16 @@
|
||||
# -------------------------------------------------------------------
|
||||
# Copyright 2005 The Apache Software Foundation.
|
||||
#
|
||||
# Licensed 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.
|
||||
# -------------------------------------------------------------------
|
||||
maven.genapp.basedir=${maven.build.dir}/my_genapp
|
||||
36
genapp/src/plugin-test/basedirTest/project.xml
Normal file
36
genapp/src/plugin-test/basedirTest/project.xml
Normal file
@ -0,0 +1,36 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
/*
|
||||
* Copyright 2005 The Apache Software Foundation.
|
||||
*
|
||||
* Licensed 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/3.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/3.0.0
|
||||
http://maven.apache.org/maven-v3_0_0.xsd">
|
||||
<pomVersion>3</pomVersion>
|
||||
<name>Genapp Plugin - Basedir Test</name>
|
||||
<artifactId>test-maven-genapp-plugin-basedirTest</artifactId>
|
||||
<inceptionYear>2005</inceptionYear>
|
||||
<shortDescription>Tests maven.genapp.basedir property</shortDescription>
|
||||
<description>Tests maven.genapp.basedir property</description>
|
||||
<url/>
|
||||
<developers>
|
||||
<developer>
|
||||
<name>Felipe Leme</name>
|
||||
<id>felipeal</id>
|
||||
<email>maven@felipeal.net</email>
|
||||
<organization>Falcon Informatica</organization>
|
||||
</developer>
|
||||
</developers>
|
||||
</project>
|
||||
22
genapp/src/plugin-test/maven.xml
Normal file
22
genapp/src/plugin-test/maven.xml
Normal file
@ -0,0 +1,22 @@
|
||||
<!--
|
||||
/*
|
||||
* Copyright 2005 The Apache Software Foundation.
|
||||
*
|
||||
* Licensed 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:util="jelly:util" xmlns:maven="jelly:maven" xmlns:j="jelly:core" xmlns:assert="assert" xmlns:ant="jelly:ant">
|
||||
<goal name="testPlugin">
|
||||
<maven:reactor basedir="${basedir}" includes="*Test/project.xml" goals="testPlugin" banner="Test" ignoreFailures="false"/>
|
||||
</goal>
|
||||
</project>
|
||||
42
genapp/src/plugin-test/project.xml
Normal file
42
genapp/src/plugin-test/project.xml
Normal file
@ -0,0 +1,42 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
/*
|
||||
* Copyright 2005 The Apache Software Foundation.
|
||||
*
|
||||
* Licensed 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>
|
||||
<pomVersion>3</pomVersion>
|
||||
<name>Test project for Maven Genapp Plugin</name>
|
||||
<groupId>maven</groupId>
|
||||
<currentVersion>1.0</currentVersion>
|
||||
<organization>
|
||||
<name>Apache Software Foundation</name>
|
||||
<url>http://www.apache.org/</url>
|
||||
<logo>http://maven.apache.org/images/apache-maven-project.png</logo>
|
||||
</organization>
|
||||
<inceptionYear>2005</inceptionYear>
|
||||
<package>org.apache.maven</package>
|
||||
<logo>http://maven.apache.org/images/maven.gif</logo>
|
||||
<description>Test for Maven Genapp plugin</description>
|
||||
<shortDescription>Test for Maven Genapp plugin</shortDescription>
|
||||
<url>http://maven.apache.org/reference/plugins/genapp/</url>
|
||||
<siteDirectory>/www/maven.apache.org/reference/plugins/genapp/</siteDirectory>
|
||||
<repository>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk/genapp/</connection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/maven/maven-1/plugins/trunk/genapp/</url>
|
||||
</repository>
|
||||
</project>
|
||||
@ -22,6 +22,7 @@
|
||||
</properties>
|
||||
<body>
|
||||
<release version="2.3-SNAPSHOT" date="in SVN">
|
||||
<action dev="felipeal" type="add" issue="MPGENAPP-24">Added new property <code>maven.genapp.basedir property</code>.</action>
|
||||
<action dev="aheritier" type="update" issue="MAVEN-1712">Update dependencies to match ones in maven 1.1 core and to unify them between plugins. The following dependencies are updated :
|
||||
<ul>
|
||||
<li>commons-logging v1.0.3 -> v1.0.4</li>
|
||||
|
||||
@ -95,6 +95,15 @@
|
||||
${maven.home.local}/template
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>maven.genapp.basedir</td>
|
||||
<td>
|
||||
Directory where the new project will be generated.
|
||||
</td>
|
||||
<td>
|
||||
${basedir}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</section>
|
||||
<section name="Application Generation Filter Settings">
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user