On 28 May 2011 07:09, Yucca Nel <[email protected]> wrote:
> Sorry, I will try be clearer... this:
> ================================
> <dependency>
>               <groupId>com.sun.faces</groupId>
>               <artifactId>jsf-api</artifactId>
>               <version>2.0.3</version>
>               <scope>compile</scope>
>           </dependency>
>           <dependency>
>               <groupId>com.sun.faces</groupId>
>               <artifactId>jsf-impl</artifactId>
>               <version>2.0.3</version>
>               <scope>compile</scope>
>           </dependency>
> ====================================
> Is not the same as this:
> ====================================
> <dependency>
>           <groupId>org.thejarbar</groupId>
>           <artifactId>hib-jsf-jta-dep</artifactId>
>           <type>pom</type>
>           <version>1.0</version>
>       </dependency>
> ===================================
> The pom project:
> ===================================
> <?xml version="1.0" encoding="UTF-8"?>
> <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/xsd/maven-4.0.0.xsd";>
>   <modelVersion>4.0.0</modelVersion>
>
>   <groupId>org.thejarbar</groupId>
>   <artifactId>facelets-dep</artifactId>
>   <version>1.0</version>
>   <packaging>pom</packaging>
>
>   <dependencyManagement>
>       <dependencies>
>           <dependency>
>               <groupId>com.sun.faces</groupId>
>               <artifactId>jsf-api</artifactId>
>               <version>2.0.3</version>
>               <scope>compile</scope>
>           </dependency>
>           <dependency>
>               <groupId>com.sun.faces</groupId>
>               <artifactId>jsf-impl</artifactId>
>               <version>2.0.3</version>
>               <scope>compile</scope>
>           </dependency>
>       </dependencies>
>   </dependencyManagement>
> </project>
> ================================
>
> I was under the impression that the two are identical?

You should add <scope>import</scope>. Just having the dependency means
it's available at compile time which is not of any help to you.

Note, though, that scope import is quite limited. It only works in the
dependencyManagement section. See
http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html.

Reply via email to