You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Marc Schneider <ma...@gmail.com> on 2008/08/12 15:31:28 UTC

POM and dependency downloading

Hi all,

There is something I don't understand.
In my maven repository, I have this POM file (Hibernate Search 3.1.O 
Beta) with :

         <dependency>
             <groupId>org.hibernate.apache.lucene.solr</groupId>
             <artifactId>apache-solr-analyzer</artifactId>
             <version>1.2.0</version>
             <optional>true</optional>
         </dependency>

When compiling the system complains that a class is missing.
This is because this class is in this artifact.

If I add this dependency directly in my project's POM file, the artifact 
  is downloaded and so it works.

But why do I have to add it manually ?

Thanks,
Marc.

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


Re: POM and dependency downloading

Posted by Nick Stolwijk <ni...@gmail.com>.
Hi marc,

Take a look at the Maven The Definitive Guide and especially the part about
optional dependencies. [1]

[1] http://www.sonatype.com/book/reference/pom-relationships.html#d0e8242

Hth,

Nick Stolwijk
~Java Developer~

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


On Tue, Aug 12, 2008 at 3:31 PM, Marc Schneider
<ma...@gmail.com>wrote:

> Hi all,
>
> There is something I don't understand.
> In my maven repository, I have this POM file (Hibernate Search 3.1.O Beta)
> with :
>
>        <dependency>
>            <groupId>org.hibernate.apache.lucene.solr</groupId>
>            <artifactId>apache-solr-analyzer</artifactId>
>            <version>1.2.0</version>
>            <optional>true</optional>
>        </dependency>
>
> When compiling the system complains that a class is missing.
> This is because this class is in this artifact.
>
> If I add this dependency directly in my project's POM file, the artifact
>  is downloaded and so it works.
>
> But why do I have to add it manually ?
>
> Thanks,
> Marc.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>