MPGENAPP-17: using ${maven.home.local} instead of ${user.home}/.maven for user-defined templates
git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@328525 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
1 parent
8d859ed29c
commit
5c2593bcf8
5 files changed
+105
-2
No files matched your search
+2
-2
@@ -53,8 +53,8 @@
|
||||
</u:available>
|
||||
|
||||
<!-- If template is in the user's home directory, use it -->
|
||||
<u:available file="${user.home}/.maven/template/${template}">
|
||||
<j:set var="maven.genapp.template.dir" value="${user.home}/.maven/template/${template}"/>
|
||||
<u:available file="${maven.home.local}/template/${template}">
|
||||
<j:set var="maven.genapp.template.dir" value="${maven.home.local}/template/${template}"/>
|
||||
</u:available>
|
||||
|
||||
<!-- If template is in a given template repository, use it -->
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
<!--
|
||||
/*
|
||||
* 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-home-local">
|
||||
<ant:mkdir dir="${newMavenHomeLocal}"/>
|
||||
<ant:copy todir="${newMavenHomeLocal}/template/my_default">
|
||||
<ant:fileset dir="${basedir}/../../plugin-resources/default/"/>
|
||||
</ant:copy>
|
||||
</goal>
|
||||
|
||||
<goal name="test-genapp" prereqs="clean">
|
||||
<attainGoal name="prepare-home-local"/>
|
||||
<j:set var="maven.home.local" value="${newMavenHomeLocal}" />
|
||||
<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}/src"/>
|
||||
</goal>
|
||||
</project>
|
||||
@@ -0,0 +1,27 @@
|
||||
# -------------------------------------------------------------------
|
||||
# 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.
|
||||
# -------------------------------------------------------------------
|
||||
# new maven.home.local.home
|
||||
newMavenHomeLocal=${maven.build.dir}/maven_local
|
||||
#maven.home.local=${maven.build.dir}/maven_local
|
||||
|
||||
# directory where it should be generated
|
||||
maven.genapp.basedir=${maven.build.dir}/my_genapp
|
||||
# properties necessary to skip the prompt
|
||||
template=my_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 - MavenHomeLocal Test</name>
|
||||
<artifactId>test-maven-genapp-plugin-mavenHomeLocalTest</artifactId>
|
||||
<inceptionYear>2005</inceptionYear>
|
||||
<shortDescription>Tests user templates at maven.home.local property</shortDescription>
|
||||
<description>Tests user templates at maven.home.local 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,6 +22,7 @@
|
||||
</properties>
|
||||
<body>
|
||||
<release version="2.3-SNAPSHOT" date="in SVN">
|
||||
<action dev="felipeal" type="fix" issue="MPGENAPP-17">Using <code>${maven.home.local}</code> instead of <code>${user.home}/.maven</code> for templates.</action>
|
||||
<action dev="felipeal" type="add" issue="MPGENAPP-23">Added property <code>maven.genapp.repackage.dir</code> as base directory for <code>maven.genapp.repackage</code>.</action>
|
||||
<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 :
|
||||
|
||||
Reference in new issue
Block a user