You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Karl Heinz Marbaise (JIRA)" <ji...@apache.org> on 2015/05/30 01:11:17 UTC

[jira] [Updated] (MSHADE-185) systemPath content is interpolated for system dependencies

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

Karl Heinz Marbaise updated MSHADE-185:
---------------------------------------
    Fix Version/s: more-investigation

> systemPath content is interpolated for system dependencies
> ----------------------------------------------------------
>
>                 Key: MSHADE-185
>                 URL: https://issues.apache.org/jira/browse/MSHADE-185
>             Project: Maven Shade Plugin
>          Issue Type: Bug
>    Affects Versions: 2.2, 2.3
>            Reporter: Arnaud HERITIER
>             Fix For: more-investigation
>
>
> For example with such a POM :
> {code}
> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
>   <modelVersion>4.0.0</modelVersion>
>   <groupId>test.shade</groupId>
>   <artifactId>system-dep</artifactId>
>   <packaging>jar</packaging>
>   <version>1.0.0-SNAPSHOT</version>
>   <dependencies>
>     <dependency>
>       <groupId>jline</groupId>
>       <artifactId>jline</artifactId>
>       <version>2.12</version>
>     </dependency>
>     <dependency>
>       <groupId>com.sun</groupId>
>       <artifactId>tools</artifactId>
>       <version>1.6</version>
>       <scope>system</scope>
>       <systemPath>${tools.jar}</systemPath>
>       <optional>true</optional>
>     </dependency>
>   </dependencies>
>   <build>
>     <plugins>
>       <plugin>
>         <artifactId>maven-shade-plugin</artifactId>
>         <version>2.3</version>
>         <executions>
>           <execution>
>             <phase>package</phase>
>             <goals>
>               <goal>shade</goal>
>             </goals>
>             <configuration>
>               <shadedArtifactAttached>false</shadedArtifactAttached>
>               <createDependencyReducedPom>true</createDependencyReducedPom>
>               <createSourcesJar>true</createSourcesJar>
>               <artifactSet>
>                 <includes>
>                   <include>jline:jline</include>
>                 </includes>
>               </artifactSet>
>               <relocations>
>                 <relocation>
>                   <pattern>jline</pattern>
>                   <shadedPattern>org.crsh.console.jline</shadedPattern>
>                 </relocation>
>               </relocations> 
>            </configuration>
>           </execution>
>         </executions>
>       </plugin>
>     </plugins>
>   </build>
>   <profiles>
>     <!-- required by byteman -->
>     <profile>
>       <id>default-profile</id>
>       <activation>
>         <file>
>           <exists>${java.home}/../lib/tools.jar</exists>
>         </file>
>       </activation>
>       <properties>
>         <tools.jar>${java.home}/../lib/tools.jar</tools.jar>
>       </properties>
>     </profile>
>     <profile>
>       <id>mac-jdk6-profile</id>
>       <activation>
>         <file>
>           <exists>${java.home}/../Classes/classes.jar</exists>
>         </file>
>       </activation>
>       <properties>
>         <tools.jar>${java.home}/../Classes/classes.jar</tools.jar>
>       </properties>
>     </profile>
>   </profiles>
> </project>
> {code}
> I'll have in the dependency-reduced-pom.xml 
> {code}
>     <dependency>
>       <groupId>com.sun</groupId>
>       <artifactId>tools</artifactId>
>       <version>1.6</version>
>       <scope>system</scope>
>       <systemPath>/Library/Java/JavaVirtualMachines/jdk1.7.0_71.jdk/Contents/Home/jre/../lib/tools.jar</systemPath>
>       <optional>true</optional>
>     </dependency>
> {code}
> While a classical jar/install/deploy won't replace such value
> Because of this we can deploy crappy things on central. See : https://jira.exoplatform.org/browse/CRASH-225



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