Github user vanzin commented on a diff in the pull request:

    https://github.com/apache/spark/pull/10780#discussion_r52047530
  
    --- Diff: network/yarn/pom.xml ---
    @@ -96,6 +113,61 @@
               </execution>
             </executions>
           </plugin>
    +
    +      <!-- probes to validate that those dependencies which must be shaded 
are  -->
    +      <plugin>
    +        <groupId>org.apache.maven.plugins</groupId>
    +        <artifactId>maven-antrun-plugin</artifactId>
    +        <executions>
    +          <execution>
    +            <phase>verify</phase>
    +            <goals>
    +              <goal>run</goal>
    +            </goals>
    +            <configuration>
    +              <target>
    +                <macrodef name="shaded">
    +                  <attribute name="resource"/>
    +                  <sequential>
    +                    <fail message="Not found ${shade}@{resource}">
    +                      <condition>
    +                        <not>
    +                          <resourceexists>
    +                            <zipentry zipfile="${shuffle.jar}" 
name="${shade}@{resource}"/>
    +                          </resourceexists>
    +                        </not>
    +                      </condition>
    +                    </fail>
    +                  </sequential>
    +                </macrodef>
    +                <echo>Verifying dependency shading</echo>
    +                <shaded 
resource="com/fasterxml/jackson/core/JsonParser.class" />
    +                <shaded 
resource="com/fasterxml/jackson/annotation/JacksonAnnotation.class" />
    +                <shaded 
resource="com/fasterxml/jackson/databind/JsonSerializer.class" />
    +              </target>
    +            </configuration>
    +          </execution>
    +        </executions>
    +      </plugin>
         </plugins>
       </build>
    +
    +  <profiles>
    +    <profile>
    +      <id>leveldb-provided</id>
    --- End diff --
    
    This is way more complicated than it needs to be. See how 
`hadoop.deps.scope` works, for example.
    
    In fact, declaring the leveldb dependency with `${hadoop.deps.scope}` scope 
should be enough, since if you don't want to include it it probably means 
you're taking it from Hadoop anyway.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to