Github user steveloughran commented on the pull request:
https://github.com/apache/spark/pull/5119#issuecomment-86659856
As an experiment, I changed the plugin declaration to exclude the main JAR
phase, that is, commented out this bit:
```xml
<execution>
<id>prepare-jar</id>
<phase>prepare-package</phase>
<goals>
<goal>jar</goal>
</goals>
</execution>
```
Running {{mvn help:effective-pom}} showed that the entire {{<executions>}}
section had been overridden, with the result that the the main build didn't
work: jars weren't being published.
```xml
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<version>2.4</version>
<executions>
<execution>
<id>prepare-test-jar</id>
<phase>prepare-package</phase>
<goals>
<goal>test-jar</goal>
</goals>
<configuration>
<excludes>
<exclude>log4j.properties</exclude>
</excludes>
<archive>
<manifestEntries>
<mode>development</mode>
<url>http://spark.apache.org/</url>
</manifestEntries>
<manifest>
<addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
</manifest>
</archive>
</configuration>
</execution>
</executions>
```
To summarise: yes, you do need to re-declare parent executions when adding
them. This is not just superstition.
---
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]