You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Martin Eisengardt (JIRA)" <ji...@codehaus.org> on 2012/02/14 15:13:02 UTC

[jira] (MNG-5244) Cleaner way to support different languages

Martin Eisengardt created MNG-5244:
--------------------------------------

             Summary: Cleaner way to support different languages
                 Key: MNG-5244
                 URL: https://jira.codehaus.org/browse/MNG-5244
             Project: Maven 2 & 3
          Issue Type: Improvement
          Components: POM
    Affects Versions: 3.0.4
            Reporter: Martin Eisengardt


Maybe I did not get the point and there is already a way that I do not see. Today the super pom is optimized for java. Let us say we want to use maven with another language. Thats possible by adding for example a different source folder to the pom. As a developer: If I set the packaging to "php" I would expect that everything works "out of the box". That would cause maven to use the source folder src/main/php or src/test/php instead of src/main/java and src/test/php. I mean: Knowing about packaging "php" should be enough to set some specific defaults without ever mention them in any pom.
As a plugin maintainer I did not yet see any way to let maven know about this convention or standard. It always loads the super pom. A possible solution is to advice every user of php-maven to use a parent-pom we will maintain. However this would not be clever because in some projects there might be aggregates that require to inherit a super-pom from a company. For example the following project structure:
- parent.pom
+--- java-parent.pom
   +--- java-library-1.pom
   +--- war-project-1.pom
+--- php-parent.pom
   +--- php-library-1.pom
   +--- php-library-2.pom

As you see the php projects should have parent.pom as their parent. Adding another parent that we will maintain is not possible.


Possible solution: As we already introduce our own packaging: Is there any way to influence it by components.xml? What I am thinking of is something that allowes maven to add a new mixing. Something to overwrite or extend the super.pom mixing. I found out that the super pom is added as a mixin and that the maven code should be able to handle multiple mixins (as far as I debugged the code). Alothough I saw no option to add additional mixins.

The whole story: http://www.mail-archive.com/users@maven.apache.org/msg121842.html
The project: http://www.php-maven.org


Greetings
Martin

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira