You're hacking the ear's plugin own resource directory with a standard
resource. This "own resource dir" was a design error in the early
days.

Anyway,  you might be able to configure a custom execution of the
resource plugin with filtering enabled. But move your files out of
src/main/application first. There's an issue in Jira to automatically
support filtering for this directory. I guess I'll do that.

Vote/comment if you're interested.

Thanks,
Stéphane

Move your stuff to src/main/resources

On 8/28/07, Jonathan Chen <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> I'm running Maven 2.0.7 and I'm trying to get resource filtering
> working with m2's ear plugin. I have a file which I'm trying to get
> certain properties replaced on a "mvn package".
>
>  src/main/application/META-INF/geronimo.xml:
>     <?xml version="1.0" encoding="UTF-8"?>
>     <application
>         xmlns="http://geronimo.apache.org/xml/ns/j2ee/application-1.2";
>         xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.2";>
>       <environment
>           xmlns="http://geronimo.apache.org/xml/ns/deployment-1.2";>
>         <moduleId>
>           <groupId>${pom.groupId}</groupId>
>           <artifactId>${pom.artifactId}</artifactId>
>           <version>${pom.version}</version>
>           <type>ear</type>
>         </moduleId>
>       </environment>
>     </application>
>
> Ideally, the ${pom.*} properties are replaced with the values from
> pom.xml; but for some reason, I can't seem to get it working with:
>
>   pom.xml:
>     <?xml version="1.0" encoding="UTF-8"?>
>     <project
>         xmlns="http://maven.apache.org/POM/4.0.0";
>         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
>                             http://maven.apache.org/xsd/maven-4.0.0.xsd";>
>
>       <modelVersion>4.0.0</modelVersion>
>
>       <name>EAR goal test</name>
>
>       <groupId>test</groupId>
>       <artifactId>ear-goal</artifactId>
>       <version>1.0-SNAPSHOT</version>
>       <packaging>ear</packaging>
>
>       <build>
>         <resources>
>           <resource>
>             <filtering>true</filtering>
>             <directory>src/main/application/META-INF</directory>
>             <includes>
>                   <include>*.xml</include>
>             </includes>
>           </resource>
>         </resources>
>
>         <plugins>
>           <plugin>
>             <groupId>org.apache.maven.plugins</groupId>
>             <artifactId>maven-ear-plugin</artifactId>
>             <configuration>
>                   <version>5</version>
>             </configuration>
>           </plugin>
>         </plugins>
>       </build>
>     </project>
>
> Can anyone on the list see what I'm doing wrong? Any help appreciated.
>
> Cheers.
> --
> Jonathan Chen <[EMAIL PROTECTED]>
> ----------------------------------------------------------------------
>                                 Don't worry about avoiding temptation,
>                             as you grow older, it starts avoiding you.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
Large Systems Suck: This rule is 100% transitive. If you build one,
you suck" -- S.Yegge

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to