[jira] [Updated] (JS2-1334) unpack overwrite rule not being honoured
"Graham (JIRA)" <[email protected]> Wed, 12 Aug 2015 15:35:45 +0000 (UTC)
| Newsgroups | gmane.comp.jakarta.jetspeed.devel |
|---|---|
| Message-ID | <[email protected]> |
[ https://issues.apache.org/jira/browse/JS2-1334?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Graham updated JS2-1334:
------------------------
Description:
The Jetspeed unpack plugin notes taken from https://portals.apache.org/jetspeed-2/buildguide/jetspeed-unpack-plugin.html describe the 'overwrite' rule as :-
{quote}
"When a selected resource from the resource archive already exists in its target directory, the overwrite setting will determine if the existing resource is overwritten, even if it has a more recent timestamp than the archived resource.
Note: if the archived resource has a more recent timestamp the existing resource will always be overwritten."
{quote}
but even though we have specified <overwrite>true</overwrite> we still see the message
{quote} "xxxx skipped: already exists at xxxxx" {quote}
Looking at src/main/java/org/apache/jetspeed/maven/utils/UnpackResources.java (line 433) it looks like it will still skip if the destintation filename timestamp is >= the source filename timestamp regardless of the overwrite flag being set.
{code}
if ( destFile.lastModified() >= fileEntry.getTime() || !unpackResources[i].isOverwrite() )
{
if (verbose) {
log.info(fileEntry.getName()+" skipped: already exists at "+destFile.getAbsolutePath());
}
else{
log.debug(fileEntry.getName()+" skipped: already exists at "+destFile.getAbsolutePath());
}
continue;
}
{code}
Is this intentional or is it a bug? I thought setting overwrite to true would always overwrite it regardless of the timestamp as the documentation says it will be overwritten even if it has a more recent timestamp than the archived resource.
was:
The Jetspeed unpack plugin notes taken from https://portals.apache.org/jetspeed-2/buildguide/jetspeed-unpack-plugin.html describe the 'overwrite' rule as :-
{quote}
"When a selected resource from the resource archive already exists in its target directory, the overwrite setting will determine if the existing resource is overwritten, even if it has a more recent timestamp than the archived resource.
Note: if the archived resource has a more recent timestamp the existing resource will always be overwritten."
{quote}
but even though we have specified <overwrite>true</overwrite> we still see the message
{quote} "xxxx skipped: already exists at xxxxx" {quote}
Looking at src/main/java/org/apache/jetspeed/maven/utils/UnpackResources.java (line 433) it looks like it will still skip if the destintation filename timestamp is >= the source filename timestamp regardless of the overwrite flag being set.
{quote}
if ( destFile.lastModified() >= fileEntry.getTime() || !unpackResources[i].isOverwrite() )
{
if (verbose) {
log.info(fileEntry.getName()+" skipped: already exists at "+destFile.getAbsolutePath());
}
else{
log.debug(fileEntry.getName()+" skipped: already exists at "+destFile.getAbsolutePath());
}
continue;
}
{quote}
Is this intentional or is it a bug? I thought setting overwrite to true would always overwrite it regardless of the timestamp as the documentation says it will be overwritten even if it has a more recent timestamp than the archived resource.
> unpack overwrite rule not being honoured
> ----------------------------------------
>
> Key: JS2-1334
> URL: https://issues.apache.org/jira/browse/JS2-1334
> Project: Jetspeed 2
> Issue Type: Bug
> Components: Other
> Affects Versions: 2.3.0
> Reporter: Graham
>
> The Jetspeed unpack plugin notes taken from https://portals.apache.org/jetspeed-2/buildguide/jetspeed-unpack-plugin.html describe the 'overwrite' rule as :-
> {quote}
> "When a selected resource from the resource archive already exists in its target directory, the overwrite setting will determine if the existing resource is overwritten, even if it has a more recent timestamp than the archived resource.
> Note: if the archived resource has a more recent timestamp the existing resource will always be overwritten."
> {quote}
> but even though we have specified <overwrite>true</overwrite> we still see the message
> {quote} "xxxx skipped: already exists at xxxxx" {quote}
> Looking at src/main/java/org/apache/jetspeed/maven/utils/UnpackResources.java (line 433) it looks like it will still skip if the destintation filename timestamp is >= the source filename timestamp regardless of the overwrite flag being set.
> {code}
> if ( destFile.lastModified() >= fileEntry.getTime() || !unpackResources[i].isOverwrite() )
> {
> if (verbose) {
> log.info(fileEntry.getName()+" skipped: already exists at "+destFile.getAbsolutePath());
> }
> else{
> log.debug(fileEntry.getName()+" skipped: already exists at "+destFile.getAbsolutePath());
> }
> continue;
> }
> {code}
> Is this intentional or is it a bug? I thought setting overwrite to true would always overwrite it regardless of the timestamp as the documentation says it will be overwritten even if it has a more recent timestamp than the archived resource.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)