buildr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From as...@apache.org
Subject svn commit: r598907 - in /incubator/buildr/trunk: CHANGELOG lib/buildr.rb lib/java/artifact.rb lib/java/packaging.rb test/artifact.rb test/packaging.rb
Date Wed, 28 Nov 2007 08:26:02 GMT
Author: assaf
Date: Wed Nov 28 00:26:01 2007
New Revision: 598907

URL: http://svn.apache.org/viewvc?rev=598907&view=rev
Log:
Fixed: Artifact.pom resolves artifact without classifier

Modified:
    incubator/buildr/trunk/CHANGELOG
    incubator/buildr/trunk/lib/buildr.rb
    incubator/buildr/trunk/lib/java/artifact.rb
    incubator/buildr/trunk/lib/java/packaging.rb
    incubator/buildr/trunk/test/artifact.rb
    incubator/buildr/trunk/test/packaging.rb

Modified: incubator/buildr/trunk/CHANGELOG
URL: http://svn.apache.org/viewvc/incubator/buildr/trunk/CHANGELOG?rev=598907&r1=598906&r2=598907&view=diff
==============================================================================
--- incubator/buildr/trunk/CHANGELOG (original)
+++ incubator/buildr/trunk/CHANGELOG Wed Nov 28 00:26:01 2007
@@ -1,6 +1,9 @@
+1.2.11 (Pending)
+* Fixed: Artifact.pom resolves artifact without classifier, i.e org.testng:testng:jar:jdk15:5.1
uses org.testng:testng:pom:5.1 (Tommy).
+
 1.2.10 (11/26/2007)
 * Changed: Resources sets permission on copied files to make them read/write-able.
-* Changed: Artifact download no longer generates destination directory if not downloaded.
+* Changed: Artifact download no longer generates destination directory if not downloaded
(Antoine).
 * Fixed: EOL in MANIFEST.MF.
 * Fixed: Bunch of typos, courtesy of Merlyn Albery-Speyer and Soemirno Kartosoewito.
 

Modified: incubator/buildr/trunk/lib/buildr.rb
URL: http://svn.apache.org/viewvc/incubator/buildr/trunk/lib/buildr.rb?rev=598907&r1=598906&r2=598907&view=diff
==============================================================================
--- incubator/buildr/trunk/lib/buildr.rb (original)
+++ incubator/buildr/trunk/lib/buildr.rb Wed Nov 28 00:26:01 2007
@@ -30,7 +30,7 @@
 
 
 module Buildr
-  VERSION = "1.2.10".freeze # unless const_defined?(:VERSION)
+  VERSION = "1.2.11".freeze # unless const_defined?(:VERSION)
 end
 
 

Modified: incubator/buildr/trunk/lib/java/artifact.rb
URL: http://svn.apache.org/viewvc/incubator/buildr/trunk/lib/java/artifact.rb?rev=598907&r1=598906&r2=598907&view=diff
==============================================================================
--- incubator/buildr/trunk/lib/java/artifact.rb (original)
+++ incubator/buildr/trunk/lib/java/artifact.rb Wed Nov 28 00:26:01 2007
@@ -74,7 +74,7 @@
     # Convenience method that returns a POM artifact.
     def pom()
       return self if type == :pom
-      Buildr.artifact(:group=>group, :id=>id, :version=>version, :type=>:pom,
:classifier=>classifier)
+      Buildr.artifact(:group=>group, :id=>id, :version=>version, :type=>:pom)
     end
 
     # :call-seq:

Modified: incubator/buildr/trunk/lib/java/packaging.rb
URL: http://svn.apache.org/viewvc/incubator/buildr/trunk/lib/java/packaging.rb?rev=598907&r1=598906&r2=598907&view=diff
==============================================================================
--- incubator/buildr/trunk/lib/java/packaging.rb (original)
+++ incubator/buildr/trunk/lib/java/packaging.rb Wed Nov 28 00:26:01 2007
@@ -336,10 +336,7 @@
         package.extend ActsAsArtifact
         package.send :apply_spec, Hash[*Artifact::ARTIFACT_ATTRIBUTES.map { |k| [ k,options[k]]
}.flatten]
         # Another task to create the POM file.
-        pom_spec = package.to_spec_hash.merge(:type=>:pom)
-        pom = file(Buildr.repositories.locate(pom_spec))
-        pom.extend ActsAsArtifact
-        pom.send :apply_spec, pom_spec
+        pom = package.pom
         pom.enhance do
           mkpath File.dirname(pom.name), :verbose=>false
           File.open(pom.name, "w") { |file| file.write pom.pom_xml }

Modified: incubator/buildr/trunk/test/artifact.rb
URL: http://svn.apache.org/viewvc/incubator/buildr/trunk/test/artifact.rb?rev=598907&r1=598906&r2=598907&view=diff
==============================================================================
--- incubator/buildr/trunk/test/artifact.rb (original)
+++ incubator/buildr/trunk/test/artifact.rb Wed Nov 28 00:26:01 2007
@@ -53,7 +53,7 @@
 
   it "should have associated POM artifact" do
     @artifact.pom.to_hash.should == @artifact.to_hash.merge(:type=>:pom)
-    @classified.pom.to_hash.should == @classified.to_hash.merge(:type=>:pom)
+    @classified.pom.to_hash.should == @classified.to_hash.merge(:type=>:pom).except(:classifier)
   end
 
   it "should download file if file does not exist" do

Modified: incubator/buildr/trunk/test/packaging.rb
URL: http://svn.apache.org/viewvc/incubator/buildr/trunk/test/packaging.rb?rev=598907&r1=598906&r2=598907&view=diff
==============================================================================
--- incubator/buildr/trunk/test/packaging.rb (original)
+++ incubator/buildr/trunk/test/packaging.rb Wed Nov 28 00:26:01 2007
@@ -272,9 +272,9 @@
 
   it "should create a POM artifact in local repository" do
     define("foo", :version=>"1.0") { package(:jar, :classifier=>"srcs") }
-    Artifact.lookup("foo:foo:pom:srcs:1.0").should_not be_nil
-    Artifact.lookup("foo:foo:pom:srcs:1.0").should be(project("foo").packages.first.pom)
-    repositories.locate("foo:foo:pom:srcs:1.0").should eql(project("foo").packages.first.pom.to_s)
+    Artifact.lookup("foo:foo:pom:1.0").should_not be_nil
+    Artifact.lookup("foo:foo:pom:1.0").should be(project("foo").packages.first.pom)
+    repositories.locate("foo:foo:pom:1.0").should eql(project("foo").packages.first.pom.to_s)
   end
 
   it "should create POM artifact that creates its own POM" do
@@ -287,7 +287,6 @@
   <groupId>bar</groupId>
   <artifactId>foo</artifactId>
   <version>1.0</version>
-  <classifier>srcs</classifier>
 </project>
 POM
     )



Mime
View raw message