lib/jbundler/lock_down.rb in jbundler-0.7.1 vs lib/jbundler/lock_down.rb in jbundler-0.7.2

- old
+ new

@@ -49,11 +49,11 @@ end else puts '...' - deps = install_dependencies( debug, verbose ) + deps = install_dependencies( debug, verbose, jarfile.exists_lock? ) update_files( classpath, collect_jars( deps ) ) if needs_update vendor_it( vendor, deps ) if needs_vendor @@ -101,15 +101,15 @@ (jars[ :test ] || []).collect { |j| j.file }, (jars[ :jruby ] || []).collect { |j| j.file }, @config.local_repository ) end - def install_dependencies( debug, verbose ) + def install_dependencies( debug, verbose, exclude_transitive = false ) deps_file = File.join( File.expand_path( @config.work_dir ), 'dependencies.txt' ) - exec_maven( debug, verbose, deps_file ) + exec_maven( debug, verbose, deps_file, exclude_transitive ) result = [] File.read( deps_file ).each_line do |line| dep = Jars::JarInstaller::Dependency.new( line ) result << dep if dep @@ -117,17 +117,18 @@ result ensure FileUtils.rm_f( deps_file ) if deps_file end - def exec_maven( debug, verbose, output ) + def exec_maven( debug, verbose, output, exclude_transitive = false ) m = Maven::Ruby::Maven.new m.options[ '-f' ] = File.join( File.dirname( __FILE__ ), 'dependency_pom.rb' ) m.property( 'verbose', debug || verbose ) m.options[ '-q' ] = nil if !debug and !verbose m.options[ '-e' ] = nil if !debug and verbose m.options[ '-X' ] = nil if debug + m.options[ '-DexcludeTransitive' ] = exclude_transitive m.verbose = debug m.property( 'jbundler.outputFile', output ) @configurator.configure( m )