polyglot-maven: [polyglot-yaml] does not handle shade plugin

this valid xml shade configuration:

        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-shade-plugin</artifactId>
            <version>2.4.2</version>
            <executions>
                <execution>
                    <phase>package</phase>
                    <goals>
                        <goal>shade</goal>
                    </goals>
                    <configuration>
                        <transformers>
                            <transformer
                                    implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
                                <mainClass>Xxxx</mainClass>
                            </transformer>
                            <transformer
                                    implementation="org.apache.maven.plugins.shade.resource.DontIncludeResourceTransformer">
                                <resource>
                                    .groovy
                                </resource>
                            </transformer>
                        </transformers>
                        <artifactSet>
                            <excludes>
                                <exclude>META-INF/*.groovy</exclude>
                            </excludes>
                        </artifactSet>
                    </configuration>
                </execution>
            </executions>
        </plugin>

is translated into:

- artifactId: maven-shade-plugin
    executions:
   - configuration:
         transformers:
         transformer: {resource: .groovy}
        artifactSet:
        excludes: {exclude: META-INF/*.groovy}
        goals: [shade]
        id: default
       inherited: true
       phase: package
       priority: 0
extensions: false
groupId: org.apache.maven.plugins
inherited: true
version: 2.4.2

which fails to compile.

About this issue

  • Original URL
  • State: open
  • Created 9 years ago
  • Reactions: 1
  • Comments: 17 (6 by maintainers)

Most upvoted comments

After digging Maven docs, found a working version:

build:
  plugins:
    - artifactId: maven-shade-plugin
      groupId: org.apache.maven.plugins
      version: 2.4.3
      executions:
        - phase: package
          goals: [shade]
          configuration:
            transformers:
              org.apache.maven.plugins.shade.resource.ManifestResourceTransformer:
                manifestEntries:
                  Main-Class: alfaorders.AlfaOrdersMain

Is this now fixed since the linked PR is merged?