archiva-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeroen Hoek <jer...@lable.org>
Subject Re: Strange error in 1.4-M4: repositoryId cannot be null
Date Fri, 10 Jan 2014 09:55:13 GMT
Hello Dirk and Olivier,

Thank you for looking into this issue, much appreciated!
I will try to give 2.0.0-SNAPSHOT a go this weekend and verify that
the bug is solved.

2014/1/9 Olivier Lamy <olamy@apache.org>:
> good catch.
> I just committed the fix. (Thanks!)
> You can try snapshot build from here
> https://builds.apache.org/view/A-D/view/Archiva/job/archiva-all-maven-3.x-jdk-1.6/
>  should be part of #2218
>
>
>
> On 10 January 2014 06:08, Dirk Buchhorn <Dirk.Buchhorn@finkundpartner.de> wrote:
>> Hello,
>>
>> we get the same error message. The problem belongs to the
>> org.apache.archiva.rest.services .DefaultRepositoriesService class. In the
>> removeProjectVersion method the repositoriyId was not set. After setting
>> this id the error is away.
>>
>> The code changes
>> Start from line 604
>>     public Boolean removeProjectVersion( String repositoryId, String
>> namespace, String projectId, String version )
>>         throws ArchivaRestServiceException
>>     {
>>         // if not a generic we can use the standard way to delete artifact
>>         if ( !VersionUtil.isGenericSnapshot( version ) )
>>         {
>>             Artifact artifact = new Artifact( namespace, projectId, version
>> );
>>            artifact.setRepositoryId( repositoryId ); // this line was
>> inserted
>>             return deleteArtifact( artifact );
>>         }
>>
>> In the method deleteArtifact the repositoryId was read from
>> artifact.getContext(). I change this to artifact.getRepositoryId() (line
>> 711).
>>
>> @Jeroen
>> After these changes the project can be build and only the
>> "archiva-rest-services-1.4-M4.jar" must be replaced.
>> For building the project I do the following changes in the parent pom.xml
>> file.
>> - comment the module "archiva-docs"
>> - run maven with skip tests (mvn clean package -DskipTests)
>>
>> Kind regards
>>
>> Dirk Buchhorn
>>
>
>
>
> --
> Olivier Lamy
> Ecetera: http://ecetera.com.au
> http://twitter.com/olamy | http://linkedin.com/in/olamy


-- 
Vriendelijke groeten,

Jeroen Hoek

Lable
‚úČ jeroen@lable.org

Mime
View raw message