You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by "Felipe Leme (JIRA)" <co...@jakarta.apache.org> on 2005/01/10 02:20:13 UTC
[jira] Created: (JELLY-194) New tag that copy text files replacing Jelly properties
New tag that copy text files replacing Jelly properties
-------------------------------------------------------
Key: JELLY-194
URL: http://issues.apache.org/jira/browse/JELLY-194
Project: jelly
Type: New Feature
Components: taglib.util
Versions: 1.0
Reporter: Felipe Leme
Hi,
It would be nice if there was a Jelly tag similar to <ant:copy> that would copy text files replacing the Jelly properties.
For instance, I need to copy a datasource XML definition to JBoss before running Cactus (on maven), but each developer in my project has its own database schema. So, I could have a XML file like this:
<datasource>
<username>${ds.username}</username>
<password>${ds.password}</password>
</datasource>
And then something like this on maven.xml:
<preGoal name="cactus:test">
<util:copyAndReplace file="datasource.xml"
toFile="${env.JBOSS_HOME}/server/default/deploy"/>
</preGoal>
If you think such tag is useful (and hence would be incorporated on Jelly), I could write the tag and test cases and then submit a patch (I'm just not sure what's the best name for it).
-- Felipe
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org
[jira] Updated: (JELLY-194) New tag that copy text files replacing Jelly properties
Posted by "Felipe Leme (JIRA)" <co...@jakarta.apache.org>.
[ http://issues.apache.org/jira/browse/JELLY-194?page=history ]
Felipe Leme updated JELLY-194:
------------------------------
Attachment: JELLY-194.patch1
dIon,
Using <core:import> or <core:include> is not enough because these tags would try to
execute the text as a Jelly script, instead of simply returning the text with the expressions
evaluated.
So, I'm providing an initial patch that adds a new tag called CopyText (I will provide another patch
where this tag and LoadText extends from a common class).
> New tag that copy text files replacing Jelly properties
> -------------------------------------------------------
>
> Key: JELLY-194
> URL: http://issues.apache.org/jira/browse/JELLY-194
> Project: jelly
> Type: New Feature
> Components: taglib.util
> Versions: 1.0
> Reporter: Felipe Leme
> Attachments: JELLY-194.patch1
>
> Hi,
> It would be nice if there was a Jelly tag similar to <ant:copy> that would copy text files replacing the Jelly properties.
> For instance, I need to copy a datasource XML definition to JBoss before running Cactus (on maven), but each developer in my project has its own database schema. So, I could have a XML file like this:
>
> <datasource>
> <username>${ds.username}</username>
> <password>${ds.password}</password>
> </datasource>
> And then something like this on maven.xml:
> <preGoal name="cactus:test">
> <util:copyAndReplace file="datasource.xml"
> toFile="${env.JBOSS_HOME}/server/default/deploy"/>
> </preGoal>
> If you think such tag is useful (and hence would be incorporated on Jelly), I could write the tag and test cases and then submit a patch (I'm just not sure what's the best name for it).
> -- Felipe
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org
[jira] Commented: (JELLY-194) New tag that copy text files replacing Jelly properties
Posted by "Felipe Leme (JIRA)" <co...@jakarta.apache.org>.
[ http://issues.apache.org/jira/browse/JELLY-194?page=comments#action_57457 ]
Felipe Leme commented on JELLY-194:
-----------------------------------
dIon,
Yes, it probably can be done using a combination of other tags (in my case, I'm using Ant replace, i.e., I have @USERNAME@ and @PASSWORD@ in the XML file and use ant tags inside Jelly to replace the values).
But I think it would be more useful/reusable if we could do everything in just one operation (well, at least I think that's a common operation).
-- Felipe
> New tag that copy text files replacing Jelly properties
> -------------------------------------------------------
>
> Key: JELLY-194
> URL: http://issues.apache.org/jira/browse/JELLY-194
> Project: jelly
> Type: New Feature
> Components: taglib.util
> Versions: 1.0
> Reporter: Felipe Leme
>
> Hi,
> It would be nice if there was a Jelly tag similar to <ant:copy> that would copy text files replacing the Jelly properties.
> For instance, I need to copy a datasource XML definition to JBoss before running Cactus (on maven), but each developer in my project has its own database schema. So, I could have a XML file like this:
>
> <datasource>
> <username>${ds.username}</username>
> <password>${ds.password}</password>
> </datasource>
> And then something like this on maven.xml:
> <preGoal name="cactus:test">
> <util:copyAndReplace file="datasource.xml"
> toFile="${env.JBOSS_HOME}/server/default/deploy"/>
> </preGoal>
> If you think such tag is useful (and hence would be incorporated on Jelly), I could write the tag and test cases and then submit a patch (I'm just not sure what's the best name for it).
> -- Felipe
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org
[jira] Updated: (JELLY-194) New tag that copy text files replacing Jelly properties
Posted by "Felipe Leme (JIRA)" <co...@jakarta.apache.org>.
[ http://issues.apache.org/jira/browse/JELLY-194?page=history ]
Felipe Leme updated JELLY-194:
------------------------------
Attachment: JELLY-194.patch2
Full patch, where the new tag (CopyTextTag) and the existing LoadTextTag now
derives from AbstractTextTag.
The patch also contains the cumulative fixes for JELLY-203 and JELLY-205 (although neither
this patch nor the patches for these other issues include changes to xdocs/changes.xml).
-- Felipe
> New tag that copy text files replacing Jelly properties
> -------------------------------------------------------
>
> Key: JELLY-194
> URL: http://issues.apache.org/jira/browse/JELLY-194
> Project: jelly
> Type: New Feature
> Components: taglib.util
> Versions: 1.0
> Reporter: Felipe Leme
> Attachments: JELLY-194.patch1, JELLY-194.patch2
>
> Hi,
> It would be nice if there was a Jelly tag similar to <ant:copy> that would copy text files replacing the Jelly properties.
> For instance, I need to copy a datasource XML definition to JBoss before running Cactus (on maven), but each developer in my project has its own database schema. So, I could have a XML file like this:
>
> <datasource>
> <username>${ds.username}</username>
> <password>${ds.password}</password>
> </datasource>
> And then something like this on maven.xml:
> <preGoal name="cactus:test">
> <util:copyAndReplace file="datasource.xml"
> toFile="${env.JBOSS_HOME}/server/default/deploy"/>
> </preGoal>
> If you think such tag is useful (and hence would be incorporated on Jelly), I could write the tag and test cases and then submit a patch (I'm just not sure what's the best name for it).
> -- Felipe
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org
[jira] Commented: (JELLY-194) New tag that copy text files replacing Jelly properties
Posted by "Felipe Leme (JIRA)" <co...@jakarta.apache.org>.
[ http://issues.apache.org/jira/browse/JELLY-194?page=comments#action_57468 ]
Felipe Leme commented on JELLY-194:
-----------------------------------
Ok, here is how to implement it using "pure" Jelly tags:
<j:file name="${toFile}"
prettyPrint="true"
outputMode="xml"
omitXmlDeclaration="true">
<j:import file="${fromFile}" inherit="true"/>
</j:file>
I still think a tag would be useful though (or at least a FAQ entry somewhere :-)
-- Felipe
> New tag that copy text files replacing Jelly properties
> -------------------------------------------------------
>
> Key: JELLY-194
> URL: http://issues.apache.org/jira/browse/JELLY-194
> Project: jelly
> Type: New Feature
> Components: taglib.util
> Versions: 1.0
> Reporter: Felipe Leme
>
> Hi,
> It would be nice if there was a Jelly tag similar to <ant:copy> that would copy text files replacing the Jelly properties.
> For instance, I need to copy a datasource XML definition to JBoss before running Cactus (on maven), but each developer in my project has its own database schema. So, I could have a XML file like this:
>
> <datasource>
> <username>${ds.username}</username>
> <password>${ds.password}</password>
> </datasource>
> And then something like this on maven.xml:
> <preGoal name="cactus:test">
> <util:copyAndReplace file="datasource.xml"
> toFile="${env.JBOSS_HOME}/server/default/deploy"/>
> </preGoal>
> If you think such tag is useful (and hence would be incorporated on Jelly), I could write the tag and test cases and then submit a patch (I'm just not sure what's the best name for it).
> -- Felipe
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org
[jira] Commented: (JELLY-194) New tag that copy text files
replacing Jelly properties
Posted by "Felipe Leme (JIRA)" <co...@jakarta.apache.org>.
[ http://issues.apache.org/jira/browse/JELLY-194?page=comments#action_12368040 ]
Felipe Leme commented on JELLY-194:
-----------------------------------
Any clue when/if these issues (JELLY-194, JELLY-203, JELLY-204 and JELLY-205) will make it to the codebase?
In particular, I think this feature is very useful - everytime I start a project in a new company, I need to create a small project only to provide such tag...
> New tag that copy text files replacing Jelly properties
> -------------------------------------------------------
>
> Key: JELLY-194
> URL: http://issues.apache.org/jira/browse/JELLY-194
> Project: jelly
> Type: New Feature
> Components: taglib.util
> Versions: 1.0
> Reporter: Felipe Leme
> Attachments: JELLY-194.patch1, JELLY-194.patch2
>
> Hi,
> It would be nice if there was a Jelly tag similar to <ant:copy> that would copy text files replacing the Jelly properties.
> For instance, I need to copy a datasource XML definition to JBoss before running Cactus (on maven), but each developer in my project has its own database schema. So, I could have a XML file like this:
>
> <datasource>
> <username>${ds.username}</username>
> <password>${ds.password}</password>
> </datasource>
> And then something like this on maven.xml:
> <preGoal name="cactus:test">
> <util:copyAndReplace file="datasource.xml"
> toFile="${env.JBOSS_HOME}/server/default/deploy"/>
> </preGoal>
> If you think such tag is useful (and hence would be incorporated on Jelly), I could write the tag and test cases and then submit a patch (I'm just not sure what's the best name for it).
> -- Felipe
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org
[jira] Commented: (JELLY-194) New tag that copy text files replacing Jelly properties
Posted by "dion gillard (JIRA)" <co...@jakarta.apache.org>.
[ http://issues.apache.org/jira/browse/JELLY-194?page=comments#action_57447 ]
dion gillard commented on JELLY-194:
------------------------------------
Can this be done with core:file and core:import?
> New tag that copy text files replacing Jelly properties
> -------------------------------------------------------
>
> Key: JELLY-194
> URL: http://issues.apache.org/jira/browse/JELLY-194
> Project: jelly
> Type: New Feature
> Components: taglib.util
> Versions: 1.0
> Reporter: Felipe Leme
>
> Hi,
> It would be nice if there was a Jelly tag similar to <ant:copy> that would copy text files replacing the Jelly properties.
> For instance, I need to copy a datasource XML definition to JBoss before running Cactus (on maven), but each developer in my project has its own database schema. So, I could have a XML file like this:
>
> <datasource>
> <username>${ds.username}</username>
> <password>${ds.password}</password>
> </datasource>
> And then something like this on maven.xml:
> <preGoal name="cactus:test">
> <util:copyAndReplace file="datasource.xml"
> toFile="${env.JBOSS_HOME}/server/default/deploy"/>
> </preGoal>
> If you think such tag is useful (and hence would be incorporated on Jelly), I could write the tag and test cases and then submit a patch (I'm just not sure what's the best name for it).
> -- Felipe
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org