lib/maven/tools/pom.rb in maven-tools-1.0.0.rc2 vs lib/maven/tools/pom.rb in maven-tools-1.0.0.rc3
- old
+ new
@@ -17,11 +17,10 @@
# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
require 'fileutils'
-require 'java' if defined? JRUBY_VERSION
require 'stringio'
require 'maven/tools/model'
require 'maven/tools/dsl'
require 'maven/tools/visitor'
require 'rubygems/specification'
@@ -29,13 +28,13 @@
module Maven
module Tools
class POM
include Maven::Tools::DSL
- def eval_spec( s )
+ def eval_spec( s, snapshot )
@model = tesla do
- spec s
+ spec s, nil, :snapshot => snapshot, :no_rubygems_repo => true
end
end
def eval_file( file )
if file && ::File.directory?( file )
@@ -58,12 +57,12 @@
@model = to_model( ::File.basename( file ) )
end
end
end
- def initialize( file = nil )
+ def initialize( file = nil, snapshot = false )
if file.is_a? Gem::Specification
- eval_spec( file )
+ eval_spec( file, snapshot )
else
eval_file( file )
end
end