[ 
http://jira.codehaus.org/browse/MSHADE-63?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=192243#action_192243
 ] 

Martin Gainty commented on MSHADE-63:
-------------------------------------

Brett
partial victory i did get the shaded classes generated into
/target/maven-shade-plugin-1.2.1-shaded.jar

how do i get the /target/maven-shade-plugin-1.2.1-shaded.jar to auto-install 
itself?

Thanks Brett

> conversion of <shadedPattern>org.commons.language.util.xwork</shadedPattern> 
> failure
> ------------------------------------------------------------------------------------
>
>                 Key: MSHADE-63
>                 URL: http://jira.codehaus.org/browse/MSHADE-63
>             Project: Maven 2.x Shade Plugin
>          Issue Type: Bug
>    Affects Versions: 1.2.1
>         Environment: <pattern>org.commons.language.util</pattern>
>                   
> <shadedPattern>org.commons.language.util.xwork</shadedPattern>
> maven 2.10
> JDK 1.6
>            Reporter: Martin Gainty
>         Attachments: shadepom.xml
>
>
> <!--
> Licensed to the Apache Software Foundation (ASF) under one
> or more contributor license agreements.  See the NOTICE file
> distributed with this work for additional information
> regarding copyright ownership.  The ASF licenses this file
> to you under the Apache License, Version 2.0 (the
> "License"); you may not use this file except in compliance
> with the License.  You may obtain a copy of the License at
> http://www.apache.org/licenses/LICENSE-2.0
> Unless required by applicable law or agreed to in writing,
> software distributed under the License is distributed on an
> "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
> KIND, either express or implied.  See the License for the
> specific language governing permissions and limitations
> under the License.
> -->
> <project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
> http://maven.apache.org/xsd/maven-4.0.0.xsd";>
> <modelVersion>4.0.0</modelVersion>
> <parent>
> <artifactId>maven-plugins</artifactId>
> <groupId>org.apache.maven.plugins</groupId>
> <version>13</version>
> </parent>
> <artifactId>maven-shade-plugin</artifactId>
> <version>1.2.1</version>
> <packaging>maven-plugin</packaging>
> <name>Maven Shade Plugin</name>
> <description>
> Repackages the project classes together with their dependencies into a single 
> uber-jar, optionally renaming classes.
> </description>
> <prerequisites>
> <maven>${mavenVersion}</maven>
> </prerequisites>
> <scm>
> <connection>
> scm:svn:http://svn.apache.org/repos/asf/maven/plugins/tags/maven-shade-plugin-1.2.1
> </connection>
> <developerConnection>
> scm:svn:https://svn.apache.org/repos/asf/maven/plugins/tags/maven-shade-plugin-1.2.1
> </developerConnection>
> <url>
> http://svn.apache.org/viewvc/maven/plugins/tags/maven-shade-plugin-1.2.1
> </url>
> </scm>
> <issueManagement>
> <system>jira</system>
> <url>http://jira.codehaus.org/browse/MSHADE</url>
> </issueManagement>
> <properties>
> <mavenVersion>2.0.6</mavenVersion>
> <currentVersion>${project.version}</currentVersion>
> </properties>
> <dependencies>
> <!-- Maven -->
> <!-- MCG -->
> <dependency>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-remote-resources-plugin</artifactId>
> <version>1.0</version>
> </dependency>
> <dependency>
> <groupId>org.codehaus.plexus</groupId>
> <artifactId>plexus-utils</artifactId>
> <version>1.4.5</version>
> </dependency>
> <!-- end MCG -->
> <dependency>
> <groupId>org.apache.maven</groupId>
> <artifactId>maven-plugin-api</artifactId>
> <version>${mavenVersion}</version>
> </dependency>
> <dependency>
> <groupId>org.apache.maven</groupId>
> <artifactId>maven-model</artifactId>
> <version>${mavenVersion}</version>
> </dependency>
> <dependency>
> <groupId>org.apache.maven</groupId>
> <artifactId>maven-project</artifactId>
> <version>${mavenVersion}</version>
> </dependency>
> <dependency>
> <groupId>org.apache.maven</groupId>
> <artifactId>maven-artifact</artifactId>
> <version>${mavenVersion}</version>
> </dependency>
> <!-- Plexus -->
> <dependency>
> <groupId>org.codehaus.plexus</groupId>
> <artifactId>plexus-container-default</artifactId>
> <version>1.0-alpha-9-stable-1</version>
> </dependency>
> <dependency>
> <groupId>org.codehaus.plexus</groupId>
> <artifactId>plexus-utils</artifactId>
> <version>1.5.5</version>
> </dependency>
> <!-- Others -->
> <dependency>
> <groupId>asm</groupId>
> <artifactId>asm</artifactId>
> <version>3.1</version>
> </dependency>
> <dependency>
> <groupId>asm</groupId>
> <artifactId>asm-commons</artifactId>
> <version>3.1</version>
> </dependency>
> <dependency>
> <groupId>jdom</groupId>
> <artifactId>jdom</artifactId>
> <version>1.0</version>
> </dependency>
> <dependency>
> <groupId>org.apache.maven.shared</groupId>
> <artifactId>maven-dependency-tree</artifactId>
> <version>1.1</version>
> </dependency>
> <dependency>
> <groupId>junit</groupId>
> <artifactId>junit</artifactId>
> <version>3.8.2</version>
> <scope>test</scope>
> </dependency>
> </dependencies>
> <build>
>   <plugins>
>     <plugin>
>         <groupId>org.apache.maven.plugins</groupId>
>         <artifactId>maven-shade-plugin</artifactId>
>         <version>1.2.1</version>
>     <executions>
>      <execution>
>             <phase>package</phase>
>             <goals>
>               <goal>shade</goal>
>             </goals>
>             <configuration>
>               <createSourcesJar>true</createSourcesJar>
>               <relocations>
>                 <relocation>
>                   <pattern>org.commons.language.util</pattern>
>                   
> <shadedPattern>org.commons.language.util.xwork</shadedPattern>
>                   <excludes>
>                   </excludes>
>                 </relocation>
>               </relocations>
>             </configuration>            
>      </execution>
>     </executions>
>    </plugin>      
>   </plugins>
> </build>
> <profiles>
> <profile>
> <id>run-its</id>
> <build>
> <plugins>
> <plugin>
> <artifactId>maven-invoker-plugin</artifactId>
> <version>1.3</version>
> <configuration>
> <debug>true</debug>
> <projectsDirectory>src/it</projectsDirectory>
> <cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo>
> <pomIncludes>
> <pomInclude>*/pom.xml</pomInclude>
> </pomIncludes>
> <preBuildHookScript>setup</preBuildHookScript>
> <postBuildHookScript>verify</postBuildHookScript>
> <localRepositoryPath>${project.build.directory}/local-repo</localRepositoryPath>
> <settingsFile>src/it/settings.xml</settingsFile>
> <goals>
> <goal>clean</goal>
> <goal>install</goal>
> </goals>
> </configuration>
> <executions>
> <execution>
> <id>integration-test</id>
> <goals>
> <goal>install</goal>
> <goal>run</goal>
> </goals>
> </execution>
> <execution>
> <id>package</id>
> <goals>
> <goal>shade</goal>
> </goals>
> </execution>
> </executions>
> </plugin>
> </plugins>
> </build>
> </profile>
> </profiles>
> </project>
> mvn package
> <!--
> Licensed to the Apache Software Foundation (ASF) under one
> or more contributor license agreements.  See the NOTICE file
> distributed with this work for additional information
> regarding copyright ownership.  The ASF licenses this file
> to you under the Apache License, Version 2.0 (the
> "License"); you may not use this file except in compliance
> with the License.  You may obtain a copy of the License at
> http://www.apache.org/licenses/LICENSE-2.0
> Unless required by applicable law or agreed to in writing,
> software distributed under the License is distributed on an
> "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
> KIND, either express or implied.  See the License for the
> specific language governing permissions and limitations
> under the License.
> -->
> <project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
> http://maven.apache.org/xsd/maven-4.0.0.xsd";>
> <modelVersion>4.0.0</modelVersion>
> <parent>
> <artifactId>maven-plugins</artifactId>
> <groupId>org.apache.maven.plugins</groupId>
> <version>13</version>
> </parent>
> <artifactId>maven-shade-plugin</artifactId>
> <version>1.2.1</version>
> <packaging>maven-plugin</packaging>
> <name>Maven Shade Plugin</name>
> <description>
> Repackages the project classes together with their dependencies into a single 
> uber-jar, optionally renaming classes.
> </description>
> <prerequisites>
> <maven>${mavenVersion}</maven>
> </prerequisites>
> <scm>
> <connection>
> scm:svn:http://svn.apache.org/repos/asf/maven/plugins/tags/maven-shade-plugin-1.2.1
> </connection>
> <developerConnection>
> scm:svn:https://svn.apache.org/repos/asf/maven/plugins/tags/maven-shade-plugin-1.2.1
> </developerConnection>
> <url>
> http://svn.apache.org/viewvc/maven/plugins/tags/maven-shade-plugin-1.2.1
> </url>
> </scm>
> <issueManagement>
> <system>jira</system>
> <url>http://jira.codehaus.org/browse/MSHADE</url>
> </issueManagement>
> <properties>
> <mavenVersion>2.0.6</mavenVersion>
> <currentVersion>${project.version}</currentVersion>
> </properties>
> <dependencies>
> <!-- Maven -->
> <!-- MCG -->
> <dependency>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-remote-resources-plugin</artifactId>
> <version>1.0</version>
> </dependency>
> <dependency>
> <groupId>org.codehaus.plexus</groupId>
> <artifactId>plexus-utils</artifactId>
> <version>1.4.5</version>
> </dependency>
> <!-- end MCG -->
> <dependency>
> <groupId>org.apache.maven</groupId>
> <artifactId>maven-plugin-api</artifactId>
> <version>${mavenVersion}</version>
> </dependency>
> <dependency>
> <groupId>org.apache.maven</groupId>
> <artifactId>maven-model</artifactId>
> <version>${mavenVersion}</version>
> </dependency>
> <dependency>
> <groupId>org.apache.maven</groupId>
> <artifactId>maven-project</artifactId>
> <version>${mavenVersion}</version>
> </dependency>
> <dependency>
> <groupId>org.apache.maven</groupId>
> <artifactId>maven-artifact</artifactId>
> <version>${mavenVersion}</version>
> </dependency>
> <!-- Plexus -->
> <dependency>
> <groupId>org.codehaus.plexus</groupId>
> <artifactId>plexus-container-default</artifactId>
> <version>1.0-alpha-9-stable-1</version>
> </dependency>
> <dependency>
> <groupId>org.codehaus.plexus</groupId>
> <artifactId>plexus-utils</artifactId>
> <version>1.5.5</version>
> </dependency>
> <!-- Others -->
> <dependency>
> <groupId>asm</groupId>
> <artifactId>asm</artifactId>
> <version>3.1</version>
> </dependency>
> <dependency>
> <groupId>asm</groupId>
> <artifactId>asm-commons</artifactId>
> <version>3.1</version>
> </dependency>
> <dependency>
> <groupId>jdom</groupId>
> <artifactId>jdom</artifactId>
> <version>1.0</version>
> </dependency>
> <dependency>
> <groupId>org.apache.maven.shared</groupId>
> <artifactId>maven-dependency-tree</artifactId>
> <version>1.1</version>
> </dependency>
> <dependency>
> <groupId>junit</groupId>
> <artifactId>junit</artifactId>
> <version>3.8.2</version>
> <scope>test</scope>
> </dependency>
> </dependencies>
> <build>
>   <plugins>
>     <plugin>
>         <groupId>org.apache.maven.plugins</groupId>
>         <artifactId>maven-shade-plugin</artifactId>
>         <version>1.2.1</version>
>     <executions>
>      <execution>
>             <phase>package</phase>
>             <goals>
>               <goal>shade</goal>
>             </goals>
>             <configuration>
>               <createSourcesJar>true</createSourcesJar>
>               <relocations>
>                 <relocation>
>                 <relocation>
>                   <pattern>org.apache.commons.lang</pattern>
>                   <shadedPattern>org.apache.commons.lang.xwork</shadedPattern>
>                 </relocation>
>                   <excludes>
>                   </excludes>
>                 </relocation>
>               </relocations>
>             </configuration>            
>      </execution>
>     </executions>
>    </plugin>      
>   </plugins>
> </build>
> <profiles>
> <profile>
> <id>run-its</id>
> <build>
> <plugins>
> <plugin>
> <artifactId>maven-invoker-plugin</artifactId>
> <version>1.3</version>
> <configuration>
> <debug>true</debug>
> <projectsDirectory>src/it</projectsDirectory>
> <cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo>
> <pomIncludes>
> <pomInclude>*/pom.xml</pomInclude>
> </pomIncludes>
> <preBuildHookScript>setup</preBuildHookScript>
> <postBuildHookScript>verify</postBuildHookScript>
> <localRepositoryPath>${project.build.directory}/local-repo</localRepositoryPath>
> <settingsFile>src/it/settings.xml</settingsFile>
> <goals>
> <goal>clean</goal>
> <goal>install</goal>
> </goals>
> </configuration>
> <executions>
> <execution>
> <id>integration-test</id>
> <goals>
> <goal>install</goal>
> <goal>run</goal>
> </goals>
> </execution>
> <execution>
> <id>package</id>
> <goals>
> <goal>shade</goal>
> </goals>
> </execution>
> </executions>
> </plugin>
> </plugins>
> </build>
> </profile>
> </profiles>
> </project>
> to reproduce:
> mvn package
> reference in Source file
> import org.apache.commons.lang.xwork.StringUtils;
> produces this error
> ServletUrlRenderer.java:[98,45] package org.apache.commons.lang.xwork does 
> not exist
> *should have* been rewritten using the shade configuration
>                 <relocation>
>                   <pattern>org.apache.commons.lang</pattern>
>                   <shadedPattern>org.apache.commons.lang.xwork</shadedPattern>
>                 </relocation>
> MCG 23 Sept

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to