Hello Olivier,
today I install the current SNAPSHOT version but the error is still
there. The fast browse view impressed me.
My focus is still on the delete functionality. I hope my explanation
will be good enough.
I test this at work with an existing repository first but my mail is
based on an new archiva installation with an empty repository.
I think before I clear the browser cache (at work) an artifact version
could be deleted. But after clearing the browser cache it don't work.
1th
- insert a new artifact (mvn release:prepare; mvn release:perform)
- do a quick search (on the first page or the upper right search field)
- the search text is shown and the first search result is displayed over
the search text
-> bug
2th
- delete an artifact version (the "All or no" repository is selected)
- a balloon shows the message "[version.delete.missing.repoId]"
-> I don't know if this is a bug, because the browser application maybe
don't know this id?
3th
- delete an artifact version (the repository that contains the artifact
is selected)
- the program ask if I'm sure to delete the artifact -> click ok
- the server error message is displayed "repositoryId cannot be null"
-> bug not fixed for non snapshot versions (see 6th)
4th
- delete a module works
5th
- insert a new snapshot artifact (mvn deploy)
- delete the artifact version (the "All" repository is selected)
- a balloon shows the message "[version.delete.missing.repoId]"
-> bug?
6th
- delete an artifact version (the snapshot repository that contains the
artifact is selected) works
- the program ask if I'm sure to delete the artifact -> click ok
-> bug was fixed for the snapshot versions. The question is, why the
code changes work with the M4 version. I think this is a bug in M4 too.
Dirk
On 09.01.2014 23:48, Olivier Lamy wrote:
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 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