You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Erich Oswald <er...@ergon.ch> on 2006/11/28 11:59:08 UTC

Seeking advice on multimodule build with JBoss archive formats

Hi,

I've been trying to switch an existing build process from ant to maven 
to become more familiar with maven. The project's final artifact is an 
EAR that includes several other archives, which is why I went for a 
multi-module setup where each archive is inside its own module.

Basically everything works fine, except for one module that gives me 
headaches. One contained archive is a JBoss Hibernate archive (.har) 
(basically a .jar with additional Hibernate resource files, which 
JBoss deploys without further configuration). I'm using the 
jboss-packaging-maven-plugin from org.codehaus.mojo to create the .har 
and add the module as a dependency to all other modules that rely on 
the contained classes.

The problem I had was that maven would change the filename extension 
during install. The maintainer of the jboss-packaging-maven-plugin 
kindly put me on track and provided me with updated patches to 
http://jira.codehaus.org/browse/MOJO-449 . However, I fear that I'm 
also suffering from http://jira.codehaus.org/browse/MNG-1682 . 
MNG-1682 basically states that custom artifact handlers don't work 
with multi-module setups.

Can somebody give me some hints for a work-around? I have tried to 
take the .har module out of its parent pom and install it as a 
standalone module. Unfortunately it doesn't get added to the classpath 
and makes compilation of the modules that depend on it fail.

Another idea I have considered is to build the .har as a .jar. 
Building the problem should then be easy, except that I would have to 
rename the artifact in the generated EAR. Is there an easy way to 
rename the .jar to .har before or after it gets added to the EAR?

Any input welcome,
Erich

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Seeking advice on multimodule build with JBoss archive formats

Posted by Erich Oswald <er...@ergon.ch>.
Joachim Van der Auwera wrote:
> Erich Oswald wrote:
>> Hi,
>>
>> Another idea I have considered is to build the .har as a .jar. 
>> Building the problem should then be easy, except that I would have to 
>> rename the artifact in the generated EAR. Is there an easy way to 
>> rename the .jar to .har before or after it gets added to the EAR?
> Can you not set the module name using "bundleFileName", see 
> http://maven.apache.org/plugins/maven-ear-plugin/examples/customizing-a-module-filename.html 
> 
> 
> Kind regards,
> Joachim

Thank you Joachim, this is exactly what I was looking for! I can now 
use the .jar for dependency resolution and compiling and rename it to 
.har in the EAR for deployment.

Erich

Re: Seeking advice on multimodule build with JBoss archive formats

Posted by Joachim Van der Auwera <jo...@progs.be>.
Erich Oswald wrote:
> Hi,
>
> Another idea I have considered is to build the .har as a .jar. 
> Building the problem should then be easy, except that I would have to 
> rename the artifact in the generated EAR. Is there an easy way to 
> rename the .jar to .har before or after it gets added to the EAR?
Can you not set the module name using "bundleFileName", see 
http://maven.apache.org/plugins/maven-ear-plugin/examples/customizing-a-module-filename.html

Kind regards,
Joachim

-- 
Joachim Van der Auwera
PROGS bvba, progs.be


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org