[ http://jira.codehaus.org/browse/MEAR-49?page=comments#action_80566 ] 
            
Ian Springer commented on MEAR-49:
----------------------------------

It happens when the "dev" profile I mentioned in an earlier issue is enabled. 
When dev mode is enabled, things get build directly to the test deployment 
location, rather than somewhere under target (this is done by using a custom 
plugin that allows project.build.directory and/or project.build.outputDirectory 
to be overridden). In this case, we have a couple of jars which are part of our 
reactor build. When dev mode is enabled, these jars will get built directly to 
/.../myjboss/.../deploy/my.ear/lib/ rather than to target/ (because 
project.build.directory has been overridden). When the ear pom in the same 
reactor is reached later in the build, the "file" fields of the in-memory 
ActiveProjectArtifacts that represent the two afore-mentioned jars are set to  
/.../myjboss/.../deploy/my.ear/lib/xxx.jar. And the destination path that the 
ear plugin computes will also end up pointing to 
/.../myjboss/.../deploy/my.ear/lib/xxx.jar. So the jar has already been placed 
where it needs to go earlier in the reactor build.

In case you actually want to try to reproduce this, I'll attach the custom 
plugin I mentioned which has two goals - one that allows you to override 
project.build.directory and another that allows you to override 
project.build.outputDirectory.


> if an artifact in the list of ear modules already exists in the ear, the ear 
> mojo will copy it on top of itself, zeroing out the file
> -------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: MEAR-49
>                 URL: http://jira.codehaus.org/browse/MEAR-49
>             Project: Maven 2.x Ear Plugin
>          Issue Type: Bug
>    Affects Versions: 2.2
>            Reporter: Ian Springer
>         Assigned To: Stephane Nicoll
>             Fix For: 2.3
>
>         Attachments: skip-already-deployed-module.patch
>
>
> The ear plugin doesn't check for artifacts that are already deployed within 
> the ear, and so ends up redundantly copying such artifacts, e.g.:
> copy C:/appserver/deploy/my.ear/lib/my.jar 
> C:/appserver/deploy/my.ear/lib/my.jar 
> and when you copy a file onto itself using the Plexus copy util method, it 
> zeros out the file (a bug in itself IMO but that's beside the point :).
> A check should be added, so the ear plugin intelligently handles this, albeit 
> unusual, case.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira


Reply via email to