I refactored the dependency into a dependency management(all my dependencies), but I note that there is still going to be RException for the Faces Servlet as my IDE is already complaining that the Class is missing. It's no problem though as I can just revert to what works, but would be nice to have my own Majorra pom and an alternate MyFaces pom for the different types of containers.

Please inform (if you can) if this is an IDE or Maven issue?

-----Original Message----- From: Yucca Nel
Sent: Sunday, May 29, 2011 12:45 PM
To: Maven Users List
Subject: Re: Strange potential bug Maven2?

Many thanks. I am reading a oreilly Sonatype Maven and such valuable info
not included :D

-----Original Message----- From: Hilco Wijbenga
Sent: Saturday, May 28, 2011 9:57 PM
To: Maven Users List
Subject: Re: Strange potential bug Maven2?

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.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to