Add spring-build 2.2.3 and ensure build succeeds.
spring-build was previously included via an svn:external. Adding directly to the source tree under Git to avoid the need for a git submodule. In order to build from any earlier commit, it is recommended to export spring-build or symlink an existing copy into the root of the spring-framework project and then build normally. $ svn export https://src.springsource.org/svn/spring-build/tags/project-build-2.2.3 spring-build
This commit is contained in:
56
spring-build/scripts/project-gen/options.rb
Normal file
56
spring-build/scripts/project-gen/options.rb
Normal file
@@ -0,0 +1,56 @@
|
||||
Choice.options do
|
||||
|
||||
header ""
|
||||
header "Spring Build Project Generator v1.0"
|
||||
|
||||
option :project_name, :required => true do
|
||||
short '-n'
|
||||
long '--name'
|
||||
desc 'The name of the new project.'
|
||||
end
|
||||
|
||||
option :target do
|
||||
short '-t'
|
||||
long '--target'
|
||||
desc 'The target directory in which to create the new project.'
|
||||
default '.'
|
||||
end
|
||||
|
||||
option :organization do
|
||||
short '-o'
|
||||
long '--org'
|
||||
desc 'The organization name to include in the ivy.xml file.'
|
||||
default do
|
||||
project_name = Choice.choices[:project_name]
|
||||
project_name.split('.')[0..1].join(".")
|
||||
end
|
||||
end
|
||||
|
||||
option :archetype do
|
||||
short '-a'
|
||||
long '--archetype'
|
||||
desc 'The archetype of the project you are creating.'
|
||||
default 'standard'
|
||||
end
|
||||
|
||||
footer ""
|
||||
footer "--help This message."
|
||||
|
||||
end
|
||||
|
||||
# Nifty hack to support lazy defaulting of choices as they are retreived
|
||||
# Allows for blocks to be used as default values as well as static values
|
||||
c = class << Choice.choices; self end
|
||||
c.module_eval do
|
||||
|
||||
alias :do_get :[]
|
||||
|
||||
def [](name)
|
||||
v = do_get(name)
|
||||
if v.is_a? Proc
|
||||
v.call
|
||||
else
|
||||
v
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user