[
https://jira.codehaus.org/browse/MNG-2785?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Paul Benedict updated MNG-2785:
-------------------------------
Fix Version/s: (was: Issues to be reviewed for 3.x)
> Incorrect system dependency results the compile-dependent libraries not be
> included into war
> --------------------------------------------------------------------------------------------
>
> Key: MNG-2785
> URL: https://jira.codehaus.org/browse/MNG-2785
> Project: Maven
> Issue Type: Bug
> Components: Dependencies
> Affects Versions: 2.0.4
> Environment: $ java -version
> java version "1.5.0_04"
> $ mvn -v
> Maven version: 2.0.4
> Reporter: Dmitry Katsubo
>
> I want to build a .war file in {{frontend}} project, that depends on
> {{sabre-lib}} library:
> {code:xml|title=frontend/pom.xml}
> <dependencies>
> <dependency>
> <groupId>com.company.sabre</groupId>
> <artifactId>sabre-lib</artifactId>
> <version>0.5</version>
> </dependency>
> ...
> {code}
> The {{sabre-lib}} library itself has the system dependency, that refers the
> library within the same project, plus one {{sabre-ota-common}} library with
> common classes:
> {code:xml|title=sabre-lib/pom.xml}
> <dependencies>
> <dependency>
> <groupId>${project.groupId}</groupId>
> <artifactId>sabre-ota-common</artifactId>
> <version>0.1</version>
> </dependency>
> <dependency>
> <groupId>com.sun.xml.messaging.saaj</groupId>
> <artifactId>saaj-impl</artifactId>
> <version>1.3</version>
> <scope>system</scope>
> <systemPath>${basedir}/lib/saaj-ri.jar</systemPath>
> <optional>true</optional>
> </dependency>
> ...
> {code}
> When building {{frontend}}, the following message is produced:
> {quote}
> [WARNING] POM for 'com.company:sabre-lib:pom:0.5:compile' is invalid. It will
> be ignored for artifact resolution. Reason: Failed to validate POM
> [DEBUG] Reason: Failed to validate POM
> [DEBUG] Validation Errors:
> [DEBUG] For dependency Dependency \{groupId=com.sun.xml.messaging.saaj,
> artifactId=saaj-impl, version=1.3, type=jar\}: system-scoped dependency must
> specify an absolute path systemPath.
> {quote}
> and, as the result, {{sabre-lib}} is packaged into .war, and
> {{sabre-ota-common}} is not. I think, this is because
> {{$\{basedir\}/lib/saaj-ri.jar}} is resolved in {{frontend}} project scope to
> its directory. However:
> # As soon as optional system dependencies should not be packaged, why to
> check the path? (solution, provided in [MNG-1173] and [MNG-1187] does not
> help)
> # Even with {{$\{basedir\}}} of {{frontend}} project, the path is still
> absolute, though non-existent. The error message is incorrect then.
> # The build process should fail, as soon as .war is finally incorrectly
> packaged.
--
This message was sent by Atlassian JIRA
(v6.1.6#6162)