mirror of https://github.com/apache/maven.git
o applying brian's patch which makes this IT work with the new/old classworlds
git-svn-id: https://svn.apache.org/repos/asf/maven/core-integration-testing/trunk@486153 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
066ef42901
commit
44dd974c00
|
@ -132,38 +132,45 @@ public class Enhance
|
|||
{
|
||||
ClassLoader sysClassLoader = Thread.currentThread().getContextClassLoader();
|
||||
URL[] urls = null;
|
||||
Field field;
|
||||
try
|
||||
|
||||
if ( sysClassLoader instanceof URLClassLoader )
|
||||
{
|
||||
urls = ( (URLClassLoader) sysClassLoader ).getURLs();
|
||||
}
|
||||
else
|
||||
{
|
||||
Field field;
|
||||
try
|
||||
{
|
||||
|
||||
field = sysClassLoader.getClass().getDeclaredField( "realm" );
|
||||
field.setAccessible( true );
|
||||
ClassRealm realm = (ClassRealm) field.get( sysClassLoader );
|
||||
field = sysClassLoader.getClass().getDeclaredField( "realm" );
|
||||
field.setAccessible( true );
|
||||
ClassRealm realm = (ClassRealm) field.get( sysClassLoader );
|
||||
|
||||
urls = realm.getConstituents();
|
||||
urls = realm.getConstituents();
|
||||
}
|
||||
catch ( SecurityException e )
|
||||
{
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
}
|
||||
catch ( NoSuchFieldException e )
|
||||
{
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
}
|
||||
catch ( IllegalArgumentException e )
|
||||
{
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
}
|
||||
catch ( IllegalAccessException e )
|
||||
{
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
catch ( SecurityException e )
|
||||
{
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
}
|
||||
catch ( NoSuchFieldException e )
|
||||
{
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
}
|
||||
catch ( IllegalArgumentException e )
|
||||
{
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
}
|
||||
catch ( IllegalAccessException e )
|
||||
{
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
//URL[] urls = ( (URLClassLoader) sysClassLoader ).getURLs();
|
||||
|
||||
this.getLog().info( "Initial Classpath:" );
|
||||
for ( int i = 0; i < urls.length; i++ )
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue