Skip to content

Instantly share code, notes, and snippets.

@headius
Created September 3, 2020 22:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save headius/cde16ee9fe14767549ed0036ec0a04dc to your computer and use it in GitHub Desktop.
Save headius/cde16ee9fe14767549ed0036ec0a04dc to your computer and use it in GitHub Desktop.
diff --git a/rakelib/commands.rake b/rakelib/commands.rake
index 988e73bbe1..6c1875b89c 100644
--- a/rakelib/commands.rake
+++ b/rakelib/commands.rake
@@ -13,6 +13,7 @@ def initialize_paths
ant.path(:id => "test.class.path") do
pathelement :path => File.join(BUILD_LIB_DIR, 'junit.jar')
+ pathelement :path => File.join(BUILD_LIB_DIR, 'annotation-api.jar')
pathelement :path => File.join(BUILD_LIB_DIR, 'livetribe-jsr223.jar')
pathelement :path => File.join(BUILD_LIB_DIR, 'bsf.jar')
pathelement :path => File.join(BUILD_LIB_DIR, 'commons-logging.jar')
diff --git a/rakelib/test.rake b/rakelib/test.rake
index 289228ace1..7c75cb8c24 100644
--- a/rakelib/test.rake
+++ b/rakelib/test.rake
@@ -25,7 +25,7 @@ namespace :test do
desc "Compile test code"
task :compile do
mkdir_p "test/target/test-classes"
- classpath = %w[lib/jruby.jar test/target/junit.jar].join(File::PATH_SEPARATOR)
+ classpath = %w[lib/jruby.jar test/target/junit.jar test/target/annotation-api.jar].join(File::PATH_SEPARATOR)
# try detecting javac - so we use the same Java versions as we're running (JAVA_HOME) with :
java_home = [ ENV_JAVA['java.home'], File.join(ENV_JAVA['java.home'], '..') ] # in case of jdk/jre
javac = java_home.map { |home| File.expand_path('bin/javac', home) }.find { |javac| File.exist?(javac) } || 'javac'
diff --git a/test/pom.rb b/test/pom.rb
index a172e0243d..11e2538678 100644
--- a/test/pom.rb
+++ b/test/pom.rb
@@ -25,6 +25,7 @@ project 'JRuby Integration Tests' do
scope :test do
jar 'junit:junit:4.11'
+ jar 'javax.annotation:javax.annotation-api:1.3.2'
jar 'commons-logging:commons-logging:1.1.3'
jar 'org.livetribe:livetribe-jsr223:2.0.7'
jar 'org.jruby:jruby-core', '${project.version}'
@@ -84,6 +85,13 @@ project 'JRuby Integration Tests' do
'overWrite' => 'false',
'outputDirectory' => 'target',
'destFileName' => 'junit.jar' },
+ { 'groupId' => 'javax.annotation',
+ 'artifactId' => 'javax.annotation-api',
+ 'version' => '1.3.2',
+ 'type' => 'jar',
+ 'overWrite' => 'false',
+ 'outputDirectory' => 'target',
+ 'destFileName' => 'annotation-api.jar' },
{ 'groupId' => 'com.googlecode.jarjar',
'artifactId' => 'jarjar',
'version' => '1.1',
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment