[jira] Commented: (MRESOURCES-8) maven-resources-plugin ignores configuration/resources property
[ http://jira.codehaus.org/browse/MRESOURCES-8?page=comments#action_58869 ] Dan Allen commented on MRESOURCES-8: I must chime in here because the root cause of this issue report has caused me extreme headaches. In my mind, and everyone sitting around me on the CM team, this is a *MAJOR* oversight in the resources plugin. Regardless of how it is fixed, it really just needs to be fixed (to get it out there) and then refactored. I will explain my use case and prove how badly we need this patch to go in (otherwise we will forever maintain our own version of this plugin to get our job done). Our goal is to use profiles to search/replace tokens in the {{src/deploy/webinf}} directory to end up in the final package (war file). We do this by setting up a plugin execution to run maven-resources-plugin during the process-resources phase. The snippet is as follows: webinf-resources process-resources resources ${project.build.directory}/${project.build.finalName} WEB-INF ${basedir}/src/deploy/webinf true In the current version of the plugin, these resources are simply ignored. The plugin must be used because both the output directory and the target path need to be specified (no other combination is possible, trust me, I tried everything). Is there really any reason why the resources configuration node cannot simply be handled in the plugin without major refactorings? > maven-resources-plugin ignores configuration/resources property > --- > > Key: MRESOURCES-8 > URL: http://jira.codehaus.org/browse/MRESOURCES-8 > Project: Maven 2.x Resources Plugin > Type: Bug > Reporter: Leszek Gawron > Assignee: Brett Porter > Attachments: MRESOURCES-8-workaround.patch, example.zip, 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: > 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";> > 4.0.0 > com.mobilebox.squash.client > squash-client > jar > 1.0-SNAPSHOT > Maven Quick Start Archetype > http://maven.apache.org > > > > maven-resources-plugin > > > prefilter-resources > generate-resources > > resources > > > > target/generated-resources > > > > src/main/resource-templates > true > > > > > > > > > ${ffile} > > > > src/main/resources > > > target/generated-resources > > > > > > junit > junit > 3.8.1 > test > > > > filter.properties > > > thing is this part: > > > src/main/properties > true > > > is completely ignored. Instead for both maven-resource-plugin executions (the > one in generate-resources phase and the default one) this config is used: > > > src/main/resources > > > target/generated-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 J
[jira] Commented: (MRESOURCES-8) maven-resources-plugin ignores configuration/resources property
[ http://jira.codehaus.org/browse/MRESOURCES-8?page=comments#action_55615 ] Brett Porter commented on MRESOURCES-8: --- I guess the expression wins if not null. > maven-resources-plugin ignores configuration/resources property > --- > > Key: MRESOURCES-8 > URL: http://jira.codehaus.org/browse/MRESOURCES-8 > Project: Maven 2.x Resources Plugin > Type: Bug > Reporter: Leszek Gawron > Assignee: Brett Porter > Attachments: MRESOURCES-8-workaround.patch, example.zip, 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: > 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";> > 4.0.0 > com.mobilebox.squash.client > squash-client > jar > 1.0-SNAPSHOT > Maven Quick Start Archetype > http://maven.apache.org > > > > maven-resources-plugin > > > prefilter-resources > generate-resources > > resources > > > > target/generated-resources > > > > src/main/resource-templates > true > > > > > > > > > ${ffile} > > > > src/main/resources > > > target/generated-resources > > > > > > junit > junit > 3.8.1 > test > > > > filter.properties > > > thing is this part: > > > src/main/properties > true > > > is completely ignored. Instead for both maven-resource-plugin executions (the > one in generate-resources phase and the default one) this config is used: > > > src/main/resources > > > target/generated-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 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[jira] Commented: (MRESOURCES-8) maven-resources-plugin ignores configuration/resources property
[ http://jira.codehaus.org/browse/MRESOURCES-8?page=comments#action_55545 ] Leszek Gawron commented on MRESOURCES-8: My discussion on irc with Kenney ended up with the conclusion that something is wrong in plexus configurator because maven-resources-plugin mojo 'resources' field cannot be set from configuration (although it is not read-only). Thus the patch provided is only a workaround. > maven-resources-plugin ignores configuration/resources property > --- > > Key: MRESOURCES-8 > URL: http://jira.codehaus.org/browse/MRESOURCES-8 > Project: Maven 2.x Resources Plugin > Type: Bug > Reporter: Leszek Gawron > Assignee: Brett Porter > Attachments: MRESOURCES-8-workaround.patch, example.zip, 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: > 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";> > 4.0.0 > com.mobilebox.squash.client > squash-client > jar > 1.0-SNAPSHOT > Maven Quick Start Archetype > http://maven.apache.org > > > > maven-resources-plugin > > > prefilter-resources > generate-resources > > resources > > > > target/generated-resources > > > > src/main/resource-templates > true > > > > > > > > > ${ffile} > > > > src/main/resources > > > target/generated-resources > > > > > > junit > junit > 3.8.1 > test > > > > filter.properties > > > thing is this part: > > > src/main/properties > true > > > is completely ignored. Instead for both maven-resource-plugin executions (the > one in generate-resources phase and the default one) this config is used: > > > src/main/resources > > > target/generated-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 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[jira] Commented: (MRESOURCES-8) maven-resources-plugin ignores configuration/resources property
[ http://jira.codehaus.org/browse/MRESOURCES-8?page=comments#action_55342 ] Leszek Gawron commented on MRESOURCES-8: Brett unfortunatelly you don't. I need to use maven-resources-plugin in generate-resources phase. I do not want src/main/properties as a resource because eclipse would copy unfiltered resources (with @TAGS@) to target/classes. That prevents me from running test cases from under eclipse. So I just want to process src/main/properties into target/generated-resources (which I make a resource). This way eclipse never deals only with postprocessed resources. You're right it does not make much sense to use configuration/resources in process-resources phase. Still it is useful for former phases. Is that explanation enough to drop 'won't fix' ? > maven-resources-plugin ignores configuration/resources property > --- > > Key: MRESOURCES-8 > URL: http://jira.codehaus.org/browse/MRESOURCES-8 > Project: Maven 2.x Resources Plugin > Type: Bug > Reporter: Leszek Gawron > Assignee: Brett Porter > Attachments: 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: > 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";> > 4.0.0 > com.mobilebox.squash.client > squash-client > jar > 1.0-SNAPSHOT > Maven Quick Start Archetype > http://maven.apache.org > > > > maven-resources-plugin > > > prefilter-resources > generate-resources > > resources > > > > target/generated-resources > > > > src/main/resource-templates > true > > > > > > > > > ${ffile} > > > > src/main/resources > > > target/generated-resources > > > > > > junit > junit > 3.8.1 > test > > > > filter.properties > > > thing is this part: > > > src/main/properties > true > > > is completely ignored. Instead for both maven-resource-plugin executions (the > one in generate-resources phase and the default one) this config is used: > > > src/main/resources > > > target/generated-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 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[jira] Commented: (MRESOURCES-8) maven-resources-plugin ignores configuration/resources property
[ http://jira.codehaus.org/browse/MRESOURCES-8?page=comments#action_55319 ] Leszek Gawron commented on MRESOURCES-8: Thank you. It works like a charm. Will this patch get eventually into official sources? > maven-resources-plugin ignores configuration/resources property > --- > > Key: MRESOURCES-8 > URL: http://jira.codehaus.org/browse/MRESOURCES-8 > Project: Maven 2.x Resources Plugin > Type: Bug > Reporter: Leszek Gawron > Attachments: 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: > 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";> > 4.0.0 > com.mobilebox.squash.client > squash-client > jar > 1.0-SNAPSHOT > Maven Quick Start Archetype > http://maven.apache.org > > > > maven-resources-plugin > > > prefilter-resources > generate-resources > > resources > > > > target/generated-resources > > > > src/main/resource-templates > true > > > > > > > > > ${ffile} > > > > src/main/resources > > > target/generated-resources > > > > > > junit > junit > 3.8.1 > test > > > > filter.properties > > > thing is this part: > > > src/main/properties > true > > > is completely ignored. Instead for both maven-resource-plugin executions (the > one in generate-resources phase and the default one) this config is used: > > > src/main/resources > > > target/generated-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 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]