You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by David Hoffer <dh...@gmail.com> on 2009/04/16 16:19:25 UTC

Multi-module build is not building with current module source code

I have a multi-module build where some modules are dependent on other
modules.  What is happening is that the dependent module is getting its
dependency from the local/corporate maven repo instead of the source code
that was just built.  How do I specify that modules always build using
current source not prior built snapshot jars?

Here is an example of the problem (it is really simple)

Parent pom:
<version>0.1-SNAPSHOT</version>
<modules>
        <module>public</module>
        <module>internal</module>
        <module>security-public</module>
</modules>

public pom:
<version>0.1-SNAPSHOT</version>

internal pom:
<dependencies>
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>public</artifactId>
            <version>0.1-SNAPSHOT</version>
        </dependency>
</dependencies>

security-public:
<dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>public</artifactId>
            <version>0.1-SNAPSHOT</version>
</dependency>

So what is happening is that instead of internal  & security-public building
using the just built public (note it is first so it was built first) they go
out and download the last deployed snapshot and build using that instead.

Nothing in the pom dependency syntax really says which to use but I assumed
that because maven 'knows' these are all in the reactor it would use module
source.  However this doesn't seem to work, what do I need to do to fix
this?

BTW, the goals being run are 'clean deploy site-deploy'

-Dave

Re: Multi-module build is not building with current module source code

Posted by David Hoffer <dh...@gmail.com>.
I can't say for sure I fixed it yet but I did find something in my case.

I suspect the order of the modules in the parent pom is critical.  In my
case I have some nested module dependencies, that is module3 depends on
module2 which depends on module1, etc.  I suspect that you have to manually
review all these dependencies and make sure all module dependencies are
first in the list.

Although I found some that were not like this in my case, its a hard thing
to test because you can make a change and everything still builds fine.  its
not until you make a breaking/new code change that another depends on can
you know if the build is right...very frustrating.   Again I'm not sure this
will fix the issue yet but I'm going to see...

It seems the reactor could be much smarter, or at least error out if its
wrong.  In my case the dependency the compiler complained about was in the
correct reactor order but certain other modules did not have all their
dependencies listed first.

Let me know if this works for you.  Perhaps others can let us know if I'm on
the right track here.

-Dave

On Thu, Apr 16, 2009 at 9:26 AM, Dmitry Skavish <sk...@gmail.com> wrote:

> I am having the same problem and would like to know that as well. Thanks!
>
> On Thu, Apr 16, 2009 at 10:19 AM, David Hoffer <dh...@gmail.com> wrote:
>
> > I have a multi-module build where some modules are dependent on other
> > modules.  What is happening is that the dependent module is getting its
> > dependency from the local/corporate maven repo instead of the source code
> > that was just built.  How do I specify that modules always build using
> > current source not prior built snapshot jars?
> >
> > Here is an example of the problem (it is really simple)
> >
> > Parent pom:
> > <version>0.1-SNAPSHOT</version>
> > <modules>
> >        <module>public</module>
> >        <module>internal</module>
> >        <module>security-public</module>
> > </modules>
> >
> > public pom:
> > <version>0.1-SNAPSHOT</version>
> >
> > internal pom:
> > <dependencies>
> >        <dependency>
> >            <groupId>${project.groupId}</groupId>
> >            <artifactId>public</artifactId>
> >            <version>0.1-SNAPSHOT</version>
> >        </dependency>
> > </dependencies>
> >
> > security-public:
> > <dependency>
> >            <groupId>${project.groupId}</groupId>
> >            <artifactId>public</artifactId>
> >            <version>0.1-SNAPSHOT</version>
> > </dependency>
> >
> > So what is happening is that instead of internal  & security-public
> > building
> > using the just built public (note it is first so it was built first) they
> > go
> > out and download the last deployed snapshot and build using that instead.
> >
> > Nothing in the pom dependency syntax really says which to use but I
> assumed
> > that because maven 'knows' these are all in the reactor it would use
> module
> > source.  However this doesn't seem to work, what do I need to do to fix
> > this?
> >
> > BTW, the goals being run are 'clean deploy site-deploy'
> >
> > -Dave
> >
>
>
>
> --
> Dmitry Skavish
>

Re: Multi-module build is not building with current module source code

Posted by Nick Stolwijk <ni...@gmail.com>.
When you start Maven, you can see the reactor order. In this order
(top to bottom) the modules are built. What does your reactor output
say?

Like this:

[INFO] Scanning for projects...
[INFO] Reactor build order:
[INFO]    Module Baz
[INFO]    Module Bar
[INFO]   Module Foo
WAGON_VERSION: 1.0-beta-2

Hth,

Nick Stolwijk
~Java Developer~

Iprofs BV.
Claus Sluterweg 125
2012 WS Haarlem
www.iprofs.nl



On Thu, Apr 16, 2009 at 5:46 PM, David Hoffer <dh...@gmail.com> wrote:
> Then I'm understanding the order of the reactor wrong.  I assumed its top to
> bottom, that is...just before internal is built...public is built; and just
> before security-public is built...internal is built.
>
> Can you clarify the order?
>
> -Dave
>
> On Thu, Apr 16, 2009 at 9:39 AM, Nick Stolwijk <ni...@gmail.com>wrote:
>
>> Maven always takes the artifacts out of the local repository. However,
>> this is not a problem, because the reactor knows in which order to
>> built the projects. Just before your internal project is built, maven
>> has installed the most recent version of security-public in the local
>> repository.
>>
>> Maybe I don't understand your problem. If that is the case, please clarify.
>>
>> Hth,
>>
>> Nick Stolwijk
>> ~Java Developer~
>>
>> Iprofs BV.
>> Claus Sluterweg 125
>> 2012 WS Haarlem
>> www.iprofs.nl
>>
>>
>>
>> On Thu, Apr 16, 2009 at 5:26 PM, Dmitry Skavish <sk...@gmail.com> wrote:
>> > I am having the same problem and would like to know that as well. Thanks!
>> >
>> > On Thu, Apr 16, 2009 at 10:19 AM, David Hoffer <dh...@gmail.com>
>> wrote:
>> >
>> >> I have a multi-module build where some modules are dependent on other
>> >> modules.  What is happening is that the dependent module is getting its
>> >> dependency from the local/corporate maven repo instead of the source
>> code
>> >> that was just built.  How do I specify that modules always build using
>> >> current source not prior built snapshot jars?
>> >>
>> >> Here is an example of the problem (it is really simple)
>> >>
>> >> Parent pom:
>> >> <version>0.1-SNAPSHOT</version>
>> >> <modules>
>> >>        <module>public</module>
>> >>        <module>internal</module>
>> >>        <module>security-public</module>
>> >> </modules>
>> >>
>> >> public pom:
>> >> <version>0.1-SNAPSHOT</version>
>> >>
>> >> internal pom:
>> >> <dependencies>
>> >>        <dependency>
>> >>            <groupId>${project.groupId}</groupId>
>> >>            <artifactId>public</artifactId>
>> >>            <version>0.1-SNAPSHOT</version>
>> >>        </dependency>
>> >> </dependencies>
>> >>
>> >> security-public:
>> >> <dependency>
>> >>            <groupId>${project.groupId}</groupId>
>> >>            <artifactId>public</artifactId>
>> >>            <version>0.1-SNAPSHOT</version>
>> >> </dependency>
>> >>
>> >> So what is happening is that instead of internal  & security-public
>> >> building
>> >> using the just built public (note it is first so it was built first)
>> they
>> >> go
>> >> out and download the last deployed snapshot and build using that
>> instead.
>> >>
>> >> Nothing in the pom dependency syntax really says which to use but I
>> assumed
>> >> that because maven 'knows' these are all in the reactor it would use
>> module
>> >> source.  However this doesn't seem to work, what do I need to do to fix
>> >> this?
>> >>
>> >> BTW, the goals being run are 'clean deploy site-deploy'
>> >>
>> >> -Dave
>> >>
>> >
>> >
>> >
>> > --
>> > Dmitry Skavish
>> >
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>
>

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


Re: Multi-module build is not building with current module source code

Posted by David Hoffer <dh...@gmail.com>.
Perhaps this is getting off the main issue a bit...but just to be clear.

In a separate maven project that is a test app that consumes the contents of
the 'problem maven build' I do use the unpack goal to put various pieces
where they need to go in a war.  Like this:

<plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <version>2.1</version>
                <executions>
                    <execution>
                        <id>copy-swf</id>
                        <phase>process-classes</phase>
                        <goals>
                            <goal>copy-dependencies</goal>
                        </goals>
                        <configuration>

<outputDirectory>${project.build.directory}/${project.build.finalName}</outputDirectory>
                            <overWriteSnapshots>true</overWriteSnapshots>
                            <includeTypes>swf</includeTypes>
                            <!--<overWrite>true</overWrite>-->

<includeArtifactIds>cdf-as-client-testapp</includeArtifactIds>
                        </configuration>
                    </execution>

                    <execution>
                        <id>unpack</id>
                        <phase>process-classes</phase>
                        <goals>
                            <goal>unpack</goal>
                        </goals>
                        <configuration>
                            <artifactItems>
                                <artifactItem>
                                    <groupId>${cdfGroupId}</groupId>

<artifactId>cdf-blaze-svcs-config</artifactId>
                                    <version>${cdfVersion}</version>
                                    <type>zip</type>
                                    <classifier>resources</classifier>
                                    <overWrite>true</overWrite>

<outputDirectory>${project.build.directory}/${project.build.finalName}/WEB-INF/flex
                                    </outputDirectory>
                                </artifactItem>
                                <artifactItem>
                                    <groupId>${cdfGroupId}</groupId>

<artifactId>cdf-spring-directbroker-config</artifactId>
                                    <version>${cdfVersion}</version>
                                    <type>zip</type>
                                    <classifier>resources</classifier>
                                    <overWrite>true</overWrite>

<outputDirectory>${project.build.directory}/${project.build.finalName}/WEB-INF
                                    </outputDirectory>
                                </artifactItem>
                            </artifactItems>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

This far I haven't seen a problem with this but your coments about unpack
have me concerned.

-Dave

On Thu, Apr 16, 2009 at 11:05 AM, Stephen Connolly <
stephen.alan.connolly@gmail.com> wrote:

> using dependency:unpack-dependencies is not a problem, as this goal
> specifically searches the reactor. it's dependency:unpack that will cause
> issues for you
>
> -Stephen
>
> 2009/4/16 David Hoffer <dh...@gmail.com>
>
> > I do use maven-dependency-plugin to unpack one resource.  I have a flex
> > module and a blaze one, I have another module that just has the XML
> config
> > files needed by blaze.
> >
> > I wouldn't expect this to be an issue because there are not Java sources
> > involved with this.
> >
> > <plugin>
> >                <groupId>org.apache.maven.plugins</groupId>
> >                <artifactId>maven-dependency-plugin</artifactId>
> >                <version>2.1</version>
> >                <executions>
> >                    <execution>
> >                        <id>unpack-config</id>
> >                        <goals>
> >                            <goal>unpack-dependencies</goal>
> >                        </goals>
> >                        <phase>generate-resources</phase>
> >                        <configuration>
> >
> >
> >
> <outputDirectory>${project.build.directory}/generated-resources</outputDirectory>
> >
> > <includeGroupIds>${project.groupId}</includeGroupIds>
> >                            <excludeTransitive>true</excludeTransitive>
> >                            <excludeTypes>pom,jar</excludeTypes>
> >
> > <includeArtifactIds>cdf-blaze-svcs-config</includeArtifactIds>
> >                        </configuration>
> >                    </execution>
> >                </executions>
> >            </plugin>
> >
> > -Dave
> >
> > On Thu, Apr 16, 2009 at 10:52 AM, Stephen Connolly <
> > stephen.alan.connolly@gmail.com> wrote:
> >
> > > by any chance are you using
> > >
> > > dependency:copy
> > >
> > > or
> > >
> > > dependency:unpack
> > >
> > > anywhere in your build?
> > >
> > > If you are that could well be the source of your issues.
> > >
> > > It sounds like one of the plugins you are using is not searching the
> > > reactor
> > > for dependencies.
> > >
> > > -Stephen
> > >
> > > 2009/4/16 David Hoffer <dh...@gmail.com>
> > >
> > > > Then there is a big bug here because I have a multi-module project
> with
> > a
> > > > few modules, the dependent one was built first (as seen in the build
> > log)
> > > > but yet when the depending module was built it did NOT use the
> > dependent
> > > > build rather it went to the repo and downloaded the previously
> deployed
> > > > artifact snapshot.
> > > >
> > > > -Dave
> > > >
> > > > On Thu, Apr 16, 2009 at 10:24 AM, Todd Thiessen <thiessen@nortel.com
> >
> > > > wrote:
> > > >
> > > > > FYI. Here is one reference,
> > > > >
> > > > > http://maven.apache.org/pom.html#Aggregation
> > > > >
> > > > > ---
> > > > > Todd Thiessen
> > > > >
> > > > >
> > > > > > -----Original Message-----
> > > > > > From: David Hoffer [mailto:dhoffer6@gmail.com]
> > > > > > Sent: Thursday, April 16, 2009 11:46 AM
> > > > > > To: Maven Users List
> > > > > > Subject: Re: Multi-module build is not building with current
> > > > > > module source code
> > > > > >
> > > > > > Then I'm understanding the order of the reactor wrong.  I
> > > > > > assumed its top to bottom, that is...just before internal is
> > > > > > built...public is built; and just before security-public is
> > > > > > built...internal is built.
> > > > > >
> > > > > > Can you clarify the order?
> > > > > >
> > > > > > -Dave
> > > > > >
> > > > > > On Thu, Apr 16, 2009 at 9:39 AM, Nick Stolwijk
> > > > > > <ni...@gmail.com>wrote:
> > > > > >
> > > > > > > Maven always takes the artifacts out of the local
> > > > > > repository. However,
> > > > > > > this is not a problem, because the reactor knows in which order
> > to
> > > > > > > built the projects. Just before your internal project is
> > > > > > built, maven
> > > > > > > has installed the most recent version of security-public in
> > > > > > the local
> > > > > > > repository.
> > > > > > >
> > > > > > > Maybe I don't understand your problem. If that is the case,
> > > > > > please clarify.
> > > > > > >
> > > > > > > Hth,
> > > > > > >
> > > > > > > Nick Stolwijk
> > > > > > > ~Java Developer~
> > > > > > >
> > > > > > > Iprofs BV.
> > > > > > > Claus Sluterweg 125
> > > > > > > 2012 WS Haarlem
> > > > > > > www.iprofs.nl
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > On Thu, Apr 16, 2009 at 5:26 PM, Dmitry Skavish
> > > > > > <sk...@gmail.com> wrote:
> > > > > > > > I am having the same problem and would like to know that
> > > > > > as well. Thanks!
> > > > > > > >
> > > > > > > > On Thu, Apr 16, 2009 at 10:19 AM, David Hoffer
> > > > > > <dh...@gmail.com>
> > > > > > > wrote:
> > > > > > > >
> > > > > > > >> I have a multi-module build where some modules are dependent
> > on
> > > > > > > >> other modules.  What is happening is that the dependent
> > > > > > module is
> > > > > > > >> getting its dependency from the local/corporate maven
> > > > > > repo instead
> > > > > > > >> of the source
> > > > > > > code
> > > > > > > >> that was just built.  How do I specify that modules always
> > build
> > > > > > > >> using current source not prior built snapshot jars?
> > > > > > > >>
> > > > > > > >> Here is an example of the problem (it is really simple)
> > > > > > > >>
> > > > > > > >> Parent pom:
> > > > > > > >> <version>0.1-SNAPSHOT</version>
> > > > > > > >> <modules>
> > > > > > > >>        <module>public</module>
> > > > > > > >>        <module>internal</module>
> > > > > > > >>        <module>security-public</module> </modules>
> > > > > > > >>
> > > > > > > >> public pom:
> > > > > > > >> <version>0.1-SNAPSHOT</version>
> > > > > > > >>
> > > > > > > >> internal pom:
> > > > > > > >> <dependencies>
> > > > > > > >>        <dependency>
> > > > > > > >>            <groupId>${project.groupId}</groupId>
> > > > > > > >>            <artifactId>public</artifactId>
> > > > > > > >>            <version>0.1-SNAPSHOT</version>
> > > > > > > >>        </dependency>
> > > > > > > >> </dependencies>
> > > > > > > >>
> > > > > > > >> security-public:
> > > > > > > >> <dependency>
> > > > > > > >>            <groupId>${project.groupId}</groupId>
> > > > > > > >>            <artifactId>public</artifactId>
> > > > > > > >>            <version>0.1-SNAPSHOT</version> </dependency>
> > > > > > > >>
> > > > > > > >> So what is happening is that instead of internal  &
> > > > > > security-public
> > > > > > > >> building using the just built public (note it is first so it
> > was
> > > > > > > >> built first)
> > > > > > > they
> > > > > > > >> go
> > > > > > > >> out and download the last deployed snapshot and build using
> > that
> > > > > > > instead.
> > > > > > > >>
> > > > > > > >> Nothing in the pom dependency syntax really says which
> > > > > > to use but I
> > > > > > > assumed
> > > > > > > >> that because maven 'knows' these are all in the reactor it
> > would
> > > > > > > >> use
> > > > > > > module
> > > > > > > >> source.  However this doesn't seem to work, what do I
> > > > > > need to do to
> > > > > > > >> fix this?
> > > > > > > >>
> > > > > > > >> BTW, the goals being run are 'clean deploy site-deploy'
> > > > > > > >>
> > > > > > > >> -Dave
> > > > > > > >>
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > --
> > > > > > > > Dmitry Skavish
> > > > > > > >
> > > > > > >
> > > > > > >
> > > > > >
> > ---------------------------------------------------------------------
> > > > > > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > > > > > > For additional commands, e-mail: users-help@maven.apache.org
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > > >
> ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > > > > For additional commands, e-mail: users-help@maven.apache.org
> > > > >
> > > > >
> > > >
> > >
> >
>

Re: Multi-module build is not building with current module source code

Posted by Stephen Connolly <st...@gmail.com>.
using dependency:unpack-dependencies is not a problem, as this goal
specifically searches the reactor. it's dependency:unpack that will cause
issues for you

-Stephen

2009/4/16 David Hoffer <dh...@gmail.com>

> I do use maven-dependency-plugin to unpack one resource.  I have a flex
> module and a blaze one, I have another module that just has the XML config
> files needed by blaze.
>
> I wouldn't expect this to be an issue because there are not Java sources
> involved with this.
>
> <plugin>
>                <groupId>org.apache.maven.plugins</groupId>
>                <artifactId>maven-dependency-plugin</artifactId>
>                <version>2.1</version>
>                <executions>
>                    <execution>
>                        <id>unpack-config</id>
>                        <goals>
>                            <goal>unpack-dependencies</goal>
>                        </goals>
>                        <phase>generate-resources</phase>
>                        <configuration>
>
>
> <outputDirectory>${project.build.directory}/generated-resources</outputDirectory>
>
> <includeGroupIds>${project.groupId}</includeGroupIds>
>                            <excludeTransitive>true</excludeTransitive>
>                            <excludeTypes>pom,jar</excludeTypes>
>
> <includeArtifactIds>cdf-blaze-svcs-config</includeArtifactIds>
>                        </configuration>
>                    </execution>
>                </executions>
>            </plugin>
>
> -Dave
>
> On Thu, Apr 16, 2009 at 10:52 AM, Stephen Connolly <
> stephen.alan.connolly@gmail.com> wrote:
>
> > by any chance are you using
> >
> > dependency:copy
> >
> > or
> >
> > dependency:unpack
> >
> > anywhere in your build?
> >
> > If you are that could well be the source of your issues.
> >
> > It sounds like one of the plugins you are using is not searching the
> > reactor
> > for dependencies.
> >
> > -Stephen
> >
> > 2009/4/16 David Hoffer <dh...@gmail.com>
> >
> > > Then there is a big bug here because I have a multi-module project with
> a
> > > few modules, the dependent one was built first (as seen in the build
> log)
> > > but yet when the depending module was built it did NOT use the
> dependent
> > > build rather it went to the repo and downloaded the previously deployed
> > > artifact snapshot.
> > >
> > > -Dave
> > >
> > > On Thu, Apr 16, 2009 at 10:24 AM, Todd Thiessen <th...@nortel.com>
> > > wrote:
> > >
> > > > FYI. Here is one reference,
> > > >
> > > > http://maven.apache.org/pom.html#Aggregation
> > > >
> > > > ---
> > > > Todd Thiessen
> > > >
> > > >
> > > > > -----Original Message-----
> > > > > From: David Hoffer [mailto:dhoffer6@gmail.com]
> > > > > Sent: Thursday, April 16, 2009 11:46 AM
> > > > > To: Maven Users List
> > > > > Subject: Re: Multi-module build is not building with current
> > > > > module source code
> > > > >
> > > > > Then I'm understanding the order of the reactor wrong.  I
> > > > > assumed its top to bottom, that is...just before internal is
> > > > > built...public is built; and just before security-public is
> > > > > built...internal is built.
> > > > >
> > > > > Can you clarify the order?
> > > > >
> > > > > -Dave
> > > > >
> > > > > On Thu, Apr 16, 2009 at 9:39 AM, Nick Stolwijk
> > > > > <ni...@gmail.com>wrote:
> > > > >
> > > > > > Maven always takes the artifacts out of the local
> > > > > repository. However,
> > > > > > this is not a problem, because the reactor knows in which order
> to
> > > > > > built the projects. Just before your internal project is
> > > > > built, maven
> > > > > > has installed the most recent version of security-public in
> > > > > the local
> > > > > > repository.
> > > > > >
> > > > > > Maybe I don't understand your problem. If that is the case,
> > > > > please clarify.
> > > > > >
> > > > > > Hth,
> > > > > >
> > > > > > Nick Stolwijk
> > > > > > ~Java Developer~
> > > > > >
> > > > > > Iprofs BV.
> > > > > > Claus Sluterweg 125
> > > > > > 2012 WS Haarlem
> > > > > > www.iprofs.nl
> > > > > >
> > > > > >
> > > > > >
> > > > > > On Thu, Apr 16, 2009 at 5:26 PM, Dmitry Skavish
> > > > > <sk...@gmail.com> wrote:
> > > > > > > I am having the same problem and would like to know that
> > > > > as well. Thanks!
> > > > > > >
> > > > > > > On Thu, Apr 16, 2009 at 10:19 AM, David Hoffer
> > > > > <dh...@gmail.com>
> > > > > > wrote:
> > > > > > >
> > > > > > >> I have a multi-module build where some modules are dependent
> on
> > > > > > >> other modules.  What is happening is that the dependent
> > > > > module is
> > > > > > >> getting its dependency from the local/corporate maven
> > > > > repo instead
> > > > > > >> of the source
> > > > > > code
> > > > > > >> that was just built.  How do I specify that modules always
> build
> > > > > > >> using current source not prior built snapshot jars?
> > > > > > >>
> > > > > > >> Here is an example of the problem (it is really simple)
> > > > > > >>
> > > > > > >> Parent pom:
> > > > > > >> <version>0.1-SNAPSHOT</version>
> > > > > > >> <modules>
> > > > > > >>        <module>public</module>
> > > > > > >>        <module>internal</module>
> > > > > > >>        <module>security-public</module> </modules>
> > > > > > >>
> > > > > > >> public pom:
> > > > > > >> <version>0.1-SNAPSHOT</version>
> > > > > > >>
> > > > > > >> internal pom:
> > > > > > >> <dependencies>
> > > > > > >>        <dependency>
> > > > > > >>            <groupId>${project.groupId}</groupId>
> > > > > > >>            <artifactId>public</artifactId>
> > > > > > >>            <version>0.1-SNAPSHOT</version>
> > > > > > >>        </dependency>
> > > > > > >> </dependencies>
> > > > > > >>
> > > > > > >> security-public:
> > > > > > >> <dependency>
> > > > > > >>            <groupId>${project.groupId}</groupId>
> > > > > > >>            <artifactId>public</artifactId>
> > > > > > >>            <version>0.1-SNAPSHOT</version> </dependency>
> > > > > > >>
> > > > > > >> So what is happening is that instead of internal  &
> > > > > security-public
> > > > > > >> building using the just built public (note it is first so it
> was
> > > > > > >> built first)
> > > > > > they
> > > > > > >> go
> > > > > > >> out and download the last deployed snapshot and build using
> that
> > > > > > instead.
> > > > > > >>
> > > > > > >> Nothing in the pom dependency syntax really says which
> > > > > to use but I
> > > > > > assumed
> > > > > > >> that because maven 'knows' these are all in the reactor it
> would
> > > > > > >> use
> > > > > > module
> > > > > > >> source.  However this doesn't seem to work, what do I
> > > > > need to do to
> > > > > > >> fix this?
> > > > > > >>
> > > > > > >> BTW, the goals being run are 'clean deploy site-deploy'
> > > > > > >>
> > > > > > >> -Dave
> > > > > > >>
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > --
> > > > > > > Dmitry Skavish
> > > > > > >
> > > > > >
> > > > > >
> > > > >
> ---------------------------------------------------------------------
> > > > > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > > > > > For additional commands, e-mail: users-help@maven.apache.org
> > > > > >
> > > > > >
> > > > >
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > > > For additional commands, e-mail: users-help@maven.apache.org
> > > >
> > > >
> > >
> >
>

Re: Multi-module build is not building with current module source code

Posted by David Hoffer <dh...@gmail.com>.
I do use maven-dependency-plugin to unpack one resource.  I have a flex
module and a blaze one, I have another module that just has the XML config
files needed by blaze.

I wouldn't expect this to be an issue because there are not Java sources
involved with this.

<plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <version>2.1</version>
                <executions>
                    <execution>
                        <id>unpack-config</id>
                        <goals>
                            <goal>unpack-dependencies</goal>
                        </goals>
                        <phase>generate-resources</phase>
                        <configuration>

<outputDirectory>${project.build.directory}/generated-resources</outputDirectory>

<includeGroupIds>${project.groupId}</includeGroupIds>
                            <excludeTransitive>true</excludeTransitive>
                            <excludeTypes>pom,jar</excludeTypes>

<includeArtifactIds>cdf-blaze-svcs-config</includeArtifactIds>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

-Dave

On Thu, Apr 16, 2009 at 10:52 AM, Stephen Connolly <
stephen.alan.connolly@gmail.com> wrote:

