Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Maven Commandline Interactive Mode

 
Joe Harry
Ranch Hand
Posts: 10124
3
Eclipse IDE Mac PPC Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Guys,

I would like to acheive something like the Maven archetype-generate plugin does. I have a Maven project and I have 3 different configurations for the project. When I build this project by calling mvn clean install, I want to show to the user 3 different configuration options namely. dev, test, reference and the user selects one of the option and hits enter. This should be then given as the input to the Maven pom file and Maven builds the project for that set of configuration values. Any suggestion on any plugin that would acheive this?
 
Peter Johnson
author
Bartender
Posts: 5852
7
Android Eclipse IDE Ubuntu
 
Tim Holloway
Saloon Keeper
Posts: 18303
56
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As a general rule, it's not a good idea to make either Maven or Ant scripts conversational. It can cause the build process to hang if the building person/application doesn't know that it should be chatting with the build and furthermore if there's an emergency and/or the original authors have been laid off (not uncommon these days), it's possible that whoever's trying to do the build may not know the proper responses. Of course some people would argue that that's a fitting means of revenge.

Profiles are a good alternative, as they can be supplied on the Maven command line or in a script that runs the maven command line.

For webapps, I myself don't do alternative builds except in cases like where the development machine is Tomcat and the target is something like an IBM iSeries WebSphere server. For more generic environments such as Windows, Linux, and Solaris, I put the personality information on the target server itself and let the app pick it up from there.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic