Guillaume Eyroulet created MECLIPSE-752:
-------------------------------------------

             Summary: Allow filtering when adding a configuration file
                 Key: MECLIPSE-752
                 URL: https://jira.codehaus.org/browse/MECLIPSE-752
             Project: Maven Eclipse Plugin
          Issue Type: New Feature
    Affects Versions: 2.9
            Reporter: Guillaume Eyroulet
            Priority: Minor


Our additional configuration files depend on Eclipse projects' name which are 
dynamic 
([projectNameTemplate|http://maven.apache.org/plugins/maven-eclipse-plugin/eclipse-mojo.html#projectNameTemplate]).
 

A solution would be to allow filtering when adding such files 
([additionalConfig|http://maven.apache.org/plugins/maven-eclipse-plugin/eclipse-mojo.html#additionalConfig]).
 

As they may contain _{*}_ expressions, it would be great to allow 
[delimiters|http://maven.apache.org/plugins/maven-resources-plugin/copy-resources-mojo.html#delimiters]
 and / or [escape 
strings|http://maven.apache.org/plugins/maven-resources-plugin/copy-resources-mojo.html#escapeString]
 configuration as 
[maven-resources-plugin:copy-resources|http://maven.apache.org/plugins/maven-resources-plugin/copy-resources-mojo.html].

Launch configuration file example with :
 - _eclipse.project.name_ token,
 - _@_ delimiter,
 - _selected_resource_path_ Eclipse variable.

{code:xml}
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication">
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
<listEntry value="/@eclipse.project.name@/src/main/java/example/Example.java"/>
</listAttribute>
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
<listEntry value="1"/>
</listAttribute>
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" 
value="example.Example"/>
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-path 
${selected_resource_path:example}"/>
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" 
value="@eclipse.project.name@"/>
</launchConfiguration>
{code}

Our current workaround consists in using [AntRun 
plugin|http://maven.apache.org/plugins/maven-antrun-plugin/run-mojo.html] with 
the [copy task|http://ant.apache.org/manual/Tasks/copy.html].



--
This message was sent by Atlassian JIRA
(v6.1.6#6162)

Reply via email to