You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildr.apache.org by bo...@apache.org on 2009/11/13 22:30:48 UTC
svn commit: r836003 - in /buildr/trunk: CHANGELOG
lib/buildr/packaging/artifact.rb spec/packaging/artifact_spec.rb
Author: boisvert
Date: Fri Nov 13 21:30:48 2009
New Revision: 836003
URL: http://svn.apache.org/viewvc?rev=836003&view=rev
Log:
* Fixed: BUILDR-330 Install task should re-install artifact even if they
already exist (Alexis Midon)
Modified:
buildr/trunk/CHANGELOG
buildr/trunk/lib/buildr/packaging/artifact.rb
buildr/trunk/spec/packaging/artifact_spec.rb
Modified: buildr/trunk/CHANGELOG
URL: http://svn.apache.org/viewvc/buildr/trunk/CHANGELOG?rev=836003&r1=836002&r2=836003&view=diff
==============================================================================
--- buildr/trunk/CHANGELOG (original)
+++ buildr/trunk/CHANGELOG Fri Nov 13 21:30:48 2009
@@ -7,6 +7,8 @@
generated .classpath using:
eclipse.classpath_variables { :VAR => '/path/to/libraries' }
* Change: Updated to JRuby 1.4.0
+* Fixed: BUILDR-330 Install task should re-install artifact even if they
+ already exist (Alexis Midon)
* Fixed: BUILDR-334 Eclipse .classpath files use absolute paths for library
entries (Stefan Wasilewski)
* Fixed: BUILDR-327 Specifying :plugin eclipse nature explicitly fails
Modified: buildr/trunk/lib/buildr/packaging/artifact.rb
URL: http://svn.apache.org/viewvc/buildr/trunk/lib/buildr/packaging/artifact.rb?rev=836003&r1=836002&r2=836003&view=diff
==============================================================================
--- buildr/trunk/lib/buildr/packaging/artifact.rb (original)
+++ buildr/trunk/lib/buildr/packaging/artifact.rb Fri Nov 13 21:30:48 2009
@@ -199,7 +199,7 @@
#
# Note: You can enhance this task to create the artifact yourself, e.g. download it from
# a site that doesn't have a remote repository structure, copy it from a different disk, etc.
- class Artifact < Rake::FileCreationTask
+ class Artifact < Rake::FileTask
# The default artifact type.
DEFAULT_TYPE = :jar
Modified: buildr/trunk/spec/packaging/artifact_spec.rb
URL: http://svn.apache.org/viewvc/buildr/trunk/spec/packaging/artifact_spec.rb?rev=836003&r1=836002&r2=836003&view=diff
==============================================================================
--- buildr/trunk/spec/packaging/artifact_spec.rb (original)
+++ buildr/trunk/spec/packaging/artifact_spec.rb Fri Nov 13 21:30:48 2009
@@ -538,6 +538,13 @@
lambda { install.invoke }.should change { File.exist?(artifact(@spec).to_s) }.to(true)
end
+ it 'should re-install artifact when "from" is newer' do
+ install artifact(@spec).from(@file)
+ write artifact(@spec).to_s # install a version of the artifact
+ sleep 1; write @file # make sure the "from" file has newer modification time
+ lambda { install.invoke }.should change { File.exist?(artifact(@spec).to_s) and File.mtime(@file) == File.mtime(artifact(@spec).to_s) }.to(true)
+ end
+
it 'should install POM alongside artifact' do
write @file
install artifact(@spec).from(@file)