maven-tools 1.0.8 → 1.0.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Mavenfile +1 -1
- data/lib/maven/tools/artifact.rb +12 -3
- data/lib/maven/tools/dsl.rb +5 -5
- data/lib/maven/tools/dsl/gemspec.rb +11 -3
- data/lib/maven/tools/dsl/project_gemspec.rb +2 -2
- data/lib/maven/tools/version.rb +1 -1
- data/lib/maven/tools/versions.rb +4 -3
- data/spec/artifact_spec.rb +2 -0
- data/spec/dsl/gemspec_spec/jars_and_poms.gemspec +1 -0
- data/spec/dsl/gemspec_spec/jars_and_poms.xml +1 -1
- data/spec/dsl/gemspec_spec/jars_and_poms_include_jars.xml +1 -1
- data/spec/dsl/gemspec_spec/maven-tools.xml +1 -1
- data/spec/dsl/profile_gemspec_spec/jars_and_poms.gemspec +1 -0
- data/spec/dsl/profile_gemspec_spec/jars_and_poms.xml +1 -1
- data/spec/dsl/profile_gemspec_spec/jars_and_poms_include_jars.xml +1 -1
- data/spec/dsl/profile_gemspec_spec/maven-tools.xml +1 -1
- data/spec/dsl/profile_gemspec_spec/no_gems.xml +1 -1
- data/spec/dsl/profile_gemspec_spec/snapshot.xml +1 -1
- data/spec/dsl/profile_gemspec_spec/unknown_license.xml +1 -1
- data/spec/dsl/project_gemspec_spec/extended.gemspec +2 -1
- data/spec/dsl/project_gemspec_spec/extended.xml +1 -1
- data/spec/dsl/project_gemspec_spec/jars_and_poms.gemspec +1 -0
- data/spec/dsl/project_gemspec_spec/jars_and_poms.xml +1 -1
- data/spec/dsl/project_gemspec_spec/jars_and_poms_include_jars.xml +1 -1
- data/spec/dsl/project_gemspec_spec/maven-tools.xml +1 -1
- data/spec/dsl/project_gemspec_spec/no_gems.xml +1 -1
- data/spec/dsl/project_gemspec_spec/profile.xml +1 -1
- data/spec/dsl/project_gemspec_spec/snapshot.xml +1 -1
- data/spec/dsl/project_gemspec_spec/unknown_license.xml +1 -1
- data/spec/gemfile/pom.xml +1 -1
- data/spec/gemfile_include_jars/pom.xml +1 -1
- data/spec/gemfile_with_access_to_model/pom.xml +1 -1
- data/spec/gemfile_with_custom_source/pom.xml +1 -1
- data/spec/gemfile_with_custom_source_and_custom_jarname/pom.xml +1 -1
- data/spec/gemfile_with_extras/pom.xml +1 -1
- data/spec/gemfile_with_groups/pom.xml +1 -1
- data/spec/gemfile_with_groups_and_lockfile/pom.xml +1 -1
- data/spec/gemfile_with_lock/pom.xml +1 -1
- data/spec/gemfile_with_path/pom.xml +2 -2
- data/spec/gemfile_with_platforms/pom.xml +1 -1
- data/spec/gemfile_with_source/pom.xml +1 -1
- data/spec/gemfile_with_source_and_custom_jarname/pom.xml +1 -1
- data/spec/gemfile_with_source_and_no_jar/pom.xml +1 -1
- data/spec/gemfile_with_test_group/pom.xml +1 -1
- data/spec/gemfile_without_gemspec/pom.xml +1 -1
- data/spec/gemspec/pom.xml +1 -1
- data/spec/gemspec_in_profile/pom.xml +1 -1
- data/spec/gemspec_include_jars/pom.xml +1 -1
- data/spec/gemspec_no_rubygems_repo/pom.xml +1 -1
- data/spec/gemspec_prerelease/pom.xml +1 -1
- data/spec/gemspec_prerelease_snapshot/pom.xml +1 -1
- data/spec/gemspec_with_access_to_model/pom.xml +1 -1
- data/spec/gemspec_with_custom_source/pom.xml +1 -1
- data/spec/gemspec_with_custom_source_and_custom_jarname/pom.xml +1 -1
- data/spec/gemspec_with_extras/pom.xml +1 -1
- data/spec/gemspec_with_jar_dependencies/pom.xml +1 -1
- data/spec/gemspec_with_prereleased_dependency/pom.xml +1 -1
- data/spec/gemspec_with_prereleased_dependency_and_no_repo/pom.xml +1 -1
- data/spec/gemspec_with_source/pom.xml +1 -1
- data/spec/gemspec_with_source_and_custom_jarname/pom.xml +1 -1
- data/spec/gemspec_with_source_and_no_jar/pom.xml +1 -1
- data/spec/pom_spec.rb +4 -0
- data/spec/pom_with_execute/pom.xml +6 -9
- metadata +288 -288
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 342743b3f2596450bde95c5c8d678310ed6e1667
|
4
|
+
data.tar.gz: 9ed724a3bca252ef6593b604ec344c798236ad06
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5fa8faaa1498cd12012e1c0ea38c652168eb544ea880581507e928bd86972f41b573b715064b8391b3064dfa4039477f24148c8a5d830f4cf184001aa25c3bce
|
7
|
+
data.tar.gz: ffeaf8c9cf0639ff6dfead3ec8fabf0536edd2f3f6b5c05133c966e7bf7754c58ef6fef5effca4e08241bb6994dd2207bb1e89efc20117863f701fbbeeece0dc
|
data/Mavenfile
CHANGED
@@ -9,7 +9,7 @@ end
|
|
9
9
|
#snapshot_repository :jruby, 'http://ci.jruby.org/snapshots/maven'
|
10
10
|
|
11
11
|
# (jruby-1.6.7 produces a lot of yaml errors parsing gemspecs)
|
12
|
-
properties( 'jruby.versions' => ['1.7.12', '1.7.19', '9.0.0.0.
|
12
|
+
properties( 'jruby.versions' => ['1.7.12', '1.7.19', '9.0.0.0.pre2'].join(','),
|
13
13
|
'jruby.modes' => ['1.9', '2.0','2.1'].join(','),
|
14
14
|
# just lock the versions
|
15
15
|
'jruby.version' => '1.7.19',
|
data/lib/maven/tools/artifact.rb
CHANGED
@@ -102,6 +102,11 @@ module Maven
|
|
102
102
|
end
|
103
103
|
|
104
104
|
def self.from_coordinate( coord )
|
105
|
+
exclusions = nil
|
106
|
+
coord.sub!(/:\[.+\]/) do |s|
|
107
|
+
exclusions = s[1..-1]
|
108
|
+
''
|
109
|
+
end
|
105
110
|
args = coord.split( /:/ )
|
106
111
|
# maven coordinates differ :(
|
107
112
|
if args.size == 5
|
@@ -109,6 +114,10 @@ module Maven
|
|
109
114
|
args[ 4 ] = args[ 3 ]
|
110
115
|
args[ 3 ] = classifier
|
111
116
|
end
|
117
|
+
if exclusions
|
118
|
+
args[ 4 ] ||= nil
|
119
|
+
args << exclusions
|
120
|
+
end
|
112
121
|
new( *args )
|
113
122
|
end
|
114
123
|
|
@@ -161,9 +170,9 @@ module Maven
|
|
161
170
|
end
|
162
171
|
private :prepare
|
163
172
|
|
164
|
-
|
165
|
-
|
166
|
-
|
173
|
+
unless defined? ATTRS
|
174
|
+
ATTRS = :type=, :group_id=, :artifact_id=, :version=, :classifier=, :exclusions=, :scope=
|
175
|
+
end
|
167
176
|
def method_missing( m, arg = nil )
|
168
177
|
if ATTRS.member? m
|
169
178
|
# setter
|
data/lib/maven/tools/dsl.rb
CHANGED
@@ -914,13 +914,13 @@ module Maven
|
|
914
914
|
|
915
915
|
# hook for polyglot maven to register those tasks
|
916
916
|
def add_execute_task( options, &block )
|
917
|
-
|
918
|
-
plugin!( 'io.
|
919
|
-
|
917
|
+
version = VERSIONS[ :polyglot_version ]
|
918
|
+
plugin!( 'io.takari.polyglot:polyglot-maven-plugin',
|
919
|
+
version ) do
|
920
920
|
execute_goal( :execute, options )
|
921
921
|
|
922
|
-
jar!( 'io.
|
923
|
-
|
922
|
+
jar!( 'io.takari.polyglot:polyglot-ruby',
|
923
|
+
version )
|
924
924
|
end
|
925
925
|
end
|
926
926
|
|
@@ -97,9 +97,9 @@ module Maven
|
|
97
97
|
def gem_specification( name )
|
98
98
|
path = File.expand_path( name )
|
99
99
|
spec_file = File.read( path )
|
100
|
-
|
100
|
+
if spec_file.start_with?( '--- !ruby/object:Gem::Specification' )
|
101
101
|
Gem::Specification.from_yaml( spec_file )
|
102
|
-
|
102
|
+
else
|
103
103
|
FileUtils.cd( @parent.basedir ) do
|
104
104
|
return eval( spec_file, nil, path )
|
105
105
|
end
|
@@ -142,7 +142,15 @@ module Maven
|
|
142
142
|
req.sub!( /#.*^/, '' )
|
143
143
|
method = req.sub(/\s.*$/, '' ).to_sym
|
144
144
|
line = req.sub(/^[^\s]*\s/, '' )
|
145
|
-
|
145
|
+
if respond_to? method
|
146
|
+
if spec.platform.to_s == 'java'
|
147
|
+
send method, line
|
148
|
+
else
|
149
|
+
warn "jar dependency found on non-java platform gem - ignoring: #{req}"
|
150
|
+
end
|
151
|
+
else
|
152
|
+
warn "unknown declaration: #{req}"
|
153
|
+
end
|
146
154
|
end
|
147
155
|
end
|
148
156
|
|
@@ -31,7 +31,7 @@ module Maven
|
|
31
31
|
def process( spec, name, options )
|
32
32
|
@parent.build.directory = '${basedir}/pkg'
|
33
33
|
version = spec.version.to_s
|
34
|
-
if spec.version.prerelease? && options[ :snapshot ] != false
|
34
|
+
if spec.version.prerelease? && options[ :snapshot ] != false && ! version.end_with?( '-SNAPSHOT' )
|
35
35
|
version += '-SNAPSHOT'
|
36
36
|
end
|
37
37
|
@parent.id "rubygems:#{spec.name}:#{version}"
|
@@ -43,7 +43,7 @@ module Maven
|
|
43
43
|
@parent.scm :url => spec.homepage, :connection => con
|
44
44
|
end
|
45
45
|
|
46
|
-
spec.licenses.each do |l|
|
46
|
+
spec.licenses.flatten.each do |l|
|
47
47
|
if Maven::Tools::LICENSES.include?(l.downcase)
|
48
48
|
lic = Maven::Tools::LICENSES[ l.downcase ]
|
49
49
|
@parent.license( :name => lic.short,
|
data/lib/maven/tools/version.rb
CHANGED
data/lib/maven/tools/versions.rb
CHANGED
@@ -24,10 +24,11 @@ module Maven
|
|
24
24
|
VERSIONS = {
|
25
25
|
:jar_plugin => "2.4",
|
26
26
|
:clean_plugin => "2.4",
|
27
|
-
:jruby_plugins => "1.0.
|
28
|
-
:bundler_version => "1.
|
27
|
+
:jruby_plugins => "1.0.9",
|
28
|
+
:bundler_version => "1.9.3",
|
29
29
|
:jruby_version => "1.7.19",
|
30
|
-
:tesla_version => "0.1.1"
|
30
|
+
:tesla_version => "0.1.1",
|
31
|
+
:polyglot_version => "0.1.18"
|
31
32
|
}.freeze
|
32
33
|
end
|
33
34
|
end
|
data/spec/artifact_spec.rb
CHANGED
@@ -6,6 +6,8 @@ describe Maven::Tools::Artifact do
|
|
6
6
|
it 'should convert from coordinate' do
|
7
7
|
Maven::Tools::Artifact.from_coordinate( 'sdas:das:jar:tes:123' ).to_s.must_equal 'sdas:das:jar:tes:123'
|
8
8
|
Maven::Tools::Artifact.from_coordinate( 'sdas:das:jar:123' ).to_s.must_equal 'sdas:das:jar:123'
|
9
|
+
Maven::Tools::Artifact.from_coordinate( 'sdas:das:jar:tes:123:[de:fr,gb:us]' ).to_s.must_equal 'sdas:das:jar:tes:123:[de:fr,gb:us]'
|
10
|
+
Maven::Tools::Artifact.from_coordinate( 'sdas:das:jar:123:[de:fr,gb:us]' ).to_s.must_equal 'sdas:das:jar:123:[de:fr,gb:us]'
|
9
11
|
end
|
10
12
|
|
11
13
|
it 'should setup artifact' do
|
@@ -13,6 +13,7 @@ Gem::Specification.new do |s|
|
|
13
13
|
|
14
14
|
s.license = 'MIT'
|
15
15
|
|
16
|
+
s.platform = 'java'
|
16
17
|
s.requirements << 'jar org.slf4j:slf4j-simple, 1.6.4'
|
17
18
|
s.requirements << 'pom org.jruby:jruby, 1.7.16'
|
18
19
|
s.requirements << 'jar org.jruby:jruby, 1.7.16, noasm, [org.jruby:jruby-stdlib]'
|
@@ -13,6 +13,7 @@ Gem::Specification.new do |s|
|
|
13
13
|
|
14
14
|
s.license = 'MIT'
|
15
15
|
|
16
|
+
s.platform = 'java'
|
16
17
|
s.requirements << 'jar org.slf4j:slf4j-simple, 1.6.4'
|
17
18
|
s.requirements << 'pom org.jruby:jruby, 1.7.16'
|
18
19
|
s.requirements << 'jar org.jruby:jruby, 1.7.16, noasm, [org.jruby:jruby-stdlib]'
|
@@ -6,7 +6,7 @@
|
|
6
6
|
<name>profile_gemspec_spec</name>
|
7
7
|
<properties>
|
8
8
|
<project.build.sourceEncoding>utf-8</project.build.sourceEncoding>
|
9
|
-
<jruby.plugins.version>1.0.
|
9
|
+
<jruby.plugins.version>1.0.9</jruby.plugins.version>
|
10
10
|
</properties>
|
11
11
|
<dependencies>
|
12
12
|
<dependency>
|
@@ -6,7 +6,7 @@
|
|
6
6
|
<name>profile_gemspec_spec</name>
|
7
7
|
<properties>
|
8
8
|
<project.build.sourceEncoding>utf-8</project.build.sourceEncoding>
|
9
|
-
<jruby.plugins.version>1.0.
|
9
|
+
<jruby.plugins.version>1.0.9</jruby.plugins.version>
|
10
10
|
</properties>
|
11
11
|
<dependencies>
|
12
12
|
<dependency>
|
@@ -6,7 +6,7 @@
|
|
6
6
|
<name>BASEDIR</name>
|
7
7
|
<properties>
|
8
8
|
<project.build.sourceEncoding>utf-8</project.build.sourceEncoding>
|
9
|
-
<jruby.plugins.version>1.0.
|
9
|
+
<jruby.plugins.version>1.0.9</jruby.plugins.version>
|
10
10
|
</properties>
|
11
11
|
<dependencies>
|
12
12
|
<dependency>
|
@@ -6,7 +6,7 @@
|
|
6
6
|
<name>profile_gemspec_spec</name>
|
7
7
|
<properties>
|
8
8
|
<project.build.sourceEncoding>utf-8</project.build.sourceEncoding>
|
9
|
-
<jruby.plugins.version>1.0.
|
9
|
+
<jruby.plugins.version>1.0.9</jruby.plugins.version>
|
10
10
|
</properties>
|
11
11
|
<repositories>
|
12
12
|
<repository>
|
@@ -6,7 +6,7 @@
|
|
6
6
|
<name>profile_gemspec_spec</name>
|
7
7
|
<properties>
|
8
8
|
<project.build.sourceEncoding>utf-8</project.build.sourceEncoding>
|
9
|
-
<jruby.plugins.version>1.0.
|
9
|
+
<jruby.plugins.version>1.0.9</jruby.plugins.version>
|
10
10
|
</properties>
|
11
11
|
<repositories>
|
12
12
|
<repository>
|
@@ -6,7 +6,7 @@
|
|
6
6
|
<name>profile_gemspec_spec</name>
|
7
7
|
<properties>
|
8
8
|
<project.build.sourceEncoding>utf-8</project.build.sourceEncoding>
|
9
|
-
<jruby.plugins.version>1.0.
|
9
|
+
<jruby.plugins.version>1.0.9</jruby.plugins.version>
|
10
10
|
</properties>
|
11
11
|
<repositories>
|
12
12
|
<repository>
|
@@ -11,8 +11,9 @@ Gem::Specification.new do |s|
|
|
11
11
|
s.authors = ['Christian Meier']
|
12
12
|
s.email = ['m.kristian@web.de']
|
13
13
|
|
14
|
-
s.license = 'MIT'
|
14
|
+
s.license = ['MIT']
|
15
15
|
|
16
|
+
s.platform = 'java'
|
16
17
|
s.requirements << 'jar org.slf4j:slf4j-simple, 1.6.4'
|
17
18
|
s.requirements << 'pom org.jruby:jruby, 1.7.16'
|
18
19
|
s.requirements << 'jar org.jruby:jruby, 1.7.16, noasm, [org.jruby:jruby-stdlib]'
|
@@ -13,6 +13,7 @@ Gem::Specification.new do |s|
|
|
13
13
|
|
14
14
|
s.license = 'MIT'
|
15
15
|
|
16
|
+
s.platform = 'java'
|
16
17
|
s.requirements << 'jar org.slf4j:slf4j-simple, 1.6.4'
|
17
18
|
s.requirements << 'pom org.jruby:jruby, 1.7.16'
|
18
19
|
s.requirements << 'jar org.jruby:jruby, 1.7.16, noasm, [org.jruby:jruby-stdlib]'
|
data/spec/gemfile/pom.xml
CHANGED
@@ -30,7 +30,7 @@
|
|
30
30
|
</scm>
|
31
31
|
<properties>
|
32
32
|
<project.build.sourceEncoding>utf-8</project.build.sourceEncoding>
|
33
|
-
<jruby.plugins.version>1.0.
|
33
|
+
<jruby.plugins.version>1.0.9</jruby.plugins.version>
|
34
34
|
<version_from_model>1.5.0</version_from_model>
|
35
35
|
</properties>
|
36
36
|
<repositories>
|
@@ -30,7 +30,7 @@
|
|
30
30
|
</scm>
|
31
31
|
<properties>
|
32
32
|
<project.build.sourceEncoding>utf-8</project.build.sourceEncoding>
|
33
|
-
<jruby.plugins.version>1.0.
|
33
|
+
<jruby.plugins.version>1.0.9</jruby.plugins.version>
|
34
34
|
<tesla.dump.pom>pom.xml</tesla.dump.pom>
|
35
35
|
<tesla.dump.readonly>true</tesla.dump.readonly>
|
36
36
|
</properties>
|
@@ -17,7 +17,7 @@
|
|
17
17
|
<name>gemfile_with_groups</name>
|
18
18
|
<properties>
|
19
19
|
<project.build.sourceEncoding>utf-8</project.build.sourceEncoding>
|
20
|
-
<jruby.plugins.version>1.0.
|
20
|
+
<jruby.plugins.version>1.0.9</jruby.plugins.version>
|
21
21
|
</properties>
|
22
22
|
<dependencies>
|
23
23
|
<dependency>
|