Re: maven snapshot dependencies and recompilation

2009-09-28 Thread Daniel Bell
Comments below...


  Hi,
 
  My question is similar to this one:
 
  http://mail-archives.apache.org/mod_mbox/maven-users/200512.mbox/browser
 
  but for maven 2.0.9 - 2.2.1.
 
  I have two projects A and B. B is dependent upon A. A produces
  A-1.0-SNAPSHOT.jar.
 
  When a change is introduced into A and the new snapshot is installed
  into the local repository, B is not fully recompiled unless clean is
  specified when building B. This means that if an interface is changed in
  A, B will not be recompiled against the changed interface.
 
  Is there something wrong with my configuration? If not, what is accepted
  practice? Manually doing a clean whenever a change in snapshot is
  detected seems inefficient and error-prone.
 
 mvn clean compile  -- maven will do clean operaion before the comile


I understand that mvn clean compile will do what is required. However,
this means that whenever there is the possibility of snapshots being
updated (ie. mvn -U or manual compilation of a dependent project) that
the clean target should be invoked. I was hoping that maven would be
intelligent enough to determine that a dependent jar had changed and be
able to automatically do a clean. Is this not possible?

Thanks,
Dan.


maven snapshot dependencies and recompilation

2009-09-25 Thread Daniel Bell
Hi,

My question is similar to this one: 

http://mail-archives.apache.org/mod_mbox/maven-users/200512.mbox/browser

but for maven 2.0.9 - 2.2.1. 

I have two projects A and B. B is dependent upon A. A produces
A-1.0-SNAPSHOT.jar. 

When a change is introduced into A and the new snapshot is installed
into the local repository, B is not fully recompiled unless clean is
specified when building B. This means that if an interface is changed in
A, B will not be recompiled against the changed interface.

Is there something wrong with my configuration? If not, what is accepted
practice? Manually doing a clean whenever a change in snapshot is
detected seems inefficient and error-prone.

Thanks,
Daniel.


Re: maven snapshot dependencies and recompilation

2009-09-25 Thread maven apache
2009/9/25 Daniel Bell daniel.b...@nec.com.au

 Hi,

 My question is similar to this one:

 http://mail-archives.apache.org/mod_mbox/maven-users/200512.mbox/browser

 but for maven 2.0.9 - 2.2.1.

 I have two projects A and B. B is dependent upon A. A produces
 A-1.0-SNAPSHOT.jar.

 When a change is introduced into A and the new snapshot is installed
 into the local repository, B is not fully recompiled unless clean is
 specified when building B. This means that if an interface is changed in
 A, B will not be recompiled against the changed interface.

 Is there something wrong with my configuration? If not, what is accepted
 practice? Manually doing a clean whenever a change in snapshot is
 detected seems inefficient and error-prone.

mvn clean compile  -- maven will do clean operaion before the comile
Thanks,
Daniel.


maven snapshot dependencies and recompilation

2009-09-24 Thread Daniel Bell
Hi,

My question is similar to this one: 

http://mail-archives.apache.org/mod_mbox/maven-users/200512.mbox/browser

but for maven 2.0.9 - 2.2.1. 

I have two projects A and B. B is dependent upon A. A produces
A-1.0-SNAPSHOT.jar. 

When a change is introduced into A and the new snapshot is installed
into the local repository, B is not fully recompiled unless clean is
specified when building B. This means that if an interface is changed in
A, B will not be recompiled against the changed interface.

Is there something wrong with my configuration? If not, what is accepted
practice? Manually doing a clean whenever a change in snapshot is
detected seems inefficient and error-prone.

Thanks,
Daniel.


Maven snapshot dependencies and recompilation

2005-12-20 Thread Peter De Velder
Situation: project B depends on project A (snapshot jar)

When building B for the first time, it correctly downloads the latest
A-version-SNAPSHOT.jar
Building B a second time without making any changes to the B source files
(and without a maven clean first), correctly sees the B doesn't need to
be recompiled.

My question : If a new version of the A-version-SNAPSHOT.jar is detected in
the remote repository and downloaded during the build B process, it doesn't
seem to recompile B.  As a consequence possible compilation errors of B due
to a changed interface in A, remain  invisible until a full
recompile (= clean + compile) of B takes place, or the B-source files have
been changed  !  This is something we like to avoid, especially in our
continuous integration (cruisecontrol) process, without having to do a clean
first.

Did I miss something or do we need to code this behaviour ourselves
e.gusing the ant-dependset explicitly in our own plugin or
maven.xml, cleaning the target directory when A-version-SNAPSHOT.jar is more
recent then target/B-version-SNAPSHOT.jar  ?
(Yes, we are  still using maven 1.0.2.   Is maven 2 behaving differently ? )

Thanks in advance,
Peter