|
View:
New views
1 Messages
—
Rating Filter:
Alert me
|
|
|
[jira] Issue Comment Edited: (MRM-747) Archiva should prevent re-deployment of released or non-snapshot versioned artifacts
by JIRA jira@codehaus.org
::
Rate this Message:
Reply (Restricted by the Administrator) | Reply to Author | View Threaded | Show Only this Message [ http://jira.codehaus.org/browse/MRM-747?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=194030#action_194030 ] Marc Lustig edited comment on MRM-747 at 10/8/09 10:14 AM: ----------------------------------------------------------- This is my patch that prevents deploying release-artifacts which already exist in the release-repository. Thanks to Deng for pointing me in the right direction. The following files have been changed: - class class org.apache.maven.archiva.webdav.ArchivaDavResourceFactory in archiva-modules/archiva-web/archiva-webdav/src/main/java The following files have been added: - class org.apache.maven.archiva.webdav.ReleaseArtifactAlreadyExistsException in archiva-modules/archiva-web/archiva-webdav/src/main/java In case - a jar-file is sent AND - the artifact-path does not contain the string "SNAPSHOT" AND - the target-repo is enabled for release-artifacts a check is commenced verifying if that artifact already exists. In case the artifact already exists, the ReleaseArtifactAlreadyExistsException is thrown to the calling method and converted to DavException with HTTP return-code SC_CONFLICT (HTTP 409). I have tested that with "real" repos, not with repo-groups. But since repo-groups cannot be written to, I suppose we won't run into issues there. The unit-tests are running fine. was (Author: axismundi): This is my patch that prevents deploying release-artifacts which already exist in the release-repository. Thanks to Deng for pointing me in the right direction. The following files have been changed: - class class org.apache.maven.archiva.webdav.ArchivaDavResourceFactory in archiva-modules/archiva-web/archiva-webdav/src/main/java The following files have been added: - class org.apache.maven.archiva.webdav.ReleaseArtifactAlreadyExistsException in archiva-modules/archiva-web/archiva-webdav/src/main/java In case - a jar-file is sent AND - the artifact-path does not contain the string SNAPSHOT AND - the target-repo is enabled for release-artifacts a check is commenced verifying if that artifact already exists. In case the artifact already exists, the ReleaseArtifactAlreadyExistsException is thrown to the calling method and converted to DavException with HTTP return-code SC_CONFLICT (HTTP 409). I have tested that with "real" repos, not with repo-groups. But since repo-groups cannot be written to, I suppose we won't run into issues there. The unit-tests are running fine. > Archiva should prevent re-deployment of released or non-snapshot versioned artifacts > ------------------------------------------------------------------------------------ > > Key: MRM-747 > URL: http://jira.codehaus.org/browse/MRM-747 > Project: Archiva > Issue Type: Bug > Components: WebDAV interface > Affects Versions: 1.0.1 > Reporter: Alexandre Navarro > Fix For: 1.x > > Attachments: ArchivaDavResourceFactory.java, ReleaseArtifactAlreadyExistsException.java > > > It is possible de redeploy a versionned jar with webdav eventhough it must be impossible. > It is possible de redeploy a versionned jar eventhough the file is readonly. > It is very problematic. -- 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 - For more information on JIRA, see: http://www.atlassian.com/software/jira |
| Free embeddable forum powered by Nabble | Forum Help |