List Info

Thread: DO NOT REPLY New: - Touch with mapper brokken




DO NOT REPLY New: - Touch with mapper brokken
country flaguser name
United States
2007-08-29 04:06:41
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=43
235>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=43235

           Summary: Touch with mapper brokken
           Product: Ant
           Version: 1.7.0
          Platform: All
        OS/Version: other
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Core
        AssignedTo: devant.apache.org
        ReportedBy: l117worsaae.dk


If one uses touch with a mapper touch ignores the millis or
datetime atributes
Instead touch uses the timestamp of the Resource. This
happens due to:
                long modTime = (r.isExists()) ?
r.getLastModified()
                    : defaultTimestamp;
in org.apache.tools.ant.taskdefs.Touch

This prohibits one from setting the time of the target file
to a value defined 
in build.xml

A clean implementation would just ignore the time of the
resource file
An advanced implementation could use the time of the
resource file UNLESS one 
of the millis or datetime attributes is set

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=ema
il
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the
assignee.

------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribeant.apache.org
For additional commands, e-mail: dev-helpant.apache.org


DO NOT REPLY - Touch with mapper brokken
country flaguser name
United States
2007-08-29 04:28:19
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=43
235>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=43235





------- Additional Comments From peterreillyapache.org  2007-08-29 02:28 -------
Please provide a simple build file that shows the
problem, ta.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=ema
il
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the
assignee.

------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribeant.apache.org
For additional commands, e-mail: dev-helpant.apache.org


DO NOT REPLY - Touch with mapper brokken
country flaguser name
United States
2007-08-29 06:01:01
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=43
235>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=43235





------- Additional Comments From l117worsaae.dk  2007-08-29
04:00 -------
Created an attachment (id=20724)
 --> (http://issues.apache.org/bugzilla/attac
hment.cgi?id=20724&action=view)
build.xml showing the problem

ant setup creates the files and dirs needed for the demo
ant touch demo will
First time after setup) create the file MySourceFile.class
with the time stamp 

of the java file
Second time update the timestamp of MySourceFile.class to
what ever timestamp
is (now) on the java file

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=ema
il
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the
assignee.

------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribeant.apache.org
For additional commands, e-mail: dev-helpant.apache.org


DO NOT REPLY - Touch with mapper brokken
country flaguser name
United States
2007-08-29 06:25:54
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=43
235>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=43235


peterreillyapache.org changed:

           What    |Removed                     |Added
------------------------------------------------------------
----------------
             Status|NEW                         |ASSIGNED




------- Additional Comments From peterreillyapache.org  2007-08-29 04:25 -------
Awesome, tak.
I will get a fix ready soon.
Peter



-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=ema
il
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the
assignee.

------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribeant.apache.org
For additional commands, e-mail: dev-helpant.apache.org


DO NOT REPLY - Touch with mapper brokken
country flaguser name
United States
2007-08-29 09:55:08
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=43
235>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=43235





------- Additional Comments From gudnabrsamyahoo.com
 2007-08-29 07:55 -------
Whoa, wait--this is documented, intentional behavior:  The
manual says "If the original file exists its 
timestamp will be used. Otherwise the task settings (millis,
datetime) take effect."  The purpose of this is 
to make it easy to set up parallel directory structures that
mimic your real setup without the storage 
impact.  If we want to provide an attribute to override this
behavior, however, fine by me.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=ema
il
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the
assignee.

------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribeant.apache.org
For additional commands, e-mail: dev-helpant.apache.org


DO NOT REPLY - Touch with mapper brokken
country flaguser name
United States
2007-08-29 10:01:54
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=43
235>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=43235





------- Additional Comments From peterreillyapache.org  2007-08-29 08:01 -------
I release that this is documented and that is the intention
of the code. However it is very strange (unexpected) to
ignore the setting given in the build file:

        <touch datetime="03/03/2003 03:33
AM">
            <fileset dir="test"
includes="src/**/*.java" />
            <mapper type="regexp"
from="^src(.*).java$$"
to="test/classes1.class"/>        
        </touch>

It is clearly (I think) the intent of the build author to
set the date on the
class files to the datetime attribute, whereas:
        <touch>
            <fileset dir="test"
includes="src/**/*.java" />
            <mapper type="regexp"
from="^src(.*).java$$"
to="test/classes1.class"/>        
        </touch>
one could argue that the timestamps of the .class files
should be
set to the timestamp of the correspond java files (although
one
could also argue that this is also surprising behavior).

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=ema
il
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the
assignee.

