You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by ji...@codehaus.org on 2003/12/31 04:48:49 UTC
[jira] Commented: (MAVEN-315) Jelly scripting in maven.xml
The following comment has been added to this issue:
Author: Brett Porter
Created: Tue, 30 Dec 2003 9:48 PM
Body:
can someone involved here confirm this is still an issue, post to Jelly's bugzilla, and then we can mark this as wontfix?
---------------------------------------------------------------------
View the issue:
http://jira.codehaus.org/secure/ViewIssue.jspa?key=MAVEN-315
Here is an overview of the issue:
---------------------------------------------------------------------
Key: MAVEN-315
Summary: Jelly scripting in maven.xml
Type: Bug
Status: Open
Priority: Critical
Original Estimate: Unknown
Time Spent: Unknown
Remaining: Unknown
Project: maven
Components:
jelly/ant integration
Fix Fors:
1.1
Versions:
1.0-beta-9
Assignee: Jason van Zyl
Reporter: Incze Lajos
Created: Wed, 5 Mar 2003 5:23 PM
Updated: Tue, 30 Dec 2003 9:48 PM
Environment: RedHat 8.0 all patches, j2sdk-1.4.1_01, maven HEAD
Description:
Jelly scripting in maven.xml is somehow not safe. The script
attached sets the namlenX vairable in various ways, and then
tries to use the values. The variable is set, the value is
correct, but using it as parameter in a call like
somestring.substring(namlenX) sometimes misteriously fails.
The attached script tries to be self explaining and comes
from a real life example.
When run the attached script namlen1, namlen2 does not work,
namlen3 work. A piece of a run shows this output:
[incze@senorg emnl-transform]$ maven emnl:test
__ __
| \/ |__ Jakarta _ ___
| |\/| / _` \ V / -_) ' \ ~ intelligent projects ~
|_| |_\__,_|\_/\___|_||_| v. 1.0-beta-9-SNAPSHOT
Attempting to download commons-jelly-SNAPSHOT.jar.
Attempting to download commons-jelly-tags-xml-SNAPSHOT.jar.
Attempting to download commons-jelly-tags-jsl-SNAPSHOT.jar.
emnl:test:
[echo] srcbase ........ /opt/data/archive
[echo] source ......... /opt/data/archive/jav/08/01jav.sgm
[echo] namlen1 ........ srcbase.length()+1 ... 18
[echo] namlen2 ........ size(srcbase)+1 ... 18
[echo] namlen3 ........ source.toString().indexOf('j') ... 18
[echo] filename ....... source.getName() ... 01jav.sgm
[echo] dirname ........ source.getParent() ... /opt/data/archive/jav/08
[echo] ext ............ filename.lastIndexOf('.') ... 5
[echo] basename ext ... filename.substring(0,ext) ... 01jav
[echo] reldir_18 ...... dirname.substring(18) ... jav/08
[echo] reldir1 ........ dirname.substring(namlen1) ...
[echo] reldir2 ........ dirname.substring(namlen2) ...
[echo] reldir3 ........ dirname.substring(namlen3) ... jav/08
[echo] reldirJoke ..... dirname.substring(ext) ... data/archive/jav/08
[echo] reldir4 ........ dirname.substring(srcbase.length()) ... /jav/08
[echo] reldir5 ........ dirname.substring(srcbase.length()+1) ...
[echo] srcbase ........ /opt/data/archive
[echo] source ......... /opt/data/archive/jav/08/02jav.sgm
[echo] namlen1 ........ srcbase.length()+1 ... 18
[echo] namlen2 ........ size(srcbase)+1 ... 18
[echo] namlen3 ........ source.toString().indexOf('j') ... 18
[echo] filename ....... source.getName() ... 02jav.sgm
[echo] dirname ........ source.getParent() ... /opt/data/archive/jav/08
[echo] ext ............ filename.lastIndexOf('.') ... 5
[echo] basename ext ... filename.substring(0,ext) ... 02jav
[echo] reldir_18 ...... dirname.substring(18) ... jav/08
[echo] reldir1 ........ dirname.substring(namlen1) ...
[echo] reldir2 ........ dirname.substring(namlen2) ...
[echo] reldir3 ........ dirname.substring(namlen3) ... jav/08
[echo] reldirJoke ..... dirname.substring(ext) ... data/archive/jav/08
[echo] reldir4 ........ dirname.substring(srcbase.length()) ... /jav/08
[echo] reldir5 ........ dirname.substring(srcbase.length()+1) ...
...
etc.
===============================
The worrst of all, that seemingly the usability of the namleX
depends on HOW (??) it was set.
---------------------------------------------------------------------
JIRA INFORMATION:
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
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org