You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Steven Cummings <es...@gmail.com> on 2007/05/23 22:09:59 UTC

Need testSourceDirectory to come before dependencies on classpath during surefire run

Hello,

I looked in the archives before posting and the closest thing I could find
to my particular situation is all of the messages surrounding
http://jira.codehaus.org/browse/MNG-1412 (the ordering of the dependencies
on the classpath).

I need a specific class to hide another that is in a needed dependency and
control this ordering. Unlike with the previous discussion, my preferred
version lives in the testSourceDirectory. When I run "mvn test" surefire
seems to have all of the dependencies loaded on the classpath *before*
testSourceDirectory. I know that one possibility would be to move this class
to a new artifact or another existing artifact and make it a dependency, but
that isn't a viable solution right now as I'm doing a bulk conversion of
projects to Maven 2. So right now, I'm just wanting to know, is this
possible? Is there a way to tell surefire to order the testSourceDirectory
before any dependencies on the classpath when it runs? Thanks.

-- 
Steven Cummings

Re: Need testSourceDirectory to come before dependencies on classpath during surefire run

Posted by Steven Cummings <es...@gmail.com>.
In the long-run yes, but the use-case is trying to convert a bulk of
projects to Maven 2. So that's why I said I'm just wanting to see how
possible this is. I understand it would be a complete hack, but I have to
know my actual options before I can weigh them. I asked because as I see it
right now, this isn't possible at all (without recompiling surefire) and I
wanted to know if I was correct in that conclusion. Thanks.

/S

On 5/24/07, Gregory Kick <gk...@gmail.com> wrote:
>
> if it looks like a hack, sounds like a hack, smells like a hack...
>
> what's your specific use case for this?  it seems like you'd probably
> be better off with a design change than relying on classpath ordering.
>
> On 5/23/07, Steven Cummings <es...@gmail.com> wrote:
> > Hello,
> >
> > I looked in the archives before posting and the closest thing I could
> find
> > to my particular situation is all of the messages surrounding
> > http://jira.codehaus.org/browse/MNG-1412 (the ordering of the
> dependencies
> > on the classpath).
> >
> > I need a specific class to hide another that is in a needed dependency
> and
> > control this ordering. Unlike with the previous discussion, my preferred
> > version lives in the testSourceDirectory. When I run "mvn test" surefire
> > seems to have all of the dependencies loaded on the classpath *before*
> > testSourceDirectory. I know that one possibility would be to move this
> class
> > to a new artifact or another existing artifact and make it a dependency,
> but
> > that isn't a viable solution right now as I'm doing a bulk conversion of
> > projects to Maven 2. So right now, I'm just wanting to know, is this
> > possible? Is there a way to tell surefire to order the
> testSourceDirectory
> > before any dependencies on the classpath when it runs? Thanks.
> >
> > --
> > Steven Cummings
> >
>
>
> --
> Gregory Kick
> http://kickstyle.net/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>


-- 
Steven Cummings

Re: Need testSourceDirectory to come before dependencies on classpath during surefire run

Posted by Gregory Kick <gk...@gmail.com>.
if it looks like a hack, sounds like a hack, smells like a hack...

what's your specific use case for this?  it seems like you'd probably
be better off with a design change than relying on classpath ordering.

On 5/23/07, Steven Cummings <es...@gmail.com> wrote:
> Hello,
>
> I looked in the archives before posting and the closest thing I could find
> to my particular situation is all of the messages surrounding
> http://jira.codehaus.org/browse/MNG-1412 (the ordering of the dependencies
> on the classpath).
>
> I need a specific class to hide another that is in a needed dependency and
> control this ordering. Unlike with the previous discussion, my preferred
> version lives in the testSourceDirectory. When I run "mvn test" surefire
> seems to have all of the dependencies loaded on the classpath *before*
> testSourceDirectory. I know that one possibility would be to move this class
> to a new artifact or another existing artifact and make it a dependency, but
> that isn't a viable solution right now as I'm doing a bulk conversion of
> projects to Maven 2. So right now, I'm just wanting to know, is this
> possible? Is there a way to tell surefire to order the testSourceDirectory
> before any dependencies on the classpath when it runs? Thanks.
>
> --
> Steven Cummings
>


-- 
Gregory Kick
http://kickstyle.net/

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