Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support to include multiple dirs when build jar #19

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/red_storm/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def run(args)
if args.size > 0
if ["install", "examples", "jar"].include?(args[0])
load(TASKS_FILE)
Rake::Task[args.shift].invoke(*args)
Rake::Task[args.shift].invoke(args.join(":"))
elsif args.size == 2 && ["local"].include?(args[0]) && File.exist?(args[1])
load(TASKS_FILE)
Rake::Task['launch'].invoke(*args)
Expand All @@ -24,4 +24,4 @@ def run(args)
end
end
end
end
end
6 changes: 4 additions & 2 deletions lib/tasks/red_storm.rake
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ task :devjar => [:unpack, :clean_jar] do
puts("\nRedStorm generated dev jar file #{TARGET_CLUSTER_JAR}")
end

task :jar, [:dir] => [:unpack, :clean_jar] do |t, args|
task :jar, [:dirs] => [:unpack, :clean_jar] do |t, args|
ant.jar :destfile => TARGET_CLUSTER_JAR do
fileset :dir => TARGET_CLASSES_DIR
fileset :dir => TARGET_DEPENDENCY_UNPACKED_DIR
Expand All @@ -96,7 +96,9 @@ task :jar, [:dir] => [:unpack, :clean_jar] do |t, args|
exclude :name => "tasks/**"
end
fileset :dir => CWD do
include :name => "#{args[:dir]}/**/*"
args[:dirs].split(":").each { |dir|
include :name => "#{dir}/**/*"
}
end
manifest do
attribute :name => "Main-Class", :value => "redstorm.TopologyLauncher"
Expand Down