maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Jonsson <jonsson.tho...@gmail.com>
Subject Re: Compilation failure due to looking at installed artifact instead for in project
Date Wed, 09 Sep 2009 08:03:31 GMT
Hi!

No, I'm buiding from project root.
I just tested with Maven 2.0.10 with no compilation failures. But if I
remove the core articfact from local repo it complains about it's
missing.

/Thomas


2009/9/9 Anders Hammar <anders@hammar.net>:
> I guess you're building from the 'integration' project, not the aggregating
> project (ejbs)?
> If that's the case, your scenario is the expected way for it to work. Your
> dependency is to an artifact (the built jar), not a Maven project on your
> local disk. So you need to build the core project first. If you build from
> the aggregating project it will be handled correctly. Or you use some tool
> to help you (m2eclipse).
> If you find yourself updating updating two different projects, then your
> separation might not be right.
>
> /Anders
>
> On Wed, Sep 9, 2009 at 09:17, Thomas Jonsson <jonsson.thomas@gmail.com>wrote:
>
>> Hi!
>>
>> I was just wondering if have misunderstood the basics of Maven and
>> dependencies.
>> I have a project according to this structure:
>>
>> ear
>> ejbs
>>   core
>>   integration
>> webapps
>>   webapp
>>
>> integration is dependent on core.
>>
>> from pom in integration.xml:
>> <dependency>
>>        <groupId>com.jf.application.ejbs</groupId>
>>        <artifactId>core</artifactId>
>>        <version>${pom.version}</version>
>>        <scope>compile</scope>
>> </dependency>
>>
>> pom in ejbs:
>>
>> <project xmlns="http://maven.apache.org/POM/4.0.0"
>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
>> http://maven.apache.org/maven-v4_0_0.xsd">
>>   <modelVersion>4.0.0</modelVersion>
>>   <groupId>com.jf.application</groupId>
>>   <artifactId>ejbs</artifactId>
>>   <packaging>pom</packaging>
>>   <name>ejbs</name>
>>   <parent>
>>      <groupId>com.jf</groupId>
>>      <artifactId>application</artifactId>
>>      <version>2010v-SNAPSHOT</version>
>>   </parent>
>>
>>   <modules>
>>      <module>core</module>
>>      <module>integration</module>
>>    </modules>
>> </project>
>>
>> When a run mvn clean:compile in the project root a I get a compilation
>> error saying that a method is missing. I recently added the method in
>> one of the classes in the core project. When I debug a see that the
>> classpath for core is the installed artifact in the local maven repo
>> and not the classpath to core in the project. Should it be this way?
>> I think it seems silly that I have to install the core artifact first.
>>
>> I'm running Maven 2.2.1 on windows.
>>
>> Any ideas?
>>
>> Best regards,
>> Thomas
>>
>> ---------------------------------------------------------------------
>> 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


Mime
View raw message