You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by "Lukas Theussl (JIRA)" <ji...@codehaus.org> on 2005/10/28 08:04:12 UTC

[jira] Updated: (MPGENAPP-3) Genapp to prompt for project root

     [ http://jira.codehaus.org/browse/MPGENAPP-3?page=all ]

Lukas Theussl updated MPGENAPP-3:
---------------------------------

    Description: 
Currently, the genapp plugin assumes that ${basedir} is to be the top-level of the project being 'gen'ed.  The user doesn't realize that the plugin is going to write a bunch of files/directories to the current directory until *after* running it.

It would be nice if we could prompt for a location.  I have tested that with simple code modifications to plugin.jelly & plugin.properties

plugin.jelly:
Step 1
Replace all occurences of ${basedir} with ${projectRoot}.

Step 2
Add the following lines at line 92

<!-- Get the project root -->
<j:set var="projectRoot" value="${maven.genapp.projectRoot}"/>
<j:if test="${empty(projectRoot)}">
  <i:ask question="${maven.genapp.prompt.projectRoot}" 
           answer="projectRoot"   
          default="${basedir}/${maven.genapp.template.name}"/>
</j:if>

plugin.properties:
Added the property setting

maven.genapp.prompt.projectRoot=Please specify the project root directory:

I can provide the modified files -- and related changes to properties.xml -- if you wish.

  was:
Currently, the genapp plugin assumes that ${basedir} is to be the top-level of the project being 'gen'ed.  The user doesn't realize that the plugin is going to write a bunch of files/directories to the current directory until *after* running it.

It would be nice if we could prompt for a location.  I have tested that with simple code modifications to plugin.jelly & plugin.properties

plugin.jelly:
Step 1
Replace all occurences of ${basedir} with ${projectRoot}.

Step 2
Add the following lines at line 92

<!-- Get the project root -->
<j:set var="projectRoot" value="${maven.genapp.projectRoot}"/>
<j:if test="${empty(projectRoot)}">
  <i:ask question="${maven.genapp.prompt.projectRoot}" 
           answer="projectRoot"   
          default="${basedir}/${maven.genapp.template.name}"/>
</j:if>

plugin.properties:
Added the property setting

maven.genapp.prompt.projectRoot=Please specify the project root directory:

I can provide the modified files -- and related changes to properties.xml -- if you wish.

    Fix Version: 2.3

> Genapp to prompt for project root
> ---------------------------------
>
>          Key: MPGENAPP-3
>          URL: http://jira.codehaus.org/browse/MPGENAPP-3
>      Project: maven-genapp-plugin
>         Type: Improvement
>  Environment: All
>     Reporter: Sri Sankaran
>     Priority: Trivial
>      Fix For: 2.3

>
> Original Estimate: 3 hours
>         Remaining: 3 hours
>
> Currently, the genapp plugin assumes that ${basedir} is to be the top-level of the project being 'gen'ed.  The user doesn't realize that the plugin is going to write a bunch of files/directories to the current directory until *after* running it.
> It would be nice if we could prompt for a location.  I have tested that with simple code modifications to plugin.jelly & plugin.properties
> plugin.jelly:
> Step 1
> Replace all occurences of ${basedir} with ${projectRoot}.
> Step 2
> Add the following lines at line 92
> <!-- Get the project root -->
> <j:set var="projectRoot" value="${maven.genapp.projectRoot}"/>
> <j:if test="${empty(projectRoot)}">
>   <i:ask question="${maven.genapp.prompt.projectRoot}" 
>            answer="projectRoot"   
>           default="${basedir}/${maven.genapp.template.name}"/>
> </j:if>
> plugin.properties:
> Added the property setting
> maven.genapp.prompt.projectRoot=Please specify the project root directory:
> I can provide the modified files -- and related changes to properties.xml -- if you wish.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org