You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Wendy Smoak <ws...@gmail.com> on 2005/11/12 17:57:54 UTC

[m2] Need help fixing dependencies in a pom

I'm trying to fix the Commons Chain pom, which has a dependency on MyFaces:
    <dependency>
      <groupId>myfaces</groupId>
      <artifactId>myfaces-jsf-api</artifactId>
      <version>1.0.8-beta</version>
    </dependency>

I'm creating a 'Struts Blank' archetype, so the process is
1. mvn install my archetype
2. mvn archetype:create a new project
3. mvn install the new project and examine the resulting .war file

I tried adding '<optional/>' to the dependency in
commons-chain-1.0.pom in my local m2 repository, but I still get the
myfaces .jar file in my .war file.

How do I modify the Chain pom to make that stop happening?

Thanks,
--
Wendy

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


Re: [m2] Need help fixing dependencies in a pom

Posted by Jason van Zyl <ja...@maven.org>.
On Sat, 2005-11-12 at 10:49 -0700, Wendy Smoak wrote:
> On 11/12/05, Stephen Duncan <st...@gmail.com> wrote:
> 
> > I believe you must do <optional>true</optional> rather than just <optional/>
> 
> Thank you!
> 
> Now, what's the correct way to keep the servlet API .jar files out of
> my webapp?  They're not optional for the dependencies that need them
> (Struts Core for example) but they should not come all the way through
> to my .war file.
> 
> Is it <scope>compile</scope> or something else?

scope = provided

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

Jason van Zyl
jason at maven.org
http://maven.apache.org

Simplex sigillum veri. (Simplicity is the seal of truth.)


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


Re: [m2] Need help fixing dependencies in a pom

Posted by Jorg Heymans <jh...@domek.be>.
Wendy Smoak wrote:

> Is it <scope>compile</scope> or something else?

<scope>provided</scope>


Jorg


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


Re: [m2] Need help fixing dependencies in a pom

Posted by Wendy Smoak <ws...@gmail.com>.
On 11/12/05, Stephen Duncan <st...@gmail.com> wrote:

> I believe you must do <optional>true</optional> rather than just <optional/>

Thank you!

Now, what's the correct way to keep the servlet API .jar files out of
my webapp?  They're not optional for the dependencies that need them
(Struts Core for example) but they should not come all the way through
to my .war file.

Is it <scope>compile</scope> or something else?

--
Wendy

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


Re: [m2] Need help fixing dependencies in a pom

Posted by Stephen Duncan <st...@gmail.com>.
I believe you must do <optional>true</optional> rather than just <optional/>

-Stephen

On 11/12/05, Wendy Smoak <ws...@gmail.com> wrote:
> I'm trying to fix the Commons Chain pom, which has a dependency on MyFaces:
>     <dependency>
>       <groupId>myfaces</groupId>
>       <artifactId>myfaces-jsf-api</artifactId>
>       <version>1.0.8-beta</version>
>     </dependency>
>
> I'm creating a 'Struts Blank' archetype, so the process is
> 1. mvn install my archetype
> 2. mvn archetype:create a new project
> 3. mvn install the new project and examine the resulting .war file
>
> I tried adding '<optional/>' to the dependency in
> commons-chain-1.0.pom in my local m2 repository, but I still get the
> myfaces .jar file in my .war file.
>
> How do I modify the Chain pom to make that stop happening?
>
> Thanks,
> --
> Wendy
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>


--
Stephen Duncan Jr
www.stephenduncanjr.com

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