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

Reply via email to