You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Arnljot Arntsen (JIRA)" <ji...@codehaus.org> on 2008/06/18 15:47:27 UTC

[jira] Commented: (MRESOURCES-8) maven-resources-plugin ignores configuration/resources property

    [ http://jira.codehaus.org/browse/MRESOURCES-8?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=138922#action_138922 ] 

Arnljot Arntsen commented on MRESOURCES-8:
------------------------------------------

We are experiencing the same problem here. Though through the MWAR-12 improvement which is supposed to let you process resources (such as web.xml).

If we put the resources and filter directly under build element in the pom, and change to jar. It's filtered and all is good. But no matter where and how we have the filter and resources (under build, under webResources or under configuration.resources) it's being completely ignored when having the packaging as war.

>From reading it seem's that it's a bug with MRESOURCES and not with MWAR?

> maven-resources-plugin ignores configuration/resources property
> ---------------------------------------------------------------
>
>                 Key: MRESOURCES-8
>                 URL: http://jira.codehaus.org/browse/MRESOURCES-8
>             Project: Maven 2.x Resources Plugin
>          Issue Type: Bug
>            Reporter: Leszek Gawron
>            Assignee: Brett Porter
>         Attachments: example.zip, MRESOURCES-8-workaround.patch, pom.xml
>
>
> I am evaluating maven + eclipse combo. In a trivial POM filtered resources exist only in target/classes. If one executes Project -> Clean under eclipse this information is lost. If filtered resources would appear as source folder they would survive cleaning and not got overriden by unfiltered ones.
> I have been trying to implement a scenario which would allow filtered resources to appear as "static" source folder under eclipse.
> The POM explains it best:
> <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/maven-v4_0_0.xsd">
>     <modelVersion>4.0.0</modelVersion>
>     <groupId>com.mobilebox.squash.client</groupId>
>     <artifactId>squash-client</artifactId>
>     <packaging>jar</packaging>
>     <version>1.0-SNAPSHOT</version>
>     <name>Maven Quick Start Archetype</name>
>     <url>http://maven.apache.org</url>
>     <build>
>         <plugins>
>             <plugin>
>                 <artifactId>maven-resources-plugin</artifactId>
>                 <executions>
>                     <execution>
>                         <id>prefilter-resources</id>
>                         <phase>generate-resources</phase>
>                         <goals>
>                             <goal>resources</goal>
>                         </goals>
>                         <configuration>
>                             <outputDirectory>target/generated-resources</outputDirectory>
>                             <resources>
>                                 <resource>
>                                     <directory>src/main/resource-templates</directory>
>                                     <filtering>true</filtering>
>                                 </resource>
>                             </resources>
>                         </configuration>
>                     </execution>
>                 </executions>
>             </plugin>
>         </plugins>
>         <filters>
>             <filter>${ffile}</filter>
>         </filters>
>         <resources>
>             <resource>
>                 <directory>src/main/resources</directory>
>             </resource>
>             <resource>
>                 <directory>target/generated-resources</directory>
>             </resource>
>         </resources>
>     </build>
>     <dependencies>
>         <dependency>
>             <groupId>junit</groupId>
>             <artifactId>junit</artifactId>
>             <version>3.8.1</version>
>             <scope>test</scope>
>         </dependency>
>     </dependencies>
>     <properties>
>         <ffile>filter.properties</ffile>
>     </properties>
> </project>
> thing is this part:
>                             <resources>
>                                 <resource>
>                                     <directory>src/main/properties</directory>
>                                     <filtering>true</filtering>
>                                 </resource>
>                             </resources>
> is completely ignored. Instead for both maven-resource-plugin executions (the one in generate-resources phase and the default one) this config is used:
>         <resources>
>             <resource>
>                 <directory>src/main/resources</directory>
>             </resource>
>             <resource>
>                 <directory>target/generated-resources</directory>
>             </resource>
>         </resources>
> which of course breaks the whole idea.
> Is this a bug or a design decision. In latter case is there any equivalent approach I might take?

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira