You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Oskar Carlstedt <os...@gmail.com> on 2009/06/16 11:17:16 UTC

Controling workflow an a global level

Hello all!

I've been using Maven since a long time. But still I haven't found an answer
of how to control the workflow on a global level while still having the
opportunity to override confiuration on a system basis. What I want to do is
to configure plugins in a company global pom-file just to make it easier for
other projects to use our build concept - but still I don't want it to be a
requirement to use the global pom as a parent.

In a huge system with about 50 subprojects we may have som simple
jar-projects, some ejb-projects, some war-projects etc., etc. It would be
great to be able to configure the build process for all these projects types
in one or several company global files. But the implementataions of these
files still want to use some project specific configurations.

Doing this we might end up with

------------------------------------------------------------------------------------

GLOBAL

GLOBAL_JAR (enherits global) GLOBAL_EJB (inherits global)

MY_SYSTEM_GLOBAL (inherits ?)

MY_SYSTEM_JAR_IMPL (inherits GLOBAL_JAR), MY_SYSTEM_EJB_IMPL (inherits
GLOBAL_EJB)

--------------------------------------------------------------------------------------

Doing this way makes i possible to control the build process/build flow. On
the other hand it is impossible to add global overriding configuration from
my system, except for properties in a settings.xml. So this is not an
optimal solution.

Doing the other way having one global pom where I can put global
configuration s.a. reporting, properties etc. This concpet won't make it
possible to control the build flow, but it give a relative huge amount of
freedom for each project.

------------------------------------------------------------------------------------

GLOBAL

MY_SYSTEM_GLOBAL (inherits global)

MY_SYSTEM_JAR_IMPL (inherits MY_SYSTEM_GLOBAL), MY_SYSTEM_EJB_IMPL (inherits
MY_SYSTEM_GLOBAL)

--------------------------------------------------------------------------------------


So, do you have any ideas about any good solution where I can control the
build process on a company basis, override it on a system basis and finally
make it possible to reconfigure everyting in each single project but still
take part of system specific properties/configurations.


Best regards
Oskar

-- 
View this message in context: http://www.nabble.com/Controling-workflow-an-a-global-level-tp24050579p24050579.html
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Controling workflow an a global level

Posted by Kiss Tibor <ki...@gmail.com>.
Hi Oskar!

I use the same scheme as your second scenario and in MY_SYSTEM_GLOBAL
(inherits global) I have
<build><pluginManagement> section with all the plugins configured for jar,
ejb, war, ear packaging types plus specialities done by was6 plugin and of
course all the stack of checkstyle, pmd, findbugs, cobertura for Hudson CI.
Then I have my PROJECT specific level which inherits MY_SYSTEM_GLOBAL
mentioned earlier and of course here I have listed my sub modules.
Then finally in my ejb, ear, etc. submodules I declare the necessary plugins
inside a <build> block.

For example, for an ejb module which uses XDoclet and I also generate
wsEjbdeploy stuff with was6 plugin, I have a list of plugin declarations
like the following:

    <build>
        <plugins>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>xdoclet-maven-plugin</artifactId>
            </plugin>

            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>was6-maven-plugin</artifactId>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-ejb-plugin</artifactId>
            </plugin>
        </plugins>
    </build>

But if you really would like to throw all these declarations on a common
place and have only very simple pom.xml-s, then you have the possibility to
create packaging specific common modules. At the end your EJB implementation
module would inherit the corresponding common POM.

The ideea is that in a project consisting from many types of submodules, its
enough to have an entry point, where there you specify your submodules by
<modules> tag, but your submodules does not need to point back to the top
module of your project structure by defining as parent module. Instead your
submodules would use as the parent module, the EJB specific POM.xml and so
forth.

Regards,
Tibor

On Tue, Jun 16, 2009 at 11:17 AM, Oskar Carlstedt <oskar.carlstedt@gmail.com
> wrote:

>
> Hello all!
>
> I've been using Maven since a long time. But still I haven't found an
> answer
> of how to control the workflow on a global level while still having the
> opportunity to override confiuration on a system basis. What I want to do
> is
> to configure plugins in a company global pom-file just to make it easier
> for
> other projects to use our build concept - but still I don't want it to be a
> requirement to use the global pom as a parent.
>
> In a huge system with about 50 subprojects we may have som simple
> jar-projects, some ejb-projects, some war-projects etc., etc. It would be
> great to be able to configure the build process for all these projects
> types
> in one or several company global files. But the implementataions of these
> files still want to use some project specific configurations.
>
> Doing this we might end up with
>
>
> ------------------------------------------------------------------------------------
>
> GLOBAL
>
> GLOBAL_JAR (enherits global) GLOBAL_EJB (inherits global)
>
> MY_SYSTEM_GLOBAL (inherits ?)
>
> MY_SYSTEM_JAR_IMPL (inherits GLOBAL_JAR), MY_SYSTEM_EJB_IMPL (inherits
> GLOBAL_EJB)
>
>
> --------------------------------------------------------------------------------------
>
> Doing this way makes i possible to control the build process/build flow. On
> the other hand it is impossible to add global overriding configuration from
> my system, except for properties in a settings.xml. So this is not an
> optimal solution.
>
> Doing the other way having one global pom where I can put global
> configuration s.a. reporting, properties etc. This concpet won't make it
> possible to control the build flow, but it give a relative huge amount of
> freedom for each project.
>
>
> ------------------------------------------------------------------------------------
>
> GLOBAL
>
> MY_SYSTEM_GLOBAL (inherits global)
>
> MY_SYSTEM_JAR_IMPL (inherits MY_SYSTEM_GLOBAL), MY_SYSTEM_EJB_IMPL
> (inherits
> MY_SYSTEM_GLOBAL)
>
>
> --------------------------------------------------------------------------------------
>
>
> So, do you have any ideas about any good solution where I can control the
> build process on a company basis, override it on a system basis and finally
> make it possible to reconfigure everyting in each single project but still
> take part of system specific properties/configurations.
>
>
> Best regards
> Oskar
>
> --
> View this message in context:
> http://www.nabble.com/Controling-workflow-an-a-global-level-tp24050579p24050579.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>