Thank you!

On Sun, Dec 12, 2010 at 2:50 AM, Anders Hammar <and...@hammar.net> wrote:

> Yes, adding a plugin in the pluginManagement section doesn't actual bind
> it.
> For a binding, you need to have it in build.plugins.
>
> /Anders
>
> On Sun, Dec 12, 2010 at 08:33, Elliot Huntington <
> elliot.hunting...@gmail.com> wrote:
>
> > Yes, here is the build section of pom.xml:
> >
> >    <build>
> >        <finalName>${artifactId}</finalName>
> >        <pluginManagement>
> >            <plugins>
> >                <plugin>
> >                    <artifactId>maven-compiler-plugin</artifactId>
> >                    <version>2.3.1</version>
> >                    <configuration>
> >                        <source>1.6</source>
> >                        <target>1.6</target>
> >                    </configuration>
> >                </plugin>
> >                 <plugin>
> >                    <groupId>org.apache.maven.plugins</groupId>
> >                     <artifactId>maven-jar-plugin</artifactId>
> >                    <version>2.3.1</version>
> >                    <configuration>
> >                        <archive>
> >                            <manifest>
> >                                <addClasspath>true</addClasspath>
> >                            </manifest>
> >                            <manifestEntries>
> >
> > <SplashScreen-Image>splash.jpg</SplashScreen-Image>
> >                                <Main-Class>my.package.Main</Main-Class>
> >                            </manifestEntries>
> >                        </archive>
> >                        <finalName>${artifactId}-tmp</finalName>
> >                    </configuration>
> >                </plugin>
> >                 <plugin>
> >                    <groupId>org.apache.maven.plugins</groupId>
> >                    <artifactId>maven-shade-plugin</artifactId>
> >                    <version>1.4</version>
> >                    <executions>
> >                        <execution>
> >                            <phase>package</phase>
> >                            <goals>
> >                                <goal>shade</goal>
> >                            </goals>
> >                            <configuration>
> >
> > <shadedArtifactAttached>true</shadedArtifactAttached>
> >
> > <shadedClassifierName>shaded</shadedClassifierName>
> >                                 <transformers>
> >                                    <transformer
> >
> >
> implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
> >
> > <resource>META-INF/spring.handlers</resource>
> >                                    </transformer>
> >                                    <transformer
> >
> >
> implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
> >
> > <resource>META-INF/spring.schemas</resource>
> >                                    </transformer>
> >                                </transformers>
> >                            </configuration>
> >                        </execution>
> >                    </executions>
> >                </plugin>
> >             </plugins>
> >        </pluginManagement>
> >    </build>
> >
> > Here is the output from running mvn:
> >
> > C:\projects\personal\svn\myproject>mvn clean package
> -Dmaven.test.skip=true
> > [INFO] Scanning for projects...
> > [INFO]
> > ------------------------------------------------------------------------
> > [INFO] Building myproject
> > [INFO]    task-segment: [clean, package]
> > [INFO]
> > ------------------------------------------------------------------------
> > [INFO] *[clean:clean {execution: default-clean}]*
> > [INFO] Deleting directory C:\projects\personal\svn\myproject\target
> > [INFO] *[resources:resources {execution: default-resources}]*
> > [INFO] Using 'UTF-8' encoding to copy filtered resources.
> > [INFO] Copying 12 resources
> > [INFO] *[compiler:compile {execution: default-compile}]*
> > [INFO] Compiling 40 source files to
> > C:\projects\personal\svn\myproject\target\classes
> > [INFO] *[resources:testResources {execution: default-testResources}]*
> > [INFO] Using 'UTF-8' encoding to copy filtered resources.
> > [INFO] skip non existing resourceDirectory
> > C:\projects\personal\svn\myproject\src\test\resources
> > [INFO] *[compiler:testCompile {execution: default-testCompile}]*
> > [INFO] Not compiling test sources
> > [INFO] *[surefire:test {execution: default-test}]*
> > [INFO] Tests are skipped.
> > [INFO] *[jar:jar {execution: default-jar}]*
> > [INFO] Building jar:
> > C:\projects\personal\svn\myproject\target\myproject-tmp.jar
> > [INFO]
> > ------------------------------------------------------------------------
> > [INFO] BUILD SUCCESSFUL
> > [INFO]
> > ------------------------------------------------------------------------
> > [INFO] Total time: 13 seconds
> > [INFO] Finished at: Sun Dec 12 00:24:54 MST 2010
> > [INFO] Final Memory: 36M/196M
> > [INFO]
> > ------------------------------------------------------------------------
> >
> > Based on this output, and looking in the jar that is created, the shade
> > plugin was not invoked. I don't see any output that indicates that
> > [shade:shade {execution: ...}] is being executed.
> >
> > Am I missing something here?
> >
> > Thanks,
> > Elliot
> >
> >
> > On Thu, Dec 9, 2010 at 11:28 PM, Anders Hammar <and...@hammar.net>
> wrote:
> >
> > > Do you have this snippet in the pluginManagement section by any chance?
> > If
> > > so, it does actually bind it.
> > >
> > > /Anders
> > >
> > > On Thu, Dec 9, 2010 at 23:32, Elliot Huntington <
> > > elliot.hunting...@gmail.com
> > > > wrote:
> > >
> > > > Thank you! I don't know how I overlooked that. I thought I checked
> the
> > > > repository and saw it there.
> > > >
> > > > Now, for some reason the plugin is not activated when I run >mvn
> > package
> > > >
> > > > I have my pom.xml configured with this:
> > > >
> > > >                <plugin>
> > > >                    <groupId>org.apache.maven.plugins</groupId>
> > > >                    <artifactId>maven-shade-plugin</artifactId>
> > > >                    <version>1.4</version>
> > > >                    <executions>
> > > >                        <execution>
> > > >                            <phase>package</phase>
> > > >                            <goals>
> > > >                                <goal>shade</goal>
> > > >                            </goals>
> > > >                            <configuration>
> > > >
> > > > <!--<shadedArtifactAttached>true</shadedArtifactAttached>-->
> > > >
> > > > <shadedClassifierName>shadedClassifierName</shadedClassifierName>
> > > >                                <transformers>
> > > >                                    <transformer
> > > >
> > > >
> > >
> >
> implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
> > > >
> > > > <resource>META-INF/spring.handlers</resource>
> > > >                                    </transformer>
> > > >                                    <transformer
> > > >
> > > >
> > >
> >
> implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
> > > >
> > > > <resource>META-INF/spring.schemas</resource>
> > > >                                    </transformer>
> > > >                                </transformers>
> > > >                            </configuration>
> > > >                        </execution>
> > > >                    </executions>
> > > >                </plugin>
> > > >
> > > > What do I need to do so that running the command "mvn package" will
> > > > generate
> > > > the artifact {$artifactId}-shadedClassifierName.jar?
> > > >
> > > > On Thu, Dec 9, 2010 at 2:59 PM, Justin Edelson <
> > jus...@justinedelson.com
> > > > >wrote:
> > > >
> > > > > According to http://maven.apache.org/plugins/maven-shade-plugin/,
> > the
> > > > > current version of the stage plugin is 1.4, i.e. 1.4.3 hasn't been
> > > > > released.
> > > > >
> > > > > On Thu, Dec 9, 2010 at 4:03 PM, Elliot Huntington <
> > > > > elliot.hunting...@gmail.com> wrote:
> > > > >
> > > > > > Hi,
> > > > > >
> > > > > > Maven is having problems downloading dependencies. Any
> suggestions?
> > > > > >
> > > > > > Here is the command line output
> > > > > >
> > > > > >
> > > > > > C:\project>mvn -version
> > > > > > Apache Maven 2.0.11 (r909250; 2010-02-11 22:55:50-0700)
> > > > > > Java version: 1.6.0_21
> > > > > > Java home: C:\devtools\Java\jdk1.6.0_21\jre
> > > > > > Default locale: en_US, platform encoding: Cp1252
> > > > > > OS name: "windows 7" version: "6.1" arch: "amd64" Family:
> "windows"
> > > > > > C:\project>
> > > > > > C:\project>
> > > > > > C:\project>mvn shade:shade
> > > > > > [INFO] Scanning for projects...
> > > > > > [INFO] Searching repository for plugin with prefix: 'shade'.
> > > > > > Downloading:
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-shade-plugin/1.4.3/maven-shade-plugin-1.4.3.pom
> > > > > > [INFO] Unable to find resource
> > > > > > 'org.apache.maven.plugins:maven-shade-plugin:pom:1.4.3' in
> > repository
> > > > > > central (http://repo1.maven.org/maven2)
> > > > > > Downloading:
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> http://maven.springframework.org/release//org/apache/maven/plugins/maven-shade-plugin/1.4.3/maven-shade-plugin-1.4.3.pom
> > > > > > [INFO] Unable to find resource
> > > > > > 'org.apache.maven.plugins:maven-shade-plugin:pom:1.4.3' in
> > repository
> > > > > > com.springsource.repository.maven.release (
> > > > > > http://maven.springframework.org/release/)
> > > > > > Downloading:
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> http://repository.jboss.org/nexus/content/groups/public/org/apache/maven/plugins/maven-shade-plugin/1.4.3/maven-shade-plugin-1.4.3.pom
> > > > > > [INFO] Unable to find resource
> > > > > > 'org.apache.maven.plugins:maven-shade-plugin:pom:1.4.3' in
> > repository
> > > > > JBoss
> > > > > > Repo (http://repository.jboss.org/nexus/content/groups/public)
> > > > > > Downloading:
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> http://download.java.net/maven/2//org/apache/maven/plugins/maven-shade-plugin/1.4.3/maven-shade-plugin-1.4.3.pom
> > > > > > [INFO] Unable to find resource
> > > > > > 'org.apache.maven.plugins:maven-shade-plugin:pom:1.4.3' in
> > repository
> > > > > > maven2-repository.dev.java.net (
> http://download.java.net/maven/2/)
> > > > > > Downloading:
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-shade-plugin/1.4.3/maven-shade-plugin-1.4.3.pom
> > > > > > [INFO] Unable to find resource
> > > > > > 'org.apache.maven.plugins:maven-shade-plugin:pom:1.4.3' in
> > repository
> > > > > > central (http://repo1.maven.org/maven2)
> > > > > > [INFO]
> > > > > >
> > > >
> > ------------------------------------------------------------------------
> > > > > > [ERROR] BUILD ERROR
> > > > > > [INFO]
> > > > > >
> > > >
> > ------------------------------------------------------------------------
> > > > > > [INFO] Error building POM (may not be this project's POM).
> > > > > >
> > > > > >
> > > > > > Project ID: org.apache.maven.plugins:maven-shade-plugin
> > > > > >
> > > > > > Reason: POM 'org.apache.maven.plugins:maven-shade-plugin' not
> found
> > > in
> > > > > > repository: Unable to download the artifact from any repository
> > > > > >
> > > > > >  org.apache.maven.plugins:maven-shade-plugin:pom:1.4.3
> > > > > >
> > > > > > from the specified remote repositories:
> > > > > >  JBoss Repo (
> > http://repository.jboss.org/nexus/content/groups/public
> > > ),
> > > > > >  com.springsource.repository.maven.release (
> > > > > > http://maven.springframework.org/release/),
> > > > > >  maven2-repository.dev.java.net (
> http://download.java.net/maven/2/
> > ),
> > > > > >  central (http://repo1.maven.org/maven2)
> > > > > >
> > > > > >  for project org.apache.maven.plugins:maven-shade-plugin
> > > > > >
> > > > > >
> > > > > > [INFO]
> > > > > >
> > > >
> > ------------------------------------------------------------------------
> > > > > > [INFO] For more information, run Maven with the -e switch
> > > > > > [INFO]
> > > > > >
> > > >
> > ------------------------------------------------------------------------
> > > > > > [INFO] Total time: 1 second
> > > > > > [INFO] Finished at: Thu Dec 09 14:02:46 MST 2010
> > > > > > [INFO] Final Memory: 3M/121M
> > > > > > [INFO]
> > > > > >
> > > >
> > ------------------------------------------------------------------------
> > > > > > C:\project>
> > > > > >
> > > > > > --
> > > > > > Elliot
> > > > > >
> > > > >
> > > >
> > > >
> > > >
> > > > --
> > > > Elliot
> > > >
> > >
> >
> >
> >
> > --
> > Elliot
> >
>



-- 
Elliot

Reply via email to