------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribeant.apache.org
For additional commands, e-mail: dev-helpant.apache.org


DO NOT REPLY - Touch with mapper brokken
country flaguser name
United States
2007-08-29 15:13:48
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=43
235>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=43235





------- Additional Comments From gudnabrsamyahoo.com
 2007-08-29 13:13 -------
(In reply to comment #5)
> I release that this is documented and that is the
intention
> of the code. However it is very strange (unexpected)
to
> ignore the setting given in the build file:
> 
>         <touch datetime="03/03/2003 03:33
AM">
>             <fileset dir="test"
includes="src/**/*.java" />
>             <mapper type="regexp"
from="^src(.*).java$$"
> to="test/classes1.class"/>        
>         </touch>
> 

Okay, point taken.

> It is clearly (I think) the intent of the build author
to set the date on the
> class files to the datetime attribute, whereas:
>         <touch>
>             <fileset dir="test"
includes="src/**/*.java" />
>             <mapper type="regexp"
from="^src(.*).java$$"
> to="test/classes1.class"/>        
>         </touch>
> one could argue that the timestamps of the .class files
should be
> set to the timestamp of the correspond java files
(although one
> could also argue that this is also surprising
behavior).

Your arguments are pretty good; I am fine with changing the
behavior, especially when datetime|millis 
is specified.  I'm still up in the air on mapping without
specifying modification time whether current 
time or inheriting time is more obviously correct.  Possibly
the former, but can you think of an 
appropriate attribute to trigger "timestamp
inheritance"?

-Matt


-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=ema
il
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the
assignee.

------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribeant.apache.org
For additional commands, e-mail: dev-helpant.apache.org


DO NOT REPLY - Touch with mapper brokken
country flaguser name
United States
2007-08-29 15:23:17
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=43
235>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=43235





------- Additional Comments From peterreillyapache.org  2007-08-29 13:23 -------
I think that the behavior should only be changed when
the datetime is specified. For the mapper without the
datetime being specified, we use the timestamps of the
mapped from files (if they exist). I am not too sure
that a new attribute is needed to control the behavior,
(we have quite enough attributes in ant already 


-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=ema
il
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the
assignee.

------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribeant.apache.org
For additional commands, e-mail: dev-helpant.apache.org


DO NOT REPLY - Touch with mapper brokken
country flaguser name
United States
2007-08-31 00:58:06
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=43
235>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=43235





------- Additional Comments From l117worsaae.dk  2007-08-30
22:58 -------
Remark to comment #7
The only drawback is that this would prohibit using touch
with mapper to do 
the most normal task for touch (to update to time=now)

Alternative suggestion:
Instead of a new attribute we could invent a new value for
"datetime" the 
value "now"

Touch used without mapper -> behaviour unchanged
touch with mapper timestamp not specifeid -> inherrit
time (as today)
touch with mapper and timestamp specified -> use the time
specified
touch with mapper and timestamp specified as "now"
-> set time to curent time

We could keep the current behaviour of timestamp transfering
if no 

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=ema
il
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the
assignee.

------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribeant.apache.org
For additional commands, e-mail: dev-helpant.apache.org


DO NOT REPLY - Touch with mapper brokken
country flaguser name
United States
2007-08-31 10:13:26
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=43
235>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=43235





------- Additional Comments From gudnabrsamyahoo.com
 2007-08-31 08:13 -------
(In reply to comment #8)
> Remark to comment #7
> The only drawback is that this would prohibit using
touch with mapper to do 
> the most normal task for touch (to update to time=now)
> 
> Alternative suggestion:
> Instead of a new attribute we could invent a new value
for "datetime" the 
> value "now"
> 
> Touch used without mapper -> behaviour unchanged
> touch with mapper timestamp not specifeid ->
inherrit time (as today)
> touch with mapper and timestamp specified -> use the
time specified
> touch with mapper and timestamp specified as
"now" -> set time to curent time
> 
> We could keep the current behaviour of timestamp
transfering if no 

I also thought of timestamp="now" the other day. 
  I
think I would be okay with this but as it would 
only exist for this particular use case it's maybe a little
weird... are you still with us, Peter?  WDYT?

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=ema
il
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the
assignee.

------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribeant.apache.org
For additional commands, e-mail: dev-helpant.apache.org


[1-10] [11-14]

about | contact  Other archives ( Real Estate discussion Medical topics )