Issue Details (XML | Word | Printable)

Key: MAVEN-514
Type: New Feature New Feature
Status: Reopened Reopened
Priority: Major Major
Assignee: Unassigned
Reporter: Brett Porter
Votes: 5
Watchers: 3
Operations

If you were logged in you would be able to see more operations.
Maven 1

enhance resource filtering

Created: 23/Jun/03 09:28 AM   Updated: 11/Apr/06 05:17 PM
Return to search
Component/s: model additions
Affects Version/s: None
Fix Version/s: None

Time Tracking:
Not Specified

Issue Links:
Duplicate
 


 Description  « Hide

Something discussed on the dev/user lists recently, and an initial implementation is in place. Here is my proposal from the list:

I would like to propose a generic solution via the POM and whatever filter-enabled copying technique that is being used. Let me know what you think.

Firstly, inside <build>:
<filters>
<file>${basedir}/conf/${maven.username}.properties</file>
<file>${basedir}/conf/filters.properties</file>
<file>${basedir}/../common/filters.properties</file>
<filter>
<token>some.property</token>
<value>some.value</value>
</filter>
</filters>

Or to go really crazy, have the above as a filterset, and wrap them up in a list of filtersets. Ant introduced this functionality, but personally I don't see the use for it as long as you keep your property names a little different.

I also think build.properties, project.properties and driver/default.properties should be included by default when filtering is enabled.

Now, each <resource/> element can keep the <filtering>true</filtering> property to acknowledge it wants to be filtered.

The reason to allow different files is that the purpose of filters is to be able to substitute varying values, so you may not want to hard code them into project.xml. And this configuration should be flexible enough to work without Ant if necessary.


I'm happy to work on this once there is agreement - just opening this to track its progress.



dion gillard made changes - 04/Aug/03 11:23 AM
Field Original Value New Value
Remaining Estimate 0 minutes [ 0 ]
Original Estimate 0
Fix Version/s 1.1 [ 10211 ]
Jason van Zyl made changes - 02/Dec/03 04:22 PM
Component/s pom [ 10586 ]
Environment
Jason van Zyl made changes - 21/Jul/04 09:54 AM
Fix Version/s 1.1 [ 10211 ]
Brett Porter made changes - 21/Feb/05 11:11 PM
Component/s model [ 10586 ]
Component/s model additions [ 10070 ]
Environment
Brett Porter added a comment - 16/May/05 01:12 AM

alternative proposed for m2, but relies on decent profile support which Maven1 won't have.


Brett Porter made changes - 16/May/05 01:12 AM
Resolution Won't Fix [ 2 ]
Status Open [ 1 ] Closed [ 6 ]
Brett Porter added a comment - 23/May/05 05:23 PM

we can reuse the m2 solution, I got carried away


Brett Porter made changes - 23/May/05 05:23 PM
Status Closed [ 6 ] Reopened [ 4 ]
Assignee Brett Porter [ brettporter ]
Resolution Won't Fix [ 2 ]
Brett Porter made changes - 23/May/05 05:23 PM
Description Something discussed on the dev/user lists recently, and an initial implementation is in place. Here is my proposal from the list:

I would like to propose a generic solution via the POM and whatever filter-enabled copying technique that is being used. Let me know what you think.

Firstly, inside <build>:
<filters>
  <file>${basedir}/conf/${maven.username}.properties</file>
  <file>${basedir}/conf/filters.properties</file>
  <file>${basedir}/../common/filters.properties</file>
  <filter>
    <token>some.property</token>
    <value>some.value</value>
  </filter>
</filters>

Or to go really crazy, have the above as a filterset, and wrap them up in a list of filtersets. Ant introduced this functionality, but personally I don't see the use for it as long as you keep your property names a little different.

I also think build.properties, project.properties and driver/default.properties should be included by default when filtering is enabled.

Now, each <resource/> element can keep the <filtering>true</filtering> property to acknowledge it wants to be filtered.

The reason to allow different files is that the purpose of filters is to be able to substitute varying values, so you may not want to hard code them into project.xml. And this configuration should be flexible enough to work without Ant if necessary.

----


I'm happy to work on this once there is agreement - just opening this to track its progress.
Something discussed on the dev/user lists recently, and an initial implementation is in place. Here is my proposal from the list:

I would like to propose a generic solution via the POM and whatever filter-enabled copying technique that is being used. Let me know what you think.

Firstly, inside <build>:
<filters>
  <file>${basedir}/conf/${maven.username}.properties</file>
  <file>${basedir}/conf/filters.properties</file>
  <file>${basedir}/../common/filters.properties</file>
  <filter>
    <token>some.property</token>
    <value>some.value</value>
  </filter>
</filters>

Or to go really crazy, have the above as a filterset, and wrap them up in a list of filtersets. Ant introduced this functionality, but personally I don't see the use for it as long as you keep your property names a little different.

I also think build.properties, project.properties and driver/default.properties should be included by default when filtering is enabled.

Now, each <resource/> element can keep the <filtering>true</filtering> property to acknowledge it wants to be filtered.

The reason to allow different files is that the purpose of filters is to be able to substitute varying values, so you may not want to hard code them into project.xml. And this configuration should be flexible enough to work without Ant if necessary.

----


I'm happy to work on this once there is agreement - just opening this to track its progress.
Environment
Fix Version/s 1.1-beta-1 [ 11371 ]
Brett Porter made changes - 24/May/05 01:43 AM
Fix Version/s 1.1-beta-1 [ 11371 ]
Fix Version/s 1.1-beta-2 [ 10211 ]
Brett Porter made changes - 11/Jun/05 12:43 AM
Link This issue is duplicated by MAVEN-1622 [ MAVEN-1622 ]
Vincent Massol made changes - 11/Aug/05 11:46 AM
Workflow jira [ 21058 ] Maven [ 38426 ]
Brett Porter made changes - 23/Aug/05 05:54 AM
Fix Version/s 1.1-rc1 [ 11971 ]
Fix Version/s 1.1-beta-2 [ 10211 ]
Brett Porter made changes - 05/Dec/05 01:11 AM
Assignee Brett Porter [ brettporter ]
Brett Porter made changes - 08/Mar/06 10:47 PM
Workflow Maven [ 38426 ] Maven New [ 51844 ]
Arnaud Heritier made changes - 11/Apr/06 05:17 PM
Fix Version/s  1.1-beta-4 [ 12553 ]
Fix Version/s 1.1-rc1 [ 11971 ]