Skip to content

Commit

Permalink
tests to ensure that org.objectweb.asm.* is repacked to another packa…
Browse files Browse the repository at this point in the history
…ge name

rounding up and fixes #2219
  • Loading branch information
mkristian committed Nov 21, 2014
1 parent 4d402cd commit eaa6ee3
Show file tree
Hide file tree
Showing 10 changed files with 162 additions and 4 deletions.
27 changes: 27 additions & 0 deletions maven/jruby-complete/src/it/integrity/pom.xml
Expand Up @@ -131,6 +131,33 @@
</arguments>
</configuration>
</execution>
<execution>
<id>ensure there is no org.objectweb.asm.ClassWriter</id>
<phase>test</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>java</executable>
<arguments>
<argument>-classpath</argument>
<!-- automatically creates the classpath using all project dependencies,
also adding the project build directory -->
<classpath/>
<argument>org.jruby.Main</argument>
<argument>-e</argument>
<!-- make sure openssl loads -->
<argument>
begin
import_java "org.objectweb.asm.ClassWriter"
raise "error there is org.objectweb.asm.ClassWriter on the classpath"
rescue NameError => e
puts "there is NO org.objectweb.asm.ClassWriter on the classpath"
end
</argument>
</arguments>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
Expand Down
7 changes: 6 additions & 1 deletion maven/jruby-complete/src/it/integrity/verify.bsh
Expand Up @@ -37,4 +37,9 @@ expected = "ffi,jar-dependencies,jruby-openssl,krypt,krypt-core,krypt-provider-j
if ( !log.contains( expected ) )
{
throw new RuntimeException( "log file does not contain '" + expected + "'" );
}
}
expected = "there is NO org.objectweb.asm.ClassWriter on the classpath";
if ( !log.contains( expected ) )
{
throw new RuntimeException( "log file does not contain '" + expected + "'" );
}
27 changes: 27 additions & 0 deletions maven/jruby-dist/src/it/integrity/pom.xml
Expand Up @@ -148,6 +148,33 @@
</arguments>
</configuration>
</execution>
<execution>
<id>ensure there is no org.objectweb.asm.ClassWriter</id>
<phase>test</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>java</executable>
<arguments>
<argument>-classpath</argument>
<!-- automatically creates the classpath using all project dependencies,
also adding the project build directory -->
<classpath/>
<argument>org.jruby.Main</argument>
<argument>-e</argument>
<!-- make sure openssl loads -->
<argument>
begin
import_java "org.objectweb.asm.ClassWriter"
raise "error there is org.objectweb.asm.ClassWriter on the classpath"
rescue NameError => e
puts "there is NO org.objectweb.asm.ClassWriter on the classpath"
end
</argument>
</arguments>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
Expand Down
5 changes: 5 additions & 0 deletions maven/jruby-dist/src/it/integrity/verify.bsh
Expand Up @@ -35,6 +35,11 @@ if ( !log.contains( expected ) )
}
expected = "ffi,jar-dependencies,jruby-openssl,krypt,krypt-core,krypt-provider-jdk";
if ( !log.contains( expected ) )
{
throw new RuntimeException( "log file does not contain '" + expected + "'" );
}
expected = "there is NO org.objectweb.asm.ClassWriter on the classpath";
if ( !log.contains( expected ) )
{
throw new RuntimeException( "log file does not contain '" + expected + "'" );
}
25 changes: 25 additions & 0 deletions maven/jruby-jars/src/it/integrity/pom.xml
Expand Up @@ -137,6 +137,31 @@
</arguments>
</configuration>
</execution>
<execution>
<id>ensure there is no org.objectweb.asm.ClassWriter</id>
<phase>test</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>java</executable>
<arguments>
<argument>-classpath</argument>
<argument>${gem.home}/gems/jruby-jars-${ruby.version}/lib/jruby-core-@project.version@.jar${path.separator}${gem.home}/gems/jruby-jars-${ruby.version}/lib/jruby-stdlib-@project.version@.jar</argument>
<argument>org.jruby.Main</argument>
<argument>-e</argument>
<!-- make sure openssl loads -->
<argument>
begin
import_java "org.objectweb.asm.ClassWriter"
raise "error there is org.objectweb.asm.ClassWriter on the classpath"
rescue NameError => e
puts "there is NO org.objectweb.asm.ClassWriter on the classpath"
end
</argument>
</arguments>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
Expand Down
7 changes: 6 additions & 1 deletion maven/jruby-jars/src/it/integrity/verify.bsh
Expand Up @@ -37,4 +37,9 @@ expected = "ffi,jar-dependencies,jruby-openssl,krypt,krypt-core,krypt-provider-j
if ( !log.contains( expected ) )
{
throw new RuntimeException( "log file does not contain '" + expected + "'" );
}
}
expected = "there is NO org.objectweb.asm.ClassWriter on the classpath";
if ( !log.contains( expected ) )
{
throw new RuntimeException( "log file does not contain '" + expected + "'" );
}
27 changes: 27 additions & 0 deletions maven/jruby-noasm/src/it/integrity/pom.xml
Expand Up @@ -131,6 +131,33 @@
</arguments>
</configuration>
</execution>
<execution>
<id>ensure there is no org.objectweb.asm.ClassWriter</id>
<phase>test</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>java</executable>
<arguments>
<argument>-classpath</argument>
<!-- automatically creates the classpath using all project dependencies,
also adding the project build directory -->
<classpath/>
<argument>org.jruby.Main</argument>
<argument>-e</argument>
<!-- make sure openssl loads -->
<argument>
begin
import_java "org.objectweb.asm.ClassWriter"
raise "error there is org.objectweb.asm.ClassWriter on the classpath"
rescue NameError => e
puts "there is NO org.objectweb.asm.ClassWriter on the classpath"
end
</argument>
</arguments>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
Expand Down
7 changes: 6 additions & 1 deletion maven/jruby-noasm/src/it/integrity/verify.bsh
Expand Up @@ -37,4 +37,9 @@ expected = "ffi,jar-dependencies,jruby-openssl,krypt,krypt-core,krypt-provider-j
if ( !log.contains( expected ) )
{
throw new RuntimeException( "log file does not contain '" + expected + "'" );
}
}
expected = "there is NO org.objectweb.asm.ClassWriter on the classpath";
if ( !log.contains( expected ) )
{
throw new RuntimeException( "log file does not contain '" + expected + "'" );
}
27 changes: 27 additions & 0 deletions maven/jruby/src/it/integrity/pom.xml
Expand Up @@ -131,6 +131,33 @@
</arguments>
</configuration>
</execution>
<execution>
<id>there is org.objectweb.asm.ClassWriter</id>
<phase>test</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>java</executable>
<arguments>
<argument>-classpath</argument>
<!-- automatically creates the classpath using all project dependencies,
also adding the project build directory -->
<classpath/>
<argument>org.jruby.Main</argument>
<argument>-e</argument>
<!-- make sure openssl loads -->
<argument>
begin
java_import "org.objectweb.asm.ClassWriter"
puts "there is org.objectweb.asm.ClassWriter on the classpath"
rescue NameError => e
raise "error there is NO org.objectweb.asm.ClassWriter on the classpath"
end
</argument>
</arguments>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
Expand Down
7 changes: 6 additions & 1 deletion maven/jruby/src/it/integrity/verify.bsh
Expand Up @@ -37,4 +37,9 @@ expected = "ffi,jar-dependencies,jruby-openssl,krypt,krypt-core,krypt-provider-j
if ( !log.contains( expected ) )
{
throw new RuntimeException( "log file does not contain '" + expected + "'" );
}
}
expected = "there is org.objectweb.asm.ClassWriter on the classpath";
if ( !log.contains( expected ) )
{
throw new RuntimeException( "log file does not contain '" + expected + "'" );
}

0 comments on commit eaa6ee3

Please sign in to comment.