[ 
http://jira.codehaus.org/browse/MNGSITE-97?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=191871#action_191871
 ] 

Sylvain MOUQUET commented on MNGSITE-97:
----------------------------------------

in my script, I select all goals like :
mvn pre-integration-test
mvn install

in MNG-3928, it provides generic goals for maven plugins (selected from 
http://repo1.maven.org/maven2/org/apache/maven/plugins/) like :
mvn help:effective-pom

i think it will be better to provide the 2 choice because my tool is specific 
of the current pom configuration and the MNG-3928 provides generic tools.







> Add enabled phases from current pom.xml for auto completion using BASH
> ----------------------------------------------------------------------
>
>                 Key: MNGSITE-97
>                 URL: http://jira.codehaus.org/browse/MNGSITE-97
>             Project: Maven 2 Project Web Site
>          Issue Type: Improvement
>            Reporter: Sylvain MOUQUET
>            Priority: Minor
>
> I provide a new feature which get all enabled phases from the current 
> pom.xml. I don't read the parent pom or settings.xml because it's difficult 
> to know which parent pom is used, and the current configuration (profile 
> activated, ...). And then it's a small tool, my goal was not corrupting the 
> performance of the bash
> #!/bin/bash
> _m2_make_goals()
> {
>   plugin=$1
>   mojos=$2
>   for mojo in $mojos
>   do
>     export goals="$goals $plugin:$mojo"
>   done
> }
> _m2_add_phases()
> {
>   for phase in `grep -i '<phase>' pom.xml | sed 
> 's/<phase>\(.*\)<\/phase>/\1/i'`
>   do
>     export goals="$goals $phase"
>   done
> }
> _m2_complete()
> {
>   local cur goals
>   COMPREPLY=()
>   cur=${COMP_WORDS[COMP_CWORD]}
>   if [ -f pom.xml ]; then
>       goals='clean compile test install package deploy site 
> help:effective-pom dependency:tree'
>       goals=$goals _m2_make_goals "eclipse" "eclipse"
>       goals=$goals _m2_add_phases
>   fi
>   COMPREPLY=($(compgen -W "${goals}" ${cur} | sed 's/\\\\//g') )
> }
> complete -F _m2_complete -o filenames mvn

-- 
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

        

Reply via email to