Guidance for building POMs


It is expected that this will end up in the Plugin documentation – for now this is just for discussion

When building the POM for a plugin there are multiple goals.

  1. We want the POM to represent a consistent state of an IdP (this would usually be the minimum IdP Version the plugin supports).
  2. We want to avoid any dependency leakage from the IdP into the plugin (and any projects deriving from the IdP).
  3. We want to avoid the project or plugin developer from accidentally shipping jars in the plugin which are subject to restrictive licenses that do not allow us to ship them. Such Jars need to be downloaded by the deployer and there is an infrastructure that deploys this.

We, therefore, have come up with the following guidance

It is worth noting that the idp-parent project is less than perfect as a parent project since declares several dubious dependencies which should be managed and mentioned expliclty.  See 

Naming

Just sketching out and recording some plausible naming conventions.

The example is one I'm working on for TOTP login flow support. In my example, the only "varying" portion seems to be the "totp" fragment and the rest might be standardized...

Git Repo: java-idp-plugin-totp

Parent POM coordinates:

    <name>Shibboleth IdP :: Plugins :: TOTP Login Flow</name>
    <groupId>net.shibboleth.idp.plugin</groupId>
    <artifactId>idp-plugin-totp</artifactId>

Typical submodules:

    <modules>
        <module>totp-impl</module>
        <module>totp-dist</module>
    </modules>

Implementation POM:

    <name>Shibboleth IdP :: Plugins :: TOTP Login Flow Impl</name>
    <artifactId>idp-plugin-totp-impl</artifactId>

    <properties>
        <automatic.module.name>net.shibboleth.idp.plugin.totp.impl</automatic.module.name>
    </properties>

Distribution POM:

    <name>Shibboleth IdP :: Plugins :: TOTP Login Flow Distribution</name>
    <artifactId>idp-plugin-totp-dist</artifactId>
    <packaging>pom</packaging>

    <properties>
        <dist.finalName>shibboleth-idp-plugin-totp-${project.version}</dist.finalName>
    </properties>