Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 10 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,28 @@ on:

jobs:
ci:
runs-on: ubuntu-24.04
runs-on: ubuntu-latest

strategy:
fail-fast: false

matrix:
ruby: [jruby-9.4.9.0, 3.3]
java: [8]
ruby: ['jruby-10', 'jruby-9.4', '4.0', '3.4', '3.3']
java: [8, 25]
exclude:
- ruby: 'jruby-10' # JRuby 10 requires Java 21+
java: 8

steps:
- name: checkout
uses: actions/checkout@v2
uses: actions/checkout@v5

- name: Set up java
uses: actions/setup-java@v2
uses: actions/setup-java@v5
with:
distribution: zulu
java-version: ${{ matrix.java }}
distribution: 'temurin'
cache: maven

- name: Set up ruby
uses: ruby/setup-ruby@v1
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ Gemfile.lock
*.gem
.ruby-version
pom.maven-tools.gemspec.xml
.idea
Binary file removed .mvn/wrapper/maven-wrapper.jar
Binary file not shown.
4 changes: 3 additions & 1 deletion .mvn/wrapper/maven-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
distributionUrl=https://repo1.maven.org/maven2/org/apache/maven/apache-maven/3.9.9/apache-maven-3.9.9-bin.zip
wrapperVersion=3.3.4
distributionType=only-script
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.12/apache-maven-3.9.12-bin.zip
2 changes: 0 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,4 @@ source 'https://rubygems.org'

gemspec

gem "copyright-header", "1.0.8", :platform => :mri, :group => :copyright

# vim: syntax=Ruby
46 changes: 9 additions & 37 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -1,32 +1,23 @@
#-*- mode: ruby -*-

task :default => [ :specs ]

desc 'generate licenses data from internet'
task :licenses do
require 'open-uri'
require 'ostruct'
require 'json'

File.open( 'lib/maven/tools/licenses.rb', 'w' ) do |f|
url = 'http://opensource.org'
f.puts "require 'ostruct'"
url = 'https://opensource.org'
f.puts 'module Maven'
f.puts ' module Tools'
f.puts ' SpdxLicenseMeta = Struct.new(:short, :name, :url, keyword_init: true)'
f.puts ' LICENSES = {}'

open( url + '/licenses/alphabetical' ).each_line do |line|

if line =~ /.*"\/licenses\// and line =~ /<li>/
l = OpenStruct.new
line.sub!( /.*"(\/licenses\/([^"]*))">/ ) do
l.url = "http://opensource.org#{$1}"
l.short = $1.sub( /\/licenses\//, '' )
''
end
line.sub!( /\ \(.*$/, '' )
f.puts " LICENSES[ #{l.short.downcase.inspect} ] = OpenStruct.new :short => #{l.short.inspect}, :name => #{line.strip.inspect}, :url => #{l.url.inspect}"
end
end
JSON.parse(URI.open( url + '/api/licenses' ).read)
.select { |l| l["spdx_id"].size > 0 && l["name"].size > 0 }
.sort_by { |l| l["spdx_id"].downcase }
.each { |l| f.puts(" LICENSES[ #{l["spdx_id"].downcase.inspect} ] = SpdxLicenseMeta.new( short: #{l["spdx_id"].inspect}, name: #{l["name"].inspect}, url: #{l["_links"]["html"]["href"].inspect} ).freeze") }

f.puts ' LICENSES.freeze'
f.puts ' end'
f.puts 'end'
Expand All @@ -48,23 +39,4 @@ task :specs do
Dir['spec/**/*_spec.rb'].each { |f| require f.sub(/spec\//, '') }
end

task :headers do
require 'copyright_header'

s = Gem::Specification.load( Dir["*gemspec"].first )

args = {
:license => s.license,
:copyright_software => s.name,
:copyright_software_description => s.description,
:copyright_holders => s.authors,
:copyright_years => [Time.now.year],
:add_path => "lib:src",
:output_dir => './'
}

command_line = CopyrightHeader::CommandLine.new( args )
command_line.execute
end

# vim: syntax=Ruby
3 changes: 0 additions & 3 deletions lib/maven/tools/dsl.rb
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,6 @@ def model
@model
end

# TODO remove me
def needs_torquebox= t
end
# TODO remove me
def current
@current
Expand Down
186 changes: 115 additions & 71 deletions lib/maven/tools/licenses.rb

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion lib/maven/tools/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@
#
module Maven
module Tools
VERSION = '1.2.3'.freeze
VERSION = '1.2.4'.freeze
end
end
12 changes: 6 additions & 6 deletions lib/maven/tools/versions.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@ module Maven
module Tools
unless defined? VERSIONS
VERSIONS = {
:jar_plugin => "2.4",
:clean_plugin => "2.4",
:jruby_plugins => "3.0.0",
:clean_plugin => "3.5.0",
:jar_plugin => "3.5.0",
:jruby_plugins => "3.0.6",
:jruby9_plugins => "0.3.0",
:bundler_version => "1.10.6",
:jruby_version => "9.1.2.0",
:polyglot_version => "0.1.18",
:mavengem_wagon => "2.0.0"
:jruby_version => "9.4.14.0",
:polyglot_version => "0.8.1",
:mavengem_wagon => "2.0.2"
}.freeze
end
end
Expand Down
8 changes: 4 additions & 4 deletions maven-tools.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Gem::Specification.new do |s|

s.summary = 'helpers for maven related tasks'
s.description = 'adds versions conversion from rubygems to maven and vice versa, ruby DSL for POM (Project Object Model from maven), pom generators, etc'
s.homepage = 'http://github.com/torquebox/maven-tools'
s.homepage = 'https://github.com/jruby/maven-tools'

s.authors = ['Christian Meier']
s.email = ['m.kristian@web.de']
Expand All @@ -29,10 +29,10 @@ Gem::Specification.new do |s|
s.test_files += Dir['spec/**/*gem']

s.add_runtime_dependency 'virtus', '~> 1.0'
s.add_runtime_dependency 'bigdecimal' # virtus is EOL, but depends on axiom-types which has a bigdecimal dependency
s.add_runtime_dependency 'ostruct' # virtus is EOL, but depends on ostruct usage

# get them out from here until jruby-maven-plugin installs test gems somewhere else then runtime gems

s.add_development_dependency 'rake', '~> 10.0'
s.add_development_dependency 'rake', '~> 13.0'
s.add_development_dependency 'minitest', '~> 5.3'
end

Expand Down
Loading