> by any chance are you using
>
> dependency:copy
>
> or
>
> dependency:unpack
>
> anywhere in your build?
>
> If you are that could well be the source of your issues.
>
> It sounds like one of the plugins you are using is not searching the
> reactor
> for dependencies.
>
> -Stephen
>
> 2009/4/16 David Hoffer <dh...@gmail.com>
>
> > Then there is a big bug here because I have a multi-module project with a
> > few modules, the dependent one was built first (as seen in the build log)
> > but yet when the depending module was built it did NOT use the dependent
> > build rather it went to the repo and downloaded the previously deployed
> > artifact snapshot.
> >
> > -Dave
> >
> > On Thu, Apr 16, 2009 at 10:24 AM, Todd Thiessen <th...@nortel.com>
> > wrote:
> >
> > > FYI. Here is one reference,
> > >
> > > http://maven.apache.org/pom.html#Aggregation
> > >
> > > ---
> > > Todd Thiessen
> > >
> > >
> > > > -----Original Message-----
> > > > From: David Hoffer [mailto:dhoffer6@gmail.com]
> > > > Sent: Thursday, April 16, 2009 11:46 AM
> > > > To: Maven Users List
> > > > Subject: Re: Multi-module build is not building with current
> > > > module source code
> > > >
> > > > Then I'm understanding the order of the reactor wrong.  I
> > > > assumed its top to bottom, that is...just before internal is
> > > > built...public is built; and just before security-public is
> > > > built...internal is built.
> > > >
> > > > Can you clarify the order?
> > > >
> > > > -Dave
> > > >
> > > > On Thu, Apr 16, 2009 at 9:39 AM, Nick Stolwijk
> > > > <ni...@gmail.com>wrote:
> > > >
> > > > > Maven always takes the artifacts out of the local
> > > > repository. However,
> > > > > this is not a problem, because the reactor knows in which order to
> > > > > built the projects. Just before your internal project is
> > > > built, maven
> > > > > has installed the most recent version of security-public in
> > > > the local
> > > > > repository.
> > > > >
> > > > > Maybe I don't understand your problem. If that is the case,
> > > > please clarify.
> > > > >
> > > > > Hth,
> > > > >
> > > > > Nick Stolwijk
> > > > > ~Java Developer~
> > > > >
> > > > > Iprofs BV.
> > > > > Claus Sluterweg 125
> > > > > 2012 WS Haarlem
> > > > > www.iprofs.nl
> > > > >
> > > > >
> > > > >
> > > > > On Thu, Apr 16, 2009 at 5:26 PM, Dmitry Skavish
> > > > <sk...@gmail.com> wrote:
> > > > > > I am having the same problem and would like to know that
> > > > as well. Thanks!
> > > > > >
> > > > > > On Thu, Apr 16, 2009 at 10:19 AM, David Hoffer
> > > > <dh...@gmail.com>
> > > > > wrote:
> > > > > >
> > > > > >> I have a multi-module build where some modules are dependent on
> > > > > >> other modules.  What is happening is that the dependent
> > > > module is
> > > > > >> getting its dependency from the local/corporate maven
> > > > repo instead
> > > > > >> of the source
> > > > > code
> > > > > >> that was just built.  How do I specify that modules always build
> > > > > >> using current source not prior built snapshot jars?
> > > > > >>
> > > > > >> Here is an example of the problem (it is really simple)
> > > > > >>
> > > > > >> Parent pom:
> > > > > >> <version>0.1-SNAPSHOT</version>
> > > > > >> <modules>
> > > > > >>        <module>public</module>
> > > > > >>        <module>internal</module>
> > > > > >>        <module>security-public</module> </modules>
> > > > > >>
> > > > > >> public pom:
> > > > > >> <version>0.1-SNAPSHOT</version>
> > > > > >>
> > > > > >> internal pom:
> > > > > >> <dependencies>
> > > > > >>        <dependency>
> > > > > >>            <groupId>${project.groupId}</groupId>
> > > > > >>            <artifactId>public</artifactId>
> > > > > >>            <version>0.1-SNAPSHOT</version>
> > > > > >>        </dependency>
> > > > > >> </dependencies>
> > > > > >>
> > > > > >> security-public:
> > > > > >> <dependency>
> > > > > >>            <groupId>${project.groupId}</groupId>
> > > > > >>            <artifactId>public</artifactId>
> > > > > >>            <version>0.1-SNAPSHOT</version> </dependency>
> > > > > >>
> > > > > >> So what is happening is that instead of internal  &
> > > > security-public
> > > > > >> building using the just built public (note it is first so it was
> > > > > >> built first)
> > > > > they
> > > > > >> go
> > > > > >> out and download the last deployed snapshot and build using that
> > > > > instead.
> > > > > >>
> > > > > >> Nothing in the pom dependency syntax really says which
> > > > to use but I
> > > > > assumed
> > > > > >> that because maven 'knows' these are all in the reactor it would
> > > > > >> use
> > > > > module
> > > > > >> source.  However this doesn't seem to work, what do I
> > > > need to do to
> > > > > >> fix this?
> > > > > >>
> > > > > >> BTW, the goals being run are 'clean deploy site-deploy'
> > > > > >>
> > > > > >> -Dave
> > > > > >>
> > > > > >
> > > > > >
> > > > > >
> > > > > > --
> > > > > > Dmitry Skavish
> > > > > >
> > > > >
> > > > >
> > > > ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > > > > For additional commands, e-mail: users-help@maven.apache.org
> > > > >
> > > > >
> > > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > > For additional commands, e-mail: users-help@maven.apache.org
> > >
> > >
> >
>

Re: Multi-module build is not building with current module source code

Posted by Stephen Connolly <st...@gmail.com>.
by any chance are you using

dependency:copy

or

dependency:unpack

anywhere in your build?

If you are that could well be the source of your issues.

It sounds like one of the plugins you are using is not searching the reactor
for dependencies.

-Stephen

2009/4/16 David Hoffer <dh...@gmail.com>

> Then there is a big bug here because I have a multi-module project with a
> few modules, the dependent one was built first (as seen in the build log)
> but yet when the depending module was built it did NOT use the dependent
> build rather it went to the repo and downloaded the previously deployed
> artifact snapshot.
>
> -Dave
>
> On Thu, Apr 16, 2009 at 10:24 AM, Todd Thiessen <th...@nortel.com>
> wrote:
>
> > FYI. Here is one reference,
> >
> > http://maven.apache.org/pom.html#Aggregation
> >
> > ---
> > Todd Thiessen
> >
> >
> > > -----Original Message-----
> > > From: David Hoffer [mailto:dhoffer6@gmail.com]
> > > Sent: Thursday, April 16, 2009 11:46 AM
> > > To: Maven Users List
> > > Subject: Re: Multi-module build is not building with current
> > > module source code
> > >
> > > Then I'm understanding the order of the reactor wrong.  I
> > > assumed its top to bottom, that is...just before internal is
> > > built...public is built; and just before security-public is
> > > built...internal is built.
> > >
> > > Can you clarify the order?
> > >
> > > -Dave
> > >
> > > On Thu, Apr 16, 2009 at 9:39 AM, Nick Stolwijk
> > > <ni...@gmail.com>wrote:
> > >
> > > > Maven always takes the artifacts out of the local
> > > repository. However,
> > > > this is not a problem, because the reactor knows in which order to
> > > > built the projects. Just before your internal project is
> > > built, maven
> > > > has installed the most recent version of security-public in
> > > the local
> > > > repository.
> > > >
> > > > Maybe I don't understand your problem. If that is the case,
> > > please clarify.
> > > >
> > > > Hth,
> > > >
> > > > Nick Stolwijk
> > > > ~Java Developer~
> > > >
> > > > Iprofs BV.
> > > > Claus Sluterweg 125
> > > > 2012 WS Haarlem
> > > > www.iprofs.nl
> > > >
> > > >
> > > >
> > > > On Thu, Apr 16, 2009 at 5:26 PM, Dmitry Skavish
> > > <sk...@gmail.com> wrote:
> > > > > I am having the same problem and would like to know that
> > > as well. Thanks!
> > > > >
> > > > > On Thu, Apr 16, 2009 at 10:19 AM, David Hoffer
> > > <dh...@gmail.com>
> > > > wrote:
> > > > >
> > > > >> I have a multi-module build where some modules are dependent on
> > > > >> other modules.  What is happening is that the dependent
> > > module is
> > > > >> getting its dependency from the local/corporate maven
> > > repo instead
> > > > >> of the source
> > > > code
> > > > >> that was just built.  How do I specify that modules always build
> > > > >> using current source not prior built snapshot jars?
> > > > >>
> > > > >> Here is an example of the problem (it is really simple)
> > > > >>
> > > > >> Parent pom:
> > > > >> <version>0.1-SNAPSHOT</version>
> > > > >> <modules>
> > > > >>        <module>public</module>
> > > > >>        <module>internal</module>
> > > > >>        <module>security-public</module> </modules>
> > > > >>
> > > > >> public pom:
> > > > >> <version>0.1-SNAPSHOT</version>
> > > > >>
> > > > >> internal pom:
> > > > >> <dependencies>
> > > > >>        <dependency>
> > > > >>            <groupId>${project.groupId}</groupId>
> > > > >>            <artifactId>public</artifactId>
> > > > >>            <version>0.1-SNAPSHOT</version>
> > > > >>        </dependency>
> > > > >> </dependencies>
> > > > >>
> > > > >> security-public:
> > > > >> <dependency>
> > > > >>            <groupId>${project.groupId}</groupId>
> > > > >>            <artifactId>public</artifactId>
> > > > >>            <version>0.1-SNAPSHOT</version> </dependency>
> > > > >>
> > > > >> So what is happening is that instead of internal  &
> > > security-public
> > > > >> building using the just built public (note it is first so it was
> > > > >> built first)
> > > > they
> > > > >> go
> > > > >> out and download the last deployed snapshot and build using that
> > > > instead.
> > > > >>
> > > > >> Nothing in the pom dependency syntax really says which
> > > to use but I
> > > > assumed
> > > > >> that because maven 'knows' these are all in the reactor it would
> > > > >> use
> > > > module
> > > > >> source.  However this doesn't seem to work, what do I
> > > need to do to
> > > > >> fix this?
> > > > >>
> > > > >> BTW, the goals being run are 'clean deploy site-deploy'
> > > > >>
> > > > >> -Dave
> > > > >>
> > > > >
> > > > >
> > > > >
> > > > > --
> > > > > Dmitry Skavish
> > > > >
> > > >
> > > >
> > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > > > For additional commands, e-mail: users-help@maven.apache.org
> > > >
> > > >
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
>

Re: Multi-module build is not building with current module source code

Posted by David Hoffer <dh...@gmail.com>.
No, we use TeamCity for CI.

-Dave

On Fri, Apr 17, 2009 at 10:10 AM, Stephen Connolly <
stephen.alan.connolly@gmail.com> wrote:

