lib/java/idea.rb in buildr-1.2.0 vs lib/java/idea.rb in buildr-1.2.1

- old
+ new

@@ -34,11 +34,11 @@ m2repo = Buildr::Repositories.instance.local excludes = [ '**/.svn/', '**/CVS/' ].join('|') # Only for projects that are packageable. - task_name = project.path_to("#{project.name.sub(':', '-')}.iml") + task_name = project.path_to("#{project.name.gsub(':', '-')}.iml") idea.enhance [ file(task_name) ] # The only thing we need to look for is a change in the Buildfile. file(task_name=>sources) do |task| puts "Writing #{task.name}" if verbose @@ -121,11 +121,11 @@ end end # Root project aggregates all the subprojects. if project.parent == nil - task_name = project.path_to("#{project.name.sub(':', '-')}.ipr") + task_name = project.path_to("#{project.name.gsub(':', '-')}.ipr") idea.enhance [ file(task_name) ] file(task_name=>sources) do |task| puts "Writing #{task.name}" if verbose @@ -134,10 +134,11 @@ xml = Builder::XmlMarkup.new(:target=>partial, :indent=>2) xml.component(:name=>"ProjectModuleManager") do xml.modules do project.projects.each do |subp| module_name = subp.name.gsub(":", "-") - module_path = subp.name[/:(.*)/][1..-1] + module_path = subp.name.split(":"); module_path.shift + module_path = module_path.join("/") path = "#{module_path}/#{module_name}.iml" xml.module :fileurl=>"file://$PROJECT_DIR$/#{path}", :filepath=>"$PROJECT_DIR$/#{path}" end xml.module :fileurl=>"file://$PROJECT_DIR$/#{project.name}.iml", :filepath=>"$PROJECT_DIR$/#{project.name}.iml" end