MPGENAPP-23: added property maven.genapp.repackage.dir as base directory for maven.genapp.repackage

git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@328520 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
felipeal committed 2005-10-26 01:20:50 +00:00
1 parent a9ae608139
commit ecaf4b11f5
8 files changed
+156 -6

No files matched your search

@@ -0,0 +1,52 @@
<!--
/*
* 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:j="jelly:core" xmlns:ant="jelly:ant" xmlns:assert="assert" default="testPlugin">
<goal name="testPlugin" prereqs="test-genapp">
<attainGoal name="clean"/>
</goal>
<goal name="prepare-template">
<ant:copy todir="${maven.genapp.template.dir}">
<ant:fileset dir="${basedir}/../../plugin-resources/default/">
<ant:exclude name="template.properties"/>
</ant:fileset>
</ant:copy>
<ant:move todir="${maven.genapp.template.dir}/template-resources/my_src">
<ant:fileset dir="${maven.genapp.template.dir}/template-resources/src"/>
</ant:move>
<ant:move todir="${maven.genapp.template.dir}/template-resources/my_src/my_java">
<ant:fileset dir="${maven.genapp.template.dir}/template-resources/my_src/java"/>
</ant:move>
<ant:move todir="${maven.genapp.template.dir}/template-resources/my_src/my_test">
<ant:fileset dir="${maven.genapp.template.dir}/template-resources/my_src/test"/>
</ant:move>
<ant:copy todir="${maven.genapp.template.dir}" file="${basedir}/template.properties"/>
</goal>
<goal name="test-genapp" prereqs="clean">
<attainGoal name="prepare-template"/>
<attainGoal name="genapp"/>
<assert:assertFileExists file="${maven.genapp.basedir}"/>
<assert:assertFileExists file="${maven.genapp.basedir}/project.xml"/>
<assert:assertFileExists file="${maven.genapp.basedir}/project.properties"/>
<assert:assertFileExists file="${maven.genapp.basedir}/${mySrc}"/>
<assert:assertFileExists file="${maven.genapp.basedir}/${mySrc}/${myJava}"/>
<assert:assertFileExists file="${maven.genapp.basedir}/${mySrc}/${myTest}"/>
</goal>
</project>
@@ -0,0 +1,30 @@
# -------------------------------------------------------------------
# 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.
# -------------------------------------------------------------------
# where is the template
maven.genapp.template.dir=${maven.build.dir}/non-standard-template
# directory where it should be generated
maven.genapp.basedir=${maven.build.dir}/my_genapp
# properties that set non-standard directories
mySrc=my_src
maven.genapp.repackage.dir=${mySrc}
# properties necessary to skip the prompt
template=default
maven.genapp.template.id=myId
maven.genapp.template.name="Genapp testcase"
maven.genapp.template.package=org.apache.genapp
@@ -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 - Non-Standard Directories 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>
@@ -0,0 +1,20 @@
# -------------------------------------------------------------------
# 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.repackage=my_java,my_test
maven.genapp.filter=project.xml
maven.genapp.default.package=example.app