Do not force the use of the parent pom
See original GitHub issueI think that mandating the use of the alfresco-sdk-parent
in projects who need to create or apply AMPs is a bad idea. That parent pom can remain as a facility if it makes life simpler for some, but it should not be mandatory – and I think not even encouraged.
Here is why!
- It is definitely not standard - in my 10 years using Maven, I’ve never used a plugin that forced or even edvised the use of a specific parent pom. Ole found an exception with Spring Roo, but this is a very “constrained” framework to build applications. Alfresco is meant to be more open.
- separation of concerns: behaviours should be in the plugin, and configurations in the pom. By defining plugin executions in the parent pom (such as
add-module-properties-to-test-classpath
), you break this paradigm. - In a multimodule build, I have one module that build an AMP, and 20 others that build JARs, WARs, etc. I don’t want to change the parent pom of the whole project just for that one module
- If 2 plugin providers impose that, I cannot use them both in the same build! (For instance: how do you create a Spring Roo application that also creates an AMP? There’s only one parent POM)
- Some companies mandate the use of their corporate parent pom, and you can’t use another one.
So, I think we should move as many things as possible from the parent pom to the alfresco-maven-plugin, and if possible get rid of the parent pom altogether.
Issue Analytics
- State:
- Created 8 years ago
- Comments:7 (5 by maintainers)
Top Results From Across the Web
Maven: Non-resolvable parent POM - Stack Overflow
The solution was to temporarily declare repository outside profile (unconditionally), launch Alt+F5 Maven Update Project, activate profile and put repository ...
Read more >Understanding Maven's “relativePath” Tag for a Parent POM
In this article, we learned that Maven does not resolve parent POMs by searching Maven repositories firstly. It rather searches for it locally, ......
Read more >How do I manage the version of a dependency in a parent ...
If a dependency is listed in the dependencyManagement section of a parent, a child's effective POM is not forced to have this dependency...
Read more >Can I force a plugin to not run during parent pom execution ...
A trick i use, provided the plugin has a configuration to skip a run, is having something like this in the parent <plugin>...
Read more >Dependency Management — Dataverse.org
Parent POM, Super POM: any project may be a child of a parent. ... Do not use transitive deps implicitly: add a direct...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I am happy to say that SDK3 does no longer require a parent pom! Closing
@ohej: I think, we are on a good way with the current state. Do you think we can close the ticket? Or is there anything left?
Thanks Jens