What you said is correct. After creating the archive for the project, maven sets the project as resolved and sets the created archive (the archive created by jar, war, etc) to the coressponding MavenProject->Artifact.

However, what's being passed into the classpath of module 2 is the location of the Module 1 jar and so the cache (if there is one) should not affect the compiler... so I really can't explain what happened. You might want to create a jira issue for this if none exists yet.



Paul Hepworth wrote:

Hi

I'm getting some strange behaviour when trying to compile and install my
projects. Here's my situation...

Parent POM with definitions for 2 sub-modules:

   - Module 1: Uses the antrun plugin to hook into the integration-test
phase to compile our xml schema into XmlBeans jar using Weblogic 8.1
SP4's xbean.jar (This compiles over the top of the jar that Maven
creates)
   - Module 2: Plain jar project that depends on Module 1.

If I run mvn clean install on Module 1 and then on Module 2, everything
is fine. However, if I run mvn clean install on the parent POM I get
compilation problems with Module 2 as it can't find Module 1 classes
(Module 1 is being compiled successfully first).

Either way, the compiled Module 1 gets put into the repository as
expected, but doesn't seem to get used by Maven in the compilation of
Module 2.

My thinking is that Maven keeps a cached version of compiled jar files
and doesn't look them up in the repository when compiling a series of
sub modules.

Can anyone shed some light on this??

Thanks
Paul



This message should be regarded as confidential. If you have received this 
email in error please notify the sender and destroy it immediately.
Statements of intent shall only become binding when confirmed in hard copy by 
an authorised signatory.  The contents of this email may relate to dealings 
with other companies within the Detica Group plc group of companies.

Detica Limited is registered in England under No: 1337451.

Registered offices: Surrey Research Park, Guildford, Surrey, GU2 7YP, England.




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to