Issue Details (XML | Word | Printable)

Key: MPGENAPP-3
Type: Improvement Improvement
Status: Closed Closed
Resolution: Fixed
Priority: Trivial Trivial
Assignee: Felipe Leme
Reporter: Sri Sankaran
Votes: 2
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
Maven 1.x Application Generation Plugin

Genapp to prompt for project root

Created: 18/Oct/03 03:53 PM   Updated: 28/Oct/05 08:28 PM   Resolved: 28/Oct/05 08:28 PM
Return to search
Component/s: None
Affects Version/s: None
Fix Version/s: 2.3

Time Tracking:
Original Estimate: 3 hours
Original Estimate - 3 hours
Remaining Estimate: 3 hours
Remaining Estimate - 3 hours
Time Spent: Not Specified
Time Spent - Not Specified

Environment: All


 Description  « Hide

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.



dion gillard made changes - 09/Nov/03 08:53 AM
Field Original Value New Value
Fix Version/s 1.1 [ 10211 ]
Jason van Zyl made changes - 30/Nov/03 03:44 PM
Component/s plugin-genapp [ 10332 ]
Fix Version/s 1.1 [ 10211 ]
Key MAVEN-948 MPGENAPP-3
Affects Version/s 1.0-rc2 [ 10245 ]
Project maven [ 10030 ] maven-genapp-plugin [ 10334 ]
Arnaud Heritier made changes - 16/Aug/04 05:57 PM
Assignee Arnaud HERITIER [ aheritier ]
Arnaud Heritier made changes - 22/Aug/05 06:40 AM
Assignee Arnaud Heritier [ aheritier ]
Lukas Theussl made changes - 28/Oct/05 01:02 AM
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.
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/s 2.3 [ 11360 ]
Felipe Leme made changes - 28/Oct/05 08:08 PM
Assignee Felipe Leme [ felipeal ]
Felipe Leme added a comment - 28/Oct/05 08:28 PM

Closed.
Note though that I used the maven.genapp.basedir.prompt and maven.genapp.basedir as properties (sorry, I had used those properties while fixing MPGENAPP-24).


Felipe Leme made changes - 28/Oct/05 08:28 PM
Resolution Fixed [ 1 ]
Status Open [ 1 ] Closed [ 6 ]