Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-dev] Re: aspectj-dev Digest, Vol 4, Issue 5

Hi Alex,

	I am looking to weave existing applications in my project.  There are
100s of jars and they all depend upon each other.  The dependencies are
contained within the Class-Path attribute of the manifest of each jar.  

I do not want to recurse through all the jars in the manifest of the
application I am starting.  I would like to just specify the application
jar in the aj.class.path and have the weaver find the jars I need from
the manifest class-paths.  This is how the default classloader works I
believe.

Right now I am required to know every single jar that is required and
specify it with aj.class.path.

example:

aj.jar's Class-Path= ../mike.jar /opt/task.jar
mike.jar's Class-Path=/opt/james.jar
task.jar's Class-Path=
james.jar's Class-Path=

currently aj.class.path would need be:
aj.jar:../mike.jar:/opt/task.jar:../james.jar

I would like:

aj.class.path=aj.jar

or at least 

aj.class.path= aj.jar:../mike.jar:/opt/task.jar

I would like this for 1.4 if possible as I do not know when we will move
to 1.5.

then we would just supply the original list to the weavingURLCLassloader
and it will weave the jars it needs as well.

thanks,
Mike


> Date: Fri, 10 Jun 2005 09:38:06 +0200
> From: Alexandre Vasseur <avasseur@xxxxxxxxx>
> Subject: Re: [aspectj-dev] WeavingURLClassLoader does not follow jar
> 	Class-Paths
> To: Wes Isberg <wes@xxxxxxxxxxxxxx>,	AspectJ developer discussions
> 	<aspectj-dev@xxxxxxxxxxx>
> Message-ID: <9aface87050610003851d61ba5@xxxxxxxxxxxxxx>
> Content-Type: text/plain; charset=ISO-8859-1
> 
> Mike,
> 
> Could you describe some more your use case. We could see if it will be
> adressed thru the load time weaving things that will surface in M3
> (based on -javaagent for Java 5 - tell us if you would like it on 1.3
> / 1.4 ).
> Perhaps the load time weaving (that will require at least a JVM
> option) will be too much for what you are trying to do ?
> 
> Alex
> 
> On 6/10/05, Wes Isberg <wes@xxxxxxxxxxxxxx> wrote:
> > Hi -
> > 
> > Sorry, this looks like another area where WeavingClassLoader
> > is more demonstration- than production-quality.  If someone
> > wants to make this work, we'd welcome a patch via an enhancement
> > request.
> > 
> > Thanks for pointing this out.
> > Wes
> > 
> > > ------------Original Message------------
> > > From: Mike Haladin <mike.haladin@xxxxxx>
> > > To: aspectj-dev@xxxxxxxxxxx
> > > Date: Tue, Jun-7-2005 7:51 AM
> > > Subject: [aspectj-dev] WeavingURLClassLoader does not follow jar Class-Paths
> > >
> > > Hello,
> > >
> > >       I am attempting to replace my project's customized URLClassLoader with
> > > the WeavingURLClassLoader.  However I find this difficult as it appears
> > > that WeavingURLClassLoader does not follow the class-path in the
> > > manifest of the provided jar files.
> > >
> > > Do I need to give it a full list of all jar files needed to the
> > > WeavingURLClassLoader? (In my code below this would be libs)
> > >
> > > or is there a way to force WeavingURLClassLoader to also weave and load
> > > the jars in the manifest Class-Path of the jars passed to it in
> > > variable
> > > libs?
> > >
> > >
> > > pointcut classloaderurl(URL[] libs, ClassLoader parent): call
> > > (URLClassLoader.new(..)) && args(libs, parent) && !this(classweaver);
> > >
> > >  URLClassLoader around (URL[] libs, ClassLoader parent) :
> > > classloaderurl(libs,parent)
> > >     {
> > >       URL[] aspectURLs;
> > >
> > >         URL url = null;
> > >
> > >         List urlList = new ArrayList();
> > >
> > >         try
> > >         {
> > >
> > >               url = makeURL("myaspect.jar");
> > >
> > >               if (url != null) urlList.add(url);
> > >
> > >         }
> > >         catch(URISyntaxException e)
> > >         {
> > >
> > >         }
> > >
> > > //      Add the Aspect URLs
> > >
> > >         aspectURLs = new URL[urlList.size()];
> > >
> > >       return(new WeavingURLClassLoader (libs, aspectURLs, parent));
> > >
> > >     }
> > >
> > > thanks,
> > > Mike Haladin
> > >
> > > --
> > >
> > > _______________________________________________
> > > aspectj-dev mailing list
> > > aspectj-dev@xxxxxxxxxxx
> > > https://dev.eclipse.org/mailman/listinfo/aspectj-dev
> > >
> > 
> > _______________________________________________
> > aspectj-dev mailing list
> > aspectj-dev@xxxxxxxxxxx
> > https://dev.eclipse.org/mailman/listinfo/aspectj-dev
> >
> 
> 
> ------------------------------
> 
> _______________________________________________
> aspectj-dev mailing list
> aspectj-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/aspectj-dev
> 
> 
> End of aspectj-dev Digest, Vol 4, Issue 5
> *****************************************
-- 


Back to the top