If you are experience issues with maven and the appc goal with the maven plugin resulting in:
weblogic.utils.compiler.ToolFailureException: [J2EE:160127]ERROR: Could not delete previous archive
then read my answer below
If you are experience issues with maven and the appc goal with the maven plugin resulting in:
weblogic.utils.compiler.ToolFailureException: [J2EE:160127]ERROR: Could not delete previous archive
then read my answer below
This solution worked for me.
Firstly the order of the application.xml is important
if you are using the maven-ear-plugin, then ensure all of the modules listed are in dependency order in the pom
<modules>
<ejbModule></ejbModule>
</modules>
if not ensure that your application.xml is in dependency order
<module>
<ejb>rng.jar</ejb>
</module>
etc.
To clarify what i mean by dependency order.
If A depends on C, B depends on A, C depends on nothing. The order of specification should be C, A, B.
Secondly it seems there is some kind of validation on having EJB dependencies which are not necessary (you use none of the classes of that EJB). Using the first method I was able to reduce this down to 1 jar not being deleted. After this all of my jars were deleted from the temp directory.
The directory for reference was:
C:\Users\user\AppData\Local\Temp\appcgen_1439472796562_application.ear