> [random]
> are you using Hudson as your CI?
> if yes, are you using the crazy m2 project type in Hudson?
> if yes, are you using the advanced parallel builds option?
> if yes to all of the above: stop right now and switch to freestyle
> [/random]
>
> 2009/4/17 David Hoffer <dh...@gmail.com>:
> > I concur with what you are saying.  I wish I had the build log to see the
> > reactor order...but I don't because the CI system wasn't keeping history.
> > So I can't say for certain the reactor order was wrong.  I can sure say
> it
> > seems so because changing it manually fixed the build.
> >
> > The thing that is 'special' or the thing that seems to trigger the
> problem
> > is the following:
> >
> > 1. It happens only when we checkin code in various modules where if the
> > build is out-of-order it won't compile because the dependencies haven't
> been
> > updated.
> > 2. It only happens on the CI build.  I'm not sure what to make of this
> > fact...developers wouldn't checkin if it didn't build on their system.
> > 3. Yes we always do clean [insert goal here] build on all systems
> including
> > CI.
> > 4. We do not purge the local repo before a build (shouldn't have to).
> >
> > IMHO, muti-module builds shouldn't even try to download module artifacts
> for
> > the build because by definition if your doing an install (or more) you
> are
> > creating these...I can't think of a case where you would want to continue
> > the build if anyone of these module artifacts could not be generated.
> > However maven is not doing this...it is perfectly happy to use one that
> > already exists which makes no sense to me.  I.e. when I say mvn clean
> deploy
> > I want maven to generate all the module artifacts and build using ONLY
> the
> > ones just generated, I don't really care if their are prior snapshots or
> not
> > because they should never be used.
> >
> > -Dave
> >
> >
> > On Fri, Apr 17, 2009 at 6:55 AM, Todd Thiessen <th...@nortel.com>
> wrote:
> >
> >> I think it may be difficult to provide much further insite without
> >> actually seeing your exact project.
> >>
> >> Are you absolutely sure that the reactor order is wrong? You started off
> >> by saying that you didn't see the build fail again after restoring the
> >> module order in the parent pom to the "wrong" order. So in some cases,
> >> it seems to work.
> >>
> >> What is special about the cases when it doesn't? This seems to be the
> >> mystery. When maven starts the build, is it actually displaying the
> >> project order incorrectly?  I personally have never seen this but I
> >> suspect the nature of our projects are fairly different and it isn't an
> >> apples to apples comparison.
> >>
> >> Do this problem happen when you do a build with a clean local
> >> repository? I presume your CI build always does a build this way. If it
> >> isn't, odd things can happen if the local repository is stale.
> >>
> >> ---
> >> Todd Thiessen
> >>
> >>
> >> > -----Original Message-----
> >> > From: David Hoffer [mailto:dhoffer6@gmail.com]
> >> > Sent: Friday, April 17, 2009 7:40 AM
> >> > To: Maven Users List
> >> > Subject: Re: Multi-module build is not building with current
> >> > module source code
> >> >
> >> > I did retry the test with the module order reset back to the
> >> > previous order where the build failed.
> >> >
> >> > Unfortunately, I was not able to see it fail again.  I
> >> > suspect that these commands don't duplicate the conditions
> >> > where folks see build failures regarding muli-module builds.
> >> > I apparently am not alone with this issue...hence plugins
> >> > seem to have been developed to work around this core bug in maven.
> >> >
> >> > Here is what I know.
> >> >
> >> > 1. The reactor (the internal auto ordering of modules) does
> >> > not always get it right.  Just prior to me sending this email
> >> > we had a case where a developer checked in a file(s) that
> >> > caused the CI build to fail.  I fixed it by simply manually
> >> > changing the order of the modules in the parent pom.  It was
> >> > clear from looking at the dependencies that moduleX had to be
> >> > built before moduleY; maven was un-able to figure this
> >> > out...all I did was manually reverse these and it worked.
> >> > Because of this I assumed that Maven had NO auto calculation
> >> > of module order.
> >> >
> >> > 2. Even when the module order is made perfect manually, maven
> >> > will still fail the build on occasion.  Although it has built
> >> > moduleX first, it does not use this as the dependency for
> >> > moduleY; instead it uses a prior snapshot from the repo!  Now
> >> > I cannot say for certain if the old snapshot was already in
> >> > the local repo or if maven pulled it down from the corporate
> >> > repo but that is what it used in the build.  To fix this
> >> > problem I had to manually deploy the new version of this
> >> > dependent artifact...then the build could find it and build correctly.
> >> >
> >> > I wish I had the build log from issue 2, but it seems our CI
> >> > build is not keeping history, I will see if I can turn this on.
> >> >
> >> > What I wondering about is how does maven handle snapshot
> >> > versioning?  It seems this second issue could be caused if
> >> > there are errors in how maven calculates snapshot timestamps
> >> > or something.  For instance, if the previous snapshot
> >> > deployed by the CI server has a later timestamp than what is
> >> > being built currently, would maven prefer the former?  (Our
> >> > CI is TeamCity so the actual builds can be performed on any
> >> > number of build agents but all publish to the same
> >> > Artifactory server.  I'm not sure if the build sets the time
> >> > or if the Artifactory server does.)  Now that I type this, I
> >> > think I will ask our CI guy to make sure the clocks on all
> >> > build systems are identical.  I suspect this is a long shot however.
> >> >
> >> > At this point I don't know what to do, this seems a serious
> >> > flaw in maven.
> >> > Any insight is greatly appreciated.
> >> >
> >> > -Dave
> >> >
> >> >
> >> > On Thu, Apr 16, 2009 at 1:17 PM, Stephen Connolly <
> >> > stephen.alan.connolly@gmail.com> wrote:
> >> >
> >> > > I'd retry the test with the module order reset back to the
> >> > way you had it.
> >> > >
> >> > > the commands I provided should be a fully clean build from
> >> > scratch, so
> >> > > should be equivalent to changing code
> >> > >
> >> > > -Stephen
> >> > >
> >> > > 2009/4/16 David Hoffer <dh...@gmail.com>:
> >> > > > Thanks that makes sense.
> >> > > >
> >> > > > I did a test using your commands after blocking my snapshot proxy
> >> > > > and it built just fine.
> >> > > >
> >> > > > This doesn't surprise me too much because I manually changed the
> >> > > > order of the modules in the parent pom based on my
> >> > premise that the
> >> > > > reactor
> >> > > ordering
> >> > > > logic is flawed.
> >> > > >
> >> > > > In addition i can't say that it works yet because I didn't change
> >> > > > any
> >> > > code.
> >> > > > I will have to try this again when we have added breaking code to
> >> > > dependent
> >> > > > module(s).
> >> > > >
> >> > > > This is a nasty issue!
> >> > > >
> >> > > > -Dave
> >> > > >
> >> > > > On Thu, Apr 16, 2009 at 12:02 PM, Stephen Connolly <
> >> > > > stephen.alan.connolly@gmail.com> wrote:
> >> > > >
> >> > > >> 2009/4/16 David Hoffer <dh...@gmail.com>:
> >> > > >> > I have a few comments/questions.
> >> > > >> >
> >> > > >> > I do have the snapshot artifacts on a remote corporate
> >> > repo.  (I
> >> > > >> > will
> >> > > see
> >> > > >> if
> >> > > >> > I can block this for this test.)
> >> > > >>
> >> > > >> If you have the artifacts on a remote repository, then when the
> >> > > >> plugin goes looking for the artifacts (from outside the
> >> > reactor) it
> >> > > >> will find them and the plugin at fault will therefore
> >> > not fail the build.
> >> > > >>
> >> > > >> By ensuring that the only source of the artifacts is from the
> >> > > >> reactor, then whatever plugin is pulling the artifacts from the
> >> > > >> repository will be forced to fail (thereby finding your
> >> > problem for
> >> > > >> you)
> >> > > >>
> >> > > >> >
> >> > > >> > What does -DreResolve do?
> >> > > >>
> >> > > >> reResolve will turn around and re-pull the dependencies from the
> >> > > >> remote repository unless you disable it with -DreResolve=false
> >> > > >>
> >> > > >> (reResolve is a parameter of the purge-... goal)
> >> > > >>
> >> > > >> >
> >> > > >> > -Dave
> >> > > >> >
> >> > > >> > On Thu, Apr 16, 2009 at 11:09 AM, Stephen Connolly <
> >> > > >> > stephen.alan.connolly@gmail.com> wrote:
> >> > > >> >
> >> > > >> >> That would be my concern too.
> >> > > >> >>
> >> > > >> >> I suspect you can reproduce your build failures if you:
> >> > > >> >>
> >> > > >> >> mvn clean
> >> > > >> >>
> >> > > >> >> mvn dependency:purge-local-repository -DreResolve=false
> >> > > >> >>
> >> > > >> >> mvn install
> >> > > >> >>
> >> > > >> >> (assuming that you have not deployed any of the -SNAPSHOT
> >> > > >> >> artifacts
> >> > > to a
> >> > > >> >> remote repository)
> >> > > >> >>
> >> > > >> >> you should recreate the build failure and be able to identify
> >> > > >> >> the
> >> > > source
> >> > > >> of
> >> > > >> >> it better.
> >> > > >> >>
> >> > > >> >> -Stephen
> >> > > >> >>
> >> > > >> >> 2009/4/16 David Hoffer <dh...@gmail.com>
> >> > > >> >>
> >> > > >> >> > Isn't that adding yet another plugin to do what maven is
> >> > > >> >> > supposed
> >> > > to
> >> > > >> do
> >> > > >> >> out
> >> > > >> >> > of the box?  I'm concerned about the increase in
> >> > complexity,
> >> > > >> >> > when
> >> > > >> >> something
> >> > > >> >> > doesn't work is it maven or the incremental plugin?
> >> > > >> >> >
> >> > > >> >> > -Dave
> >> > > >> >> >
> >> > > >> >> > On Thu, Apr 16, 2009 at 10:37 AM, Dmitry Skavish <
> >> > > skavish@gmail.com>
> >> > > >> >> > wrote:
> >> > > >> >> >
> >> > > >> >> > > I asked the same question on OSGi maillist and
> >> > they advised
> >> > > >> >> > > me to
> >> > > >> use
> >> > > >> >> > > incremental-build plugin:
> >> > > >> >> https://maven-incremental-build.dev.java.net/I
> >> > > >> >> > > does exactly what I need, check it out, it could
> >> > solve your
> >> > > problem
> >> > > >> as
> >> > > >> >> > > well.
> >> > > >> >> > >
> >> > > >> >> > > On Thu, Apr 16, 2009 at 12:33 PM, David Hoffer <
> >> > > dhoffer6@gmail.com>
> >> > > >> >> > wrote:
> >> > > >> >> > >
> >> > > >> >> > > > Then there is a big bug here because I have a
> >> > multi-module
> >> > > project
> >> > > >> >> with
> >> > > >> >> > a
> >> > > >> >> > > > few modules, the dependent one was built first
> >> > (as seen in
> >> > > >> >> > > > the
> >> > > >> build
> >> > > >> >> > log)
> >> > > >> >> > > > but yet when the depending module was built it
> >> > did NOT use
> >> > > >> >> > > > the
> >> > > >> >> > dependent
> >> > > >> >> > > > build rather it went to the repo and downloaded the
> >> > > >> >> > > > previously
> >> > > >> >> deployed
> >> > > >> >> > > > artifact snapshot.
> >> > > >> >> > > >
> >> > > >> >> > > > -Dave
> >> > > >> >> > > >
> >> > > >> >> > > > On Thu, Apr 16, 2009 at 10:24 AM, Todd Thiessen <
> >> > > >> thiessen@nortel.com
> >> > > >> >> >
> >> > > >> >> > > > wrote:
> >> > > >> >> > > >
> >> > > >> >> > > > > FYI. Here is one reference,
> >> > > >> >> > > > >
> >> > > >> >> > > > > http://maven.apache.org/pom.html#Aggregation
> >> > > >> >> > > > >
> >> > > >> >> > > > > ---
> >> > > >> >> > > > > Todd Thiessen
> >> > > >> >> > > > >
> >> > > >> >> > > > >
> >> > > >> >> > > > > > -----Original Message-----
> >> > > >> >> > > > > > From: David Hoffer [mailto:dhoffer6@gmail.com]
> >> > > >> >> > > > > > Sent: Thursday, April 16, 2009 11:46 AM
> >> > > >> >> > > > > > To: Maven Users List
> >> > > >> >> > > > > > Subject: Re: Multi-module build is not building with
> >> > > current
> >> > > >> >> > > > > > module source code
> >> > > >> >> > > > > >
> >> > > >> >> > > > > > Then I'm understanding the order of the
> >> > reactor wrong.
> >> > > >> >> > > > > > I assumed its top to bottom, that is...just before
> >> > > >> >> > > > > > internal
> >> > > is
> >> > > >> >> > > > > > built...public is built; and just before
> >> > > >> >> > > > > > security-public is built...internal is built.
> >> > > >> >> > > > > >
> >> > > >> >> > > > > > Can you clarify the order?
> >> > > >> >> > > > > >
> >> > > >> >> > > > > > -Dave
> >> > > >> >> > > > > >
> >> > > >> >> > > > > > On Thu, Apr 16, 2009 at 9:39 AM, Nick Stolwijk
> >> > > >> >> > > > > > <ni...@gmail.com>wrote:
> >> > > >> >> > > > > >
> >> > > >> >> > > > > > > Maven always takes the artifacts out of the local
> >> > > >> >> > > > > > repository. However,
> >> > > >> >> > > > > > > this is not a problem, because the
> >> > reactor knows in
> >> > > >> >> > > > > > > which
> >> > > >> order
> >> > > >> >> > to
> >> > > >> >> > > > > > > built the projects. Just before your internal
> >> > > >> >> > > > > > > project is
> >> > > >> >> > > > > > built, maven
> >> > > >> >> > > > > > > has installed the most recent version of
> >> > > >> >> > > > > > > security-public
> >> > > in
> >> > > >> >> > > > > > the local
> >> > > >> >> > > > > > > repository.
> >> > > >> >> > > > > > >
> >> > > >> >> > > > > > > Maybe I don't understand your problem. If that is
> >> > > >> >> > > > > > > the
> >> > > case,
> >> > > >> >> > > > > > please clarify.
> >> > > >> >> > > > > > >
> >> > > >> >> > > > > > > Hth,
> >> > > >> >> > > > > > >
> >> > > >> >> > > > > > > Nick Stolwijk
> >> > > >> >> > > > > > > ~Java Developer~
> >> > > >> >> > > > > > >
> >> > > >> >> > > > > > > Iprofs BV.
> >> > > >> >> > > > > > > Claus Sluterweg 125
> >> > > >> >> > > > > > > 2012 WS Haarlem
> >> > > >> >> > > > > > > www.iprofs.nl
> >> > > >> >> > > > > > >
> >> > > >> >> > > > > > >
> >> > > >> >> > > > > > >
> >> > > >> >> > > > > > > On Thu, Apr 16, 2009 at 5:26 PM, Dmitry Skavish
> >> > > >> >> > > > > > <sk...@gmail.com> wrote:
> >> > > >> >> > > > > > > > I am having the same problem and would like to
> >> > > >> >> > > > > > > > know
> >> > > that
> >> > > >> >> > > > > > as well. Thanks!
> >> > > >> >> > > > > > > >
> >> > > >> >> > > > > > > > On Thu, Apr 16, 2009 at 10:19 AM, David Hoffer
> >> > > >> >> > > > > > <dh...@gmail.com>
> >> > > >> >> > > > > > > wrote:
> >> > > >> >> > > > > > > >
> >> > > >> >> > > > > > > >> I have a multi-module build where some modules
> >> > > >> >> > > > > > > >> are
> >> > > >> dependent
> >> > > >> >> > on
> >> > > >> >> > > > > > > >> other modules.  What is happening is that the
> >> > > dependent
> >> > > >> >> > > > > > module is
> >> > > >> >> > > > > > > >> getting its dependency from the
> >> > local/corporate
> >> > > >> >> > > > > > > >> maven
> >> > > >> >> > > > > > repo instead
> >> > > >> >> > > > > > > >> of the source
> >> > > >> >> > > > > > > code
> >> > > >> >> > > > > > > >> that was just built.  How do I specify that
> >> > > >> >> > > > > > > >> modules
> >> > > >> always
> >> > > >> >> > build
> >> > > >> >> > > > > > > >> using current source not prior built
> >> > snapshot jars?
> >> > > >> >> > > > > > > >>
> >> > > >> >> > > > > > > >> Here is an example of the problem (it is really
> >> > > simple)
> >> > > >> >> > > > > > > >>
> >> > > >> >> > > > > > > >> Parent pom:
> >> > > >> >> > > > > > > >> <version>0.1-SNAPSHOT</version> <modules>
> >> > > >> >> > > > > > > >>        <module>public</module>
> >> > > >> >> > > > > > > >>        <module>internal</module>
> >> > > >> >> > > > > > > >>        <module>security-public</module>
> >> > > >> >> > > > > > > >> </modules>
> >> > > >> >> > > > > > > >>
> >> > > >> >> > > > > > > >> public pom:
> >> > > >> >> > > > > > > >> <version>0.1-SNAPSHOT</version>
> >> > > >> >> > > > > > > >>
> >> > > >> >> > > > > > > >> internal pom:
> >> > > >> >> > > > > > > >> <dependencies>
> >> > > >> >> > > > > > > >>        <dependency>
> >> > > >> >> > > > > > > >>
> >> > <groupId>${project.groupId}</groupId>
> >> > > >> >> > > > > > > >>            <artifactId>public</artifactId>
> >> > > >> >> > > > > > > >>            <version>0.1-SNAPSHOT</version>
> >> > > >> >> > > > > > > >>        </dependency> </dependencies>
> >> > > >> >> > > > > > > >>
> >> > > >> >> > > > > > > >> security-public:
> >> > > >> >> > > > > > > >> <dependency>
> >> > > >> >> > > > > > > >>
> >> > <groupId>${project.groupId}</groupId>
> >> > > >> >> > > > > > > >>            <artifactId>public</artifactId>
> >> > > >> >> > > > > > > >>            <version>0.1-SNAPSHOT</version>
> >> > > </dependency>
> >> > > >> >> > > > > > > >>
> >> > > >> >> > > > > > > >> So what is happening is that instead
> >> > of internal
> >> > > >> >> > > > > > > >> &
> >> > > >> >> > > > > > security-public
> >> > > >> >> > > > > > > >> building using the just built public
> >> > (note it is
> >> > > >> >> > > > > > > >> first
> >> > > so
> >> > > >> it
> >> > > >> >> > was
> >> > > >> >> > > > > > > >> built first)
> >> > > >> >> > > > > > > they
> >> > > >> >> > > > > > > >> go
> >> > > >> >> > > > > > > >> out and download the last deployed
> >> > snapshot and
> >> > > >> >> > > > > > > >> build
> >> > > >> using
> >> > > >> >> > that
> >> > > >> >> > > > > > > instead.
> >> > > >> >> > > > > > > >>
> >> > > >> >> > > > > > > >> Nothing in the pom dependency syntax
> >> > really says
> >> > > >> >> > > > > > > >> which
> >> > > >> >> > > > > > to use but I
> >> > > >> >> > > > > > > assumed
> >> > > >> >> > > > > > > >> that because maven 'knows' these are all in the
> >> > > reactor
> >> > > >> it
> >> > > >> >> > would
> >> > > >> >> > > > > > > >> use
> >> > > >> >> > > > > > > module
> >> > > >> >> > > > > > > >> source.  However this doesn't seem to
> >> > work, what
> >> > > >> >> > > > > > > >> do I
> >> > > >> >> > > > > > need to do to
> >> > > >> >> > > > > > > >> fix this?
> >> > > >> >> > > > > > > >>
> >> > > >> >> > > > > > > >> BTW, the goals being run are 'clean deploy
> >> > > site-deploy'
> >> > > >> >> > > > > > > >>
> >> > > >> >> > > > > > > >> -Dave
> >> > > >> >> > > > > > > >>
> >> > > >> >> > > > > > > >
> >> > > >> >> > > > > > > >
> >> > > >> >> > > > > > > >
> >> > > >> >> > > > > > > > --
> >> > > >> >> > > > > > > > Dmitry Skavish
> >> > > >> >> > > > > > > >
> >> > > >> >> > > > > > >
> >> > > >> >> > > > > > >
> >> > > >> >> > > > > >
> >> > > >> >> >
> >> > >
> >> > ---------------------------------------------------------------------
> >> > > >> >> > > > > > > To unsubscribe, e-mail:
> >> > > users-unsubscribe@maven.apache.org
> >> > > >> >> > > > > > > For additional commands, e-mail:
> >> > > >> users-help@maven.apache.org
> >> > > >> >> > > > > > >
> >> > > >> >> > > > > > >
> >> > > >> >> > > > > >
> >> > > >> >> > > > >
> >> > > >> >> > > > >
> >> > > >> >>
> >> > ----------------------------------------------------------------
> >> > > >> >> -----
> >> > > >> >> > > > > To unsubscribe, e-mail:
> >> > > >> >> > > > > users-unsubscribe@maven.apache.org
> >> > > >> >> > > > > For additional commands, e-mail:
> >> > > >> >> > > > > users-help@maven.apache.org
> >> > > >> >> > > > >
> >> > > >> >> > > > >
> >> > > >> >> > > >
> >> > > >> >> > >
> >> > > >> >> > >
> >> > > >> >> > >
> >> > > >> >> > > --
> >> > > >> >> > > Dmitry Skavish
> >> > > >> >> > >
> >> > > >> >> >
> >> > > >> >>
> >> > > >> >
> >> > > >>
> >> > > >>
> >> > -------------------------------------------------------------------
> >> > > >> -- To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> >> > > >> For additional commands, e-mail: users-help@maven.apache.org
> >> > > >>
> >> > > >>
> >> > > >
> >> > >
> >> > >
> >> > ---------------------------------------------------------------------
> >> > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> >> > > For additional commands, e-mail: users-help@maven.apache.org
> >> > >
> >> > >
> >> >
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> >> For additional commands, e-mail: users-help@maven.apache.org
> >>
> >>
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: Multi-module build is not building with current module source code

Posted by Stephen Connolly <st...@gmail.com>.
[random]
are you using Hudson as your CI?
if yes, are you using the crazy m2 project type in Hudson?
if yes, are you using the advanced parallel builds option?
if yes to all of the above: stop right now and switch to freestyle
[/random]

2009/4/17 David Hoffer <dh...@gmail.com>:
> I concur with what you are saying.  I wish I had the build log to see the
> reactor order...but I don't because the CI system wasn't keeping history.
> So I can't say for certain the reactor order was wrong.  I can sure say it
> seems so because changing it manually fixed the build.
>
> The thing that is 'special' or the thing that seems to trigger the problem
> is the following:
>
> 1. It happens only when we checkin code in various modules where if the
> build is out-of-order it won't compile because the dependencies haven't been
> updated.
> 2. It only happens on the CI build.  I'm not sure what to make of this
> fact...developers wouldn't checkin if it didn't build on their system.
> 3. Yes we always do clean [insert goal here] build on all systems including
> CI.
> 4. We do not purge the local repo before a build (shouldn't have to).
>
> IMHO, muti-module builds shouldn't even try to download module artifacts for
> the build because by definition if your doing an install (or more) you are
> creating these...I can't think of a case where you would want to continue
> the build if anyone of these module artifacts could not be generated.
> However maven is not doing this...it is perfectly happy to use one that
> already exists which makes no sense to me.  I.e. when I say mvn clean deploy
> I want maven to generate all the module artifacts and build using ONLY the
> ones just generated, I don't really care if their are prior snapshots or not
> because they should never be used.
>
> -Dave
>
>
> On Fri, Apr 17, 2009 at 6:55 AM, Todd Thiessen <th...@nortel.com> wrote:
>
>> I think it may be difficult to provide much further insite without
>> actually seeing your exact project.
>>
>> Are you absolutely sure that the reactor order is wrong? You started off
>> by saying that you didn't see the build fail again after restoring the
>> module order in the parent pom to the "wrong" order. So in some cases,
>> it seems to work.
>>
>> What is special about the cases when it doesn't? This seems to be the
>> mystery. When maven starts the build, is it actually displaying the
>> project order incorrectly?  I personally have never seen this but I
>> suspect the nature of our projects are fairly different and it isn't an
>> apples to apples comparison.
>>
>> Do this problem happen when you do a build with a clean local
>> repository? I presume your CI build always does a build this way. If it
>> isn't, odd things can happen if the local repository is stale.
>>
>> ---
>> Todd Thiessen
>>
>>
>> > -----Original Message-----
>> > From: David Hoffer [mailto:dhoffer6@gmail.com]
>> > Sent: Friday, April 17, 2009 7:40 AM
>> > To: Maven Users List
>> > Subject: Re: Multi-module build is not building with current
>> > module source code
>> >
>> > I did retry the test with the module order reset back to the
>> > previous order where the build failed.
>> >
>> > Unfortunately, I was not able to see it fail again.  I
>> > suspect that these commands don't duplicate the conditions
>> > where folks see build failures regarding muli-module builds.
>> > I apparently am not alone with this issue...hence plugins
>> > seem to have been developed to work around this core bug in maven.
>> >
>> > Here is what I know.
>> >
>> > 1. The reactor (the internal auto ordering of modules) does
>> > not always get it right.  Just prior to me sending this email
>> > we had a case where a developer checked in a file(s) that
>> > caused the CI build to fail.  I fixed it by simply manually
>> > changing the order of the modules in the parent pom.  It was
>> > clear from looking at the dependencies that moduleX had to be
>> > built before moduleY; maven was un-able to figure this
>> > out...all I did was manually reverse these and it worked.
>> > Because of this I assumed that Maven had NO auto calculation
>> > of module order.
>> >
>> > 2. Even when the module order is made perfect manually, maven
>> > will still fail the build on occasion.  Although it has built
>> > moduleX first, it does not use this as the dependency for
>> > moduleY; instead it uses a prior snapshot from the repo!  Now
>> > I cannot say for certain if the old snapshot was already in
>> > the local repo or if maven pulled it down from the corporate
>> > repo but that is what it used in the build.  To fix this
>> > problem I had to manually deploy the new version of this
>> > dependent artifact...then the build could find it and build correctly.
>> >
>> > I wish I had the build log from issue 2, but it seems our CI
>> > build is not keeping history, I will see if I can turn this on.
>> >
>> > What I wondering about is how does maven handle snapshot
>> > versioning?  It seems this second issue could be caused if
>> > there are errors in how maven calculates snapshot timestamps
>> > or something.  For instance, if the previous snapshot
>> > deployed by the CI server has a later timestamp than what is
>> > being built currently, would maven prefer the former?  (Our
>> > CI is TeamCity so the actual builds can be performed on any
>> > number of build agents but all publish to the same
>> > Artifactory server.  I'm not sure if the build sets the time
>> > or if the Artifactory server does.)  Now that I type this, I
>> > think I will ask our CI guy to make sure the clocks on all
>> > build systems are identical.  I suspect this is a long shot however.
>> >
>> > At this point I don't know what to do, this seems a serious
>> > flaw in maven.
>> > Any insight is greatly appreciated.
>> >
>> > -Dave
>> >
>> >
>> > On Thu, Apr 16, 2009 at 1:17 PM, Stephen Connolly <
>> > stephen.alan.connolly@gmail.com> wrote:
>> >
>> > > I'd retry the test with the module order reset back to the
>> > way you had it.
>> > >
>> > > the commands I provided should be a fully clean build from
>> > scratch, so
>> > > should be equivalent to changing code
>> > >
>> > > -Stephen
>> > >
>> > > 2009/4/16 David Hoffer <dh...@gmail.com>:
>> > > > Thanks that makes sense.
>> > > >
>> > > > I did a test using your commands after blocking my snapshot proxy
>> > > > and it built just fine.
>> > > >
>> > > > This doesn't surprise me too much because I manually changed the
>> > > > order of the modules in the parent pom based on my
>> > premise that the
>> > > > reactor
>> > > ordering
>> > > > logic is flawed.
>> > > >
>> > > > In addition i can't say that it works yet because I didn't change
>> > > > any
>> > > code.
>> > > > I will have to try this again when we have added breaking code to
>> > > dependent
>> > > > module(s).
>> > > >
>> > > > This is a nasty issue!
>> > > >
>> > > > -Dave
>> > > >
>> > > > On Thu, Apr 16, 2009 at 12:02 PM, Stephen Connolly <
>> > > > stephen.alan.connolly@gmail.com> wrote:
>> > > >
>> > > >> 2009/4/16 David Hoffer <dh...@gmail.com>:
>> > > >> > I have a few comments/questions.
>> > > >> >
>> > > >> > I do have the snapshot artifacts on a remote corporate
>> > repo.  (I
>> > > >> > will
>> > > see
>> > > >> if
>> > > >> > I can block this for this test.)
>> > > >>
>> > > >> If you have the artifacts on a remote repository, then when the
>> > > >> plugin goes looking for the artifacts (from outside the
>> > reactor) it
>> > > >> will find them and the plugin at fault will therefore
>> > not fail the build.
>> > > >>
>> > > >> By ensuring that the only source of the artifacts is from the
>> > > >> reactor, then whatever plugin is pulling the artifacts from the
>> > > >> repository will be forced to fail (thereby finding your
>> > problem for
>> > > >> you)
>> > > >>
>> > > >> >
>> > > >> > What does -DreResolve do?
>> > > >>
>> > > >> reResolve will turn around and re-pull the dependencies from the
>> > > >> remote repository unless you disable it with -DreResolve=false
>> > > >>
>> > > >> (reResolve is a parameter of the purge-... goal)
>> > > >>
>> > > >> >
>> > > >> > -Dave
>> > > >> >
>> > > >> > On Thu, Apr 16, 2009 at 11:09 AM, Stephen Connolly <
>> > > >> > stephen.alan.connolly@gmail.com> wrote:
>> > > >> >
>> > > >> >> That would be my concern too.
>> > > >> >>
>> > > >> >> I suspect you can reproduce your build failures if you:
>> > > >> >>
>> > > >> >> mvn clean
>> > > >> >>
>> > > >> >> mvn dependency:purge-local-repository -DreResolve=false
>> > > >> >>
>> > > >> >> mvn install
>> > > >> >>
>> > > >> >> (assuming that you have not deployed any of the -SNAPSHOT
>> > > >> >> artifacts
>> > > to a
>> > > >> >> remote repository)
>> > > >> >>
>> > > >> >> you should recreate the build failure and be able to identify
>> > > >> >> the
>> > > source
>> > > >> of
>> > > >> >> it better.
>> > > >> >>
>> > > >> >> -Stephen
>> > > >> >>
>> > > >> >> 2009/4/16 David Hoffer <dh...@gmail.com>
>> > > >> >>
>> > > >> >> > Isn't that adding yet another plugin to do what maven is
>> > > >> >> > supposed
>> > > to
>> > > >> do
>> > > >> >> out
>> > > >> >> > of the box?  I'm concerned about the increase in
>> > complexity,
>> > > >> >> > when
>> > > >> >> something
>> > > >> >> > doesn't work is it maven or the incremental plugin?
>> > > >> >> >
>> > > >> >> > -Dave
>> > > >> >> >
>> > > >> >> > On Thu, Apr 16, 2009 at 10:37 AM, Dmitry Skavish <
>> > > skavish@gmail.com>
>> > > >> >> > wrote:
>> > > >> >> >
>> > > >> >> > > I asked the same question on OSGi maillist and
>> > they advised
>> > > >> >> > > me to
>> > > >> use
>> > > >> >> > > incremental-build plugin:
>> > > >> >> https://maven-incremental-build.dev.java.net/I
>> > > >> >> > > does exactly what I need, check it out, it could
>> > solve your
>> > > problem
>> > > >> as
>> > > >> >> > > well.
>> > > >> >> > >
>> > > >> >> > > On Thu, Apr 16, 2009 at 12:33 PM, David Hoffer <
>> > > dhoffer6@gmail.com>
>> > > >> >> > wrote:
>> > > >> >> > >
>> > > >> >> > > > Then there is a big bug here because I have a
>> > multi-module
>> > > project
>> > > >> >> with
>> > > >> >> > a
>> > > >> >> > > > few modules, the dependent one was built first
>> > (as seen in
>> > > >> >> > > > the
>> > > >> build
>> > > >> >> > log)
>> > > >> >> > > > but yet when the depending module was built it
>> > did NOT use
>> > > >> >> > > > the
>> > > >> >> > dependent
>> > > >> >> > > > build rather it went to the repo and downloaded the
>> > > >> >> > > > previously
>> > > >> >> deployed
>> > > >> >> > > > artifact snapshot.
>> > > >> >> > > >
>> > > >> >> > > > -Dave
>> > > >> >> > > >
>> > > >> >> > > > On Thu, Apr 16, 2009 at 10:24 AM, Todd Thiessen <
>> > > >> thiessen@nortel.com
>> > > >> >> >
>> > > >> >> > > > wrote:
>> > > >> >> > > >
>> > > >> >> > > > > FYI. Here is one reference,
>> > > >> >> > > > >
>> > > >> >> > > > > http://maven.apache.org/pom.html#Aggregation
>> > > >> >> > > > >
>> > > >> >> > > > > ---
>> > > >> >> > > > > Todd Thiessen
>> > > >> >> > > > >
>> > > >> >> > > > >
>> > > >> >> > > > > > -----Original Message-----
>> > > >> >> > > > > > From: David Hoffer [mailto:dhoffer6@gmail.com]
>> > > >> >> > > > > > Sent: Thursday, April 16, 2009 11:46 AM
>> > > >> >> > > > > > To: Maven Users List
>> > > >> >> > > > > > Subject: Re: Multi-module build is not building with
>> > > current
>> > > >> >> > > > > > module source code
>> > > >> >> > > > > >
>> > > >> >> > > > > > Then I'm understanding the order of the
>> > reactor wrong.
>> > > >> >> > > > > > I assumed its top to bottom, that is...just before
>> > > >> >> > > > > > internal
>> > > is
>> > > >> >> > > > > > built...public is built; and just before
>> > > >> >> > > > > > security-public is built...internal is built.
>> > > >> >> > > > > >
>> > > >> >> > > > > > Can you clarify the order?
>> > > >> >> > > > > >
>> > > >> >> > > > > > -Dave
>> > > >> >> > > > > >
>> > > >> >> > > > > > On Thu, Apr 16, 2009 at 9:39 AM, Nick Stolwijk
>> > > >> >> > > > > > <ni...@gmail.com>wrote:
>> > > >> >> > > > > >
>> > > >> >> > > > > > > Maven always takes the artifacts out of the local
>> > > >> >> > > > > > repository. However,
>> > > >> >> > > > > > > this is not a problem, because the
>> > reactor knows in
>> > > >> >> > > > > > > which
>> > > >> order
>> > > >> >> > to
>> > > >> >> > > > > > > built the projects. Just before your internal
>> > > >> >> > > > > > > project is
>> > > >> >> > > > > > built, maven
>> > > >> >> > > > > > > has installed the most recent version of
>> > > >> >> > > > > > > security-public
>> > > in
>> > > >> >> > > > > > the local
>> > > >> >> > > > > > > repository.
>> > > >> >> > > > > > >
>> > > >> >> > > > > > > Maybe I don't understand your problem. If that is
>> > > >> >> > > > > > > the
>> > > case,
>> > > >> >> > > > > > please clarify.
>> > > >> >> > > > > > >
>> > > >> >> > > > > > > Hth,
>> > > >> >> > > > > > >
>> > > >> >> > > > > > > Nick Stolwijk
>> > > >> >> > > > > > > ~Java Developer~
>> > > >> >> > > > > > >
>> > > >> >> > > > > > > Iprofs BV.
>> > > >> >> > > > > > > Claus Sluterweg 125
>> > > >> >> > > > > > > 2012 WS Haarlem
>> > > >> >> > > > > > > www.iprofs.nl
>> > > >> >> > > > > > >
>> > > >> >> > > > > > >
>> > > >> >> > > > > > >
>> > > >> >> > > > > > > On Thu, Apr 16, 2009 at 5:26 PM, Dmitry Skavish
>> > > >> >> > > > > > <sk...@gmail.com> wrote:
>> > > >> >> > > > > > > > I am having the same problem and would like to
>> > > >> >> > > > > > > > know
>> > > that
>> > > >> >> > > > > > as well. Thanks!
>> > > >> >> > > > > > > >
>> > > >> >> > > > > > > > On Thu, Apr 16, 2009 at 10:19 AM, David Hoffer
>> > > >> >> > > > > > <dh...@gmail.com>
>> > > >> >> > > > > > > wrote:
>> > > >> >> > > > > > > >
>> > > >> >> > > > > > > >> I have a multi-module build where some modules
>> > > >> >> > > > > > > >> are
>> > > >> dependent
>> > > >> >> > on
>> > > >> >> > > > > > > >> other modules.  What is happening is that the
>> > > dependent
>> > > >> >> > > > > > module is
>> > > >> >> > > > > > > >> getting its dependency from the
>> > local/corporate
>> > > >> >> > > > > > > >> maven
>> > > >> >> > > > > > repo instead
>> > > >> >> > > > > > > >> of the source
>> > > >> >> > > > > > > code
>> > > >> >> > > > > > > >> that was just built.  How do I specify that
>> > > >> >> > > > > > > >> modules
>> > > >> always
>> > > >> >> > build
>> > > >> >> > > > > > > >> using current source not prior built
>> > snapshot jars?
>> > > >> >> > > > > > > >>
>> > > >> >> > > > > > > >> Here is an example of the problem (it is really
>> > > simple)
>> > > >> >> > > > > > > >>
>> > > >> >> > > > > > > >> Parent pom:
>> > > >> >> > > > > > > >> <version>0.1-SNAPSHOT</version> <modules>
>> > > >> >> > > > > > > >>        <module>public</module>
>> > > >> >> > > > > > > >>        <module>internal</module>
>> > > >> >> > > > > > > >>        <module>security-public</module>
>> > > >> >> > > > > > > >> </modules>
>> > > >> >> > > > > > > >>
>> > > >> >> > > > > > > >> public pom:
>> > > >> >> > > > > > > >> <version>0.1-SNAPSHOT</version>
>> > > >> >> > > > > > > >>
>> > > >> >> > > > > > > >> internal pom:
>> > > >> >> > > > > > > >> <dependencies>
>> > > >> >> > > > > > > >>        <dependency>
>> > > >> >> > > > > > > >>
>> > <groupId>${project.groupId}</groupId>
>> > > >> >> > > > > > > >>            <artifactId>public</artifactId>
>> > > >> >> > > > > > > >>            <version>0.1-SNAPSHOT</version>
>> > > >> >> > > > > > > >>        </dependency> </dependencies>
>> > > >> >> > > > > > > >>
>> > > >> >> > > > > > > >> security-public:
>> > > >> >> > > > > > > >> <dependency>
>> > > >> >> > > > > > > >>
>> > <groupId>${project.groupId}</groupId>
>> > > >> >> > > > > > > >>            <artifactId>public</artifactId>
>> > > >> >> > > > > > > >>            <version>0.1-SNAPSHOT</version>
>> > > </dependency>
>> > > >> >> > > > > > > >>
>> > > >> >> > > > > > > >> So what is happening is that instead
>> > of internal
>> > > >> >> > > > > > > >> &
>> > > >> >> > > > > > security-public
>> > > >> >> > > > > > > >> building using the just built public
>> > (note it is
>> > > >> >> > > > > > > >> first
>> > > so
>> > > >> it
>> > > >> >> > was
>> > > >> >> > > > > > > >> built first)
>> > > >> >> > > > > > > they
>> > > >> >> > > > > > > >> go
>> > > >> >> > > > > > > >> out and download the last deployed
>> > snapshot and
>> > > >> >> > > > > > > >> build
>> > > >> using
>> > > >> >> > that
>> > > >> >> > > > > > > instead.
>> > > >> >> > > > > > > >>
>> > > >> >> > > > > > > >> Nothing in the pom dependency syntax
>> > really says
>> > > >> >> > > > > > > >> which
>> > > >> >> > > > > > to use but I
>> > > >> >> > > > > > > assumed
>> > > >> >> > > > > > > >> that because maven 'knows' these are all in the
>> > > reactor
>> > > >> it
>> > > >> >> > would
>> > > >> >> > > > > > > >> use
>> > > >> >> > > > > > > module
>> > > >> >> > > > > > > >> source.  However this doesn't seem to
>> > work, what
>> > > >> >> > > > > > > >> do I
>> > > >> >> > > > > > need to do to
>> > > >> >> > > > > > > >> fix this?
>> > > >> >> > > > > > > >>
>> > > >> >> > > > > > > >> BTW, the goals being run are 'clean deploy
>> > > site-deploy'
>> > > >> >> > > > > > > >>
>> > > >> >> > > > > > > >> -Dave
>> > > >> >> > > > > > > >>
>> > > >> >> > > > > > > >
>> > > >> >> > > > > > > >
>> > > >> >> > > > > > > >
>> > > >> >> > > > > > > > --
>> > > >> >> > > > > > > > Dmitry Skavish
>> > > >> >> > > > > > > >
>> > > >> >> > > > > > >
>> > > >> >> > > > > > >
>> > > >> >> > > > > >
>> > > >> >> >
>> > >
>> > ---------------------------------------------------------------------
>> > > >> >> > > > > > > To unsubscribe, e-mail:
>> > > users-unsubscribe@maven.apache.org
>> > > >> >> > > > > > > For additional commands, e-mail:
>> > > >> users-help@maven.apache.org
>> > > >> >> > > > > > >
>> > > >> >> > > > > > >
>> > > >> >> > > > > >
>> > > >> >> > > > >
>> > > >> >> > > > >
>> > > >> >>
>> > ----------------------------------------------------------------
>> > > >> >> -----
>> > > >> >> > > > > To unsubscribe, e-mail:
>> > > >> >> > > > > users-unsubscribe@maven.apache.org
>> > > >> >> > > > > For additional commands, e-mail:
>> > > >> >> > > > > users-help@maven.apache.org
>> > > >> >> > > > >
>> > > >> >> > > > >
>> > > >> >> > > >
>> > > >> >> > >
>> > > >> >> > >
>> > > >> >> > >
>> > > >> >> > > --
>> > > >> >> > > Dmitry Skavish
>> > > >> >> > >
>> > > >> >> >
>> > > >> >>
>> > > >> >
>> > > >>
>> > > >>
>> > -------------------------------------------------------------------
>> > > >> -- To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> > > >> For additional commands, e-mail: users-help@maven.apache.org
>> > > >>
>> > > >>
>> > > >
>> > >
>> > >
>> > ---------------------------------------------------------------------
>> > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> > > For additional commands, e-mail: users-help@maven.apache.org
>> > >
>> > >
>> >
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>
>

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


Re: Multi-module build is not building with current module source code

Posted by David Hoffer <dh...@gmail.com>.
What CI system is used?  I think we loose our maven integration if we use a
script but we will check into this.

-Dave

On Fri, Apr 17, 2009 at 2:20 PM, Todd Thiessen <th...@nortel.com> wrote:

> You don't even need a plugin. Instead of calling maven directly, your CI
> could call a script which calls the maven commands seperate.  So your CI
> only need call the one script. One of my collegues does exactly that.
>
> You could also use the release plugin.
>
> ---
> Todd Thiessen
>
>
> > -----Original Message-----
> > From: David Hoffer [mailto:dhoffer6@gmail.com]
> > Sent: Friday, April 17, 2009 12:48 PM
> > To: Maven Users List
> > Subject: Re: Multi-module build is not building with current
> > module source code
> >
> > Yes, I'm sure we call:
> >
> > mvn clean deploy site-deploy
> >
> > I too figured site-deploy would happen after the deploy so
> > all would be well.
> >
> > I have not written a plugin before, I'm not sure I'd know how
> > to do this.
> >
> > I can't easily change my build to do this in separate steps, i.e.
> >
> > mvn clean deploy
> > mvn site-deploy
> >
> > Because our CI server doesn't support running two separate
> > command lines when using maven, I would loose all maven
> > support if I did this.  (If someone could point out how to
> > write a maven plugin that would perform the two steps, I
> > would be interested in trying this.)
> >
> > I am using maven 2.1.
> >
> > -Dave
> >
> >
> > On Fri, Apr 17, 2009 at 10:38 AM, Stephen Connolly <
> > stephen.alan.connolly@gmail.com> wrote:
> >
> > > Ahhhhh
> > >
> > > OK, that explains some things, but I'm not sure how you go about
> > > fixing them ;-)
> > >
> > > I suspect some of your site reports are forking a build...
> > the forked
> > > build will not have reference to the reactor artifacts from
> > the main
> > > build, so as a result will pull the version from the local
> > > repository/remote repository which will be the previous
> > version and so
> > > fail the build.
> > >
> > > if you disabled your remote repository and purged
> > dependencies again
> > > you should be able to reproduce the failure with the
> > goal(s) you are
> > > providing to the CI server... thereby at least confirming
> > that this is
> > > a forked build by site problem (since you'd have your build log)
> > >
> > > Also are you sure it's
> > >
> > > clean deploy site-deploy
> > >
> > > and not
> > >
> > > clean site-deploy deploy
> > >
> > > my understanding is that lifecycle phases are invoked in
> > the order in
> > > which they occur.
> > >
> > > you might be able to cheat by writing a simple aggregator
> > plugin that
> > > does nothing and invoking that aggregator goal in between
> > deploy and
> > > site-deploy... since a build plan for such would force the
> > deploy to
> > > have completed on everything before starting the site-deploy...
> > >
> > > (I mention build plans... but they may be a 3.0 feature)
> > >
> > > what version of Maven is this also... I'm hoping this is
> > not a 2.1.0
> > > regression
> > >
> > > -Stephen
> > >
> > > 2009/4/17 David Hoffer <dh...@gmail.com>:
> > > > Your replies do make sense to me, I have had this problem with
> > > > renaming artifacts, etc but I think to really find all missed
> > > > changes you also
> > > would
> > > > need to purge these from your corporate repo.
> > > >
> > > > Okay I have more data on why our CI builds fail.  (I'm
> > prepared for
> > > > a
> > > 'your
> > > > doing it wrong' type of answer).
> > > >
> > > > On our CI system we want a complete site report in addition to the
> > > regular
> > > > clean & deploy goals so our build command is:
> > > > mvn clean deploy site-deploy
> > > >
> > > > The problem is the site-deploy.  If we remove this then
> > we get the
> > > > normal build process where each module is built, installed and
> > > > deployed in order for each module.
> > > >
> > > > When we add the site-deploy it doesn't do this, rather it
> > builds the
> > > source
> > > > for each module WITHOUT doing an install and/or deploy first.  So
> > > > the site-deploy seems to be taking over and saying I need
> > to do my
> > > > tasks
> > > first
> > > > then you can do the normal build.
> > > >
> > > > How should I be doing this?  I.e. How can I get the site to be
> > > > generated
> > > and
> > > > deployed AFTER the normal clean deploy goals?  I don't want site
> > > generation
> > > > to be done separately on a different trigger because its
> > important
> > > > that
> > > the
> > > > site be based on the artifacts generated during the deploy phase.
> > > >
> > > > Hopefully there is a simple fix for this?
> > > >
> > > > -Dave
> > > >
> > > >
> > > >
> > > >
> > > > On Fri, Apr 17, 2009 at 8:16 AM, Todd Thiessen
> > <th...@nortel.com>
> > > wrote:
> > > >
> > > >> > So how then does one know when they have to purge the local
> > > >> > repository?  Having rules where you sometimes need to and
> > > >> > sometimes don't is really hard to live with.  Perhaps you can
> > > >> > clarify the rules?
> > > >>
> > > >> I can provide a bit of clarify here. You could have a problem if
> > > >> you changed the artifactId, groupId or version of
> > anything in your project.
> > > >> Maven would install a new copy of this artifact in your
> > local and
> > > >> if you happen to forget to update all references to this
> > > >> dependency, your code will still build and compile file, but you
> > > >> may get unexected runtime problems. If you purge your
> > local, your build will properly fail.
> > > >>
> > > >> > And if it's important why isn't it done by default?
> > > >>
> > > >> This is a good question which I am not qualitfied to
> > answer. I have
> > > >> been tempted to add to the clean phase a goal which also deletes
> > > >> the artifact from the local repo (although this still
> > isn't sufficient).
> > > >>
> > > >>
> > -------------------------------------------------------------------
> > > >> -- To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > > >> For additional commands, e-mail: users-help@maven.apache.org
> > > >>
> > > >>
> > > >
> > >
> > >
> > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > > For additional commands, e-mail: users-help@maven.apache.org
> > >
> > >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

RE: Multi-module build is not building with current module source code

Posted by Todd Thiessen <th...@nortel.com>.
You don't even need a plugin. Instead of calling maven directly, your CI
could call a script which calls the maven commands seperate.  So your CI
only need call the one script. One of my collegues does exactly that.

You could also use the release plugin.

---
Todd Thiessen
 

> -----Original Message-----
> From: David Hoffer [mailto:dhoffer6@gmail.com] 
> Sent: Friday, April 17, 2009 12:48 PM
> To: Maven Users List
> Subject: Re: Multi-module build is not building with current 
> module source code
> 
> Yes, I'm sure we call:
> 
> mvn clean deploy site-deploy
> 
> I too figured site-deploy would happen after the deploy so 
> all would be well.
> 
> I have not written a plugin before, I'm not sure I'd know how 
> to do this.
> 
> I can't easily change my build to do this in separate steps, i.e.
> 
> mvn clean deploy
> mvn site-deploy
> 
> Because our CI server doesn't support running two separate 
> command lines when using maven, I would loose all maven 
> support if I did this.  (If someone could point out how to 
> write a maven plugin that would perform the two steps, I 
> would be interested in trying this.)
> 
> I am using maven 2.1.
> 
> -Dave
> 
> 
> On Fri, Apr 17, 2009 at 10:38 AM, Stephen Connolly < 
> stephen.alan.connolly@gmail.com> wrote:
> 
> > Ahhhhh
> >
> > OK, that explains some things, but I'm not sure how you go about 
> > fixing them ;-)
> >
> > I suspect some of your site reports are forking a build... 
> the forked 
> > build will not have reference to the reactor artifacts from 
> the main 
> > build, so as a result will pull the version from the local 
> > repository/remote repository which will be the previous 
> version and so 
> > fail the build.
> >
> > if you disabled your remote repository and purged 
> dependencies again 
> > you should be able to reproduce the failure with the 
> goal(s) you are 
> > providing to the CI server... thereby at least confirming 
> that this is 
> > a forked build by site problem (since you'd have your build log)
> >
> > Also are you sure it's
> >
> > clean deploy site-deploy
> >
> > and not
> >
> > clean site-deploy deploy
> >
> > my understanding is that lifecycle phases are invoked in 
> the order in 
> > which they occur.
> >
> > you might be able to cheat by writing a simple aggregator 
> plugin that 
> > does nothing and invoking that aggregator goal in between 
> deploy and 
> > site-deploy... since a build plan for such would force the 
> deploy to 
> > have completed on everything before starting the site-deploy...
> >
> > (I mention build plans... but they may be a 3.0 feature)
> >
> > what version of Maven is this also... I'm hoping this is 
> not a 2.1.0 
> > regression
> >
> > -Stephen
> >
> > 2009/4/17 David Hoffer <dh...@gmail.com>:
> > > Your replies do make sense to me, I have had this problem with 
> > > renaming artifacts, etc but I think to really find all missed 
> > > changes you also
> > would
> > > need to purge these from your corporate repo.
> > >
> > > Okay I have more data on why our CI builds fail.  (I'm 
> prepared for 
> > > a
> > 'your
> > > doing it wrong' type of answer).
> > >
> > > On our CI system we want a complete site report in addition to the
> > regular
> > > clean & deploy goals so our build command is:
> > > mvn clean deploy site-deploy
> > >
> > > The problem is the site-deploy.  If we remove this then 
> we get the 
> > > normal build process where each module is built, installed and 
> > > deployed in order for each module.
> > >
> > > When we add the site-deploy it doesn't do this, rather it 
> builds the
> > source
> > > for each module WITHOUT doing an install and/or deploy first.  So 
> > > the site-deploy seems to be taking over and saying I need 
> to do my 
> > > tasks
> > first
> > > then you can do the normal build.
> > >
> > > How should I be doing this?  I.e. How can I get the site to be 
> > > generated
> > and
> > > deployed AFTER the normal clean deploy goals?  I don't want site
> > generation
> > > to be done separately on a different trigger because its 
> important 
> > > that
> > the
> > > site be based on the artifacts generated during the deploy phase.
> > >
> > > Hopefully there is a simple fix for this?
> > >
> > > -Dave
> > >
> > >
> > >
> > >
> > > On Fri, Apr 17, 2009 at 8:16 AM, Todd Thiessen 
> <th...@nortel.com>
> > wrote:
> > >
> > >> > So how then does one know when they have to purge the local 
> > >> > repository?  Having rules where you sometimes need to and 
> > >> > sometimes don't is really hard to live with.  Perhaps you can 
> > >> > clarify the rules?
> > >>
> > >> I can provide a bit of clarify here. You could have a problem if 
> > >> you changed the artifactId, groupId or version of 
> anything in your project.
> > >> Maven would install a new copy of this artifact in your 
> local and 
> > >> if you happen to forget to update all references to this 
> > >> dependency, your code will still build and compile file, but you 
> > >> may get unexected runtime problems. If you purge your 
> local, your build will properly fail.
> > >>
> > >> > And if it's important why isn't it done by default?
> > >>
> > >> This is a good question which I am not qualitfied to 
> answer. I have 
> > >> been tempted to add to the clean phase a goal which also deletes 
> > >> the artifact from the local repo (although this still 
> isn't sufficient).
> > >>
> > >> 
> -------------------------------------------------------------------
> > >> -- To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > >> For additional commands, e-mail: users-help@maven.apache.org
> > >>
> > >>
> > >
> >
> > 
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
> 

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


Re: Multi-module build is not building with current module source code

Posted by David Hoffer <dh...@gmail.com>.
Yes, I'm sure we call:

mvn clean deploy site-deploy

I too figured site-deploy would happen after the deploy so all would be
well.

I have not written a plugin before, I'm not sure I'd know how to do this.

I can't easily change my build to do this in separate steps, i.e.

mvn clean deploy
mvn site-deploy

Because our CI server doesn't support running two separate command lines
when using maven, I would loose all maven support if I did this.  (If
someone could point out how to write a maven plugin that would perform the
two steps, I would be interested in trying this.)

I am using maven 2.1.

-Dave


On Fri, Apr 17, 2009 at 10:38 AM, Stephen Connolly <
stephen.alan.connolly@gmail.com> wrote:

> Ahhhhh
>
> OK, that explains some things, but I'm not sure how you go about fixing
> them ;-)
>
> I suspect some of your site reports are forking a build... the forked
> build will not have reference to the reactor artifacts from the main
> build, so as a result will pull the version from the local
> repository/remote repository which will be the previous version and so
> fail the build.
>
> if you disabled your remote repository and purged dependencies again
> you should be able to reproduce the failure with the goal(s) you are
> providing to the CI server... thereby at least confirming that this is
> a forked build by site problem (since you'd have your build log)
>
> Also are you sure it's
>
> clean deploy site-deploy
>
> and not
>
> clean site-deploy deploy
>
> my understanding is that lifecycle phases are invoked in the order in
> which they occur.
>
> you might be able to cheat by writing a simple aggregator plugin that
> does nothing and invoking that aggregator goal in between deploy and
> site-deploy... since a build plan for such would force the deploy to
> have completed on everything before starting the site-deploy...
>
> (I mention build plans... but they may be a 3.0 feature)
>
> what version of Maven is this also... I'm hoping this is not a 2.1.0
> regression
>
> -Stephen
>
> 2009/4/17 David Hoffer <dh...@gmail.com>:
> > Your replies do make sense to me, I have had this problem with renaming
> > artifacts, etc but I think to really find all missed changes you also
> would
> > need to purge these from your corporate repo.
> >
> > Okay I have more data on why our CI builds fail.  (I'm prepared for a
> 'your
> > doing it wrong' type of answer).
> >
> > On our CI system we want a complete site report in addition to the
> regular
> > clean & deploy goals so our build command is:
> > mvn clean deploy site-deploy
> >
> > The problem is the site-deploy.  If we remove this then we get the normal
> > build process where each module is built, installed and deployed in order
> > for each module.
> >
> > When we add the site-deploy it doesn't do this, rather it builds the
> source
> > for each module WITHOUT doing an install and/or deploy first.  So the
> > site-deploy seems to be taking over and saying I need to do my tasks
> first
> > then you can do the normal build.
> >
> > How should I be doing this?  I.e. How can I get the site to be generated
> and
> > deployed AFTER the normal clean deploy goals?  I don't want site
> generation
> > to be done separately on a different trigger because its important that
> the
> > site be based on the artifacts generated during the deploy phase.
> >
> > Hopefully there is a simple fix for this?
> >
> > -Dave
> >
> >
> >
> >
> > On Fri, Apr 17, 2009 at 8:16 AM, Todd Thiessen <th...@nortel.com>
> wrote:
> >
> >> > So how then does one know when they have to purge the local
> >> > repository?  Having rules where you sometimes need to and
> >> > sometimes don't is really hard to live with.  Perhaps you can
> >> > clarify the rules?
> >>
> >> I can provide a bit of clarify here. You could have a problem if you
> >> changed the artifactId, groupId or version of anything in your project.
> >> Maven would install a new copy of this artifact in your local and if you
> >> happen to forget to update all references to this dependency, your code
> >> will still build and compile file, but you may get unexected runtime
> >> problems. If you purge your local, your build will properly fail.
> >>
> >> > And if it's important why isn't it done by
> >> > default?
> >>
> >> This is a good question which I am not qualitfied to answer. I have been
> >> tempted to add to the clean phase a goal which also deletes the artifact
> >> from the local repo (although this still isn't sufficient).
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> >> For additional commands, e-mail: users-help@maven.apache.org
> >>
> >>
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: Multi-module build is not building with current module source code

Posted by Stephen Connolly <st...@gmail.com>.
Ahhhhh

OK, that explains some things, but I'm not sure how you go about fixing them ;-)

I suspect some of your site reports are forking a build... the forked
build will not have reference to the reactor artifacts from the main
build, so as a result will pull the version from the local
repository/remote repository which will be the previous version and so
fail the build.

if you disabled your remote repository and purged dependencies again
you should be able to reproduce the failure with the goal(s) you are
providing to the CI server... thereby at least confirming that this is
a forked build by site problem (since you'd have your build log)

Also are you sure it's

clean deploy site-deploy

and not

clean site-deploy deploy

my understanding is that lifecycle phases are invoked in the order in
which they occur.

you might be able to cheat by writing a simple aggregator plugin that
does nothing and invoking that aggregator goal in between deploy and
site-deploy... since a build plan for such would force the deploy to
have completed on everything before starting the site-deploy...

(I mention build plans... but they may be a 3.0 feature)

what version of Maven is this also... I'm hoping this is not a 2.1.0 regression

-Stephen

2009/4/17 David Hoffer <dh...@gmail.com>:
> Your replies do make sense to me, I have had this problem with renaming
> artifacts, etc but I think to really find all missed changes you also would
> need to purge these from your corporate repo.
>
> Okay I have more data on why our CI builds fail.  (I'm prepared for a 'your
> doing it wrong' type of answer).
>
> On our CI system we want a complete site report in addition to the regular
> clean & deploy goals so our build command is:
> mvn clean deploy site-deploy
>
> The problem is the site-deploy.  If we remove this then we get the normal
> build process where each module is built, installed and deployed in order
> for each module.
>
> When we add the site-deploy it doesn't do this, rather it builds the source
> for each module WITHOUT doing an install and/or deploy first.  So the
> site-deploy seems to be taking over and saying I need to do my tasks first
> then you can do the normal build.
>
> How should I be doing this?  I.e. How can I get the site to be generated and
> deployed AFTER the normal clean deploy goals?  I don't want site generation
> to be done separately on a different trigger because its important that the
> site be based on the artifacts generated during the deploy phase.
>
> Hopefully there is a simple fix for this?
>
> -Dave
>
>
>
>
> On Fri, Apr 17, 2009 at 8:16 AM, Todd Thiessen <th...@nortel.com> wrote:
>
>> > So how then does one know when they have to purge the local
>> > repository?  Having rules where you sometimes need to and
>> > sometimes don't is really hard to live with.  Perhaps you can
>> > clarify the rules?
>>
>> I can provide a bit of clarify here. You could have a problem if you
>> changed the artifactId, groupId or version of anything in your project.
>> Maven would install a new copy of this artifact in your local and if you
>> happen to forget to update all references to this dependency, your code
>> will still build and compile file, but you may get unexected runtime
>> problems. If you purge your local, your build will properly fail.
>>
>> > And if it's important why isn't it done by
>> > default?
>>
>> This is a good question which I am not qualitfied to answer. I have been
>> tempted to add to the clean phase a goal which also deletes the artifact
>> from the local repo (although this still isn't sufficient).
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>
>

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


Re: Multi-module build is not building with current module source code

Posted by David Hoffer <dh...@gmail.com>.
Our CI server doesn't support running separate command lines when using
maven, it wants a list of goals.

Regarding the release plugin, we do/will use this but that's exclusively for
releases we are just doing snapshot builds at the moment.  I have however,
had good success with the release plugin generating sites.

-Dave

On Fri, Apr 17, 2009 at 10:38 AM, Todd Thiessen <th...@nortel.com> wrote:

> > On our CI system we want a complete site report in addition
> > to the regular clean & deploy goals so our build command is:
> > mvn clean deploy site-deploy
>
> Ok. You could try executing each command individually. ie:
>
> mvn clean
> mvn deploy
> mvn site-deploy
>
> Doing them all at once has different behaviour in that it will do a
> clean, deploy, site-deploy on the parent, then a clean, deploy,
> site-deploy on the first child, and so on.
>
> I would also consider using the release-plugin which takes care of most
> of this hassle.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

RE: Multi-module build is not building with current module source code

Posted by Todd Thiessen <th...@nortel.com>.
> On our CI system we want a complete site report in addition 
> to the regular clean & deploy goals so our build command is:
> mvn clean deploy site-deploy

Ok. You could try executing each command individually. ie:

mvn clean
mvn deploy
mvn site-deploy

Doing them all at once has different behaviour in that it will do a
clean, deploy, site-deploy on the parent, then a clean, deploy,
site-deploy on the first child, and so on.

I would also consider using the release-plugin which takes care of most
of this hassle.

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


Re: Multi-module build is not building with current module source code

Posted by David Hoffer <dh...@gmail.com>.
Your replies do make sense to me, I have had this problem with renaming
artifacts, etc but I think to really find all missed changes you also would
need to purge these from your corporate repo.

Okay I have more data on why our CI builds fail.  (I'm prepared for a 'your
doing it wrong' type of answer).

On our CI system we want a complete site report in addition to the regular
clean & deploy goals so our build command is:
mvn clean deploy site-deploy

The problem is the site-deploy.  If we remove this then we get the normal
build process where each module is built, installed and deployed in order
for each module.

When we add the site-deploy it doesn't do this, rather it builds the source
for each module WITHOUT doing an install and/or deploy first.  So the
site-deploy seems to be taking over and saying I need to do my tasks first
then you can do the normal build.

How should I be doing this?  I.e. How can I get the site to be generated and
deployed AFTER the normal clean deploy goals?  I don't want site generation
to be done separately on a different trigger because its important that the
site be based on the artifacts generated during the deploy phase.

Hopefully there is a simple fix for this?

-Dave




On Fri, Apr 17, 2009 at 8:16 AM, Todd Thiessen <th...@nortel.com> wrote:

> > So how then does one know when they have to purge the local
> > repository?  Having rules where you sometimes need to and
> > sometimes don't is really hard to live with.  Perhaps you can
> > clarify the rules?
>
> I can provide a bit of clarify here. You could have a problem if you
> changed the artifactId, groupId or version of anything in your project.
> Maven would install a new copy of this artifact in your local and if you
> happen to forget to update all references to this dependency, your code
> will still build and compile file, but you may get unexected runtime
> problems. If you purge your local, your build will properly fail.
>
> > And if it's important why isn't it done by
> > default?
>
> This is a good question which I am not qualitfied to answer. I have been
> tempted to add to the clean phase a goal which also deletes the artifact
> from the local repo (although this still isn't sufficient).
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

RE: Multi-module build is not building with current module source code

Posted by Todd Thiessen <th...@nortel.com>.
> So how then does one know when they have to purge the local 
> repository?  Having rules where you sometimes need to and 
> sometimes don't is really hard to live with.  Perhaps you can 
> clarify the rules?

I can provide a bit of clarify here. You could have a problem if you
changed the artifactId, groupId or version of anything in your project.
Maven would install a new copy of this artifact in your local and if you
happen to forget to update all references to this dependency, your code
will still build and compile file, but you may get unexected runtime
problems. If you purge your local, your build will properly fail.

> And if it's important why isn't it done by 
> default?

This is a good question which I am not qualitfied to answer. I have been
tempted to add to the clean phase a goal which also deletes the artifact
from the local repo (although this still isn't sufficient).

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


Re: Multi-module build is not building with current module source code

Posted by David Hoffer <dh...@gmail.com>.
So how then does one know when they have to purge the local repository?  And
if it's important why isn't it done by default?  Having rules where you
sometimes need to and sometimes don't is really hard to live with.  Perhaps
you can clarify the rules?  I would hate to tell the developers well add
'this' if you get 'that' error, etc.

If your building just one module of a large multi-module build I agree that
OTHER modules not being built should be downloaded and used in the build.
However, I'm saying that for the set of modules that I am building none
should be downloaded.

Yes, maven does download modules because that is the workaround I used to
'fix' the build.  Since maven refused to build with the code in the module,
when doing the multi-module build, I manually built and deployed the needed
artifact and then maven saw it and used it in the build!

Yeah, I should check the central repo to see if something is wrong there.
This would explain what I am observing.

-Dave




On Fri, Apr 17, 2009 at 7:43 AM, Todd Thiessen <th...@nortel.com> wrote:

> > 4. We do not purge the local repo before a build (shouldn't have to).
>
> This is the only thing I disagree with. There are scenarios where you do
> have to do it and it isn't obvious.
>
> > IMHO, muti-module builds shouldn't even try to download
> > module artifacts for the build because by definition if your
> > doing an install (or more) you are creating these...
>
> Not necessarily. You could build one module of a large multi-module
> project and if that project has a dependency on another module, it would
> need to download it. This can be a very valuable way to save dev build
> time.
>
> I agree though that for a CI build, you want to build everything and
> nothing should be downloaded. I didn't think anything was ;-).
>
> Perhaps the meta data of your snapshops in your central repo is
> corrupted and maven thinks that these snapshots are always newer than
> the ones built in your local.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

RE: Multi-module build is not building with current module source code

Posted by Todd Thiessen <th...@nortel.com>.
> 4. We do not purge the local repo before a build (shouldn't have to).

This is the only thing I disagree with. There are scenarios where you do
have to do it and it isn't obvious.

> IMHO, muti-module builds shouldn't even try to download 
> module artifacts for the build because by definition if your 
> doing an install (or more) you are creating these...

Not necessarily. You could build one module of a large multi-module
project and if that project has a dependency on another module, it would
need to download it. This can be a very valuable way to save dev build
time.

I agree though that for a CI build, you want to build everything and
nothing should be downloaded. I didn't think anything was ;-).

Perhaps the meta data of your snapshops in your central repo is
corrupted and maven thinks that these snapshots are always newer than
the ones built in your local.

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


Re: Multi-module build is not building with current module source code

Posted by David Hoffer <dh...@gmail.com>.
I concur with what you are saying.  I wish I had the build log to see the
reactor order...but I don't because the CI system wasn't keeping history.
So I can't say for certain the reactor order was wrong.  I can sure say it
seems so because changing it manually fixed the build.

The thing that is 'special' or the thing that seems to trigger the problem
is the following:

1. It happens only when we checkin code in various modules where if the
build is out-of-order it won't compile because the dependencies haven't been
updated.
2. It only happens on the CI build.  I'm not sure what to make of this
fact...developers wouldn't checkin if it didn't build on their system.
3. Yes we always do clean [insert goal here] build on all systems including
CI.
4. We do not purge the local repo before a build (shouldn't have to).

IMHO, muti-module builds shouldn't even try to download module artifacts for
the build because by definition if your doing an install (or more) you are
creating these...I can't think of a case where you would want to continue
the build if anyone of these module artifacts could not be generated.
However maven is not doing this...it is perfectly happy to use one that
already exists which makes no sense to me.  I.e. when I say mvn clean deploy
I want maven to generate all the module artifacts and build using ONLY the
ones just generated, I don't really care if their are prior snapshots or not
because they should never be used.

-Dave


On Fri, Apr 17, 2009 at 6:55 AM, Todd Thiessen <th...@nortel.com> wrote:

> I think it may be difficult to provide much further insite without
> actually seeing your exact project.
>
> Are you absolutely sure that the reactor order is wrong? You started off
> by saying that you didn't see the build fail again after restoring the
> module order in the parent pom to the "wrong" order. So in some cases,
> it seems to work.
>
> What is special about the cases when it doesn't? This seems to be the
> mystery. When maven starts the build, is it actually displaying the
> project order incorrectly?  I personally have never seen this but I
> suspect the nature of our projects are fairly different and it isn't an
> apples to apples comparison.
>
> Do this problem happen when you do a build with a clean local
> repository? I presume your CI build always does a build this way. If it
> isn't, odd things can happen if the local repository is stale.
>
> ---
> Todd Thiessen
>
>
> > -----Original Message-----
> > From: David Hoffer [mailto:dhoffer6@gmail.com]
> > Sent: Friday, April 17, 2009 7:40 AM
> > To: Maven Users List
> > Subject: Re: Multi-module build is not building with current
> > module source code
> >
> > I did retry the test with the module order reset back to the
> > previous order where the build failed.
> >
> > Unfortunately, I was not able to see it fail again.  I
> > suspect that these commands don't duplicate the conditions
> > where folks see build failures regarding muli-module builds.
> > I apparently am not alone with this issue...hence plugins
> > seem to have been developed to work around this core bug in maven.
> >
> > Here is what I know.
> >
> > 1. The reactor (the internal auto ordering of modules) does
> > not always get it right.  Just prior to me sending this email
> > we had a case where a developer checked in a file(s) that
> > caused the CI build to fail.  I fixed it by simply manually
> > changing the order of the modules in the parent pom.  It was
> > clear from looking at the dependencies that moduleX had to be
> > built before moduleY; maven was un-able to figure this
> > out...all I did was manually reverse these and it worked.
> > Because of this I assumed that Maven had NO auto calculation
> > of module order.
> >
> > 2. Even when the module order is made perfect manually, maven
> > will still fail the build on occasion.  Although it has built
> > moduleX first, it does not use this as the dependency for
> > moduleY; instead it uses a prior snapshot from the repo!  Now
> > I cannot say for certain if the old snapshot was already in
> > the local repo or if maven pulled it down from the corporate
> > repo but that is what it used in the build.  To fix this
> > problem I had to manually deploy the new version of this
> > dependent artifact...then the build could find it and build correctly.
> >
> > I wish I had the build log from issue 2, but it seems our CI
> > build is not keeping history, I will see if I can turn this on.
> >
> > What I wondering about is how does maven handle snapshot
> > versioning?  It seems this second issue could be caused if
> > there are errors in how maven calculates snapshot timestamps
> > or something.  For instance, if the previous snapshot
> > deployed by the CI server has a later timestamp than what is
> > being built currently, would maven prefer the former?  (Our
> > CI is TeamCity so the actual builds can be performed on any
> > number of build agents but all publish to the same
> > Artifactory server.  I'm not sure if the build sets the time
> > or if the Artifactory server does.)  Now that I type this, I
> > think I will ask our CI guy to make sure the clocks on all
> > build systems are identical.  I suspect this is a long shot however.
> >
> > At this point I don't know what to do, this seems a serious
> > flaw in maven.
> > Any insight is greatly appreciated.
> >
> > -Dave
> >
> >
> > On Thu, Apr 16, 2009 at 1:17 PM, Stephen Connolly <
> > stephen.alan.connolly@gmail.com> wrote:
> >
> > > I'd retry the test with the module order reset back to the
> > way you had it.
> > >
> > > the commands I provided should be a fully clean build from
> > scratch, so
> > > should be equivalent to changing code
> > >
> > > -Stephen
> > >
> > > 2009/4/16 David Hoffer <dh...@gmail.com>:
> > > > Thanks that makes sense.
> > > >
> > > > I did a test using your commands after blocking my snapshot proxy
> > > > and it built just fine.
> > > >
> > > > This doesn't surprise me too much because I manually changed the
> > > > order of the modules in the parent pom based on my
> > premise that the
> > > > reactor
> > > ordering
> > > > logic is flawed.
> > > >
> > > > In addition i can't say that it works yet because I didn't change
> > > > any
> > > code.
> > > > I will have to try this again when we have added breaking code to
> > > dependent
> > > > module(s).
> > > >
> > > > This is a nasty issue!
> > > >
> > > > -Dave
> > > >
> > > > On Thu, Apr 16, 2009 at 12:02 PM, Stephen Connolly <
> > > > stephen.alan.connolly@gmail.com> wrote:
> > > >
> > > >> 2009/4/16 David Hoffer <dh...@gmail.com>:
> > > >> > I have a few comments/questions.
> > > >> >
> > > >> > I do have the snapshot artifacts on a remote corporate
> > repo.  (I
> > > >> > will
> > > see
> > > >> if
> > > >> > I can block this for this test.)
> > > >>
> > > >> If you have the artifacts on a remote repository, then when the
> > > >> plugin goes looking for the artifacts (from outside the
> > reactor) it
> > > >> will find them and the plugin at fault will therefore
> > not fail the build.
> > > >>
> > > >> By ensuring that the only source of the artifacts is from the
> > > >> reactor, then whatever plugin is pulling the artifacts from the
> > > >> repository will be forced to fail (thereby finding your
> > problem for
> > > >> you)
> > > >>
> > > >> >
> > > >> > What does -DreResolve do?
> > > >>
> > > >> reResolve will turn around and re-pull the dependencies from the
> > > >> remote repository unless you disable it with -DreResolve=false
> > > >>
> > > >> (reResolve is a parameter of the purge-... goal)
> > > >>
> > > >> >
> > > >> > -Dave
> > > >> >
> > > >> > On Thu, Apr 16, 2009 at 11:09 AM, Stephen Connolly <
> > > >> > stephen.alan.connolly@gmail.com> wrote:
> > > >> >
> > > >> >> That would be my concern too.
> > > >> >>
> > > >> >> I suspect you can reproduce your build failures if you:
> > > >> >>
> > > >> >> mvn clean
> > > >> >>
> > > >> >> mvn dependency:purge-local-repository -DreResolve=false
> > > >> >>
> > > >> >> mvn install
> > > >> >>
> > > >> >> (assuming that you have not deployed any of the -SNAPSHOT
> > > >> >> artifacts
> > > to a
> > > >> >> remote repository)
> > > >> >>
> > > >> >> you should recreate the build failure and be able to identify
> > > >> >> the
> > > source
> > > >> of
> > > >> >> it better.
> > > >> >>
> > > >> >> -Stephen
> > > >> >>
> > > >> >> 2009/4/16 David Hoffer <dh...@gmail.com>
> > > >> >>
> > > >> >> > Isn't that adding yet another plugin to do what maven is
> > > >> >> > supposed
> > > to
> > > >> do
> > > >> >> out
> > > >> >> > of the box?  I'm concerned about the increase in
> > complexity,
> > > >> >> > when
> > > >> >> something
> > > >> >> > doesn't work is it maven or the incremental plugin?
> > > >> >> >
> > > >> >> > -Dave
> > > >> >> >
> > > >> >> > On Thu, Apr 16, 2009 at 10:37 AM, Dmitry Skavish <
> > > skavish@gmail.com>
> > > >> >> > wrote:
> > > >> >> >
> > > >> >> > > I asked the same question on OSGi maillist and
> > they advised
> > > >> >> > > me to
> > > >> use
> > > >> >> > > incremental-build plugin:
> > > >> >> https://maven-incremental-build.dev.java.net/I
> > > >> >> > > does exactly what I need, check it out, it could
> > solve your
> > > problem
> > > >> as
> > > >> >> > > well.
> > > >> >> > >
> > > >> >> > > On Thu, Apr 16, 2009 at 12:33 PM, David Hoffer <
> > > dhoffer6@gmail.com>
> > > >> >> > wrote:
> > > >> >> > >
> > > >> >> > > > Then there is a big bug here because I have a
> > multi-module
> > > project
> > > >> >> with
> > > >> >> > a
> > > >> >> > > > few modules, the dependent one was built first
> > (as seen in
> > > >> >> > > > the
> > > >> build
> > > >> >> > log)
> > > >> >> > > > but yet when the depending module was built it
> > did NOT use
> > > >> >> > > > the
> > > >> >> > dependent
> > > >> >> > > > build rather it went to the repo and downloaded the
> > > >> >> > > > previously
> > > >> >> deployed
> > > >> >> > > > artifact snapshot.
> > > >> >> > > >
> > > >> >> > > > -Dave
> > > >> >> > > >
> > > >> >> > > > On Thu, Apr 16, 2009 at 10:24 AM, Todd Thiessen <
> > > >> thiessen@nortel.com
> > > >> >> >
> > > >> >> > > > wrote:
> > > >> >> > > >
> > > >> >> > > > > FYI. Here is one reference,
> > > >> >> > > > >
> > > >> >> > > > > http://maven.apache.org/pom.html#Aggregation
> > > >> >> > > > >
> > > >> >> > > > > ---
> > > >> >> > > > > Todd Thiessen
> > > >> >> > > > >
> > > >> >> > > > >
> > > >> >> > > > > > -----Original Message-----
> > > >> >> > > > > > From: David Hoffer [mailto:dhoffer6@gmail.com]
> > > >> >> > > > > > Sent: Thursday, April 16, 2009 11:46 AM
> > > >> >> > > > > > To: Maven Users List
> > > >> >> > > > > > Subject: Re: Multi-module build is not building with
> > > current
> > > >> >> > > > > > module source code
> > > >> >> > > > > >
> > > >> >> > > > > > Then I'm understanding the order of the
> > reactor wrong.
> > > >> >> > > > > > I assumed its top to bottom, that is...just before
> > > >> >> > > > > > internal
> > > is
> > > >> >> > > > > > built...public is built; and just before
> > > >> >> > > > > > security-public is built...internal is built.
> > > >> >> > > > > >
> > > >> >> > > > > > Can you clarify the order?
> > > >> >> > > > > >
> > > >> >> > > > > > -Dave
> > > >> >> > > > > >
> > > >> >> > > > > > On Thu, Apr 16, 2009 at 9:39 AM, Nick Stolwijk
> > > >> >> > > > > > <ni...@gmail.com>wrote:
> > > >> >> > > > > >
> > > >> >> > > > > > > Maven always takes the artifacts out of the local
> > > >> >> > > > > > repository. However,
> > > >> >> > > > > > > this is not a problem, because the
> > reactor knows in
> > > >> >> > > > > > > which
> > > >> order
> > > >> >> > to
> > > >> >> > > > > > > built the projects. Just before your internal
> > > >> >> > > > > > > project is
> > > >> >> > > > > > built, maven
> > > >> >> > > > > > > has installed the most recent version of
> > > >> >> > > > > > > security-public
> > > in
> > > >> >> > > > > > the local
> > > >> >> > > > > > > repository.
> > > >> >> > > > > > >
> > > >> >> > > > > > > Maybe I don't understand your problem. If that is
> > > >> >> > > > > > > the
> > > case,
> > > >> >> > > > > > please clarify.
> > > >> >> > > > > > >
> > > >> >> > > > > > > Hth,
> > > >> >> > > > > > >
> > > >> >> > > > > > > Nick Stolwijk
> > > >> >> > > > > > > ~Java Developer~
> > > >> >> > > > > > >
> > > >> >> > > > > > > Iprofs BV.
> > > >> >> > > > > > > Claus Sluterweg 125
> > > >> >> > > > > > > 2012 WS Haarlem
> > > >> >> > > > > > > www.iprofs.nl
> > > >> >> > > > > > >
> > > >> >> > > > > > >
> > > >> >> > > > > > >
> > > >> >> > > > > > > On Thu, Apr 16, 2009 at 5:26 PM, Dmitry Skavish
> > > >> >> > > > > > <sk...@gmail.com> wrote:
> > > >> >> > > > > > > > I am having the same problem and would like to
> > > >> >> > > > > > > > know
> > > that
> > > >> >> > > > > > as well. Thanks!
> > > >> >> > > > > > > >
> > > >> >> > > > > > > > On Thu, Apr 16, 2009 at 10:19 AM, David Hoffer
> > > >> >> > > > > > <dh...@gmail.com>
> > > >> >> > > > > > > wrote:
> > > >> >> > > > > > > >
> > > >> >> > > > > > > >> I have a multi-module build where some modules
> > > >> >> > > > > > > >> are
> > > >> dependent
> > > >> >> > on
> > > >> >> > > > > > > >> other modules.  What is happening is that the
> > > dependent
> > > >> >> > > > > > module is
> > > >> >> > > > > > > >> getting its dependency from the
> > local/corporate
> > > >> >> > > > > > > >> maven
> > > >> >> > > > > > repo instead
> > > >> >> > > > > > > >> of the source
> > > >> >> > > > > > > code
> > > >> >> > > > > > > >> that was just built.  How do I specify that
> > > >> >> > > > > > > >> modules
> > > >> always
> > > >> >> > build
> > > >> >> > > > > > > >> using current source not prior built
> > snapshot jars?
> > > >> >> > > > > > > >>
> > > >> >> > > > > > > >> Here is an example of the problem (it is really
> > > simple)
> > > >> >> > > > > > > >>
> > > >> >> > > > > > > >> Parent pom:
> > > >> >> > > > > > > >> <version>0.1-SNAPSHOT</version> <modules>
> > > >> >> > > > > > > >>        <module>public</module>
> > > >> >> > > > > > > >>        <module>internal</module>
> > > >> >> > > > > > > >>        <module>security-public</module>
> > > >> >> > > > > > > >> </modules>
> > > >> >> > > > > > > >>
> > > >> >> > > > > > > >> public pom:
> > > >> >> > > > > > > >> <version>0.1-SNAPSHOT</version>
> > > >> >> > > > > > > >>
> > > >> >> > > > > > > >> internal pom:
> > > >> >> > > > > > > >> <dependencies>
> > > >> >> > > > > > > >>        <dependency>
> > > >> >> > > > > > > >>
> > <groupId>${project.groupId}</groupId>
> > > >> >> > > > > > > >>            <artifactId>public</artifactId>
> > > >> >> > > > > > > >>            <version>0.1-SNAPSHOT</version>
> > > >> >> > > > > > > >>        </dependency> </dependencies>
> > > >> >> > > > > > > >>
> > > >> >> > > > > > > >> security-public:
> > > >> >> > > > > > > >> <dependency>
> > > >> >> > > > > > > >>
> > <groupId>${project.groupId}</groupId>
> > > >> >> > > > > > > >>            <artifactId>public</artifactId>
> > > >> >> > > > > > > >>            <version>0.1-SNAPSHOT</version>
> > > </dependency>
> > > >> >> > > > > > > >>
> > > >> >> > > > > > > >> So what is happening is that instead
> > of internal
> > > >> >> > > > > > > >> &
> > > >> >> > > > > > security-public
> > > >> >> > > > > > > >> building using the just built public
> > (note it is
> > > >> >> > > > > > > >> first
> > > so
> > > >> it
> > > >> >> > was
> > > >> >> > > > > > > >> built first)
> > > >> >> > > > > > > they
> > > >> >> > > > > > > >> go
> > > >> >> > > > > > > >> out and download the last deployed
> > snapshot and
> > > >> >> > > > > > > >> build
> > > >> using
> > > >> >> > that
> > > >> >> > > > > > > instead.
> > > >> >> > > > > > > >>
> > > >> >> > > > > > > >> Nothing in the pom dependency syntax
> > really says
> > > >> >> > > > > > > >> which
> > > >> >> > > > > > to use but I
> > > >> >> > > > > > > assumed
> > > >> >> > > > > > > >> that because maven 'knows' these are all in the
> > > reactor
> > > >> it
> > > >> >> > would
> > > >> >> > > > > > > >> use
> > > >> >> > > > > > > module
> > > >> >> > > > > > > >> source.  However this doesn't seem to
> > work, what
> > > >> >> > > > > > > >> do I
> > > >> >> > > > > > need to do to
> > > >> >> > > > > > > >> fix this?
> > > >> >> > > > > > > >>
> > > >> >> > > > > > > >> BTW, the goals being run are 'clean deploy
> > > site-deploy'
> > > >> >> > > > > > > >>
> > > >> >> > > > > > > >> -Dave
> > > >> >> > > > > > > >>
> > > >> >> > > > > > > >
> > > >> >> > > > > > > >
> > > >> >> > > > > > > >
> > > >> >> > > > > > > > --
> > > >> >> > > > > > > > Dmitry Skavish
> > > >> >> > > > > > > >
> > > >> >> > > > > > >
> > > >> >> > > > > > >
> > > >> >> > > > > >
> > > >> >> >
> > >
> > ---------------------------------------------------------------------
> > > >> >> > > > > > > To unsubscribe, e-mail:
> > > users-unsubscribe@maven.apache.org
> > > >> >> > > > > > > For additional commands, e-mail:
> > > >> users-help@maven.apache.org
> > > >> >> > > > > > >
> > > >> >> > > > > > >
> > > >> >> > > > > >
> > > >> >> > > > >
> > > >> >> > > > >
> > > >> >>
> > ----------------------------------------------------------------
> > > >> >> -----
> > > >> >> > > > > To unsubscribe, e-mail:
> > > >> >> > > > > users-unsubscribe@maven.apache.org
> > > >> >> > > > > For additional commands, e-mail:
> > > >> >> > > > > users-help@maven.apache.org
> > > >> >> > > > >
> > > >> >> > > > >
> > > >> >> > > >
> > > >> >> > >
> > > >> >> > >
> > > >> >> > >
> > > >> >> > > --
> > > >> >> > > Dmitry Skavish
> > > >> >> > >
> > > >> >> >
> > > >> >>
> > > >> >
> > > >>
> > > >>
> > -------------------------------------------------------------------
> > > >> -- To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > > >> For additional commands, e-mail: users-help@maven.apache.org
> > > >>
> > > >>
> > > >
> > >
> > >
> > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > > For additional commands, e-mail: users-help@maven.apache.org
> > >
> > >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

RE: Multi-module build is not building with current module source code

Posted by Todd Thiessen <th...@nortel.com>.
I think it may be difficult to provide much further insite without
actually seeing your exact project.

Are you absolutely sure that the reactor order is wrong? You started off
by saying that you didn't see the build fail again after restoring the
module order in the parent pom to the "wrong" order. So in some cases,
it seems to work.

What is special about the cases when it doesn't? This seems to be the
mystery. When maven starts the build, is it actually displaying the
project order incorrectly?  I personally have never seen this but I
suspect the nature of our projects are fairly different and it isn't an
apples to apples comparison.

Do this problem happen when you do a build with a clean local
repository? I presume your CI build always does a build this way. If it
isn't, odd things can happen if the local repository is stale.

---
Todd Thiessen
 

> -----Original Message-----
> From: David Hoffer [mailto:dhoffer6@gmail.com] 
> Sent: Friday, April 17, 2009 7:40 AM
> To: Maven Users List
> Subject: Re: Multi-module build is not building with current 
> module source code
> 
> I did retry the test with the module order reset back to the 
> previous order where the build failed.
> 
> Unfortunately, I was not able to see it fail again.  I 
> suspect that these commands don't duplicate the conditions 
> where folks see build failures regarding muli-module builds.  
> I apparently am not alone with this issue...hence plugins 
> seem to have been developed to work around this core bug in maven.
> 
> Here is what I know.
> 
> 1. The reactor (the internal auto ordering of modules) does 
> not always get it right.  Just prior to me sending this email 
> we had a case where a developer checked in a file(s) that 
> caused the CI build to fail.  I fixed it by simply manually 
> changing the order of the modules in the parent pom.  It was 
> clear from looking at the dependencies that moduleX had to be 
> built before moduleY; maven was un-able to figure this 
> out...all I did was manually reverse these and it worked.  
> Because of this I assumed that Maven had NO auto calculation 
> of module order.
> 
> 2. Even when the module order is made perfect manually, maven 
> will still fail the build on occasion.  Although it has built 
> moduleX first, it does not use this as the dependency for 
> moduleY; instead it uses a prior snapshot from the repo!  Now 
> I cannot say for certain if the old snapshot was already in 
> the local repo or if maven pulled it down from the corporate 
> repo but that is what it used in the build.  To fix this 
> problem I had to manually deploy the new version of this 
> dependent artifact...then the build could find it and build correctly.
> 
> I wish I had the build log from issue 2, but it seems our CI 
> build is not keeping history, I will see if I can turn this on.
> 
> What I wondering about is how does maven handle snapshot 
> versioning?  It seems this second issue could be caused if 
> there are errors in how maven calculates snapshot timestamps 
> or something.  For instance, if the previous snapshot 
> deployed by the CI server has a later timestamp than what is 
> being built currently, would maven prefer the former?  (Our 
> CI is TeamCity so the actual builds can be performed on any 
> number of build agents but all publish to the same 
> Artifactory server.  I'm not sure if the build sets the time 
> or if the Artifactory server does.)  Now that I type this, I 
> think I will ask our CI guy to make sure the clocks on all 
> build systems are identical.  I suspect this is a long shot however.
> 
> At this point I don't know what to do, this seems a serious 
> flaw in maven.
> Any insight is greatly appreciated.
> 
> -Dave
> 
> 
> On Thu, Apr 16, 2009 at 1:17 PM, Stephen Connolly < 
> stephen.alan.connolly@gmail.com> wrote:
> 
> > I'd retry the test with the module order reset back to the 
> way you had it.
> >
> > the commands I provided should be a fully clean build from 
> scratch, so 
> > should be equivalent to changing code
> >
> > -Stephen
> >
> > 2009/4/16 David Hoffer <dh...@gmail.com>:
> > > Thanks that makes sense.
> > >
> > > I did a test using your commands after blocking my snapshot proxy 
> > > and it built just fine.
> > >
> > > This doesn't surprise me too much because I manually changed the 
> > > order of the modules in the parent pom based on my 
> premise that the 
> > > reactor
> > ordering
> > > logic is flawed.
> > >
> > > In addition i can't say that it works yet because I didn't change 
> > > any
> > code.
> > > I will have to try this again when we have added breaking code to
> > dependent
> > > module(s).
> > >
> > > This is a nasty issue!
> > >
> > > -Dave
> > >
> > > On Thu, Apr 16, 2009 at 12:02 PM, Stephen Connolly < 
> > > stephen.alan.connolly@gmail.com> wrote:
> > >
> > >> 2009/4/16 David Hoffer <dh...@gmail.com>:
> > >> > I have a few comments/questions.
> > >> >
> > >> > I do have the snapshot artifacts on a remote corporate 
> repo.  (I 
> > >> > will
> > see
> > >> if
> > >> > I can block this for this test.)
> > >>
> > >> If you have the artifacts on a remote repository, then when the 
> > >> plugin goes looking for the artifacts (from outside the 
> reactor) it 
> > >> will find them and the plugin at fault will therefore 
> not fail the build.
> > >>
> > >> By ensuring that the only source of the artifacts is from the 
> > >> reactor, then whatever plugin is pulling the artifacts from the 
> > >> repository will be forced to fail (thereby finding your 
> problem for 
> > >> you)
> > >>
> > >> >
> > >> > What does -DreResolve do?
> > >>
> > >> reResolve will turn around and re-pull the dependencies from the 
> > >> remote repository unless you disable it with -DreResolve=false
> > >>
> > >> (reResolve is a parameter of the purge-... goal)
> > >>
> > >> >
> > >> > -Dave
> > >> >
> > >> > On Thu, Apr 16, 2009 at 11:09 AM, Stephen Connolly < 
> > >> > stephen.alan.connolly@gmail.com> wrote:
> > >> >
> > >> >> That would be my concern too.
> > >> >>
> > >> >> I suspect you can reproduce your build failures if you:
> > >> >>
> > >> >> mvn clean
> > >> >>
> > >> >> mvn dependency:purge-local-repository -DreResolve=false
> > >> >>
> > >> >> mvn install
> > >> >>
> > >> >> (assuming that you have not deployed any of the -SNAPSHOT 
> > >> >> artifacts
> > to a
> > >> >> remote repository)
> > >> >>
> > >> >> you should recreate the build failure and be able to identify 
> > >> >> the
> > source
> > >> of
> > >> >> it better.
> > >> >>
> > >> >> -Stephen
> > >> >>
> > >> >> 2009/4/16 David Hoffer <dh...@gmail.com>
> > >> >>
> > >> >> > Isn't that adding yet another plugin to do what maven is 
> > >> >> > supposed
> > to
> > >> do
> > >> >> out
> > >> >> > of the box?  I'm concerned about the increase in 
> complexity, 
> > >> >> > when
> > >> >> something
> > >> >> > doesn't work is it maven or the incremental plugin?
> > >> >> >
> > >> >> > -Dave
> > >> >> >
> > >> >> > On Thu, Apr 16, 2009 at 10:37 AM, Dmitry Skavish <
> > skavish@gmail.com>
> > >> >> > wrote:
> > >> >> >
> > >> >> > > I asked the same question on OSGi maillist and 
> they advised 
> > >> >> > > me to
> > >> use
> > >> >> > > incremental-build plugin:
> > >> >> https://maven-incremental-build.dev.java.net/I
> > >> >> > > does exactly what I need, check it out, it could 
> solve your
> > problem
> > >> as
> > >> >> > > well.
> > >> >> > >
> > >> >> > > On Thu, Apr 16, 2009 at 12:33 PM, David Hoffer <
> > dhoffer6@gmail.com>
> > >> >> > wrote:
> > >> >> > >
> > >> >> > > > Then there is a big bug here because I have a 
> multi-module
> > project
> > >> >> with
> > >> >> > a
> > >> >> > > > few modules, the dependent one was built first 
> (as seen in 
> > >> >> > > > the
> > >> build
> > >> >> > log)
> > >> >> > > > but yet when the depending module was built it 
> did NOT use 
> > >> >> > > > the
> > >> >> > dependent
> > >> >> > > > build rather it went to the repo and downloaded the 
> > >> >> > > > previously
> > >> >> deployed
> > >> >> > > > artifact snapshot.
> > >> >> > > >
> > >> >> > > > -Dave
> > >> >> > > >
> > >> >> > > > On Thu, Apr 16, 2009 at 10:24 AM, Todd Thiessen <
> > >> thiessen@nortel.com
> > >> >> >
> > >> >> > > > wrote:
> > >> >> > > >
> > >> >> > > > > FYI. Here is one reference,
> > >> >> > > > >
> > >> >> > > > > http://maven.apache.org/pom.html#Aggregation
> > >> >> > > > >
> > >> >> > > > > ---
> > >> >> > > > > Todd Thiessen
> > >> >> > > > >
> > >> >> > > > >
> > >> >> > > > > > -----Original Message-----
> > >> >> > > > > > From: David Hoffer [mailto:dhoffer6@gmail.com]
> > >> >> > > > > > Sent: Thursday, April 16, 2009 11:46 AM
> > >> >> > > > > > To: Maven Users List
> > >> >> > > > > > Subject: Re: Multi-module build is not building with
> > current
> > >> >> > > > > > module source code
> > >> >> > > > > >
> > >> >> > > > > > Then I'm understanding the order of the 
> reactor wrong.  
> > >> >> > > > > > I assumed its top to bottom, that is...just before 
> > >> >> > > > > > internal
> > is
> > >> >> > > > > > built...public is built; and just before 
> > >> >> > > > > > security-public is built...internal is built.
> > >> >> > > > > >
> > >> >> > > > > > Can you clarify the order?
> > >> >> > > > > >
> > >> >> > > > > > -Dave
> > >> >> > > > > >
> > >> >> > > > > > On Thu, Apr 16, 2009 at 9:39 AM, Nick Stolwijk
> > >> >> > > > > > <ni...@gmail.com>wrote:
> > >> >> > > > > >
> > >> >> > > > > > > Maven always takes the artifacts out of the local
> > >> >> > > > > > repository. However,
> > >> >> > > > > > > this is not a problem, because the 
> reactor knows in 
> > >> >> > > > > > > which
> > >> order
> > >> >> > to
> > >> >> > > > > > > built the projects. Just before your internal 
> > >> >> > > > > > > project is
> > >> >> > > > > > built, maven
> > >> >> > > > > > > has installed the most recent version of 
> > >> >> > > > > > > security-public
> > in
> > >> >> > > > > > the local
> > >> >> > > > > > > repository.
> > >> >> > > > > > >
> > >> >> > > > > > > Maybe I don't understand your problem. If that is 
> > >> >> > > > > > > the
> > case,
> > >> >> > > > > > please clarify.
> > >> >> > > > > > >
> > >> >> > > > > > > Hth,
> > >> >> > > > > > >
> > >> >> > > > > > > Nick Stolwijk
> > >> >> > > > > > > ~Java Developer~
> > >> >> > > > > > >
> > >> >> > > > > > > Iprofs BV.
> > >> >> > > > > > > Claus Sluterweg 125
> > >> >> > > > > > > 2012 WS Haarlem
> > >> >> > > > > > > www.iprofs.nl
> > >> >> > > > > > >
> > >> >> > > > > > >
> > >> >> > > > > > >
> > >> >> > > > > > > On Thu, Apr 16, 2009 at 5:26 PM, Dmitry Skavish
> > >> >> > > > > > <sk...@gmail.com> wrote:
> > >> >> > > > > > > > I am having the same problem and would like to 
> > >> >> > > > > > > > know
> > that
> > >> >> > > > > > as well. Thanks!
> > >> >> > > > > > > >
> > >> >> > > > > > > > On Thu, Apr 16, 2009 at 10:19 AM, David Hoffer
> > >> >> > > > > > <dh...@gmail.com>
> > >> >> > > > > > > wrote:
> > >> >> > > > > > > >
> > >> >> > > > > > > >> I have a multi-module build where some modules 
> > >> >> > > > > > > >> are
> > >> dependent
> > >> >> > on
> > >> >> > > > > > > >> other modules.  What is happening is that the
> > dependent
> > >> >> > > > > > module is
> > >> >> > > > > > > >> getting its dependency from the 
> local/corporate 
> > >> >> > > > > > > >> maven
> > >> >> > > > > > repo instead
> > >> >> > > > > > > >> of the source
> > >> >> > > > > > > code
> > >> >> > > > > > > >> that was just built.  How do I specify that 
> > >> >> > > > > > > >> modules
> > >> always
> > >> >> > build
> > >> >> > > > > > > >> using current source not prior built 
> snapshot jars?
> > >> >> > > > > > > >>
> > >> >> > > > > > > >> Here is an example of the problem (it is really
> > simple)
> > >> >> > > > > > > >>
> > >> >> > > > > > > >> Parent pom:
> > >> >> > > > > > > >> <version>0.1-SNAPSHOT</version> <modules>
> > >> >> > > > > > > >>        <module>public</module>
> > >> >> > > > > > > >>        <module>internal</module>
> > >> >> > > > > > > >>        <module>security-public</module> 
> > >> >> > > > > > > >> </modules>
> > >> >> > > > > > > >>
> > >> >> > > > > > > >> public pom:
> > >> >> > > > > > > >> <version>0.1-SNAPSHOT</version>
> > >> >> > > > > > > >>
> > >> >> > > > > > > >> internal pom:
> > >> >> > > > > > > >> <dependencies>
> > >> >> > > > > > > >>        <dependency>
> > >> >> > > > > > > >>            
> <groupId>${project.groupId}</groupId>
> > >> >> > > > > > > >>            <artifactId>public</artifactId>
> > >> >> > > > > > > >>            <version>0.1-SNAPSHOT</version>
> > >> >> > > > > > > >>        </dependency> </dependencies>
> > >> >> > > > > > > >>
> > >> >> > > > > > > >> security-public:
> > >> >> > > > > > > >> <dependency>
> > >> >> > > > > > > >>            
> <groupId>${project.groupId}</groupId>
> > >> >> > > > > > > >>            <artifactId>public</artifactId>
> > >> >> > > > > > > >>            <version>0.1-SNAPSHOT</version>
> > </dependency>
> > >> >> > > > > > > >>
> > >> >> > > > > > > >> So what is happening is that instead 
> of internal  
> > >> >> > > > > > > >> &
> > >> >> > > > > > security-public
> > >> >> > > > > > > >> building using the just built public 
> (note it is 
> > >> >> > > > > > > >> first
> > so
> > >> it
> > >> >> > was
> > >> >> > > > > > > >> built first)
> > >> >> > > > > > > they
> > >> >> > > > > > > >> go
> > >> >> > > > > > > >> out and download the last deployed 
> snapshot and 
> > >> >> > > > > > > >> build
> > >> using
> > >> >> > that
> > >> >> > > > > > > instead.
> > >> >> > > > > > > >>
> > >> >> > > > > > > >> Nothing in the pom dependency syntax 
> really says 
> > >> >> > > > > > > >> which
> > >> >> > > > > > to use but I
> > >> >> > > > > > > assumed
> > >> >> > > > > > > >> that because maven 'knows' these are all in the
> > reactor
> > >> it
> > >> >> > would
> > >> >> > > > > > > >> use
> > >> >> > > > > > > module
> > >> >> > > > > > > >> source.  However this doesn't seem to 
> work, what 
> > >> >> > > > > > > >> do I
> > >> >> > > > > > need to do to
> > >> >> > > > > > > >> fix this?
> > >> >> > > > > > > >>
> > >> >> > > > > > > >> BTW, the goals being run are 'clean deploy
> > site-deploy'
> > >> >> > > > > > > >>
> > >> >> > > > > > > >> -Dave
> > >> >> > > > > > > >>
> > >> >> > > > > > > >
> > >> >> > > > > > > >
> > >> >> > > > > > > >
> > >> >> > > > > > > > --
> > >> >> > > > > > > > Dmitry Skavish
> > >> >> > > > > > > >
> > >> >> > > > > > >
> > >> >> > > > > > >
> > >> >> > > > > >
> > >> >> >
> > 
> ---------------------------------------------------------------------
> > >> >> > > > > > > To unsubscribe, e-mail:
> > users-unsubscribe@maven.apache.org
> > >> >> > > > > > > For additional commands, e-mail:
> > >> users-help@maven.apache.org
> > >> >> > > > > > >
> > >> >> > > > > > >
> > >> >> > > > > >
> > >> >> > > > >
> > >> >> > > > >
> > >> >> 
> ----------------------------------------------------------------
> > >> >> -----
> > >> >> > > > > To unsubscribe, e-mail: 
> > >> >> > > > > users-unsubscribe@maven.apache.org
> > >> >> > > > > For additional commands, e-mail: 
> > >> >> > > > > users-help@maven.apache.org
> > >> >> > > > >
> > >> >> > > > >
> > >> >> > > >
> > >> >> > >
> > >> >> > >
> > >> >> > >
> > >> >> > > --
> > >> >> > > Dmitry Skavish
> > >> >> > >
> > >> >> >
> > >> >>
> > >> >
> > >>
> > >> 
> -------------------------------------------------------------------
> > >> -- To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > >> For additional commands, e-mail: users-help@maven.apache.org
> > >>
> > >>
> > >
> >
> > 
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
> 

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


Re: Multi-module build is not building with current module source code

Posted by David Hoffer <dh...@gmail.com>.
I did retry the test with the module order reset back to the previous order
where the build failed.

Unfortunately, I was not able to see it fail again.  I suspect that these
commands don't duplicate the conditions where folks see build failures
regarding muli-module builds.  I apparently am not alone with this
issue...hence plugins seem to have been developed to work around this core
bug in maven.

Here is what I know.

1. The reactor (the internal auto ordering of modules) does not always get
it right.  Just prior to me sending this email we had a case where a
developer checked in a file(s) that caused the CI build to fail.  I fixed it
by simply manually changing the order of the modules in the parent pom.  It
was clear from looking at the dependencies that moduleX had to be built
before moduleY; maven was un-able to figure this out...all I did was
manually reverse these and it worked.  Because of this I assumed that Maven
had NO auto calculation of module order.

2. Even when the module order is made perfect manually, maven will still
fail the build on occasion.  Although it has built moduleX first, it does
not use this as the dependency for moduleY; instead it uses a prior snapshot
from the repo!  Now I cannot say for certain if the old snapshot was already
in the local repo or if maven pulled it down from the corporate repo but
that is what it used in the build.  To fix this problem I had to manually
deploy the new version of this dependent artifact...then the build could
find it and build correctly.

I wish I had the build log from issue 2, but it seems our CI build is not
keeping history, I will see if I can turn this on.

What I wondering about is how does maven handle snapshot versioning?  It
seems this second issue could be caused if there are errors in how maven
calculates snapshot timestamps or something.  For instance, if the previous
snapshot deployed by the CI server has a later timestamp than what is being
built currently, would maven prefer the former?  (Our CI is TeamCity so the
actual builds can be performed on any number of build agents but all publish
to the same Artifactory server.  I'm not sure if the build sets the time or
if the Artifactory server does.)  Now that I type this, I think I will ask
our CI guy to make sure the clocks on all build systems are identical.  I
suspect this is a long shot however.

At this point I don't know what to do, this seems a serious flaw in maven.
Any insight is greatly appreciated.

-Dave


On Thu, Apr 16, 2009 at 1:17 PM, Stephen Connolly <
stephen.alan.connolly@gmail.com> wrote:

> I'd retry the test with the module order reset back to the way you had it.
>
> the commands I provided should be a fully clean build from scratch, so
> should be equivalent to changing code
>
> -Stephen
>
> 2009/4/16 David Hoffer <dh...@gmail.com>:
> > Thanks that makes sense.
> >
> > I did a test using your commands after blocking my snapshot proxy and it
> > built just fine.
> >
> > This doesn't surprise me too much because I manually changed the order of
> > the modules in the parent pom based on my premise that the reactor
> ordering
> > logic is flawed.
> >
> > In addition i can't say that it works yet because I didn't change any
> code.
> > I will have to try this again when we have added breaking code to
> dependent
> > module(s).
> >
> > This is a nasty issue!
> >
> > -Dave
> >
> > On Thu, Apr 16, 2009 at 12:02 PM, Stephen Connolly <
> > stephen.alan.connolly@gmail.com> wrote:
> >
> >> 2009/4/16 David Hoffer <dh...@gmail.com>:
> >> > I have a few comments/questions.
> >> >
> >> > I do have the snapshot artifacts on a remote corporate repo.  (I will
> see
> >> if
> >> > I can block this for this test.)
> >>
> >> If you have the artifacts on a remote repository, then when the plugin
> >> goes looking for the artifacts (from outside the reactor) it will find
> >> them and the plugin at fault will therefore not fail the build.
> >>
> >> By ensuring that the only source of the artifacts is from the reactor,
> >> then whatever plugin is pulling the artifacts from the repository will
> >> be forced to fail (thereby finding your problem for you)
> >>
> >> >
> >> > What does -DreResolve do?
> >>
> >> reResolve will turn around and re-pull the dependencies from the
> >> remote repository unless you disable it with -DreResolve=false
> >>
> >> (reResolve is a parameter of the purge-... goal)
> >>
> >> >
> >> > -Dave
> >> >
> >> > On Thu, Apr 16, 2009 at 11:09 AM, Stephen Connolly <
> >> > stephen.alan.connolly@gmail.com> wrote:
> >> >
> >> >> That would be my concern too.
> >> >>
> >> >> I suspect you can reproduce your build failures if you:
> >> >>
> >> >> mvn clean
> >> >>
> >> >> mvn dependency:purge-local-repository -DreResolve=false
> >> >>
> >> >> mvn install
> >> >>
> >> >> (assuming that you have not deployed any of the -SNAPSHOT artifacts
> to a
> >> >> remote repository)
> >> >>
> >> >> you should recreate the build failure and be able to identify the
> source
> >> of
> >> >> it better.
> >> >>
> >> >> -Stephen
> >> >>
> >> >> 2009/4/16 David Hoffer <dh...@gmail.com>
> >> >>
> >> >> > Isn't that adding yet another plugin to do what maven is supposed
> to
> >> do
> >> >> out
> >> >> > of the box?  I'm concerned about the increase in complexity, when
> >> >> something
> >> >> > doesn't work is it maven or the incremental plugin?
> >> >> >
> >> >> > -Dave
> >> >> >
> >> >> > On Thu, Apr 16, 2009 at 10:37 AM, Dmitry Skavish <
> skavish@gmail.com>
> >> >> > wrote:
> >> >> >
> >> >> > > I asked the same question on OSGi maillist and they advised me to
> >> use
> >> >> > > incremental-build plugin:
> >> >> https://maven-incremental-build.dev.java.net/I
> >> >> > > does exactly what I need, check it out, it could solve your
> problem
> >> as
> >> >> > > well.
> >> >> > >
> >> >> > > On Thu, Apr 16, 2009 at 12:33 PM, David Hoffer <
> dhoffer6@gmail.com>
> >> >> > wrote:
> >> >> > >
> >> >> > > > Then there is a big bug here because I have a multi-module
> project
> >> >> with
> >> >> > a
> >> >> > > > few modules, the dependent one was built first (as seen in the
> >> build
> >> >> > log)
> >> >> > > > but yet when the depending module was built it did NOT use the
> >> >> > dependent
> >> >> > > > build rather it went to the repo and downloaded the previously
> >> >> deployed
> >> >> > > > artifact snapshot.
> >> >> > > >
> >> >> > > > -Dave
> >> >> > > >
> >> >> > > > On Thu, Apr 16, 2009 at 10:24 AM, Todd Thiessen <
> >> thiessen@nortel.com
> >> >> >
> >> >> > > > wrote:
> >> >> > > >
> >> >> > > > > FYI. Here is one reference,
> >> >> > > > >
> >> >> > > > > http://maven.apache.org/pom.html#Aggregation
> >> >> > > > >
> >> >> > > > > ---
> >> >> > > > > Todd Thiessen
> >> >> > > > >
> >> >> > > > >
> >> >> > > > > > -----Original Message-----
> >> >> > > > > > From: David Hoffer [mailto:dhoffer6@gmail.com]
> >> >> > > > > > Sent: Thursday, April 16, 2009 11:46 AM
> >> >> > > > > > To: Maven Users List
> >> >> > > > > > Subject: Re: Multi-module build is not building with
> current
> >> >> > > > > > module source code
> >> >> > > > > >
> >> >> > > > > > Then I'm understanding the order of the reactor wrong.  I
> >> >> > > > > > assumed its top to bottom, that is...just before internal
> is
> >> >> > > > > > built...public is built; and just before security-public is
> >> >> > > > > > built...internal is built.
> >> >> > > > > >
> >> >> > > > > > Can you clarify the order?
> >> >> > > > > >
> >> >> > > > > > -Dave
> >> >> > > > > >
> >> >> > > > > > On Thu, Apr 16, 2009 at 9:39 AM, Nick Stolwijk
> >> >> > > > > > <ni...@gmail.com>wrote:
> >> >> > > > > >
> >> >> > > > > > > Maven always takes the artifacts out of the local
> >> >> > > > > > repository. However,
> >> >> > > > > > > this is not a problem, because the reactor knows in which
> >> order
> >> >> > to
> >> >> > > > > > > built the projects. Just before your internal project is
> >> >> > > > > > built, maven
> >> >> > > > > > > has installed the most recent version of security-public
> in
> >> >> > > > > > the local
> >> >> > > > > > > repository.
> >> >> > > > > > >
> >> >> > > > > > > Maybe I don't understand your problem. If that is the
> case,
> >> >> > > > > > please clarify.
> >> >> > > > > > >
> >> >> > > > > > > Hth,
> >> >> > > > > > >
> >> >> > > > > > > Nick Stolwijk
> >> >> > > > > > > ~Java Developer~
> >> >> > > > > > >
> >> >> > > > > > > Iprofs BV.
> >> >> > > > > > > Claus Sluterweg 125
> >> >> > > > > > > 2012 WS Haarlem
> >> >> > > > > > > www.iprofs.nl
> >> >> > > > > > >
> >> >> > > > > > >
> >> >> > > > > > >
> >> >> > > > > > > On Thu, Apr 16, 2009 at 5:26 PM, Dmitry Skavish
> >> >> > > > > > <sk...@gmail.com> wrote:
> >> >> > > > > > > > I am having the same problem and would like to know
> that
> >> >> > > > > > as well. Thanks!
> >> >> > > > > > > >
> >> >> > > > > > > > On Thu, Apr 16, 2009 at 10:19 AM, David Hoffer
> >> >> > > > > > <dh...@gmail.com>
> >> >> > > > > > > wrote:
> >> >> > > > > > > >
> >> >> > > > > > > >> I have a multi-module build where some modules are
> >> dependent
> >> >> > on
> >> >> > > > > > > >> other modules.  What is happening is that the
> dependent
> >> >> > > > > > module is
> >> >> > > > > > > >> getting its dependency from the local/corporate maven
> >> >> > > > > > repo instead
> >> >> > > > > > > >> of the source
> >> >> > > > > > > code
> >> >> > > > > > > >> that was just built.  How do I specify that modules
> >> always
> >> >> > build
> >> >> > > > > > > >> using current source not prior built snapshot jars?
> >> >> > > > > > > >>
> >> >> > > > > > > >> Here is an example of the problem (it is really
> simple)
> >> >> > > > > > > >>
> >> >> > > > > > > >> Parent pom:
> >> >> > > > > > > >> <version>0.1-SNAPSHOT</version>
> >> >> > > > > > > >> <modules>
> >> >> > > > > > > >>        <module>public</module>
> >> >> > > > > > > >>        <module>internal</module>
> >> >> > > > > > > >>        <module>security-public</module> </modules>
> >> >> > > > > > > >>
> >> >> > > > > > > >> public pom:
> >> >> > > > > > > >> <version>0.1-SNAPSHOT</version>
> >> >> > > > > > > >>
> >> >> > > > > > > >> internal pom:
> >> >> > > > > > > >> <dependencies>
> >> >> > > > > > > >>        <dependency>
> >> >> > > > > > > >>            <groupId>${project.groupId}</groupId>
> >> >> > > > > > > >>            <artifactId>public</artifactId>
> >> >> > > > > > > >>            <version>0.1-SNAPSHOT</version>
> >> >> > > > > > > >>        </dependency>
> >> >> > > > > > > >> </dependencies>
> >> >> > > > > > > >>
> >> >> > > > > > > >> security-public:
> >> >> > > > > > > >> <dependency>
> >> >> > > > > > > >>            <groupId>${project.groupId}</groupId>
> >> >> > > > > > > >>            <artifactId>public</artifactId>
> >> >> > > > > > > >>            <version>0.1-SNAPSHOT</version>
> </dependency>
> >> >> > > > > > > >>
> >> >> > > > > > > >> So what is happening is that instead of internal  &
> >> >> > > > > > security-public
> >> >> > > > > > > >> building using the just built public (note it is first
> so
> >> it
> >> >> > was
> >> >> > > > > > > >> built first)
> >> >> > > > > > > they
> >> >> > > > > > > >> go
> >> >> > > > > > > >> out and download the last deployed snapshot and build
> >> using
> >> >> > that
> >> >> > > > > > > instead.
> >> >> > > > > > > >>
> >> >> > > > > > > >> Nothing in the pom dependency syntax really says which
> >> >> > > > > > to use but I
> >> >> > > > > > > assumed
> >> >> > > > > > > >> that because maven 'knows' these are all in the
> reactor
> >> it
> >> >> > would
> >> >> > > > > > > >> use
> >> >> > > > > > > module
> >> >> > > > > > > >> source.  However this doesn't seem to work, what do I
> >> >> > > > > > need to do to
> >> >> > > > > > > >> fix this?
> >> >> > > > > > > >>
> >> >> > > > > > > >> BTW, the goals being run are 'clean deploy
> site-deploy'
> >> >> > > > > > > >>
> >> >> > > > > > > >> -Dave
> >> >> > > > > > > >>
> >> >> > > > > > > >
> >> >> > > > > > > >
> >> >> > > > > > > >
> >> >> > > > > > > > --
> >> >> > > > > > > > Dmitry Skavish
> >> >> > > > > > > >
> >> >> > > > > > >
> >> >> > > > > > >
> >> >> > > > > >
> >> >> >
> ---------------------------------------------------------------------
> >> >> > > > > > > To unsubscribe, e-mail:
> users-unsubscribe@maven.apache.org
> >> >> > > > > > > For additional commands, e-mail:
> >> users-help@maven.apache.org
> >> >> > > > > > >
> >> >> > > > > > >
> >> >> > > > > >
> >> >> > > > >
> >> >> > > > >
> >> >> ---------------------------------------------------------------------
> >> >> > > > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> >> >> > > > > For additional commands, e-mail: users-help@maven.apache.org
> >> >> > > > >
> >> >> > > > >
> >> >> > > >
> >> >> > >
> >> >> > >
> >> >> > >
> >> >> > > --
> >> >> > > Dmitry Skavish
> >> >> > >
> >> >> >
> >> >>
> >> >
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> >> For additional commands, e-mail: users-help@maven.apache.org
> >>
> >>
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: Multi-module build is not building with current module source code

Posted by Stephen Connolly <st...@gmail.com>.
I'd retry the test with the module order reset back to the way you had it.

the commands I provided should be a fully clean build from scratch, so
should be equivalent to changing code

-Stephen

2009/4/16 David Hoffer <dh...@gmail.com>:
> Thanks that makes sense.
>
> I did a test using your commands after blocking my snapshot proxy and it
> built just fine.
>
> This doesn't surprise me too much because I manually changed the order of
> the modules in the parent pom based on my premise that the reactor ordering
> logic is flawed.
>
> In addition i can't say that it works yet because I didn't change any code.
> I will have to try this again when we have added breaking code to dependent
> module(s).
>
> This is a nasty issue!
>
> -Dave
>
> On Thu, Apr 16, 2009 at 12:02 PM, Stephen Connolly <
> stephen.alan.connolly@gmail.com> wrote:
>
>> 2009/4/16 David Hoffer <dh...@gmail.com>:
>> > I have a few comments/questions.
>> >
>> > I do have the snapshot artifacts on a remote corporate repo.  (I will see
>> if
>> > I can block this for this test.)
>>
>> If you have the artifacts on a remote repository, then when the plugin
>> goes looking for the artifacts (from outside the reactor) it will find
>> them and the plugin at fault will therefore not fail the build.
>>
>> By ensuring that the only source of the artifacts is from the reactor,
>> then whatever plugin is pulling the artifacts from the repository will
>> be forced to fail (thereby finding your problem for you)
>>
>> >
>> > What does -DreResolve do?
>>
>> reResolve will turn around and re-pull the dependencies from the
>> remote repository unless you disable it with -DreResolve=false
>>
>> (reResolve is a parameter of the purge-... goal)
>>
>> >
>> > -Dave
>> >
>> > On Thu, Apr 16, 2009 at 11:09 AM, Stephen Connolly <
>> > stephen.alan.connolly@gmail.com> wrote:
>> >
>> >> That would be my concern too.
>> >>
>> >> I suspect you can reproduce your build failures if you:
>> >>
>> >> mvn clean
>> >>
>> >> mvn dependency:purge-local-repository -DreResolve=false
>> >>
>> >> mvn install
>> >>
>> >> (assuming that you have not deployed any of the -SNAPSHOT artifacts to a
>> >> remote repository)
>> >>
>> >> you should recreate the build failure and be able to identify the source
>> of
>> >> it better.
>> >>
>> >> -Stephen
>> >>
>> >> 2009/4/16 David Hoffer <dh...@gmail.com>
>> >>
>> >> > Isn't that adding yet another plugin to do what maven is supposed to
>> do
>> >> out
>> >> > of the box?  I'm concerned about the increase in complexity, when
>> >> something
>> >> > doesn't work is it maven or the incremental plugin?
>> >> >
>> >> > -Dave
>> >> >
>> >> > On Thu, Apr 16, 2009 at 10:37 AM, Dmitry Skavish <sk...@gmail.com>
>> >> > wrote:
>> >> >
>> >> > > I asked the same question on OSGi maillist and they advised me to
>> use
>> >> > > incremental-build plugin:
>> >> https://maven-incremental-build.dev.java.net/I
>> >> > > does exactly what I need, check it out, it could solve your problem
>> as
>> >> > > well.
>> >> > >
>> >> > > On Thu, Apr 16, 2009 at 12:33 PM, David Hoffer <dh...@gmail.com>
>> >> > wrote:
>> >> > >
>> >> > > > Then there is a big bug here because I have a multi-module project
>> >> with
>> >> > a
>> >> > > > few modules, the dependent one was built first (as seen in the
>> build
>> >> > log)
>> >> > > > but yet when the depending module was built it did NOT use the
>> >> > dependent
>> >> > > > build rather it went to the repo and downloaded the previously
>> >> deployed
>> >> > > > artifact snapshot.
>> >> > > >
>> >> > > > -Dave
>> >> > > >
>> >> > > > On Thu, Apr 16, 2009 at 10:24 AM, Todd Thiessen <
>> thiessen@nortel.com
>> >> >
>> >> > > > wrote:
>> >> > > >
>> >> > > > > FYI. Here is one reference,
>> >> > > > >
>> >> > > > > http://maven.apache.org/pom.html#Aggregation
>> >> > > > >
>> >> > > > > ---
>> >> > > > > Todd Thiessen
>> >> > > > >
>> >> > > > >
>> >> > > > > > -----Original Message-----
>> >> > > > > > From: David Hoffer [mailto:dhoffer6@gmail.com]
>> >> > > > > > Sent: Thursday, April 16, 2009 11:46 AM
>> >> > > > > > To: Maven Users List
>> >> > > > > > Subject: Re: Multi-module build is not building with current
>> >> > > > > > module source code
>> >> > > > > >
>> >> > > > > > Then I'm understanding the order of the reactor wrong.  I
>> >> > > > > > assumed its top to bottom, that is...just before internal is
>> >> > > > > > built...public is built; and just before security-public is
>> >> > > > > > built...internal is built.
>> >> > > > > >
>> >> > > > > > Can you clarify the order?
>> >> > > > > >
>> >> > > > > > -Dave
>> >> > > > > >
>> >> > > > > > On Thu, Apr 16, 2009 at 9:39 AM, Nick Stolwijk
>> >> > > > > > <ni...@gmail.com>wrote:
>> >> > > > > >
>> >> > > > > > > Maven always takes the artifacts out of the local
>> >> > > > > > repository. However,
>> >> > > > > > > this is not a problem, because the reactor knows in which
>> order
>> >> > to
>> >> > > > > > > built the projects. Just before your internal project is
>> >> > > > > > built, maven
>> >> > > > > > > has installed the most recent version of security-public in
>> >> > > > > > the local
>> >> > > > > > > repository.
>> >> > > > > > >
>> >> > > > > > > Maybe I don't understand your problem. If that is the case,
>> >> > > > > > please clarify.
>> >> > > > > > >
>> >> > > > > > > Hth,
>> >> > > > > > >
>> >> > > > > > > Nick Stolwijk
>> >> > > > > > > ~Java Developer~
>> >> > > > > > >
>> >> > > > > > > Iprofs BV.
>> >> > > > > > > Claus Sluterweg 125
>> >> > > > > > > 2012 WS Haarlem
>> >> > > > > > > www.iprofs.nl
>> >> > > > > > >
>> >> > > > > > >
>> >> > > > > > >
>> >> > > > > > > On Thu, Apr 16, 2009 at 5:26 PM, Dmitry Skavish
>> >> > > > > > <sk...@gmail.com> wrote:
>> >> > > > > > > > I am having the same problem and would like to know that
>> >> > > > > > as well. Thanks!
>> >> > > > > > > >
>> >> > > > > > > > On Thu, Apr 16, 2009 at 10:19 AM, David Hoffer
>> >> > > > > > <dh...@gmail.com>
>> >> > > > > > > wrote:
>> >> > > > > > > >
>> >> > > > > > > >> I have a multi-module build where some modules are
>> dependent
>> >> > on
>> >> > > > > > > >> other modules.  What is happening is that the dependent
>> >> > > > > > module is
>> >> > > > > > > >> getting its dependency from the local/corporate maven
>> >> > > > > > repo instead
>> >> > > > > > > >> of the source
>> >> > > > > > > code
>> >> > > > > > > >> that was just built.  How do I specify that modules
>> always
>> >> > build
>> >> > > > > > > >> using current source not prior built snapshot jars?
>> >> > > > > > > >>
>> >> > > > > > > >> Here is an example of the problem (it is really simple)
>> >> > > > > > > >>
>> >> > > > > > > >> Parent pom:
>> >> > > > > > > >> <version>0.1-SNAPSHOT</version>
>> >> > > > > > > >> <modules>
>> >> > > > > > > >>        <module>public</module>
>> >> > > > > > > >>        <module>internal</module>
>> >> > > > > > > >>        <module>security-public</module> </modules>
>> >> > > > > > > >>
>> >> > > > > > > >> public pom:
>> >> > > > > > > >> <version>0.1-SNAPSHOT</version>
>> >> > > > > > > >>
>> >> > > > > > > >> internal pom:
>> >> > > > > > > >> <dependencies>
>> >> > > > > > > >>        <dependency>
>> >> > > > > > > >>            <groupId>${project.groupId}</groupId>
>> >> > > > > > > >>            <artifactId>public</artifactId>
>> >> > > > > > > >>            <version>0.1-SNAPSHOT</version>
>> >> > > > > > > >>        </dependency>
>> >> > > > > > > >> </dependencies>
>> >> > > > > > > >>
>> >> > > > > > > >> security-public:
>> >> > > > > > > >> <dependency>
>> >> > > > > > > >>            <groupId>${project.groupId}</groupId>
>> >> > > > > > > >>            <artifactId>public</artifactId>
>> >> > > > > > > >>            <version>0.1-SNAPSHOT</version> </dependency>
>> >> > > > > > > >>
>> >> > > > > > > >> So what is happening is that instead of internal  &
>> >> > > > > > security-public
>> >> > > > > > > >> building using the just built public (note it is first so
>> it
>> >> > was
>> >> > > > > > > >> built first)
>> >> > > > > > > they
>> >> > > > > > > >> go
>> >> > > > > > > >> out and download the last deployed snapshot and build
>> using
>> >> > that
>> >> > > > > > > instead.
>> >> > > > > > > >>
>> >> > > > > > > >> Nothing in the pom dependency syntax really says which
>> >> > > > > > to use but I
>> >> > > > > > > assumed
>> >> > > > > > > >> that because maven 'knows' these are all in the reactor
>> it
>> >> > would
>> >> > > > > > > >> use
>> >> > > > > > > module
>> >> > > > > > > >> source.  However this doesn't seem to work, what do I
>> >> > > > > > need to do to
>> >> > > > > > > >> fix this?
>> >> > > > > > > >>
>> >> > > > > > > >> BTW, the goals being run are 'clean deploy site-deploy'
>> >> > > > > > > >>
>> >> > > > > > > >> -Dave
>> >> > > > > > > >>
>> >> > > > > > > >
>> >> > > > > > > >
>> >> > > > > > > >
>> >> > > > > > > > --
>> >> > > > > > > > Dmitry Skavish
>> >> > > > > > > >
>> >> > > > > > >
>> >> > > > > > >
>> >> > > > > >
>> >> > ---------------------------------------------------------------------
>> >> > > > > > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> >> > > > > > > For additional commands, e-mail:
>> users-help@maven.apache.org
>> >> > > > > > >
>> >> > > > > > >
>> >> > > > > >
>> >> > > > >
>> >> > > > >
>> >> ---------------------------------------------------------------------
>> >> > > > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> >> > > > > For additional commands, e-mail: users-help@maven.apache.org
>> >> > > > >
>> >> > > > >
>> >> > > >
>> >> > >
>> >> > >
>> >> > >
>> >> > > --
>> >> > > Dmitry Skavish
>> >> > >
>> >> >
>> >>
>> >
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>
>

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


Re: Multi-module build is not building with current module source code

Posted by David Hoffer <dh...@gmail.com>.
Thanks that makes sense.

I did a test using your commands after blocking my snapshot proxy and it
built just fine.

This doesn't surprise me too much because I manually changed the order of
the modules in the parent pom based on my premise that the reactor ordering
logic is flawed.

In addition i can't say that it works yet because I didn't change any code.
I will have to try this again when we have added breaking code to dependent
module(s).

This is a nasty issue!

-Dave

On Thu, Apr 16, 2009 at 12:02 PM, Stephen Connolly <
stephen.alan.connolly@gmail.com> wrote:

> 2009/4/16 David Hoffer <dh...@gmail.com>:
> > I have a few comments/questions.
> >
> > I do have the snapshot artifacts on a remote corporate repo.  (I will see
> if
> > I can block this for this test.)
>
> If you have the artifacts on a remote repository, then when the plugin
> goes looking for the artifacts (from outside the reactor) it will find
> them and the plugin at fault will therefore not fail the build.
>
> By ensuring that the only source of the artifacts is from the reactor,
> then whatever plugin is pulling the artifacts from the repository will
> be forced to fail (thereby finding your problem for you)
>
> >
> > What does -DreResolve do?
>
> reResolve will turn around and re-pull the dependencies from the
> remote repository unless you disable it with -DreResolve=false
>
> (reResolve is a parameter of the purge-... goal)
>
> >
> > -Dave
> >
> > On Thu, Apr 16, 2009 at 11:09 AM, Stephen Connolly <
> > stephen.alan.connolly@gmail.com> wrote:
> >
> >> That would be my concern too.
> >>
> >> I suspect you can reproduce your build failures if you:
> >>
> >> mvn clean
> >>
> >> mvn dependency:purge-local-repository -DreResolve=false
> >>
> >> mvn install
> >>
> >> (assuming that you have not deployed any of the -SNAPSHOT artifacts to a
> >> remote repository)
> >>
> >> you should recreate the build failure and be able to identify the source
> of
> >> it better.
> >>
> >> -Stephen
> >>
> >> 2009/4/16 David Hoffer <dh...@gmail.com>
> >>
> >> > Isn't that adding yet another plugin to do what maven is supposed to
> do
> >> out
> >> > of the box?  I'm concerned about the increase in complexity, when
> >> something
> >> > doesn't work is it maven or the incremental plugin?
> >> >
> >> > -Dave
> >> >
> >> > On Thu, Apr 16, 2009 at 10:37 AM, Dmitry Skavish <sk...@gmail.com>
> >> > wrote:
> >> >
> >> > > I asked the same question on OSGi maillist and they advised me to
> use
> >> > > incremental-build plugin:
> >> https://maven-incremental-build.dev.java.net/I
> >> > > does exactly what I need, check it out, it could solve your problem
> as
> >> > > well.
> >> > >
> >> > > On Thu, Apr 16, 2009 at 12:33 PM, David Hoffer <dh...@gmail.com>
> >> > wrote:
> >> > >
> >> > > > Then there is a big bug here because I have a multi-module project
> >> with
> >> > a
> >> > > > few modules, the dependent one was built first (as seen in the
> build
> >> > log)
> >> > > > but yet when the depending module was built it did NOT use the
> >> > dependent
> >> > > > build rather it went to the repo and downloaded the previously
> >> deployed
> >> > > > artifact snapshot.
> >> > > >
> >> > > > -Dave
> >> > > >
> >> > > > On Thu, Apr 16, 2009 at 10:24 AM, Todd Thiessen <
> thiessen@nortel.com
> >> >
> >> > > > wrote:
> >> > > >
> >> > > > > FYI. Here is one reference,
> >> > > > >
> >> > > > > http://maven.apache.org/pom.html#Aggregation
> >> > > > >
> >> > > > > ---
> >> > > > > Todd Thiessen
> >> > > > >
> >> > > > >
> >> > > > > > -----Original Message-----
> >> > > > > > From: David Hoffer [mailto:dhoffer6@gmail.com]
> >> > > > > > Sent: Thursday, April 16, 2009 11:46 AM
> >> > > > > > To: Maven Users List
> >> > > > > > Subject: Re: Multi-module build is not building with current
> >> > > > > > module source code
> >> > > > > >
> >> > > > > > Then I'm understanding the order of the reactor wrong.  I
> >> > > > > > assumed its top to bottom, that is...just before internal is
> >> > > > > > built...public is built; and just before security-public is
> >> > > > > > built...internal is built.
> >> > > > > >
> >> > > > > > Can you clarify the order?
> >> > > > > >
> >> > > > > > -Dave
> >> > > > > >
> >> > > > > > On Thu, Apr 16, 2009 at 9:39 AM, Nick Stolwijk
> >> > > > > > <ni...@gmail.com>wrote:
> >> > > > > >
> >> > > > > > > Maven always takes the artifacts out of the local
> >> > > > > > repository. However,
> >> > > > > > > this is not a problem, because the reactor knows in which
> order
> >> > to
> >> > > > > > > built the projects. Just before your internal project is
> >> > > > > > built, maven
> >> > > > > > > has installed the most recent version of security-public in
> >> > > > > > the local
> >> > > > > > > repository.
> >> > > > > > >
> >> > > > > > > Maybe I don't understand your problem. If that is the case,
> >> > > > > > please clarify.
> >> > > > > > >
> >> > > > > > > Hth,
> >> > > > > > >
> >> > > > > > > Nick Stolwijk
> >> > > > > > > ~Java Developer~
> >> > > > > > >
> >> > > > > > > Iprofs BV.
> >> > > > > > > Claus Sluterweg 125
> >> > > > > > > 2012 WS Haarlem
> >> > > > > > > www.iprofs.nl
> >> > > > > > >
> >> > > > > > >
> >> > > > > > >
> >> > > > > > > On Thu, Apr 16, 2009 at 5:26 PM, Dmitry Skavish
> >> > > > > > <sk...@gmail.com> wrote:
> >> > > > > > > > I am having the same problem and would like to know that
> >> > > > > > as well. Thanks!
> >> > > > > > > >
> >> > > > > > > > On Thu, Apr 16, 2009 at 10:19 AM, David Hoffer
> >> > > > > > <dh...@gmail.com>
> >> > > > > > > wrote:
> >> > > > > > > >
> >> > > > > > > >> I have a multi-module build where some modules are
> dependent
> >> > on
> >> > > > > > > >> other modules.  What is happening is that the dependent
> >> > > > > > module is
> >> > > > > > > >> getting its dependency from the local/corporate maven
> >> > > > > > repo instead
> >> > > > > > > >> of the source
> >> > > > > > > code
> >> > > > > > > >> that was just built.  How do I specify that modules
> always
> >> > build
> >> > > > > > > >> using current source not prior built snapshot jars?
> >> > > > > > > >>
> >> > > > > > > >> Here is an example of the problem (it is really simple)
> >> > > > > > > >>
> >> > > > > > > >> Parent pom:
> >> > > > > > > >> <version>0.1-SNAPSHOT</version>
> >> > > > > > > >> <modules>
> >> > > > > > > >>        <module>public</module>
> >> > > > > > > >>        <module>internal</module>
> >> > > > > > > >>        <module>security-public</module> </modules>
> >> > > > > > > >>
> >> > > > > > > >> public pom:
> >> > > > > > > >> <version>0.1-SNAPSHOT</version>
> >> > > > > > > >>
> >> > > > > > > >> internal pom:
> >> > > > > > > >> <dependencies>
> >> > > > > > > >>        <dependency>
> >> > > > > > > >>            <groupId>${project.groupId}</groupId>
> >> > > > > > > >>            <artifactId>public</artifactId>
> >> > > > > > > >>            <version>0.1-SNAPSHOT</version>
> >> > > > > > > >>        </dependency>
> >> > > > > > > >> </dependencies>
> >> > > > > > > >>
> >> > > > > > > >> security-public:
> >> > > > > > > >> <dependency>
> >> > > > > > > >>            <groupId>${project.groupId}</groupId>
> >> > > > > > > >>            <artifactId>public</artifactId>
> >> > > > > > > >>            <version>0.1-SNAPSHOT</version> </dependency>
> >> > > > > > > >>
> >> > > > > > > >> So what is happening is that instead of internal  &
> >> > > > > > security-public
> >> > > > > > > >> building using the just built public (note it is first so
> it
> >> > was
> >> > > > > > > >> built first)
> >> > > > > > > they
> >> > > > > > > >> go
> >> > > > > > > >> out and download the last deployed snapshot and build
> using
> >> > that
> >> > > > > > > instead.
> >> > > > > > > >>
> >> > > > > > > >> Nothing in the pom dependency syntax really says which
> >> > > > > > to use but I
> >> > > > > > > assumed
> >> > > > > > > >> that because maven 'knows' these are all in the reactor
> it
> >> > would
> >> > > > > > > >> use
> >> > > > > > > module
> >> > > > > > > >> source.  However this doesn't seem to work, what do I
> >> > > > > > need to do to
> >> > > > > > > >> fix this?
> >> > > > > > > >>
> >> > > > > > > >> BTW, the goals being run are 'clean deploy site-deploy'
> >> > > > > > > >>
> >> > > > > > > >> -Dave
> >> > > > > > > >>
> >> > > > > > > >
> >> > > > > > > >
> >> > > > > > > >
> >> > > > > > > > --
> >> > > > > > > > Dmitry Skavish
> >> > > > > > > >
> >> > > > > > >
> >> > > > > > >
> >> > > > > >
> >> > ---------------------------------------------------------------------
> >> > > > > > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> >> > > > > > > For additional commands, e-mail:
> users-help@maven.apache.org
> >> > > > > > >
> >> > > > > > >
> >> > > > > >
> >> > > > >
> >> > > > >
> >> ---------------------------------------------------------------------
> >> > > > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> >> > > > > For additional commands, e-mail: users-help@maven.apache.org
> >> > > > >
> >> > > > >
> >> > > >
> >> > >
> >> > >
> >> > >
> >> > > --
> >> > > Dmitry Skavish
> >> > >
> >> >
> >>
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: Multi-module build is not building with current module source code

Posted by Stephen Connolly <st...@gmail.com>.
2009/4/16 David Hoffer <dh...@gmail.com>:
> I have a few comments/questions.
>
> I do have the snapshot artifacts on a remote corporate repo.  (I will see if
> I can block this for this test.)

If you have the artifacts on a remote repository, then when the plugin
goes looking for the artifacts (from outside the reactor) it will find
them and the plugin at fault will therefore not fail the build.

By ensuring that the only source of the artifacts is from the reactor,
then whatever plugin is pulling the artifacts from the repository will
be forced to fail (thereby finding your problem for you)

>
> What does -DreResolve do?

reResolve will turn around and re-pull the dependencies from the
remote repository unless you disable it with -DreResolve=false

(reResolve is a parameter of the purge-... goal)

>
> -Dave
>
> On Thu, Apr 16, 2009 at 11:09 AM, Stephen Connolly <
> stephen.alan.connolly@gmail.com> wrote:
>
>> That would be my concern too.
>>
>> I suspect you can reproduce your build failures if you:
>>
>> mvn clean
>>
>> mvn dependency:purge-local-repository -DreResolve=false
>>
>> mvn install
>>
>> (assuming that you have not deployed any of the -SNAPSHOT artifacts to a
>> remote repository)
>>
>> you should recreate the build failure and be able to identify the source of
>> it better.
>>
>> -Stephen
>>
>> 2009/4/16 David Hoffer <dh...@gmail.com>
>>
>> > Isn't that adding yet another plugin to do what maven is supposed to do
>> out
>> > of the box?  I'm concerned about the increase in complexity, when
>> something
>> > doesn't work is it maven or the incremental plugin?
>> >
>> > -Dave
>> >
>> > On Thu, Apr 16, 2009 at 10:37 AM, Dmitry Skavish <sk...@gmail.com>
>> > wrote:
>> >
>> > > I asked the same question on OSGi maillist and they advised me to use
>> > > incremental-build plugin:
>> https://maven-incremental-build.dev.java.net/I
>> > > does exactly what I need, check it out, it could solve your problem as
>> > > well.
>> > >
>> > > On Thu, Apr 16, 2009 at 12:33 PM, David Hoffer <dh...@gmail.com>
>> > wrote:
>> > >
>> > > > Then there is a big bug here because I have a multi-module project
>> with
>> > a
>> > > > few modules, the dependent one was built first (as seen in the build
>> > log)
>> > > > but yet when the depending module was built it did NOT use the
>> > dependent
>> > > > build rather it went to the repo and downloaded the previously
>> deployed
>> > > > artifact snapshot.
>> > > >
>> > > > -Dave
>> > > >
>> > > > On Thu, Apr 16, 2009 at 10:24 AM, Todd Thiessen <thiessen@nortel.com
>> >
>> > > > wrote:
>> > > >
>> > > > > FYI. Here is one reference,
>> > > > >
>> > > > > http://maven.apache.org/pom.html#Aggregation
>> > > > >
>> > > > > ---
>> > > > > Todd Thiessen
>> > > > >
>> > > > >
>> > > > > > -----Original Message-----
>> > > > > > From: David Hoffer [mailto:dhoffer6@gmail.com]
>> > > > > > Sent: Thursday, April 16, 2009 11:46 AM
>> > > > > > To: Maven Users List
>> > > > > > Subject: Re: Multi-module build is not building with current
>> > > > > > module source code
>> > > > > >
>> > > > > > Then I'm understanding the order of the reactor wrong.  I
>> > > > > > assumed its top to bottom, that is...just before internal is
>> > > > > > built...public is built; and just before security-public is
>> > > > > > built...internal is built.
>> > > > > >
>> > > > > > Can you clarify the order?
>> > > > > >
>> > > > > > -Dave
>> > > > > >
>> > > > > > On Thu, Apr 16, 2009 at 9:39 AM, Nick Stolwijk
>> > > > > > <ni...@gmail.com>wrote:
>> > > > > >
>> > > > > > > Maven always takes the artifacts out of the local
>> > > > > > repository. However,
>> > > > > > > this is not a problem, because the reactor knows in which order
>> > to
>> > > > > > > built the projects. Just before your internal project is
>> > > > > > built, maven
>> > > > > > > has installed the most recent version of security-public in
>> > > > > > the local
>> > > > > > > repository.
>> > > > > > >
>> > > > > > > Maybe I don't understand your problem. If that is the case,
>> > > > > > please clarify.
>> > > > > > >
>> > > > > > > Hth,
>> > > > > > >
>> > > > > > > Nick Stolwijk
>> > > > > > > ~Java Developer~
>> > > > > > >
>> > > > > > > Iprofs BV.
>> > > > > > > Claus Sluterweg 125
>> > > > > > > 2012 WS Haarlem
>> > > > > > > www.iprofs.nl
>> > > > > > >
>> > > > > > >
>> > > > > > >
>> > > > > > > On Thu, Apr 16, 2009 at 5:26 PM, Dmitry Skavish
>> > > > > > <sk...@gmail.com> wrote:
>> > > > > > > > I am having the same problem and would like to know that
>> > > > > > as well. Thanks!
>> > > > > > > >
>> > > > > > > > On Thu, Apr 16, 2009 at 10:19 AM, David Hoffer
>> > > > > > <dh...@gmail.com>
>> > > > > > > wrote:
>> > > > > > > >
>> > > > > > > >> I have a multi-module build where some modules are dependent
>> > on
>> > > > > > > >> other modules.  What is happening is that the dependent
>> > > > > > module is
>> > > > > > > >> getting its dependency from the local/corporate maven
>> > > > > > repo instead
>> > > > > > > >> of the source
>> > > > > > > code
>> > > > > > > >> that was just built.  How do I specify that modules always
>> > build
>> > > > > > > >> using current source not prior built snapshot jars?
>> > > > > > > >>
>> > > > > > > >> Here is an example of the problem (it is really simple)
>> > > > > > > >>
>> > > > > > > >> Parent pom:
>> > > > > > > >> <version>0.1-SNAPSHOT</version>
>> > > > > > > >> <modules>
>> > > > > > > >>        <module>public</module>
>> > > > > > > >>        <module>internal</module>
>> > > > > > > >>        <module>security-public</module> </modules>
>> > > > > > > >>
>> > > > > > > >> public pom:
>> > > > > > > >> <version>0.1-SNAPSHOT</version>
>> > > > > > > >>
>> > > > > > > >> internal pom:
>> > > > > > > >> <dependencies>
>> > > > > > > >>        <dependency>
>> > > > > > > >>            <groupId>${project.groupId}</groupId>
>> > > > > > > >>            <artifactId>public</artifactId>
>> > > > > > > >>            <version>0.1-SNAPSHOT</version>
>> > > > > > > >>        </dependency>
>> > > > > > > >> </dependencies>
>> > > > > > > >>
>> > > > > > > >> security-public:
>> > > > > > > >> <dependency>
>> > > > > > > >>            <groupId>${project.groupId}</groupId>
>> > > > > > > >>            <artifactId>public</artifactId>
>> > > > > > > >>            <version>0.1-SNAPSHOT</version> </dependency>
>> > > > > > > >>
>> > > > > > > >> So what is happening is that instead of internal  &
>> > > > > > security-public
>> > > > > > > >> building using the just built public (note it is first so it
>> > was
>> > > > > > > >> built first)
>> > > > > > > they
>> > > > > > > >> go
>> > > > > > > >> out and download the last deployed snapshot and build using
>> > that
>> > > > > > > instead.
>> > > > > > > >>
>> > > > > > > >> Nothing in the pom dependency syntax really says which
>> > > > > > to use but I
>> > > > > > > assumed
>> > > > > > > >> that because maven 'knows' these are all in the reactor it
>> > would
>> > > > > > > >> use
>> > > > > > > module
>> > > > > > > >> source.  However this doesn't seem to work, what do I
>> > > > > > need to do to
>> > > > > > > >> fix this?
>> > > > > > > >>
>> > > > > > > >> BTW, the goals being run are 'clean deploy site-deploy'
>> > > > > > > >>
>> > > > > > > >> -Dave
>> > > > > > > >>
>> > > > > > > >
>> > > > > > > >
>> > > > > > > >
>> > > > > > > > --
>> > > > > > > > Dmitry Skavish
>> > > > > > > >
>> > > > > > >
>> > > > > > >
>> > > > > >
>> > ---------------------------------------------------------------------
>> > > > > > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> > > > > > > For additional commands, e-mail: users-help@maven.apache.org
>> > > > > > >
>> > > > > > >
>> > > > > >
>> > > > >
>> > > > >
>> ---------------------------------------------------------------------
>> > > > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> > > > > For additional commands, e-mail: users-help@maven.apache.org
>> > > > >
>> > > > >
>> > > >
>> > >
>> > >
>> > >
>> > > --
>> > > Dmitry Skavish
>> > >
>> >
>>
>

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


Re: Multi-module build is not building with current module source code

Posted by David Hoffer <dh...@gmail.com>.
I have a few comments/questions.

I do have the snapshot artifacts on a remote corporate repo.  (I will see if
I can block this for this test.)

What does -DreResolve do?

-Dave

On Thu, Apr 16, 2009 at 11:09 AM, Stephen Connolly <
stephen.alan.connolly@gmail.com> wrote:

> That would be my concern too.
>
> I suspect you can reproduce your build failures if you:
>
> mvn clean
>
> mvn dependency:purge-local-repository -DreResolve=false
>
> mvn install
>
> (assuming that you have not deployed any of the -SNAPSHOT artifacts to a
> remote repository)
>
> you should recreate the build failure and be able to identify the source of
> it better.
>
> -Stephen
>
> 2009/4/16 David Hoffer <dh...@gmail.com>
>
> > Isn't that adding yet another plugin to do what maven is supposed to do
> out
> > of the box?  I'm concerned about the increase in complexity, when
> something
> > doesn't work is it maven or the incremental plugin?
> >
> > -Dave
> >
> > On Thu, Apr 16, 2009 at 10:37 AM, Dmitry Skavish <sk...@gmail.com>
> > wrote:
> >
> > > I asked the same question on OSGi maillist and they advised me to use
> > > incremental-build plugin:
> https://maven-incremental-build.dev.java.net/I
> > > does exactly what I need, check it out, it could solve your problem as
> > > well.
> > >
> > > On Thu, Apr 16, 2009 at 12:33 PM, David Hoffer <dh...@gmail.com>
> > wrote:
> > >
> > > > Then there is a big bug here because I have a multi-module project
> with
> > a
> > > > few modules, the dependent one was built first (as seen in the build
> > log)
> > > > but yet when the depending module was built it did NOT use the
> > dependent
> > > > build rather it went to the repo and downloaded the previously
> deployed
> > > > artifact snapshot.
> > > >
> > > > -Dave
> > > >
> > > > On Thu, Apr 16, 2009 at 10:24 AM, Todd Thiessen <thiessen@nortel.com
> >
> > > > wrote:
> > > >
> > > > > FYI. Here is one reference,
> > > > >
> > > > > http://maven.apache.org/pom.html#Aggregation
> > > > >
> > > > > ---
> > > > > Todd Thiessen
> > > > >
> > > > >
> > > > > > -----Original Message-----
> > > > > > From: David Hoffer [mailto:dhoffer6@gmail.com]
> > > > > > Sent: Thursday, April 16, 2009 11:46 AM
> > > > > > To: Maven Users List
> > > > > > Subject: Re: Multi-module build is not building with current
> > > > > > module source code
> > > > > >
> > > > > > Then I'm understanding the order of the reactor wrong.  I
> > > > > > assumed its top to bottom, that is...just before internal is
> > > > > > built...public is built; and just before security-public is
> > > > > > built...internal is built.
> > > > > >
> > > > > > Can you clarify the order?
> > > > > >
> > > > > > -Dave
> > > > > >
> > > > > > On Thu, Apr 16, 2009 at 9:39 AM, Nick Stolwijk
> > > > > > <ni...@gmail.com>wrote:
> > > > > >
> > > > > > > Maven always takes the artifacts out of the local
> > > > > > repository. However,
> > > > > > > this is not a problem, because the reactor knows in which order
> > to
> > > > > > > built the projects. Just before your internal project is
> > > > > > built, maven
> > > > > > > has installed the most recent version of security-public in
> > > > > > the local
> > > > > > > repository.
> > > > > > >
> > > > > > > Maybe I don't understand your problem. If that is the case,
> > > > > > please clarify.
> > > > > > >
> > > > > > > Hth,
> > > > > > >
> > > > > > > Nick Stolwijk
> > > > > > > ~Java Developer~
> > > > > > >
> > > > > > > Iprofs BV.
> > > > > > > Claus Sluterweg 125
> > > > > > > 2012 WS Haarlem
> > > > > > > www.iprofs.nl
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > On Thu, Apr 16, 2009 at 5:26 PM, Dmitry Skavish
> > > > > > <sk...@gmail.com> wrote:
> > > > > > > > I am having the same problem and would like to know that
> > > > > > as well. Thanks!
> > > > > > > >
> > > > > > > > On Thu, Apr 16, 2009 at 10:19 AM, David Hoffer
> > > > > > <dh...@gmail.com>
> > > > > > > wrote:
> > > > > > > >
> > > > > > > >> I have a multi-module build where some modules are dependent
> > on
> > > > > > > >> other modules.  What is happening is that the dependent
> > > > > > module is
> > > > > > > >> getting its dependency from the local/corporate maven
> > > > > > repo instead
> > > > > > > >> of the source
> > > > > > > code
> > > > > > > >> that was just built.  How do I specify that modules always
> > build
> > > > > > > >> using current source not prior built snapshot jars?
> > > > > > > >>
> > > > > > > >> Here is an example of the problem (it is really simple)
> > > > > > > >>
> > > > > > > >> Parent pom:
> > > > > > > >> <version>0.1-SNAPSHOT</version>
> > > > > > > >> <modules>
> > > > > > > >>        <module>public</module>
> > > > > > > >>        <module>internal</module>
> > > > > > > >>        <module>security-public</module> </modules>
> > > > > > > >>
> > > > > > > >> public pom:
> > > > > > > >> <version>0.1-SNAPSHOT</version>
> > > > > > > >>
> > > > > > > >> internal pom:
> > > > > > > >> <dependencies>
> > > > > > > >>        <dependency>
> > > > > > > >>            <groupId>${project.groupId}</groupId>
> > > > > > > >>            <artifactId>public</artifactId>
> > > > > > > >>            <version>0.1-SNAPSHOT</version>
> > > > > > > >>        </dependency>
> > > > > > > >> </dependencies>
> > > > > > > >>
> > > > > > > >> security-public:
> > > > > > > >> <dependency>
> > > > > > > >>            <groupId>${project.groupId}</groupId>
> > > > > > > >>            <artifactId>public</artifactId>
> > > > > > > >>            <version>0.1-SNAPSHOT</version> </dependency>
> > > > > > > >>
> > > > > > > >> So what is happening is that instead of internal  &
> > > > > > security-public
> > > > > > > >> building using the just built public (note it is first so it
> > was
> > > > > > > >> built first)
> > > > > > > they
> > > > > > > >> go
> > > > > > > >> out and download the last deployed snapshot and build using
> > that
> > > > > > > instead.
> > > > > > > >>
> > > > > > > >> Nothing in the pom dependency syntax really says which
> > > > > > to use but I
> > > > > > > assumed
> > > > > > > >> that because maven 'knows' these are all in the reactor it
> > would
> > > > > > > >> use
> > > > > > > module
> > > > > > > >> source.  However this doesn't seem to work, what do I
> > > > > > need to do to
> > > > > > > >> fix this?
> > > > > > > >>
> > > > > > > >> BTW, the goals being run are 'clean deploy site-deploy'
> > > > > > > >>
> > > > > > > >> -Dave
> > > > > > > >>
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > --
> > > > > > > > Dmitry Skavish
> > > > > > > >
> > > > > > >
> > > > > > >
> > > > > >
> > ---------------------------------------------------------------------
> > > > > > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > > > > > > For additional commands, e-mail: users-help@maven.apache.org
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > > >
> ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > > > > For additional commands, e-mail: users-help@maven.apache.org
> > > > >
> > > > >
> > > >
> > >
> > >
> > >
> > > --
> > > Dmitry Skavish
> > >
> >
>

Re: Multi-module build is not building with current module source code

Posted by Stephen Connolly <st...@gmail.com>.
That would be my concern too.

I suspect you can reproduce your build failures if you:

mvn clean

mvn dependency:purge-local-repository -DreResolve=false

mvn install

(assuming that you have not deployed any of the -SNAPSHOT artifacts to a
remote repository)

you should recreate the build failure and be able to identify the source of
it better.

-Stephen

2009/4/16 David Hoffer <dh...@gmail.com>

> Isn't that adding yet another plugin to do what maven is supposed to do out
> of the box?  I'm concerned about the increase in complexity, when something
> doesn't work is it maven or the incremental plugin?
>
> -Dave
>
> On Thu, Apr 16, 2009 at 10:37 AM, Dmitry Skavish <sk...@gmail.com>
> wrote:
>
> > I asked the same question on OSGi maillist and they advised me to use
> > incremental-build plugin: https://maven-incremental-build.dev.java.net/I
> > does exactly what I need, check it out, it could solve your problem as
> > well.
> >
> > On Thu, Apr 16, 2009 at 12:33 PM, David Hoffer <dh...@gmail.com>
> wrote:
> >
> > > Then there is a big bug here because I have a multi-module project with
> a
> > > few modules, the dependent one was built first (as seen in the build
> log)
> > > but yet when the depending module was built it did NOT use the
> dependent
> > > build rather it went to the repo and downloaded the previously deployed
> > > artifact snapshot.
> > >
> > > -Dave
> > >
> > > On Thu, Apr 16, 2009 at 10:24 AM, Todd Thiessen <th...@nortel.com>
> > > wrote:
> > >
> > > > FYI. Here is one reference,
> > > >
> > > > http://maven.apache.org/pom.html#Aggregation
> > > >
> > > > ---
> > > > Todd Thiessen
> > > >
> > > >
> > > > > -----Original Message-----
> > > > > From: David Hoffer [mailto:dhoffer6@gmail.com]
> > > > > Sent: Thursday, April 16, 2009 11:46 AM
> > > > > To: Maven Users List
> > > > > Subject: Re: Multi-module build is not building with current
> > > > > module source code
> > > > >
> > > > > Then I'm understanding the order of the reactor wrong.  I
> > > > > assumed its top to bottom, that is...just before internal is
> > > > > built...public is built; and just before security-public is
> > > > > built...internal is built.
> > > > >
> > > > > Can you clarify the order?
> > > > >
> > > > > -Dave
> > > > >
> > > > > On Thu, Apr 16, 2009 at 9:39 AM, Nick Stolwijk
> > > > > <ni...@gmail.com>wrote:
> > > > >
> > > > > > Maven always takes the artifacts out of the local
> > > > > repository. However,
> > > > > > this is not a problem, because the reactor knows in which order
> to
> > > > > > built the projects. Just before your internal project is
> > > > > built, maven
> > > > > > has installed the most recent version of security-public in
> > > > > the local
> > > > > > repository.
> > > > > >
> > > > > > Maybe I don't understand your problem. If that is the case,
> > > > > please clarify.
> > > > > >
> > > > > > Hth,
> > > > > >
> > > > > > Nick Stolwijk
> > > > > > ~Java Developer~
> > > > > >
> > > > > > Iprofs BV.
> > > > > > Claus Sluterweg 125
> > > > > > 2012 WS Haarlem
> > > > > > www.iprofs.nl
> > > > > >
> > > > > >
> > > > > >
> > > > > > On Thu, Apr 16, 2009 at 5:26 PM, Dmitry Skavish
> > > > > <sk...@gmail.com> wrote:
> > > > > > > I am having the same problem and would like to know that
> > > > > as well. Thanks!
> > > > > > >
> > > > > > > On Thu, Apr 16, 2009 at 10:19 AM, David Hoffer
> > > > > <dh...@gmail.com>
> > > > > > wrote:
> > > > > > >
> > > > > > >> I have a multi-module build where some modules are dependent
> on
> > > > > > >> other modules.  What is happening is that the dependent
> > > > > module is
> > > > > > >> getting its dependency from the local/corporate maven
> > > > > repo instead
> > > > > > >> of the source
> > > > > > code
> > > > > > >> that was just built.  How do I specify that modules always
> build
> > > > > > >> using current source not prior built snapshot jars?
> > > > > > >>
> > > > > > >> Here is an example of the problem (it is really simple)
> > > > > > >>
> > > > > > >> Parent pom:
> > > > > > >> <version>0.1-SNAPSHOT</version>
> > > > > > >> <modules>
> > > > > > >>        <module>public</module>
> > > > > > >>        <module>internal</module>
> > > > > > >>        <module>security-public</module> </modules>
> > > > > > >>
> > > > > > >> public pom:
> > > > > > >> <version>0.1-SNAPSHOT</version>
> > > > > > >>
> > > > > > >> internal pom:
> > > > > > >> <dependencies>
> > > > > > >>        <dependency>
> > > > > > >>            <groupId>${project.groupId}</groupId>
> > > > > > >>            <artifactId>public</artifactId>
> > > > > > >>            <version>0.1-SNAPSHOT</version>
> > > > > > >>        </dependency>
> > > > > > >> </dependencies>
> > > > > > >>
> > > > > > >> security-public:
> > > > > > >> <dependency>
> > > > > > >>            <groupId>${project.groupId}</groupId>
> > > > > > >>            <artifactId>public</artifactId>
> > > > > > >>            <version>0.1-SNAPSHOT</version> </dependency>
> > > > > > >>
> > > > > > >> So what is happening is that instead of internal  &
> > > > > security-public
> > > > > > >> building using the just built public (note it is first so it
> was
> > > > > > >> built first)
> > > > > > they
> > > > > > >> go
> > > > > > >> out and download the last deployed snapshot and build using
> that
> > > > > > instead.
> > > > > > >>
> > > > > > >> Nothing in the pom dependency syntax really says which
> > > > > to use but I
> > > > > > assumed
> > > > > > >> that because maven 'knows' these are all in the reactor it
> would
> > > > > > >> use
> > > > > > module
> > > > > > >> source.  However this doesn't seem to work, what do I
> > > > > need to do to
> > > > > > >> fix this?
> > > > > > >>
> > > > > > >> BTW, the goals being run are 'clean deploy site-deploy'
> > > > > > >>
> > > > > > >> -Dave
> > > > > > >>
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > --
> > > > > > > Dmitry Skavish
> > > > > > >
> > > > > >
> > > > > >
> > > > >
> ---------------------------------------------------------------------
> > > > > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > > > > > For additional commands, e-mail: users-help@maven.apache.org
> > > > > >
> > > > > >
> > > > >
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > > > For additional commands, e-mail: users-help@maven.apache.org
> > > >
> > > >
> > >
> >
> >
> >
> > --
> > Dmitry Skavish
> >
>

Re: Multi-module build is not building with current module source code

Posted by David Hoffer <dh...@gmail.com>.
Isn't that adding yet another plugin to do what maven is supposed to do out
of the box?  I'm concerned about the increase in complexity, when something
doesn't work is it maven or the incremental plugin?

-Dave

On Thu, Apr 16, 2009 at 10:37 AM, Dmitry Skavish <sk...@gmail.com> wrote:

> I asked the same question on OSGi maillist and they advised me to use
> incremental-build plugin: https://maven-incremental-build.dev.java.net/I
> does exactly what I need, check it out, it could solve your problem as
> well.
>
> On Thu, Apr 16, 2009 at 12:33 PM, David Hoffer <dh...@gmail.com> wrote:
>
> > Then there is a big bug here because I have a multi-module project with a
> > few modules, the dependent one was built first (as seen in the build log)
> > but yet when the depending module was built it did NOT use the dependent
> > build rather it went to the repo and downloaded the previously deployed
> > artifact snapshot.
> >
> > -Dave
> >
> > On Thu, Apr 16, 2009 at 10:24 AM, Todd Thiessen <th...@nortel.com>
> > wrote:
> >
> > > FYI. Here is one reference,
> > >
> > > http://maven.apache.org/pom.html#Aggregation
> > >
> > > ---
> > > Todd Thiessen
> > >
> > >
> > > > -----Original Message-----
> > > > From: David Hoffer [mailto:dhoffer6@gmail.com]
> > > > Sent: Thursday, April 16, 2009 11:46 AM
> > > > To: Maven Users List
> > > > Subject: Re: Multi-module build is not building with current
> > > > module source code
> > > >
> > > > Then I'm understanding the order of the reactor wrong.  I
> > > > assumed its top to bottom, that is...just before internal is
> > > > built...public is built; and just before security-public is
> > > > built...internal is built.
> > > >
> > > > Can you clarify the order?
> > > >
> > > > -Dave
> > > >
> > > > On Thu, Apr 16, 2009 at 9:39 AM, Nick Stolwijk
> > > > <ni...@gmail.com>wrote:
> > > >
> > > > > Maven always takes the artifacts out of the local
> > > > repository. However,
> > > > > this is not a problem, because the reactor knows in which order to
> > > > > built the projects. Just before your internal project is
> > > > built, maven
> > > > > has installed the most recent version of security-public in
> > > > the local
> > > > > repository.
> > > > >
> > > > > Maybe I don't understand your problem. If that is the case,
> > > > please clarify.
> > > > >
> > > > > Hth,
> > > > >
> > > > > Nick Stolwijk
> > > > > ~Java Developer~
> > > > >
> > > > > Iprofs BV.
> > > > > Claus Sluterweg 125
> > > > > 2012 WS Haarlem
> > > > > www.iprofs.nl
> > > > >
> > > > >
> > > > >
> > > > > On Thu, Apr 16, 2009 at 5:26 PM, Dmitry Skavish
> > > > <sk...@gmail.com> wrote:
> > > > > > I am having the same problem and would like to know that
> > > > as well. Thanks!
> > > > > >
> > > > > > On Thu, Apr 16, 2009 at 10:19 AM, David Hoffer
> > > > <dh...@gmail.com>
> > > > > wrote:
> > > > > >
> > > > > >> I have a multi-module build where some modules are dependent on
> > > > > >> other modules.  What is happening is that the dependent
> > > > module is
> > > > > >> getting its dependency from the local/corporate maven
> > > > repo instead
> > > > > >> of the source
> > > > > code
> > > > > >> that was just built.  How do I specify that modules always build
> > > > > >> using current source not prior built snapshot jars?
> > > > > >>
> > > > > >> Here is an example of the problem (it is really simple)
> > > > > >>
> > > > > >> Parent pom:
> > > > > >> <version>0.1-SNAPSHOT</version>
> > > > > >> <modules>
> > > > > >>        <module>public</module>
> > > > > >>        <module>internal</module>
> > > > > >>        <module>security-public</module> </modules>
> > > > > >>
> > > > > >> public pom:
> > > > > >> <version>0.1-SNAPSHOT</version>
> > > > > >>
> > > > > >> internal pom:
> > > > > >> <dependencies>
> > > > > >>        <dependency>
> > > > > >>            <groupId>${project.groupId}</groupId>
> > > > > >>            <artifactId>public</artifactId>
> > > > > >>            <version>0.1-SNAPSHOT</version>
> > > > > >>        </dependency>
> > > > > >> </dependencies>
> > > > > >>
> > > > > >> security-public:
> > > > > >> <dependency>
> > > > > >>            <groupId>${project.groupId}</groupId>
> > > > > >>            <artifactId>public</artifactId>
> > > > > >>            <version>0.1-SNAPSHOT</version> </dependency>
> > > > > >>
> > > > > >> So what is happening is that instead of internal  &
> > > > security-public
> > > > > >> building using the just built public (note it is first so it was
> > > > > >> built first)
> > > > > they
> > > > > >> go
> > > > > >> out and download the last deployed snapshot and build using that
> > > > > instead.
> > > > > >>
> > > > > >> Nothing in the pom dependency syntax really says which
> > > > to use but I
> > > > > assumed
> > > > > >> that because maven 'knows' these are all in the reactor it would
> > > > > >> use
> > > > > module
> > > > > >> source.  However this doesn't seem to work, what do I
> > > > need to do to
> > > > > >> fix this?
> > > > > >>
> > > > > >> BTW, the goals being run are 'clean deploy site-deploy'
> > > > > >>
> > > > > >> -Dave
> > > > > >>
> > > > > >
> > > > > >
> > > > > >
> > > > > > --
> > > > > > Dmitry Skavish
> > > > > >
> > > > >
> > > > >
> > > > ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > > > > For additional commands, e-mail: users-help@maven.apache.org
> > > > >
> > > > >
> > > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > > For additional commands, e-mail: users-help@maven.apache.org
> > >
> > >
> >
>
>
>
> --
> Dmitry Skavish
>

Re: Multi-module build is not building with current module source code

Posted by Dmitry Skavish <sk...@gmail.com>.
I asked the same question on OSGi maillist and they advised me to use
incremental-build plugin: https://maven-incremental-build.dev.java.net/I
does exactly what I need, check it out, it could solve your problem as
well.

On Thu, Apr 16, 2009 at 12:33 PM, David Hoffer <dh...@gmail.com> wrote:

> Then there is a big bug here because I have a multi-module project with a
> few modules, the dependent one was built first (as seen in the build log)
> but yet when the depending module was built it did NOT use the dependent
> build rather it went to the repo and downloaded the previously deployed
> artifact snapshot.
>
> -Dave
>
> On Thu, Apr 16, 2009 at 10:24 AM, Todd Thiessen <th...@nortel.com>
> wrote:
>
> > FYI. Here is one reference,
> >
> > http://maven.apache.org/pom.html#Aggregation
> >
> > ---
> > Todd Thiessen
> >
> >
> > > -----Original Message-----
> > > From: David Hoffer [mailto:dhoffer6@gmail.com]
> > > Sent: Thursday, April 16, 2009 11:46 AM
> > > To: Maven Users List
> > > Subject: Re: Multi-module build is not building with current
> > > module source code
> > >
> > > Then I'm understanding the order of the reactor wrong.  I
> > > assumed its top to bottom, that is...just before internal is
> > > built...public is built; and just before security-public is
> > > built...internal is built.
> > >
> > > Can you clarify the order?
> > >
> > > -Dave
> > >
> > > On Thu, Apr 16, 2009 at 9:39 AM, Nick Stolwijk
> > > <ni...@gmail.com>wrote:
> > >
> > > > Maven always takes the artifacts out of the local
> > > repository. However,
> > > > this is not a problem, because the reactor knows in which order to
> > > > built the projects. Just before your internal project is
> > > built, maven
> > > > has installed the most recent version of security-public in
> > > the local
> > > > repository.
> > > >
> > > > Maybe I don't understand your problem. If that is the case,
> > > please clarify.
> > > >
> > > > Hth,
> > > >
> > > > Nick Stolwijk
> > > > ~Java Developer~
> > > >
> > > > Iprofs BV.
> > > > Claus Sluterweg 125
> > > > 2012 WS Haarlem
> > > > www.iprofs.nl
> > > >
> > > >
> > > >
> > > > On Thu, Apr 16, 2009 at 5:26 PM, Dmitry Skavish
> > > <sk...@gmail.com> wrote:
> > > > > I am having the same problem and would like to know that
> > > as well. Thanks!
> > > > >
> > > > > On Thu, Apr 16, 2009 at 10:19 AM, David Hoffer
> > > <dh...@gmail.com>
> > > > wrote:
> > > > >
> > > > >> I have a multi-module build where some modules are dependent on
> > > > >> other modules.  What is happening is that the dependent
> > > module is
> > > > >> getting its dependency from the local/corporate maven
> > > repo instead
> > > > >> of the source
> > > > code
> > > > >> that was just built.  How do I specify that modules always build
> > > > >> using current source not prior built snapshot jars?
> > > > >>
> > > > >> Here is an example of the problem (it is really simple)
> > > > >>
> > > > >> Parent pom:
> > > > >> <version>0.1-SNAPSHOT</version>
> > > > >> <modules>
> > > > >>        <module>public</module>
> > > > >>        <module>internal</module>
> > > > >>        <module>security-public</module> </modules>
> > > > >>
> > > > >> public pom:
> > > > >> <version>0.1-SNAPSHOT</version>
> > > > >>
> > > > >> internal pom:
> > > > >> <dependencies>
> > > > >>        <dependency>
> > > > >>            <groupId>${project.groupId}</groupId>
> > > > >>            <artifactId>public</artifactId>
> > > > >>            <version>0.1-SNAPSHOT</version>
> > > > >>        </dependency>
> > > > >> </dependencies>
> > > > >>
> > > > >> security-public:
> > > > >> <dependency>
> > > > >>            <groupId>${project.groupId}</groupId>
> > > > >>            <artifactId>public</artifactId>
> > > > >>            <version>0.1-SNAPSHOT</version> </dependency>
> > > > >>
> > > > >> So what is happening is that instead of internal  &
> > > security-public
> > > > >> building using the just built public (note it is first so it was
> > > > >> built first)
> > > > they
> > > > >> go
> > > > >> out and download the last deployed snapshot and build using that
> > > > instead.
> > > > >>
> > > > >> Nothing in the pom dependency syntax really says which
> > > to use but I
> > > > assumed
> > > > >> that because maven 'knows' these are all in the reactor it would
> > > > >> use
> > > > module
> > > > >> source.  However this doesn't seem to work, what do I
> > > need to do to
> > > > >> fix this?
> > > > >>
> > > > >> BTW, the goals being run are 'clean deploy site-deploy'
> > > > >>
> > > > >> -Dave
> > > > >>
> > > > >
> > > > >
> > > > >
> > > > > --
> > > > > Dmitry Skavish
> > > > >
> > > >
> > > >
> > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > > > For additional commands, e-mail: users-help@maven.apache.org
> > > >
> > > >
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
>



-- 
Dmitry Skavish

Re: Multi-module build is not building with current module source code

Posted by David Hoffer <dh...@gmail.com>.
Then there is a big bug here because I have a multi-module project with a
few modules, the dependent one was built first (as seen in the build log)
but yet when the depending module was built it did NOT use the dependent
build rather it went to the repo and downloaded the previously deployed
artifact snapshot.

-Dave

On Thu, Apr 16, 2009 at 10:24 AM, Todd Thiessen <th...@nortel.com> wrote:

> FYI. Here is one reference,
>
> http://maven.apache.org/pom.html#Aggregation
>
> ---
> Todd Thiessen
>
>
> > -----Original Message-----
> > From: David Hoffer [mailto:dhoffer6@gmail.com]
> > Sent: Thursday, April 16, 2009 11:46 AM
> > To: Maven Users List
> > Subject: Re: Multi-module build is not building with current
> > module source code
> >
> > Then I'm understanding the order of the reactor wrong.  I
> > assumed its top to bottom, that is...just before internal is
> > built...public is built; and just before security-public is
> > built...internal is built.
> >
> > Can you clarify the order?
> >
> > -Dave
> >
> > On Thu, Apr 16, 2009 at 9:39 AM, Nick Stolwijk
> > <ni...@gmail.com>wrote:
> >
> > > Maven always takes the artifacts out of the local
> > repository. However,
> > > this is not a problem, because the reactor knows in which order to
> > > built the projects. Just before your internal project is
> > built, maven
> > > has installed the most recent version of security-public in
> > the local
> > > repository.
> > >
> > > Maybe I don't understand your problem. If that is the case,
> > please clarify.
> > >
> > > Hth,
> > >
> > > Nick Stolwijk
> > > ~Java Developer~
> > >
> > > Iprofs BV.
> > > Claus Sluterweg 125
> > > 2012 WS Haarlem
> > > www.iprofs.nl
> > >
> > >
> > >
> > > On Thu, Apr 16, 2009 at 5:26 PM, Dmitry Skavish
> > <sk...@gmail.com> wrote:
> > > > I am having the same problem and would like to know that
> > as well. Thanks!
> > > >
> > > > On Thu, Apr 16, 2009 at 10:19 AM, David Hoffer
> > <dh...@gmail.com>
> > > wrote:
> > > >
> > > >> I have a multi-module build where some modules are dependent on
> > > >> other modules.  What is happening is that the dependent
> > module is
> > > >> getting its dependency from the local/corporate maven
> > repo instead
> > > >> of the source
> > > code
> > > >> that was just built.  How do I specify that modules always build
> > > >> using current source not prior built snapshot jars?
> > > >>
> > > >> Here is an example of the problem (it is really simple)
> > > >>
> > > >> Parent pom:
> > > >> <version>0.1-SNAPSHOT</version>
> > > >> <modules>
> > > >>        <module>public</module>
> > > >>        <module>internal</module>
> > > >>        <module>security-public</module> </modules>
> > > >>
> > > >> public pom:
> > > >> <version>0.1-SNAPSHOT</version>
> > > >>
> > > >> internal pom:
> > > >> <dependencies>
> > > >>        <dependency>
> > > >>            <groupId>${project.groupId}</groupId>
> > > >>            <artifactId>public</artifactId>
> > > >>            <version>0.1-SNAPSHOT</version>
> > > >>        </dependency>
> > > >> </dependencies>
> > > >>
> > > >> security-public:
> > > >> <dependency>
> > > >>            <groupId>${project.groupId}</groupId>
> > > >>            <artifactId>public</artifactId>
> > > >>            <version>0.1-SNAPSHOT</version> </dependency>
> > > >>
> > > >> So what is happening is that instead of internal  &
> > security-public
> > > >> building using the just built public (note it is first so it was
> > > >> built first)
> > > they
> > > >> go
> > > >> out and download the last deployed snapshot and build using that
> > > instead.
> > > >>
> > > >> Nothing in the pom dependency syntax really says which
> > to use but I
> > > assumed
> > > >> that because maven 'knows' these are all in the reactor it would
> > > >> use
> > > module
> > > >> source.  However this doesn't seem to work, what do I
> > need to do to
> > > >> fix this?
> > > >>
> > > >> BTW, the goals being run are 'clean deploy site-deploy'
> > > >>
> > > >> -Dave
> > > >>
> > > >
> > > >
> > > >
> > > > --
> > > > Dmitry Skavish
> > > >
> > >
> > >
> > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > > For additional commands, e-mail: users-help@maven.apache.org
> > >
> > >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

RE: Multi-module build is not building with current module source code

Posted by Todd Thiessen <th...@nortel.com>.
FYI. Here is one reference,

http://maven.apache.org/pom.html#Aggregation

---
Todd Thiessen
 

> -----Original Message-----
> From: David Hoffer [mailto:dhoffer6@gmail.com] 
> Sent: Thursday, April 16, 2009 11:46 AM
> To: Maven Users List
> Subject: Re: Multi-module build is not building with current 
> module source code
> 
> Then I'm understanding the order of the reactor wrong.  I 
> assumed its top to bottom, that is...just before internal is 
> built...public is built; and just before security-public is 
> built...internal is built.
> 
> Can you clarify the order?
> 
> -Dave
> 
> On Thu, Apr 16, 2009 at 9:39 AM, Nick Stolwijk 
> <ni...@gmail.com>wrote:
> 
> > Maven always takes the artifacts out of the local 
> repository. However, 
> > this is not a problem, because the reactor knows in which order to 
> > built the projects. Just before your internal project is 
> built, maven 
> > has installed the most recent version of security-public in 
> the local 
> > repository.
> >
> > Maybe I don't understand your problem. If that is the case, 
> please clarify.
> >
> > Hth,
> >
> > Nick Stolwijk
> > ~Java Developer~
> >
> > Iprofs BV.
> > Claus Sluterweg 125
> > 2012 WS Haarlem
> > www.iprofs.nl
> >
> >
> >
> > On Thu, Apr 16, 2009 at 5:26 PM, Dmitry Skavish 
> <sk...@gmail.com> wrote:
> > > I am having the same problem and would like to know that 
> as well. Thanks!
> > >
> > > On Thu, Apr 16, 2009 at 10:19 AM, David Hoffer 
> <dh...@gmail.com>
> > wrote:
> > >
> > >> I have a multi-module build where some modules are dependent on 
> > >> other modules.  What is happening is that the dependent 
> module is 
> > >> getting its dependency from the local/corporate maven 
> repo instead 
> > >> of the source
> > code
> > >> that was just built.  How do I specify that modules always build 
> > >> using current source not prior built snapshot jars?
> > >>
> > >> Here is an example of the problem (it is really simple)
> > >>
> > >> Parent pom:
> > >> <version>0.1-SNAPSHOT</version>
> > >> <modules>
> > >>        <module>public</module>
> > >>        <module>internal</module>
> > >>        <module>security-public</module> </modules>
> > >>
> > >> public pom:
> > >> <version>0.1-SNAPSHOT</version>
> > >>
> > >> internal pom:
> > >> <dependencies>
> > >>        <dependency>
> > >>            <groupId>${project.groupId}</groupId>
> > >>            <artifactId>public</artifactId>
> > >>            <version>0.1-SNAPSHOT</version>
> > >>        </dependency>
> > >> </dependencies>
> > >>
> > >> security-public:
> > >> <dependency>
> > >>            <groupId>${project.groupId}</groupId>
> > >>            <artifactId>public</artifactId>
> > >>            <version>0.1-SNAPSHOT</version> </dependency>
> > >>
> > >> So what is happening is that instead of internal  & 
> security-public 
> > >> building using the just built public (note it is first so it was 
> > >> built first)
> > they
> > >> go
> > >> out and download the last deployed snapshot and build using that
> > instead.
> > >>
> > >> Nothing in the pom dependency syntax really says which 
> to use but I
> > assumed
> > >> that because maven 'knows' these are all in the reactor it would 
> > >> use
> > module
> > >> source.  However this doesn't seem to work, what do I 
> need to do to 
> > >> fix this?
> > >>
> > >> BTW, the goals being run are 'clean deploy site-deploy'
> > >>
> > >> -Dave
> > >>
> > >
> > >
> > >
> > > --
> > > Dmitry Skavish
> > >
> >
> > 
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
> 

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


RE: Multi-module build is not building with current module source code

Posted by Todd Thiessen <th...@nortel.com>.
The order in the parent pom is not the order in the reactor. The reactor
is aware of module interdependencies and ensures that if A depends on B,
then B gets built first.

---
Todd Thiessen
 

> -----Original Message-----
> From: David Hoffer [mailto:dhoffer6@gmail.com] 
> Sent: Thursday, April 16, 2009 11:46 AM
> To: Maven Users List
> Subject: Re: Multi-module build is not building with current 
> module source code
> 
> Then I'm understanding the order of the reactor wrong.  I 
> assumed its top to bottom, that is...just before internal is 
> built...public is built; and just before security-public is 
> built...internal is built.
> 
> Can you clarify the order?
> 
> -Dave
> 
> On Thu, Apr 16, 2009 at 9:39 AM, Nick Stolwijk 
> <ni...@gmail.com>wrote:
> 
> > Maven always takes the artifacts out of the local 
> repository. However, 
> > this is not a problem, because the reactor knows in which order to 
> > built the projects. Just before your internal project is 
> built, maven 
> > has installed the most recent version of security-public in 
> the local 
> > repository.
> >
> > Maybe I don't understand your problem. If that is the case, 
> please clarify.
> >
> > Hth,
> >
> > Nick Stolwijk
> > ~Java Developer~
> >
> > Iprofs BV.
> > Claus Sluterweg 125
> > 2012 WS Haarlem
> > www.iprofs.nl
> >
> >
> >
> > On Thu, Apr 16, 2009 at 5:26 PM, Dmitry Skavish 
> <sk...@gmail.com> wrote:
> > > I am having the same problem and would like to know that 
> as well. Thanks!
> > >
> > > On Thu, Apr 16, 2009 at 10:19 AM, David Hoffer 
> <dh...@gmail.com>
> > wrote:
> > >
> > >> I have a multi-module build where some modules are dependent on 
> > >> other modules.  What is happening is that the dependent 
> module is 
> > >> getting its dependency from the local/corporate maven 
> repo instead 
> > >> of the source
> > code
> > >> that was just built.  How do I specify that modules always build 
> > >> using current source not prior built snapshot jars?
> > >>
> > >> Here is an example of the problem (it is really simple)
> > >>
> > >> Parent pom:
> > >> <version>0.1-SNAPSHOT</version>
> > >> <modules>
> > >>        <module>public</module>
> > >>        <module>internal</module>
> > >>        <module>security-public</module> </modules>
> > >>
> > >> public pom:
> > >> <version>0.1-SNAPSHOT</version>
> > >>
> > >> internal pom:
> > >> <dependencies>
> > >>        <dependency>
> > >>            <groupId>${project.groupId}</groupId>
> > >>            <artifactId>public</artifactId>
> > >>            <version>0.1-SNAPSHOT</version>
> > >>        </dependency>
> > >> </dependencies>
> > >>
> > >> security-public:
> > >> <dependency>
> > >>            <groupId>${project.groupId}</groupId>
> > >>            <artifactId>public</artifactId>
> > >>            <version>0.1-SNAPSHOT</version> </dependency>
> > >>
> > >> So what is happening is that instead of internal  & 
> security-public 
> > >> building using the just built public (note it is first so it was 
> > >> built first)
> > they
> > >> go
> > >> out and download the last deployed snapshot and build using that
> > instead.
> > >>
> > >> Nothing in the pom dependency syntax really says which 
> to use but I
> > assumed
> > >> that because maven 'knows' these are all in the reactor it would 
> > >> use
> > module
> > >> source.  However this doesn't seem to work, what do I 
> need to do to 
> > >> fix this?
> > >>
> > >> BTW, the goals being run are 'clean deploy site-deploy'
> > >>
> > >> -Dave
> > >>
> > >
> > >
> > >
> > > --
> > > Dmitry Skavish
> > >
> >
> > 
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
> 

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


Re: Multi-module build is not building with current module source code

Posted by David Hoffer <dh...@gmail.com>.
Then I'm understanding the order of the reactor wrong.  I assumed its top to
bottom, that is...just before internal is built...public is built; and just
before security-public is built...internal is built.

Can you clarify the order?

-Dave

On Thu, Apr 16, 2009 at 9:39 AM, Nick Stolwijk <ni...@gmail.com>wrote:

> Maven always takes the artifacts out of the local repository. However,
> this is not a problem, because the reactor knows in which order to
> built the projects. Just before your internal project is built, maven
> has installed the most recent version of security-public in the local
> repository.
>
> Maybe I don't understand your problem. If that is the case, please clarify.
>
> Hth,
>
> Nick Stolwijk
> ~Java Developer~
>
> Iprofs BV.
> Claus Sluterweg 125
> 2012 WS Haarlem
> www.iprofs.nl
>
>
>
> On Thu, Apr 16, 2009 at 5:26 PM, Dmitry Skavish <sk...@gmail.com> wrote:
> > I am having the same problem and would like to know that as well. Thanks!
> >
> > On Thu, Apr 16, 2009 at 10:19 AM, David Hoffer <dh...@gmail.com>
> wrote:
> >
> >> I have a multi-module build where some modules are dependent on other
> >> modules.  What is happening is that the dependent module is getting its
> >> dependency from the local/corporate maven repo instead of the source
> code
> >> that was just built.  How do I specify that modules always build using
> >> current source not prior built snapshot jars?
> >>
> >> Here is an example of the problem (it is really simple)
> >>
> >> Parent pom:
> >> <version>0.1-SNAPSHOT</version>
> >> <modules>
> >>        <module>public</module>
> >>        <module>internal</module>
> >>        <module>security-public</module>
> >> </modules>
> >>
> >> public pom:
> >> <version>0.1-SNAPSHOT</version>
> >>
> >> internal pom:
> >> <dependencies>
> >>        <dependency>
> >>            <groupId>${project.groupId}</groupId>
> >>            <artifactId>public</artifactId>
> >>            <version>0.1-SNAPSHOT</version>
> >>        </dependency>
> >> </dependencies>
> >>
> >> security-public:
> >> <dependency>
> >>            <groupId>${project.groupId}</groupId>
> >>            <artifactId>public</artifactId>
> >>            <version>0.1-SNAPSHOT</version>
> >> </dependency>
> >>
> >> So what is happening is that instead of internal  & security-public
> >> building
> >> using the just built public (note it is first so it was built first)
> they
> >> go
> >> out and download the last deployed snapshot and build using that
> instead.
> >>
> >> Nothing in the pom dependency syntax really says which to use but I
> assumed
> >> that because maven 'knows' these are all in the reactor it would use
> module
> >> source.  However this doesn't seem to work, what do I need to do to fix
> >> this?
> >>
> >> BTW, the goals being run are 'clean deploy site-deploy'
> >>
> >> -Dave
> >>
> >
> >
> >
> > --
> > Dmitry Skavish
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: Multi-module build is not building with current module source code

Posted by Nick Stolwijk <ni...@gmail.com>.
Maven always takes the artifacts out of the local repository. However,
this is not a problem, because the reactor knows in which order to
built the projects. Just before your internal project is built, maven
has installed the most recent version of security-public in the local
repository.

Maybe I don't understand your problem. If that is the case, please clarify.

Hth,

Nick Stolwijk
~Java Developer~

Iprofs BV.
Claus Sluterweg 125
2012 WS Haarlem
www.iprofs.nl



On Thu, Apr 16, 2009 at 5:26 PM, Dmitry Skavish <sk...@gmail.com> wrote:
> I am having the same problem and would like to know that as well. Thanks!
>
> On Thu, Apr 16, 2009 at 10:19 AM, David Hoffer <dh...@gmail.com> wrote:
>
>> I have a multi-module build where some modules are dependent on other
>> modules.  What is happening is that the dependent module is getting its
>> dependency from the local/corporate maven repo instead of the source code
>> that was just built.  How do I specify that modules always build using
>> current source not prior built snapshot jars?
>>
>> Here is an example of the problem (it is really simple)
>>
>> Parent pom:
>> <version>0.1-SNAPSHOT</version>
>> <modules>
>>        <module>public</module>
>>        <module>internal</module>
>>        <module>security-public</module>
>> </modules>
>>
>> public pom:
>> <version>0.1-SNAPSHOT</version>
>>
>> internal pom:
>> <dependencies>
>>        <dependency>
>>            <groupId>${project.groupId}</groupId>
>>            <artifactId>public</artifactId>
>>            <version>0.1-SNAPSHOT</version>
>>        </dependency>
>> </dependencies>
>>
>> security-public:
>> <dependency>
>>            <groupId>${project.groupId}</groupId>
>>            <artifactId>public</artifactId>
>>            <version>0.1-SNAPSHOT</version>
>> </dependency>
>>
>> So what is happening is that instead of internal  & security-public
>> building
>> using the just built public (note it is first so it was built first) they
>> go
>> out and download the last deployed snapshot and build using that instead.
>>
>> Nothing in the pom dependency syntax really says which to use but I assumed
>> that because maven 'knows' these are all in the reactor it would use module
>> source.  However this doesn't seem to work, what do I need to do to fix
>> this?
>>
>> BTW, the goals being run are 'clean deploy site-deploy'
>>
>> -Dave
>>
>
>
>
> --
> Dmitry Skavish
>

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


Re: Multi-module build is not building with current module source code

Posted by Dmitry Skavish <sk...@gmail.com>.
I am having the same problem and would like to know that as well. Thanks!

On Thu, Apr 16, 2009 at 10:19 AM, David Hoffer <dh...@gmail.com> wrote:

> I have a multi-module build where some modules are dependent on other
> modules.  What is happening is that the dependent module is getting its
> dependency from the local/corporate maven repo instead of the source code
> that was just built.  How do I specify that modules always build using
> current source not prior built snapshot jars?
>
> Here is an example of the problem (it is really simple)
>
> Parent pom:
> <version>0.1-SNAPSHOT</version>
> <modules>
>        <module>public</module>
>        <module>internal</module>
>        <module>security-public</module>
> </modules>
>
> public pom:
> <version>0.1-SNAPSHOT</version>
>
> internal pom:
> <dependencies>
>        <dependency>
>            <groupId>${project.groupId}</groupId>
>            <artifactId>public</artifactId>
>            <version>0.1-SNAPSHOT</version>
>        </dependency>
> </dependencies>
>
> security-public:
> <dependency>
>            <groupId>${project.groupId}</groupId>
>            <artifactId>public</artifactId>
>            <version>0.1-SNAPSHOT</version>
> </dependency>
>
> So what is happening is that instead of internal  & security-public
> building
> using the just built public (note it is first so it was built first) they
> go
> out and download the last deployed snapshot and build using that instead.
>
> Nothing in the pom dependency syntax really says which to use but I assumed
> that because maven 'knows' these are all in the reactor it would use module
> source.  However this doesn't seem to work, what do I need to do to fix
> this?
>
> BTW, the goals being run are 'clean deploy site-deploy'
>
> -Dave
>



-- 
Dmitry Skavish