maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Maczka Michal <michal.mac...@imtf.ch>
Subject RE: extra files in META-INF
Date Fri, 08 Oct 2004 09:27:13 GMT


> -----Original Message-----
> From: Charles N. Harvey III [mailto:charlieh@alloy.com]
> Sent: Thursday, October 07, 2004 5:37 PM
> To: Maven Users List
> Subject: extra files in META-INF
> 
> 
> Hello.
> I am trying to use Hivemind and it requires that my config 
> files get placed
> in the META-INF directory of my jar file.  So far, from the 
> jar plugin, I
> can't seem to figure out where I should place these files and what 
> properties
> I have to set to get them built into the jar.
> 
> project/
>     /src/
>        /main/
>           /java/
>           /resources/
>              log4j.properties
>           /descriptor/
>              my-modules.xml
> 
> Everything in /resources/ gets into the top level "directory" of the 
> compiled
> jar.  But how do I get files into project.jar/META-INF/?  
> Should/can I 
> put them
> in /descriptor/?  Should I put them somewhere else?  The only options 
> that I can
> see in the jar plugin are to add extra information to the 
> file that Maven
> generates.
> 
> Any help is much appreciated.
> 

There are two possiblities

a) you can structure it like:
    resources/
            log4j.properties
            META-INF/
               my-modules.xml

b) you can use targetPath element in defiition of your resources

     <resource>
        <directory>${basedir}/src/resources/descriptor</directory>
        <targetPath>META-INF</targetPath>
        <includes>
          <include>*.xml</include>
        </includes>
      </resource>


I prefer a) as it is also supported by IDEs like IDEA or Eclipse. 

Michal

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


Mime
View raw message