FAQ
Hi there,

I'm running into an error when trying to build my project using the shade plugin. I need to merge some XML-Files, so the interesting part of my pom.xml looks like 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>
<transformers>
<transformer
implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<mainClass> de.mms_dresden.t4g.validator.Main </mainClass>
</transformer>
<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>
<transformer
implementation="org.apache.maven.plugins.shade.resource.XmlAppendingTrans‌​former">
<resource>META-INF/wsdl.plugin.xml</resource>
<ignoreDtd>false</ignoreDtd>
</transformer>
</transformers>
<shadedArtifactAttached>true</shadedArtifactAttached>
<!-- optional -->
<shadedClassifierName>executable</shadedClassifierName>
</configuration>
</execution>
</executions>
</plugin>

Stacktrace:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-shade-plugin:1.4:shade (default) on project validator: Unable to parse configuration of mojo org.apache.maven.plugins:maven-shade-plugin:1.4:shade: ClassNotFoundException: Class name which was explicitly given in configuration using 'implementation' attribute: 'org.apache.maven.plugins.shade.resource.XmlAppendingTrans‌​former' cannot be loaded -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-shade-plugin:1.4:shade (default) on project validator: Unable to parse configuration of mojo org.apache.maven.plugins:maven-shade-plugin:1.4:shade: ClassNotFoundException: Class name which was explicitly given in configuration using 'implementation' attribute: 'org.apache.maven.plugins.shade.resource.XmlAppendingTrans‌​former' cannot be loaded
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:221)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: org.apache.maven.plugin.PluginConfigurationException: Unable to parse configuration of mojo org.apache.maven.plugins:maven-shade-plugin:1.4:shade: ClassNotFoundException: Class name which was explicitly given in configuration using 'implementation' attribute: 'org.apache.maven.plugins.shade.resource.XmlAppendingTrans‌​former' cannot be loaded
at org.apache.maven.plugin.internal.DefaultMavenPluginManager.populatePluginFields(DefaultMavenPluginManager.java:597)
at org.apache.maven.plugin.internal.DefaultMavenPluginManager.getConfiguredMojo(DefaultMavenPluginManager.java:529)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:92)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
... 19 more
Caused by: org.codehaus.plexus.component.configurator.ComponentConfigurationException: ClassNotFoundException: Class name which was explicitly given in configuration using 'implementation' attribute: 'org.apache.maven.plugins.shade.resource.XmlAppendingTrans‌​former' cannot be loaded
at org.codehaus.plexus.component.configurator.converters.AbstractConfigurationConverter.getClassForImplementationHint(AbstractConfigurationConverter.java:80)
at org.codehaus.plexus.component.configurator.converters.composite.ArrayConverter.getChildType(ArrayConverter.java:147)
at org.codehaus.plexus.component.configurator.converters.composite.ArrayConverter.fromChildren(ArrayConverter.java:125)
at org.codehaus.plexus.component.configurator.converters.composite.ArrayConverter.fromConfiguration(ArrayConverter.java:91)
at org.codehaus.plexus.component.configurator.converters.ComponentValueSetter.configure(ComponentValueSetter.java:348)
at org.codehaus.plexus.component.configurator.converters.composite.ObjectWithFieldsConverter.processConfiguration(ObjectWithFieldsConverter.java:161)
at org.codehaus.plexus.component.configurator.BasicComponentConfigurator.configureComponent(BasicComponentConfigurator.java:56)
at org.apache.maven.plugin.internal.DefaultMavenPluginManager.populatePluginFields(DefaultMavenPluginManager.java:567)
... 22 more
Caused by: java.lang.ClassNotFoundException: org.apache.maven.plugins.shade.resource.XmlAppendingTrans‌​former
at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:50)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:244)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:230)
at org.codehaus.plexus.component.configurator.converters.AbstractConfigurationConverter.getClassForImplementationHint(AbstractConfigurationConverter.java:68)
... 29 more

I hope anyone can help me out with this. Any help will be appreciated.

Regards,
Benjamin

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org

Search Discussions

  • Thorsten Heit at Nov 29, 2012 at 10:21 am
    Hi Benjamin,
    I'm running into an error when trying to build my project using the
    shade plugin. I need to merge some XML-Files, so the interesting
    part of my pom.xml looks like this: *snip*
    <transformer

    implementation="org.apache.maven.plugins.shade.resource.XmlAppendingTrans‌​
    former">
    ^^^^^^^^^^
    Stacktrace:

    [ERROR] Failed to execute goal org.apache.maven.plugins:maven-shade-
    plugin:1.4:shade (default) on project validator: Unable to parse
    configuration of mojo org.apache.maven.plugins:maven-shade-plugin:1.
    4:shade: ClassNotFoundException: Class name which was explicitly
    given in configuration using 'implementation' attribute:
    'org.apache.maven.plugins.shade.resource.XmlAppendingTrans‌​former'
    cannot be loaded -> [Help 1]
    Have a look at the error message: Obviously you have a spelling error in
    your transformer declaration; see above...


    HTH

    Thorsten

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupusers @
categoriesmaven
postedNov 29, '12 at 10:06a
activeNov 29, '12 at 10:21a
posts2
users2
websitemaven.apache.org
irc#maven

2 users in discussion

Thorsten Heit: 1 post Benjamin Süß: 1 post

People

Translate

site design / logo © 2019 Grokbase