You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Bernard Perchman <be...@macquarie.com> on 2008/10/02 04:14:49 UTC
RE: Putting file in META-INF in EAR
Actually you can do this much more simply: just add a
/src/main/application/META-INF folder to your build; the plugin will include
files here automatically. However, if you're working with Jboss and need to
add a jboss-app to include loader repository config (eg
<jboss-app>
<loader-repository>
javax.xml.ws:archive=my specific.ear
<loader-repository-config>
java2ParentDelegation=false
</loader-repository-config>
</loader-repository>
</jboss-app>
),
, you're now including a reference to the version of your ear file. You
want to make this dynamic, so you'd therefore need to add a <resource> tag
in your <build> and then set filtering to true.
Vikramaditya Garg wrote:
>
> My Friend
>
> Use the following configuration
>
> Initially you should add packaging to ear
>
> <packaging>ear</packaging>
>
> Then...configure ur more elements in POM
>
> <finalName>${application.id}-${pom.version}</finalName>
> <resources>
> <resource>
> <directory>src/main/config</directory>
> <targetPath>../</targetPath>
> <filtering>true</filtering>
> </resource>
> <resource>
> <directory>src/main/application</directory>
>
> <targetPath>../${application.id}-${pom.version}</targetPath>
> <filtering>true</filtering>
> </resource>
> </resources>
>
> You need to configure the plugins as well
>
> <plugins>
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-ear-plugin</artifactId>
> <version>2.1</version>
> <configuration>
> <includes>**/*.xml</includes>
> <excludes>**/jboss-app.xml</excludes>
> <version>1.4</version>
> <modules>
> <javaModule>
> <groupId>${pom.groupId}</groupId>
> <artifactId>app-common</artifactId>
>
> <includeInApplicationXml>true</includeInApplicationXml>
> </javaModule>
> <ejbModule>
> <groupId>${pom.groupId}</groupId>
> <artifactId>app-core</artifactId>
> </ejbModule>
> <webModule>
> <groupId>${pom.groupId}</groupId>
> <artifactId>app-web</artifactId>
> <contextRoot>/${application.id}</contextRoot>
> </webModule>
> </modules>
> </configuration>
> </plugin>
> </plugins>
> In the plugins element, you must specify the modules you configured.
>
> Please use the above configuration and notify in case of issue
>
> Thanks
> Vikramaditya Garg
>
>
> -----Original Message-----
> From: bjorn.de.bakker@accenture.com [mailto:bjorn.de.bakker@accenture.com]
> Sent: Tuesday, August 12, 2008 1:12 PM
> To: users@maven.apache.org
> Subject: Putting file in META-INF in EAR
>
> We want to create an EAR file and add some files to the META-INF
> directory. I've done some research on the internet, but without any luck
> so far. I've added this to my POM-file:
>
> <build>
> <resources>
> <resource>
> <directory>${basedir}/src/main/security</directory>
> <targetPath>META-INF</targetPath>
> <includes>
> <include>was.policy</include>
> </includes>
> </resource
> </resource>
> </build>
>
> But that doesn't work. Anyone else has an idea on how to do this? We use
> the maven-ear-plugin to create the EAR-file, but I haven't found anything
> in the documentation regarding this problem.
>
>
>
> This message is for the designated recipient only and may contain
> privileged, proprietary, or otherwise private information. If you have
> received it in error, please notify the sender immediately and delete the
> original. Any other use of the email by you is prohibited.
>
> **************** CAUTION - Disclaimer *****************
> This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended
> solely
> for the use of the addressee(s). If you are not the intended recipient,
> please
> notify the sender by e-mail and delete the original message. Further, you
> are not
> to copy, disclose, or distribute this e-mail or its contents to any other
> person and
> any such actions are unlawful. This e-mail may contain viruses. Infosys
> has taken
> every reasonable precaution to minimize this risk, but is not liable for
> any damage
> you may sustain as a result of any virus in this e-mail. You should carry
> out your
> own virus checks before opening the e-mail or attachment. Infosys reserves
> the
> right to monitor and review the content of all messages sent to or from
> this e-mail
> address. Messages sent to or from this e-mail address may be stored on the
> Infosys e-mail system.
> ***INFOSYS******** End of Disclaimer ********INFOSYS***
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
>
--
View this message in context: http://www.nabble.com/Putting-file-in-META-INF-in-EAR-tp18939464p19772329.html
Sent from the Maven - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org