Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 1.0
-
Fix Version/s: 1.0.2
-
Component/s: None
-
Labels:None
-
Environment:Linux Fedora Core 5 / Windows XP
Java 5
-
Number of attachments :
Description
Adding to database a project model (B) that contains no groupId and/or version, by assuming it inherits them from parent POM, causes an error if another artifact (A) with same artifactId but different version had been added previously.
That's because the effect cache key on this particular case is always null:<artifactId>:null making the latter (B) fetch information, such as version, from the former (A) during the artifact processing (please see processArchivaArtifact method from ProjectModelToDatabaseConsumer class for more information).
Below is an example of this particular error:
File redback-users-api-1.0-alpha-4.pom has an invalid project model [groupId:org.codehaus.plexus.redback|artifactId:redback-users-api|version:1.0-alpha-3|packaging:null]; The model version [1.0-alpha-3] does not match the version portion of the filename: 1.0-alpha-4
This issue may be related to http://jira.codehaus.org/browse/MRM-608.
Attachments
Issue Links
| This issue relates to: | ||||
| MRM-620 | pom.xml that inherit version from parent show up in reports as "has an invalid project model" |
|
|
|
I've made a change to archiva-repository-layer component and this issue seems to be fixed now.
Attached it the patch file. Please let me know any comments on it.
Dário