[ 
https://issues.apache.org/jira/browse/MNG-5727?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Igor Fedorenko closed MNG-5727.
-------------------------------
       Resolution: Fixed
    Fix Version/s: 3.2.5

I am not sure what attached project you refer to. The test project I committed 
as part of [1] includes <dependencyManagement> entry without <version> element. 
The test project is expected to fail with ProjectBuildingException, which is 
ensured by the regression test introduced as part of the commit. 

This issue was specifically about InvalidArtifactRTException, which is fixed 
now, so I am closing this issue as such.

[1] 
https://git1-us-west.apache.org/repos/asf?p=maven.git;a=commit;h=ce6f0bfdb527e20c3afbd76b9c742e07b13d25b2

> unexpected InvalidArtifactRTException from ProjectBuilder#build
> ---------------------------------------------------------------
>
>                 Key: MNG-5727
>                 URL: https://issues.apache.org/jira/browse/MNG-5727
>             Project: Maven
>          Issue Type: Bug
>            Reporter: Igor Fedorenko
>             Fix For: 3.2.5
>
>
> Calling into ProjectBuilder#build(File, ProjectBuildingRequest) results in 
> InvalidArtifactRTException below if project pom.xml has managed dependency 
> without <version>. Although the pom is invalid, I expected to get 
> ProjectBuildingException that includes location of problematic dependency, 
> similar to what I get during command line build.
> {code}
> org.apache.maven.artifact.InvalidArtifactRTException: For artifact 
> {org.apache.maven.its:a:null:jar}: The version cannot be empty.
>       at 
> org.apache.maven.artifact.DefaultArtifact.validateIdentity(DefaultArtifact.java:148)
>       at 
> org.apache.maven.artifact.DefaultArtifact.<init>(DefaultArtifact.java:123)
>       at 
> org.apache.maven.bridge.MavenRepositorySystem.XcreateArtifact(MavenRepositorySystem.java:695)
>       at 
> org.apache.maven.bridge.MavenRepositorySystem.XcreateDependencyArtifact(MavenRepositorySystem.java:613)
>       at 
> org.apache.maven.bridge.MavenRepositorySystem.createDependencyArtifact(MavenRepositorySystem.java:121)
>       at 
> org.apache.maven.project.DefaultProjectBuilder.initProject(DefaultProjectBuilder.java:808)
>       at 
> org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:174)
>       at 
> org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:118)
> ...
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to