archiva-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dirk Buchhorn <>
Subject Re: Strange error in 1.4-M4: repositoryId cannot be null
Date Thu, 09 Jan 2014 19:08:48 GMT

we get the same error message. The problem belongs to the
.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).

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

View raw message