[ 
https://issues.apache.org/jira/browse/LABS-201?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12659827#action_12659827
 ] 

Simone Gianni commented on LABS-201:
------------------------------------

The basic procedure is there.

Currently calling mvn magma:war will effectively take each single dependency 
jar file, unjar it, run aspectj on it, run openjpa enhancer where needed, 
repack the jar.

It does not yet creates a complete war out of it, but that is trivial.

The AspectJ part has been carved out to a new class, AjcLauncher, which hides 
some specific problems and acts as a programmatic interface to Ajc. The same 
should be done for other steps, so that there will be a magma-builder package 
able to build a project executing all the necessary steps.

The openJPA enhancement is, right now, simply cabled in. It should be possible 
to plug different external enhancers, based on the presence of some 
dependencies in the project. This could be achieved having a single interface 
to "enhance classes in this folder", a way to determine the order of this 
enhancements (say, aspectj = 1, OpenJPA = 2, TopLink = 2 , something else = 3), 
and a way to find the proper enhancer given the presence of a certain 
dependency (could be the presence of a file in the jar pointing to the class 
name of the enhancer? could be another artifact with a naming convention?).

Once this works correctly, it could be possible from magma:run to check for 
source modifications, run the ajc compiler on modified .java / .aj files, the 
run all required enhancements on resulting classes, and reload the webapp if 
not redefine those classes in the classloader to obtain complete RAD.

> Full build system
> -----------------
>
>                 Key: LABS-201
>                 URL: https://issues.apache.org/jira/browse/LABS-201
>             Project: Labs
>          Issue Type: New Feature
>          Components: Magma
>    Affects Versions: Current
>            Reporter: Simone Gianni
>            Assignee: Simone Gianni
>             Fix For: Current
>
>
> Currently Magma runs in a LTW environment, which is good for development. The 
> final build system should create a complete WAR, performing all the necessary 
> weaving optimized.
> This task is not simple as it may seem, because each jar to be included in 
> the WAR have to be passed thru the weaver, and then repackaged to form the 
> weaved version, avoiding to place duplicated classes (coming from different 
> jars) in the same output jar. 
> It needs to be investigated wether playing with current AspectJ configuration 
> (inpath, aspectpath, classpath, outjar) and iterating over every jar could be 
> enough, or not.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to