You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@archiva.apache.org by Lilians AUVIGNE <au...@sungard-finance.fr> on 2008/08/01 11:54:35 UTC

Re: Archiva 1.1 and packaging zip

Hi all, 

I come back on holiday, and I have installed the "official" archiva 1.1
distribution.

I have the same 404 error with the following URL :
http://hostname:8080/archiva/repository/internal_m1/test2/zips/testLAU-1.0.zip

I saw the issue http://jira.codehaus.org/browse/MRM-761 fixed  in 1.0.2.
When I apply the under workaround, it works.

Just have to install the zip file as
groupId/distributions/artifactId-version.zip.
see :
http://jira.codehaus.org/browse/MRM-761?focusedCommentId=129790#action_129790

Is it the same problem in 1.1 ?

Thanks for your response.
Lilians


Lilians Auvigne-2 wrote:
> 
> Hi all,
> ...
> 
> I have just a problem with the *packaging zip*.
> 
> I have successfully uploaded a zip artefact in a  Maven 1.x Repository
> (with
> the new web form).
> I see the files on my repository file system.
> 
> But when I get the artefact, Archiva returns a 404 HTTP code :
> http://hostname:8080/archiva/repository/internal_m1/test2/zips/testLAU-1.0.zip
> 
> return :
> HTTP ERROR: 404
> 
> Resource does not exist
> 
> RequestURI=/archiva/repository/internal_m1/test2/zips/testLAU-1.0.zip
> 
> *Powered by Jetty:// <http://jetty.mortbay.org/>*
> *Is it a known bug ?
> 
> *Thanks for your response.
> 
> Lilians
> *
> *
> 
> 

-- 
View this message in context: http://www.nabble.com/Archiva-1.1-and-packaging-zip-tp18400077p18771330.html
Sent from the archiva-users mailing list archive at Nabble.com.


Re: Archiva 1.1 and packaging zip

Posted by Lilians AUVIGNE <au...@sungard-finance.fr>.
After a debug on the svn tag, I found where the problem is :

In the method fetchContentFromProxies : logicalResource has the variable
path setted to "/test/zips/testLAU-1.0.zip".
and at line 522, the path is modified with this value
"test/distributions/testLAU-1.0.zip" that doesn't exist.

The code :
ArchivaDavResourceFactory [line: 522] -
fetchContentFromProxies(ManagedRepositoryContent, DavServletRequest,
LogicalResource) :
resource.setPath( managedRepository.toPath( artifact ) );

This new value is calculated by the method 
AbstractLegacyRepositoryContent [line: 110] - getDirectory(String, String)
    private String getDirectory( String classifier, String type )
    {
        String dirname = (String) typeToDirectoryMap.get( type );
    ...
    
with this value :
    static
    {
        typeToDirectoryMap = new HashMap<String, String>();
        typeToDirectoryMap.put( "ejb-client", "ejb" );
        typeToDirectoryMap.put( ArtifactExtensionMapping.MAVEN_PLUGIN,
"maven-plugin" );
        typeToDirectoryMap.put( ArtifactExtensionMapping.MAVEN_ONE_PLUGIN,
"plugin" );
        typeToDirectoryMap.put( "distribution-tgz", "distribution" );
        typeToDirectoryMap.put( "distribution-zip", "distribution" );
        typeToDirectoryMap.put( "javadoc", "javadoc.jar" );
    }
    
Is it the expected behaviour ?
If isn't, I can create an Jira issue.

Regards
Lilians


Lilians AUVIGNE wrote:
> 
> I have the same 404 error with the following URL :
> http://hostname:8080/archiva/repository/internal_m1/test2/zips/testLAU-1.0.zip
> 
> I saw the issue http://jira.codehaus.org/browse/MRM-761 fixed  in 1.0.2.
> 

-- 
View this message in context: http://www.nabble.com/Archiva-1.1-and-packaging-zip-tp18400077p18772963.html
Sent from the archiva-users mailing list archive at Nabble.com.