You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@beam.apache.org by Ron Gonzalez <zl...@yahoo.com> on 2018/01/15 06:51:54 UTC

Spark runner maven shade plugin

Hi,  I added the maven build plugin in the Spark runner page:
<plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-shade-plugin</artifactId>
  <configuration>
    <createDependencyReducedPom>false</createDependencyReducedPom>
    <filters>
      <filter>
        <artifact>*:*</artifact>
        <excludes>
          <exclude>META-INF/*.SF</exclude>
          <exclude>META-INF/*.DSA</exclude>
          <exclude>META-INF/*.RSA</exclude>
        </excludes>
      </filter>
    </filters>
  </configuration>
  <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.ServicesResourceTransformer"/>
        </transformers>
      </configuration>
    </execution>
  </executions>
</plugin>
but I'm getting the following error:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-shade-plugin:2.4.3:shade (default) on project transform: Unable to parse configuration of mojo org.apache.maven.plugins:maven-shade-plugin:2.4.3:shade for parameter resource: Cannot find 'resource' in class org.apache.maven.plugins.shade.resource.ServicesResourceTransformer -> [Help 1]
Please advise...
Thanks,Ron

Re: Spark runner maven shade plugin

Posted by Alexey Romanenko <ar...@gmail.com>.
Hi Ron,

Could you show the whole pom.xml which you actually used? 

I can guess that it was an issue with transformers configuration because seems ServicesResourceTransformer doesn’t support “resource" parameter. 

WBR,
Alexey

> On 15 Jan 2018, at 07:51, Ron Gonzalez <zl...@yahoo.com> wrote:
> 
> Hi,
>   I added the maven build plugin in the Spark runner page:
> 
> <plugin>
>   <groupId>org.apache.maven.plugins</groupId>
>   <artifactId>maven-shade-plugin</artifactId>
>   <configuration>
>     <createDependencyReducedPom>false</createDependencyReducedPom>
>     <filters>
>       <filter>
>         <artifact>*:*</artifact>
>         <excludes>
>           <exclude>META-INF/*.SF</exclude>
>           <exclude>META-INF/*.DSA</exclude>
>           <exclude>META-INF/*.RSA</exclude>
>         </excludes>
>       </filter>
>     </filters>
>   </configuration>
>   <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.ServicesResourceTransformer"/>
>         </transformers>
>       </configuration>
>     </execution>
>   </executions>
> </plugin>
> 
> but I'm getting the following error:
> 
> [ERROR] Failed to execute goal org.apache.maven.plugins:maven-shade-plugin:2.4.3:shade (default) on project transform: Unable to parse configuration of mojo org.apache.maven.plugins:maven-shade-plugin:2.4.3:shade for parameter resource: Cannot find 'resource' in class org.apache.maven.plugins.shade.resource.ServicesResourceTransformer -> [Help 1]
> 
> Please advise...
> 
> Thanks,
> Ron
>