Of course one parent POM can have another parent. This is usual practice to have specific configuration in second parent POM which is aggregator in reactor (multi-module) project. Regarding plugin inheritance the parent POM (single inheritance) would be the way to go. Regarding complex dependencies inheritance : https://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html http://books.sonatype.com/mvnref-book/reference/pom-relationships-sect-project-relationships.html http://books.sonatype.com/mvnref-book/reference/pom-relationships-sect-pom-best-practice.html http://books.sonatype.com/mvnref-book/reference/pom-relationships-sect-project-dependencies.html
I would not spend time to write a plugin. Instead I would use existing Maven features and maybe Maven profiles if really necessary. On Wed, Oct 7, 2015 at 10:43 AM, Stian Soiland-Reyes-2 [via Maven] < [email protected]> wrote: > Thanks for your suggestions. > > I am not making this plugin for one particular project (although I am > using the Open PHACTS data as a use case), but for any project that > needs to distribute datasets. > > > Maven-based projects and organizations typically already have existing > parent poms. > > Is it possible to do multiple parent-pom inheritance/merging, or are > you suggesting a copy-and-paste practice from say a wiki page to the > individual parent poms..? > > > My plugin also wants to capture additional execution provenance of the > Maven build, e.g. operating system and Java version, and propagating > upstream metadata, e.g. adding pav:retrievedFrom statements for > downloaded files, prov:wasDerivedFrom for derived data, and > propagation of upstream licensing data, e.g. as required by Creative > Commons. It is things like this that is my main goal of this > approach. > > > Suggesting the use of a plugin in combination with a fixed parent pom > (or copy/paste) increases the barrier to entry, although of course I > understand you can't do "everything" from a plugin and that much can > also be achieved by just a documentation-based approach. I will > certainly have a go at this for comparison, as documentation and > examples would be really important for non-Maven users as well. > > > On 7 October 2015 at 07:39, Tibor Digana <[hidden email] > <http:///user/SendEmail.jtp?type=node&node=5847570&i=0>> wrote: > > > I can tell you that parent POM configuration is the way to go. > > I believe XML is very well understandable format for devs and non-devs > as > > well. > > I think it's worth to teach people reading this staff rather then > teaching > > them MOJO plugin maintenance and custom config. > > > > On Tue, Oct 6, 2015 at 6:07 PM, Stian Soiland-Reyes <[hidden email] > <http:///user/SendEmail.jtp?type=node&node=5847570&i=1>> > > wrote: > > > >> So I guess you mean > >> > >> > https://maven.apache.org/surefire/maven-surefire-plugin/examples/configuring-classpath.html > >> > >> How can I modify the surefire configuration from a different plugin? > >> > >> > >> My aim with this plugin is for someone to be able to make a data > >> archive in a one-go plugin configuration, and then to be able to do > >> src/test/java type junit tests. (but also adding support for > >> additional scripting languages like jRuby and Jython) > >> > >> The Assembly plugin is a bit of a beast for non-Maven experts to deal > >> with, so it doesn't (on its own) achieve this goal. My plugin could > >> try to use it by stealth, of course. > >> > >> Is it possible for one plugin to inject configuration for a second > >> plugin? I know I can activate a plugin goal from > >> plexus/components.xml, but how can I provide its configuration? > >> > >> > >> Within the tests I want to be able to do say > >> getClass().getResourceAsStream("data/my-artifact/data.csv") to access > >> resources from the ZIP file. > >> > >> > >> Here's an example of using the data-plugin with a unit tests: > >> > >> https://github.com/openphacts/ops-uniprot-linksets/tree/data-plugin > >> > >> > >> I used the additionalClassPathElement, but then I had to do things > like: > >> > >> <configuration> > >> <additionalClasspathElements> > >> > >> > > <additionalClasspathElement>${project.build.directory}/${project.artifactId}-${project.version}.data.zip</additionalClasspathElement> > > >> </additionalClasspathElements> > >> </configuration> > >> > >> I would love for my data-maven-plugin to be able to inject this kind of > >> magic. > >> > >> I know it can be put in a super-pom, but different projects that might > >> want to use this data plugins might have different super-poms. > >> > >> > >> > >> On 6 October 2015 at 10:11, Tibor Digana <[hidden email] > <http:///user/SendEmail.jtp?type=node&node=5847570&i=2>> wrote: > >> > test classpath can be extended by extraordinary JAR. > >> > Did you see surefire documentation? > >> > It's described there. > >> > > >> > On Tue, Oct 6, 2015 at 11:06 AM, Stian Soiland-Reyes-2 [via Maven] < > >> > [hidden email] > <http:///user/SendEmail.jtp?type=node&node=5847570&i=3>> wrote: > >> > > >> >> Hi! > >> >> > >> >> I'm developing a Maven plugin for a custom <packaging> > >> >> > >> >> https://github.com/stain/data-maven-plugin > >> >> > >> >> Is it possible for a plugin to add a JAR file to the test classpath? > >> I've > >> >> tried to modify project.getArtifacts() from the INITIALIZATION > stage, > >> >> without luck. > >> >> > >> >> Catch: the JAR file is the project artifact, and is made during the > >> >> compile > >> >> stage as I want to test it during the test stage. > >> >> > >> >> (The reason for this is that this plugin supports making ZIP > archives of > >> >> data files, which could be large and therefore I want to avoid > copying > >> >> them > >> >> to target/classes.) > >> >> > >> >> > >> >> ------------------------------ > >> >> If you reply to this email, your message will be added to the > discussion > >> >> below: > >> >> > >> >> > >> > http://maven.40175.n5.nabble.com/Modifying-test-classpath-from-Maven-plugin-tp5847294.html > >> >> To start a new topic under Maven Developers, email > >> >> [hidden email] > <http:///user/SendEmail.jtp?type=node&node=5847570&i=4> > >> >> To unsubscribe from Maven Developers, click here > >> >> < > >> > > >> >> . > >> >> NAML > >> >> < > >> > http://maven.40175.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml > >> > > >> >> > >> > > >> > > >> > > >> > > >> > -- > >> > View this message in context: > >> > http://maven.40175.n5.nabble.com/Modifying-test-classpath-from-Maven-plugin-tp5847294p5847296.html > >> > Sent from the Maven Developers mailing list archive at Nabble.com. > >> > >> > >> > >> -- > >> Stian Soiland-Reyes > >> Apache Taverna (incubating), Apache Commons RDF (incubating) > >> http://orcid.org/0000-0001-9842-9718 > >> > >> --------------------------------------------------------------------- > >> To unsubscribe, e-mail: [hidden email] > <http:///user/SendEmail.jtp?type=node&node=5847570&i=5> > >> For additional commands, e-mail: [hidden email] > <http:///user/SendEmail.jtp?type=node&node=5847570&i=6> > >> > >> > > > > > > -- > > Cheers > > Tibor > > > > -- > Stian Soiland-Reyes > Apache Taverna (incubating), Apache Commons RDF (incubating) > http://orcid.org/0000-0001-9842-9718 > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [hidden email] > <http:///user/SendEmail.jtp?type=node&node=5847570&i=7> > For additional commands, e-mail: [hidden email] > <http:///user/SendEmail.jtp?type=node&node=5847570&i=8> > > > > ------------------------------ > If you reply to this email, your message will be added to the discussion > below: > > http://maven.40175.n5.nabble.com/Modifying-test-classpath-from-Maven-plugin-tp5847294p5847570.html > To start a new topic under Maven Developers, email > [email protected] > To unsubscribe from Maven Developers, click here > <http://maven.40175.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=142166&code=dGlib3JkaWdhbmFAYXBhY2hlLm9yZ3wxNDIxNjZ8LTI4OTQ5MjEwMg==> > . > NAML > <http://maven.40175.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml> > -- View this message in context: http://maven.40175.n5.nabble.com/Modifying-test-classpath-from-Maven-plugin-tp5847294p5847594.html Sent from the Maven Developers mailing list archive at Nabble.com.
