Re: "provided" dependency scope
"provided" is correct, but I think this is a bug. It should be available to compile test code. I will put it in JIRA. - Brett On 7/18/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > > My dilemma is pretty simple. I have a jar that meets the following > criteria: > > 1. The jar is needed to compile my source code > 2. The jar is needed to compile my test code > 3. The jar is supplied by my container, so I don't want it packaged up with > the artifact that gets generated. > > If I set the dependency to "compile" scope, bullet #3 isn't satisfied. > If I set the dependency to "test" scope, bullet #1 isn't satisfied. > If I set the dependency to "provided" scope, bullet #2 isn't satisfied > (which is the reason for my post). > > Is this a bug or am I just not doing something right? > > > -Original Message- > From: Brett Porter [mailto:[EMAIL PROTECTED] > Sent: Saturday, July 16, 2005 12:29 AM > To: Maven Users List > Subject: Re: "provided" dependency scope > > This JIRA issue is different to your issue from the mail. > > The scope definition of "provided" is for compilation only, that it > will -always- be provided at runtime (by the JDK or a container, and > this includes the execution of unit tests). > > If it is not provided, it should be one of compile, runtime or test. > > What is the problem with making the dependencies a "test" dependency, > that you want to use "provided"? > > - Brett > > On 6/28/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Can anyone comment if this specific bug will be fixed in MNG-514? Or > beta1 > > for that matter? Should I make a comment about this problem on MNG-514? > > > > Many thanks! > > > > -Original Message- > > From: Mike Perham [mailto:[EMAIL PROTECTED] > > Sent: Monday, June 27, 2005 11:22 AM > > To: Maven Users List > > Subject: RE: "provided" dependency scope > > > > I noticed the same thing. It's a bug. See also > > http://jira.codehaus.org/browse/MNG-514. > > > > mike > > > > -Original Message- > > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > > Sent: Monday, June 27, 2005 9:08 AM > > To: users@maven.apache.org > > Subject: "provided" dependency scope > > > > I'm trying to figure out the correct approach here, and I may have also > > stumbled upon a bug... > > > > I'm using the "provided" scope for declaring dependencies, and I'm > > noticing that these libraries aren't included in the TEST classpath, so > > none of my tests compile. I tried adding the same dependencies again > > with a "test" > > scope, but it appears a dependency can only be loaded in one scope. > > When I add the dependencies as "compile" scope, everything works just > > fine, but then these huge jar files get put into my distribution jars > > when I package them, so that's not the scope I want either. > > > > Does anyone have advice on how to get around this? Or is it a bug? > > > > - > > 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] > > > > - > > 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] > > - > 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]
RE: "provided" dependency scope
My dilemma is pretty simple. I have a jar that meets the following criteria: 1. The jar is needed to compile my source code 2. The jar is needed to compile my test code 3. The jar is supplied by my container, so I don't want it packaged up with the artifact that gets generated. If I set the dependency to "compile" scope, bullet #3 isn't satisfied. If I set the dependency to "test" scope, bullet #1 isn't satisfied. If I set the dependency to "provided" scope, bullet #2 isn't satisfied (which is the reason for my post). Is this a bug or am I just not doing something right? -Original Message- From: Brett Porter [mailto:[EMAIL PROTECTED] Sent: Saturday, July 16, 2005 12:29 AM To: Maven Users List Subject: Re: "provided" dependency scope This JIRA issue is different to your issue from the mail. The scope definition of "provided" is for compilation only, that it will -always- be provided at runtime (by the JDK or a container, and this includes the execution of unit tests). If it is not provided, it should be one of compile, runtime or test. What is the problem with making the dependencies a "test" dependency, that you want to use "provided"? - Brett On 6/28/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Can anyone comment if this specific bug will be fixed in MNG-514? Or beta1 > for that matter? Should I make a comment about this problem on MNG-514? > > Many thanks! > > -Original Message- > From: Mike Perham [mailto:[EMAIL PROTECTED] > Sent: Monday, June 27, 2005 11:22 AM > To: Maven Users List > Subject: RE: "provided" dependency scope > > I noticed the same thing. It's a bug. See also > http://jira.codehaus.org/browse/MNG-514. > > mike > > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Sent: Monday, June 27, 2005 9:08 AM > To: users@maven.apache.org > Subject: "provided" dependency scope > > I'm trying to figure out the correct approach here, and I may have also > stumbled upon a bug... > > I'm using the "provided" scope for declaring dependencies, and I'm > noticing that these libraries aren't included in the TEST classpath, so > none of my tests compile. I tried adding the same dependencies again > with a "test" > scope, but it appears a dependency can only be loaded in one scope. > When I add the dependencies as "compile" scope, everything works just > fine, but then these huge jar files get put into my distribution jars > when I package them, so that's not the scope I want either. > > Does anyone have advice on how to get around this? Or is it a bug? > > - > 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] > > - > 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: "provided" dependency scope
This JIRA issue is different to your issue from the mail. The scope definition of "provided" is for compilation only, that it will -always- be provided at runtime (by the JDK or a container, and this includes the execution of unit tests). If it is not provided, it should be one of compile, runtime or test. What is the problem with making the dependencies a "test" dependency, that you want to use "provided"? - Brett On 6/28/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Can anyone comment if this specific bug will be fixed in MNG-514? Or beta1 > for that matter? Should I make a comment about this problem on MNG-514? > > Many thanks! > > -Original Message- > From: Mike Perham [mailto:[EMAIL PROTECTED] > Sent: Monday, June 27, 2005 11:22 AM > To: Maven Users List > Subject: RE: "provided" dependency scope > > I noticed the same thing. It's a bug. See also > http://jira.codehaus.org/browse/MNG-514. > > mike > > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Sent: Monday, June 27, 2005 9:08 AM > To: users@maven.apache.org > Subject: "provided" dependency scope > > I'm trying to figure out the correct approach here, and I may have also > stumbled upon a bug... > > I'm using the "provided" scope for declaring dependencies, and I'm > noticing that these libraries aren't included in the TEST classpath, so > none of my tests compile. I tried adding the same dependencies again > with a "test" > scope, but it appears a dependency can only be loaded in one scope. > When I add the dependencies as "compile" scope, everything works just > fine, but then these huge jar files get put into my distribution jars > when I package them, so that's not the scope I want either. > > Does anyone have advice on how to get around this? Or is it a bug? > > - > 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] > > - > 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]
RE: "provided" dependency scope
Can anyone comment if this specific bug will be fixed in MNG-514? Or beta1 for that matter? Should I make a comment about this problem on MNG-514? Many thanks! -Original Message- From: Mike Perham [mailto:[EMAIL PROTECTED] Sent: Monday, June 27, 2005 11:22 AM To: Maven Users List Subject: RE: "provided" dependency scope I noticed the same thing. It's a bug. See also http://jira.codehaus.org/browse/MNG-514. mike -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Monday, June 27, 2005 9:08 AM To: users@maven.apache.org Subject: "provided" dependency scope I'm trying to figure out the correct approach here, and I may have also stumbled upon a bug... I'm using the "provided" scope for declaring dependencies, and I'm noticing that these libraries aren't included in the TEST classpath, so none of my tests compile. I tried adding the same dependencies again with a "test" scope, but it appears a dependency can only be loaded in one scope. When I add the dependencies as "compile" scope, everything works just fine, but then these huge jar files get put into my distribution jars when I package them, so that's not the scope I want either. Does anyone have advice on how to get around this? Or is it a bug? - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: "provided" dependency scope
I noticed the same thing. It's a bug. See also http://jira.codehaus.org/browse/MNG-514. mike -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Monday, June 27, 2005 9:08 AM To: users@maven.apache.org Subject: "provided" dependency scope I'm trying to figure out the correct approach here, and I may have also stumbled upon a bug... I'm using the "provided" scope for declaring dependencies, and I'm noticing that these libraries aren't included in the TEST classpath, so none of my tests compile. I tried adding the same dependencies again with a "test" scope, but it appears a dependency can only be loaded in one scope. When I add the dependencies as "compile" scope, everything works just fine, but then these huge jar files get put into my distribution jars when I package them, so that's not the scope I want either. Does anyone have advice on how to get around this? Or is it a bug? - 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]
"provided" dependency scope
I'm trying to figure out the correct approach here, and I may have also stumbled upon a bug... I'm using the "provided" scope for declaring dependencies, and I'm noticing that these libraries aren't included in the TEST classpath, so none of my tests compile. I tried adding the same dependencies again with a "test" scope, but it appears a dependency can only be loaded in one scope. When I add the dependencies as "compile" scope, everything works just fine, but then these huge jar files get put into my distribution jars when I package them, so that's not the scope I want either. Does anyone have advice on how to get around this? Or is it a bug? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]