I've had a session tidying the pom.xml of taverna-language (in https://github.com/taverna-incubator/incubator-taverna-language )
I removed numerous sections like this: - <build> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-compiler-plugin</artifactId> - <configuration> - <source>1.7</source> - <target>1.7</target> - </configuration> - </plugin> - <plugin> - <groupId>org.apache.rat</groupId> - <artifactId>apache-rat-plugin</artifactId> - </plugin> - - </plugins> - </build> These were seemingly copy-pasted into every module. I removed these as they are inherited through the Maven parents. Note that our parent hierarchies now are: > org.apache:apache:14 > org.apache.taverna:taverna-parent:1-incubating-SNAPSHOT > org.apache.taverna.language:taverna-language:0.15.0-incubating-SNAPSHOT (last one will obviously vary pr repository). We don't have deeper parents, as the git repositories have flat lists of submodules. To see the effective pom after inheritance, in Eclipse click to the "Effective POM" tab - with Maven use: mvn help:effective-pom To look at settings from the apache super-parent, see http://central.maven.org/maven2/org/apache/apache/16/apache-16.pom The Taverna parent: https://github.com/taverna-incubator/incubator-taverna-maven-parent/blob/master/pom.xml Please edit the Taverna parent settings - they are not set in stone! (But do remember they affect all the repositories). It should not be necessary to explicitly list an inherited maven plugin unless the configuration needs to be tweaked. For some plugins, like the rat-plugin, this might mean copying the whole configuration from the parent - but generally just listing the particular properties to override is enough. Which thing goes where? Well.. please discuss! My views: General build-settings (e.g. java version) goes in taverna-parent unless they are already set in the apache parent (which has good default for all the standard plugins). Things needed for organizing specific sources, like compiling xsds, should be configured in the <pluginManagement> in repository parent and activated/specialized in the modules that need it. Versions of external dependencies goes in taverna-parent under <properties> (unless you truly need an older version, in which case it should probably be in <properties> of the repository parent)). <properties> defining version of our own intra-dependencies like <taverna.engine.version> goes in the repository.parent. A repository should not listing intra-dependencies that are "below" it in the list of http://taverna.incubator.apache.org/download/code/ ..as that would easily mean circular dependencies. If <dependencyManagement> is needed (to override transitive dependency versions), it goes in the repository parent. Usually using the <properties> is enough. <dependencies> goes in each module. (but junit-testscope-dependency is in taverna parent) <scm> and <repositories> goes in each repository parent in case someone tries to check out and build a SNAPSHOT repository. For example: maven-jaxb2-plugin is configured in incubator-taverna-language/pom.xml: https://github.com/taverna-incubator/incubator-taverna-language/blob/master/pom.xml#L172 and activated in some of the modules, like: https://github.com/taverna-incubator/incubator-taverna-language/blob/master/taverna-scufl2-schemas/pom.xml#L37 Here you see that <schemaDirectory is overriden - the remaining settings are inherited. -- Stian Soiland-Reyes Apache Taverna (incubating) http://orcid.org/0000-0001-9842-9718
