Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Critical
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: None
-
Labels:None
-
Environment:Win XP, Maven 2.0
-
Number of attachments :
Description
When building from the parent POM dir, all paths are relative to it. A problem occurs when its modules have dependencies of <scope>system</scope> - the module's corresponding <systemPath> is relative to the parent POM dir, instead of the module's POM dir.
With a module's <systemPath> set to compile correctly it on its own, compiling from its parent POM dir gives this error:
[ERROR] BUILD ERROR
[INFO] ----------------------------------------------------------------------------
[INFO] Failed to resolve artifact.
GroupId: thegrp
ArtifactId: subsystem
Version: 2.1-SNAPSHOT
Reason: System artifact: thegrp:subsystem:jar:2.1-SNAPSHOT not found in
path: src\lib\subsystem.jar
thegrp:subsystem:2.1-SNAPSHOT:jar
(would be nice to have the fully qualified path name listed there, instead of the relative one so users would know where it is really looking for it
from)
Expected behavior is that Maven treats system scope paths relative to the module POM, not the parent's POM.
Issue Links
- is depended upon by
-
MNG-1867
deprecate system scope, analyse other use cases
-
this should be won't fix: system scope must be absolute.
Instead, we should validate the systemPath and ensure this is the case.