You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by Kasun Gajasinghe <ka...@gmail.com> on 2011/06/19 08:34:30 UTC

maven-core tests fail when invoked via ant.

Hi,
We are in the process of integrating Maven in to Gentoo. Currently, we are
trying to bootstrap maven. Our strategy is to integrate each and every
sub-project of Maven-2.2.1 [1] separately. So, we first transformed these to
an ant projects by generating the build.xml via `mvn ant:ant`. I know that
Maven provides a build.xml in the parent, but we have to integrate each and
every project separately. We will be moving to 3.x after 2.x is complete. We
chose 2.x as it's much stable, and is much popular currently.

So far, we have successfully integrated project up-to maven-core in the
build order. But, we are encountering an issue in maven-core. When invoked
via mvn (mvn install), it passes the tests successfully (obviously!). But
when I invoke the project via ant, a test fails with an ERROR.

I'm sending this to the dev group thinking this error is probably obvious to
you all.

=================================
test:
    [mkdir] Created dir:
/gentoo-sources/maven/maven-2/tags/maven-2.2.1/maven-core-2.2.1/target/test-reports
    [junit] Running org.apache.maven.WagonSelectorTest
    [junit] Testsuite: org.apache.maven.WagonSelectorTest
    [junit] Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 2.361 sec
    [junit] Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 2.361 sec
    [junit]
    [junit] Testcase: testSelectHttpWagonFromDefault took 0.358 sec
    [junit]     Caused an ERROR
    [junit] Error starting container
    [junit] org.codehaus.plexus.PlexusContainerException: Error starting
container
    [junit]     at
org.codehaus.plexus.DefaultPlexusContainer.start(DefaultPlexusContainer.java:795)
    [junit]     at
org.codehaus.plexus.PlexusTestCase.setUp(PlexusTestCase.java:121)
    [junit]     at
org.apache.maven.WagonSelectorTest.setUp(WagonSelectorTest.java:76)
    [junit] Caused by:
org.codehaus.plexus.component.repository.exception.ComponentRepositoryException:
Component descriptor role:
'org.sonatype.plexus.components.sec.dispatcher.SecDispatcher',
implementation:
'org.sonatype.plexus.components.sec.dispatcher.DefaultSecDispatcher', role
hint: 'maven' has a hint, but there are other implementations that don't
    [junit]     at
org.codehaus.plexus.component.repository.DefaultComponentRepository.addComponentDescriptor(DefaultComponentRepository.java:184)
    [junit]     at
org.codehaus.plexus.DefaultPlexusContainer.addComponentDescriptor(DefaultPlexusContainer.java:515)
    [junit]     at
org.codehaus.plexus.DefaultPlexusContainer.discoverComponents(DefaultPlexusContainer.java:738)
    [junit]     at
org.codehaus.plexus.DefaultPlexusContainer.start(DefaultPlexusContainer.java:779)
    [junit]

BUILD FAILED
/gentoo-sources/maven/maven-2/tags/maven-2.2.1/maven-core-2.2.1/maven-build.xml:206:
Test org.apache.maven.WagonSelectorTest failed

=================================

Any clues on getting rid of this error? I'm thinking whether the generated
build.xml has some issue. Much appreciate your help!

The maven-build.xml is at [2]. The full ant output of the test failure is at
[3]. I'm using maven-ant-plugin-2.3 with maven-2.2.1. The test fails with
both ant 1.7.1 and 1.8.1. Please do let me know if any other information is
needed.

[1]
https://svn.apache.org/repos/asf/maven/maven-2/tags/maven-2.2.1/maven-core/
[2] http://pastebin.com/9eWM0xjN
[3] http://pastebin.com/vRC6qVa8

Thanks,
--Kasun

-- 
~~~*******'''''''''''''*******~~~
Kasun Gajasinghe,
University of Moratuwa
Blog: http://kasunbg.blogspot.com
Twitter: http://twitter.com/kasunbg

Re: maven-core tests fail when invoked via ant.

Posted by Kasun Gajasinghe <ka...@gmail.com>.
On Mon, Jun 20, 2011 at 11:41 AM, Kristian Rosenvold <
kristian.rosenvold@gmail.com> wrote:

> I somehow think that if I was to do this integration I'd consider reversing
> the order; build maven3 from scratch
> and then use maven3 to build the older versions.
>
>
Kristian,
Thanks for the suggestion. But we've come this far, now only few packages
left. So, I think it's better to go ahead with current implementation and
then add maven3, isn't it?

And, regarding the compiling **/cli/**java with 1.4, I actually don't see
that when compiling via maven either. I'm probably wrong here, but I see
that during the execution "default" everything compiles. When it comes to
"cli" execution phase, what I see is "[INFO] Nothing to compile - all
classes are up to date". (Yes, I did a mvn clean first!) The debug log is at
http://pastebin.com/EK01GFRf

This is just what I noticed, and there's high chance that I didn't correctly
understand the debug logs. :-)

Thanks,
--Kasun


>
> Kristian
>
>
>
> Den 20.06.2011 07:52, skrev Kasun Gajasinghe:
>
>  Hi Brett,
>>
>> On Mon, Jun 20, 2011 at 5:41 AM, Brett Porter<br...@apache.org>  wrote:
>>
>>
>>  The problem you're seeing is probably related to an incorrect definition
>>> of
>>> a META-INF/plexus/components.xml file related to that SecDispatcher
>>> component. You're probably pulling in a file you didn't intend to.
>>> Hopefully
>>> you can grep through the test resources and find the culprit.
>>>
>>>  Yes, thanks. maven-core uses plexus-sec-dispatcher version 1.3, which
>> doesn't contain a<role-hint>  in META-INF/plexus/components.**xml. So,
>> I've
>> updated the version to 1.4, and the test error I mentioned is gone.
>>
>> Well, now there's a test _failure_ (not error), in MavenCliTest, which
>> I've
>> identified as due to the wrong compilation version. i.e. according to
>> maven-core pom, **/cli/*.java files should be compiled using JDK 1.4 while
>> the rest of classes using 1.5. But apparently, the generated build.xml
>> disregard this setting and compiles the whole bunch using 1.5.
>> Is this a bug in the maven ant plugin or ant is incapable of handling this
>> kind of thing?
>>
>> Is there a reason you can't use the build.xml we've already provided for
>>
>>> those that need to bootstrap? Hopefully that would simplify things for
>>> you.
>>>
>>>  Since we have to package the sub-modules separately, we can't use the
>> provided build.xml. Building via mvn ant:ant too isn't a much of a
>> problem.
>> But these test failures is a concern.
>>
>> Thanks for the help!
>> --Kasun
>>
>>
>>  - Brett
>>>
>>> On 19/06/2011, at 4:34 PM, Kasun Gajasinghe wrote:
>>>
>>>  Hi,
>>>> We are in the process of integrating Maven in to Gentoo. Currently, we
>>>>
>>> are
>>>
>>>> trying to bootstrap maven. Our strategy is to integrate each and every
>>>> sub-project of Maven-2.2.1 [1] separately. So, we first transformed
>>>> these
>>>>
>>> to
>>>
>>>> an ant projects by generating the build.xml via `mvn ant:ant`. I know
>>>>
>>> that
>>>
>>>> Maven provides a build.xml in the parent, but we have to integrate each
>>>>
>>> and
>>>
>>>> every project separately. We will be moving to 3.x after 2.x is
>>>> complete.
>>>>
>>> We
>>>
>>>> chose 2.x as it's much stable, and is much popular currently.
>>>>
>>>> So far, we have successfully integrated project up-to maven-core in the
>>>> build order. But, we are encountering an issue in maven-core. When
>>>>
>>> invoked
>>>
>>>> via mvn (mvn install), it passes the tests successfully (obviously!).
>>>> But
>>>> when I invoke the project via ant, a test fails with an ERROR.
>>>>
>>>> I'm sending this to the dev group thinking this error is probably
>>>> obvious
>>>>
>>> to
>>>
>>>> you all.
>>>>
>>>> ==============================**===
>>>> test:
>>>>    [mkdir] Created dir:
>>>>
>>>>  /gentoo-sources/maven/maven-2/**tags/maven-2.2.1/maven-core-2.**
>>> 2.1/target/test-reports
>>>
>>>>    [junit] Running org.apache.maven.**WagonSelectorTest
>>>>    [junit] Testsuite: org.apache.maven.**WagonSelectorTest
>>>>    [junit] Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 2.361 sec
>>>>    [junit] Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 2.361 sec
>>>>    [junit]
>>>>    [junit] Testcase: testSelectHttpWagonFromDefault took 0.358 sec
>>>>    [junit]     Caused an ERROR
>>>>    [junit] Error starting container
>>>>    [junit] org.codehaus.plexus.**PlexusContainerException: Error
>>>> starting
>>>> container
>>>>    [junit]     at
>>>>
>>>>  org.codehaus.plexus.**DefaultPlexusContainer.start(**
>>> DefaultPlexusContainer.java:**795)
>>>
>>>>    [junit]     at
>>>> org.codehaus.plexus.**PlexusTestCase.setUp(**PlexusTestCase.java:121)
>>>>    [junit]     at
>>>> org.apache.maven.**WagonSelectorTest.setUp(**WagonSelectorTest.java:76)
>>>>    [junit] Caused by:
>>>>
>>>>  org.codehaus.plexus.component.**repository.exception.**
>>> ComponentRepositoryException:
>>>
>>>> Component descriptor role:
>>>> 'org.sonatype.plexus.**components.sec.dispatcher.**SecDispatcher',
>>>> implementation:
>>>> 'org.sonatype.plexus.**components.sec.dispatcher.**
>>>> DefaultSecDispatcher',
>>>>
>>> role
>>>
>>>> hint: 'maven' has a hint, but there are other implementations that don't
>>>>    [junit]     at
>>>>
>>>>  org.codehaus.plexus.component.**repository.**
>>> DefaultComponentRepository.**addComponentDescriptor(**
>>> DefaultComponentRepository.**java:184)
>>>
>>>>    [junit]     at
>>>>
>>>>  org.codehaus.plexus.**DefaultPlexusContainer.**addComponentDescriptor(
>>> **DefaultPlexusContainer.java:**515)
>>>
>>>>    [junit]     at
>>>>
>>>>  org.codehaus.plexus.**DefaultPlexusContainer.**discoverComponents(**
>>> DefaultPlexusContainer.java:**738)
>>>
>>>>    [junit]     at
>>>>
>>>>  org.codehaus.plexus.**DefaultPlexusContainer.start(**
>>> DefaultPlexusContainer.java:**779)
>>>
>>>>    [junit]
>>>>
>>>> BUILD FAILED
>>>>
>>>>  /gentoo-sources/maven/maven-2/**tags/maven-2.2.1/maven-core-2.**
>>> 2.1/maven-build.xml:206:
>>>
>>>> Test org.apache.maven.**WagonSelectorTest failed
>>>>
>>>> ==============================**===
>>>>
>>>> Any clues on getting rid of this error? I'm thinking whether the
>>>>
>>> generated
>>>
>>>> build.xml has some issue. Much appreciate your help!
>>>>
>>>> The maven-build.xml is at [2]. The full ant output of the test failure
>>>> is
>>>>
>>> at
>>>
>>>> [3]. I'm using maven-ant-plugin-2.3 with maven-2.2.1. The test fails
>>>> with
>>>> both ant 1.7.1 and 1.8.1. Please do let me know if any other information
>>>>
>>> is
>>>
>>>> needed.
>>>>
>>>> [1]
>>>>
>>>>  https://svn.apache.org/repos/**asf/maven/maven-2/tags/maven-**
>>> 2.2.1/maven-core/<https://svn.apache.org/repos/asf/maven/maven-2/tags/maven-2.2.1/maven-core/>
>>>
>>>> [2] http://pastebin.com/9eWM0xjN
>>>> [3] http://pastebin.com/vRC6qVa8
>>>>
>>>> Thanks,
>>>> --Kasun
>>>>
>>>> --
>>>> ~~~*******'''''''''''''*********~~~
>>>> Kasun Gajasinghe,
>>>> University of Moratuwa
>>>> Blog: http://kasunbg.blogspot.com
>>>> Twitter: http://twitter.com/kasunbg
>>>>
>>> --
>>> Brett Porter
>>> brett@apache.org
>>> http://brettporter.wordpress.**com/ <http://brettporter.wordpress.com/>
>>> http://au.linkedin.com/in/**brettporter<http://au.linkedin.com/in/brettporter>
>>>
>>>
>>>
>>>
>>>
>>> ------------------------------**------------------------------**
>>> ---------
>>> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.**org<de...@maven.apache.org>
>>> For additional commands, e-mail: dev-help@maven.apache.org
>>>
>>>
>>>
>>
>
> ------------------------------**------------------------------**---------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.**org<de...@maven.apache.org>
> For additional commands, e-mail: dev-help@maven.apache.org
>
>


-- 
~~~*******'''''''''''''*******~~~
Kasun Gajasinghe,
University of Moratuwa,
Sri Lanka.
Blog: http://blog.kasunbg.org
Twitter: http://twitter.com/kasunbg

Re: maven-core tests fail when invoked via ant.

Posted by Kristian Rosenvold <kr...@gmail.com>.
I somehow think that if I was to do this integration I'd consider 
reversing the order; build maven3 from scratch
and then use maven3 to build the older versions.


Kristian



Den 20.06.2011 07:52, skrev Kasun Gajasinghe:
> Hi Brett,
>
> On Mon, Jun 20, 2011 at 5:41 AM, Brett Porter<br...@apache.org>  wrote:
>
>
>> The problem you're seeing is probably related to an incorrect definition of
>> a META-INF/plexus/components.xml file related to that SecDispatcher
>> component. You're probably pulling in a file you didn't intend to. Hopefully
>> you can grep through the test resources and find the culprit.
>>
> Yes, thanks. maven-core uses plexus-sec-dispatcher version 1.3, which
> doesn't contain a<role-hint>  in META-INF/plexus/components.xml. So, I've
> updated the version to 1.4, and the test error I mentioned is gone.
>
> Well, now there's a test _failure_ (not error), in MavenCliTest, which I've
> identified as due to the wrong compilation version. i.e. according to
> maven-core pom, **/cli/*.java files should be compiled using JDK 1.4 while
> the rest of classes using 1.5. But apparently, the generated build.xml
> disregard this setting and compiles the whole bunch using 1.5.
> Is this a bug in the maven ant plugin or ant is incapable of handling this
> kind of thing?
>
> Is there a reason you can't use the build.xml we've already provided for
>> those that need to bootstrap? Hopefully that would simplify things for you.
>>
> Since we have to package the sub-modules separately, we can't use the
> provided build.xml. Building via mvn ant:ant too isn't a much of a problem.
> But these test failures is a concern.
>
> Thanks for the help!
> --Kasun
>
>
>> - Brett
>>
>> On 19/06/2011, at 4:34 PM, Kasun Gajasinghe wrote:
>>
>>> Hi,
>>> We are in the process of integrating Maven in to Gentoo. Currently, we
>> are
>>> trying to bootstrap maven. Our strategy is to integrate each and every
>>> sub-project of Maven-2.2.1 [1] separately. So, we first transformed these
>> to
>>> an ant projects by generating the build.xml via `mvn ant:ant`. I know
>> that
>>> Maven provides a build.xml in the parent, but we have to integrate each
>> and
>>> every project separately. We will be moving to 3.x after 2.x is complete.
>> We
>>> chose 2.x as it's much stable, and is much popular currently.
>>>
>>> So far, we have successfully integrated project up-to maven-core in the
>>> build order. But, we are encountering an issue in maven-core. When
>> invoked
>>> via mvn (mvn install), it passes the tests successfully (obviously!). But
>>> when I invoke the project via ant, a test fails with an ERROR.
>>>
>>> I'm sending this to the dev group thinking this error is probably obvious
>> to
>>> you all.
>>>
>>> =================================
>>> test:
>>>     [mkdir] Created dir:
>>>
>> /gentoo-sources/maven/maven-2/tags/maven-2.2.1/maven-core-2.2.1/target/test-reports
>>>     [junit] Running org.apache.maven.WagonSelectorTest
>>>     [junit] Testsuite: org.apache.maven.WagonSelectorTest
>>>     [junit] Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 2.361 sec
>>>     [junit] Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 2.361 sec
>>>     [junit]
>>>     [junit] Testcase: testSelectHttpWagonFromDefault took 0.358 sec
>>>     [junit]     Caused an ERROR
>>>     [junit] Error starting container
>>>     [junit] org.codehaus.plexus.PlexusContainerException: Error starting
>>> container
>>>     [junit]     at
>>>
>> org.codehaus.plexus.DefaultPlexusContainer.start(DefaultPlexusContainer.java:795)
>>>     [junit]     at
>>> org.codehaus.plexus.PlexusTestCase.setUp(PlexusTestCase.java:121)
>>>     [junit]     at
>>> org.apache.maven.WagonSelectorTest.setUp(WagonSelectorTest.java:76)
>>>     [junit] Caused by:
>>>
>> org.codehaus.plexus.component.repository.exception.ComponentRepositoryException:
>>> Component descriptor role:
>>> 'org.sonatype.plexus.components.sec.dispatcher.SecDispatcher',
>>> implementation:
>>> 'org.sonatype.plexus.components.sec.dispatcher.DefaultSecDispatcher',
>> role
>>> hint: 'maven' has a hint, but there are other implementations that don't
>>>     [junit]     at
>>>
>> org.codehaus.plexus.component.repository.DefaultComponentRepository.addComponentDescriptor(DefaultComponentRepository.java:184)
>>>     [junit]     at
>>>
>> org.codehaus.plexus.DefaultPlexusContainer.addComponentDescriptor(DefaultPlexusContainer.java:515)
>>>     [junit]     at
>>>
>> org.codehaus.plexus.DefaultPlexusContainer.discoverComponents(DefaultPlexusContainer.java:738)
>>>     [junit]     at
>>>
>> org.codehaus.plexus.DefaultPlexusContainer.start(DefaultPlexusContainer.java:779)
>>>     [junit]
>>>
>>> BUILD FAILED
>>>
>> /gentoo-sources/maven/maven-2/tags/maven-2.2.1/maven-core-2.2.1/maven-build.xml:206:
>>> Test org.apache.maven.WagonSelectorTest failed
>>>
>>> =================================
>>>
>>> Any clues on getting rid of this error? I'm thinking whether the
>> generated
>>> build.xml has some issue. Much appreciate your help!
>>>
>>> The maven-build.xml is at [2]. The full ant output of the test failure is
>> at
>>> [3]. I'm using maven-ant-plugin-2.3 with maven-2.2.1. The test fails with
>>> both ant 1.7.1 and 1.8.1. Please do let me know if any other information
>> is
>>> needed.
>>>
>>> [1]
>>>
>> https://svn.apache.org/repos/asf/maven/maven-2/tags/maven-2.2.1/maven-core/
>>> [2] http://pastebin.com/9eWM0xjN
>>> [3] http://pastebin.com/vRC6qVa8
>>>
>>> Thanks,
>>> --Kasun
>>>
>>> --
>>> ~~~*******'''''''''''''*******~~~
>>> Kasun Gajasinghe,
>>> University of Moratuwa
>>> Blog: http://kasunbg.blogspot.com
>>> Twitter: http://twitter.com/kasunbg
>> --
>> Brett Porter
>> brett@apache.org
>> http://brettporter.wordpress.com/
>> http://au.linkedin.com/in/brettporter
>>
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
>> For additional commands, e-mail: dev-help@maven.apache.org
>>
>>
>


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


Re: maven-core tests fail when invoked via ant.

Posted by Kasun Gajasinghe <ka...@gmail.com>.
Hi Brett,

On Mon, Jun 20, 2011 at 5:41 AM, Brett Porter <br...@apache.org> wrote:


>
> The problem you're seeing is probably related to an incorrect definition of
> a META-INF/plexus/components.xml file related to that SecDispatcher
> component. You're probably pulling in a file you didn't intend to. Hopefully
> you can grep through the test resources and find the culprit.
>

Yes, thanks. maven-core uses plexus-sec-dispatcher version 1.3, which
doesn't contain a <role-hint> in META-INF/plexus/components.xml. So, I've
updated the version to 1.4, and the test error I mentioned is gone.

Well, now there's a test _failure_ (not error), in MavenCliTest, which I've
identified as due to the wrong compilation version. i.e. according to
maven-core pom, **/cli/*.java files should be compiled using JDK 1.4 while
the rest of classes using 1.5. But apparently, the generated build.xml
disregard this setting and compiles the whole bunch using 1.5.
Is this a bug in the maven ant plugin or ant is incapable of handling this
kind of thing?

Is there a reason you can't use the build.xml we've already provided for
> those that need to bootstrap? Hopefully that would simplify things for you.
>

Since we have to package the sub-modules separately, we can't use the
provided build.xml. Building via mvn ant:ant too isn't a much of a problem.
But these test failures is a concern.

Thanks for the help!
--Kasun


>
> - Brett
>
> On 19/06/2011, at 4:34 PM, Kasun Gajasinghe wrote:
>
> > Hi,
> > We are in the process of integrating Maven in to Gentoo. Currently, we
> are
> > trying to bootstrap maven. Our strategy is to integrate each and every
> > sub-project of Maven-2.2.1 [1] separately. So, we first transformed these
> to
> > an ant projects by generating the build.xml via `mvn ant:ant`. I know
> that
> > Maven provides a build.xml in the parent, but we have to integrate each
> and
> > every project separately. We will be moving to 3.x after 2.x is complete.
> We
> > chose 2.x as it's much stable, and is much popular currently.
> >
> > So far, we have successfully integrated project up-to maven-core in the
> > build order. But, we are encountering an issue in maven-core. When
> invoked
> > via mvn (mvn install), it passes the tests successfully (obviously!). But
> > when I invoke the project via ant, a test fails with an ERROR.
> >
> > I'm sending this to the dev group thinking this error is probably obvious
> to
> > you all.
> >
> > =================================
> > test:
> >    [mkdir] Created dir:
> >
> /gentoo-sources/maven/maven-2/tags/maven-2.2.1/maven-core-2.2.1/target/test-reports
> >    [junit] Running org.apache.maven.WagonSelectorTest
> >    [junit] Testsuite: org.apache.maven.WagonSelectorTest
> >    [junit] Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 2.361 sec
> >    [junit] Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 2.361 sec
> >    [junit]
> >    [junit] Testcase: testSelectHttpWagonFromDefault took 0.358 sec
> >    [junit]     Caused an ERROR
> >    [junit] Error starting container
> >    [junit] org.codehaus.plexus.PlexusContainerException: Error starting
> > container
> >    [junit]     at
> >
> org.codehaus.plexus.DefaultPlexusContainer.start(DefaultPlexusContainer.java:795)
> >    [junit]     at
> > org.codehaus.plexus.PlexusTestCase.setUp(PlexusTestCase.java:121)
> >    [junit]     at
> > org.apache.maven.WagonSelectorTest.setUp(WagonSelectorTest.java:76)
> >    [junit] Caused by:
> >
> org.codehaus.plexus.component.repository.exception.ComponentRepositoryException:
> > Component descriptor role:
> > 'org.sonatype.plexus.components.sec.dispatcher.SecDispatcher',
> > implementation:
> > 'org.sonatype.plexus.components.sec.dispatcher.DefaultSecDispatcher',
> role
> > hint: 'maven' has a hint, but there are other implementations that don't
> >    [junit]     at
> >
> org.codehaus.plexus.component.repository.DefaultComponentRepository.addComponentDescriptor(DefaultComponentRepository.java:184)
> >    [junit]     at
> >
> org.codehaus.plexus.DefaultPlexusContainer.addComponentDescriptor(DefaultPlexusContainer.java:515)
> >    [junit]     at
> >
> org.codehaus.plexus.DefaultPlexusContainer.discoverComponents(DefaultPlexusContainer.java:738)
> >    [junit]     at
> >
> org.codehaus.plexus.DefaultPlexusContainer.start(DefaultPlexusContainer.java:779)
> >    [junit]
> >
> > BUILD FAILED
> >
> /gentoo-sources/maven/maven-2/tags/maven-2.2.1/maven-core-2.2.1/maven-build.xml:206:
> > Test org.apache.maven.WagonSelectorTest failed
> >
> > =================================
> >
> > Any clues on getting rid of this error? I'm thinking whether the
> generated
> > build.xml has some issue. Much appreciate your help!
> >
> > The maven-build.xml is at [2]. The full ant output of the test failure is
> at
> > [3]. I'm using maven-ant-plugin-2.3 with maven-2.2.1. The test fails with
> > both ant 1.7.1 and 1.8.1. Please do let me know if any other information
> is
> > needed.
> >
> > [1]
> >
> https://svn.apache.org/repos/asf/maven/maven-2/tags/maven-2.2.1/maven-core/
> > [2] http://pastebin.com/9eWM0xjN
> > [3] http://pastebin.com/vRC6qVa8
> >
> > Thanks,
> > --Kasun
> >
> > --
> > ~~~*******'''''''''''''*******~~~
> > Kasun Gajasinghe,
> > University of Moratuwa
> > Blog: http://kasunbg.blogspot.com
> > Twitter: http://twitter.com/kasunbg
>
> --
> Brett Porter
> brett@apache.org
> http://brettporter.wordpress.com/
> http://au.linkedin.com/in/brettporter
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>
>


-- 
~~~*******'''''''''''''*******~~~
Kasun Gajasinghe,
University of Moratuwa,
Sri Lanka.
Blog: http://blog.kasunbg.org
Twitter: http://twitter.com/kasunbg

Re: maven-core tests fail when invoked via ant.

Posted by Brett Porter <br...@apache.org>.
Is there a reason you can't use the build.xml we've already provided for those that need to bootstrap? Hopefully that would simplify things for you.

The problem you're seeing is probably related to an incorrect definition of a META-INF/plexus/components.xml file related to that SecDispatcher component. You're probably pulling in a file you didn't intend to. Hopefully you can grep through the test resources and find the culprit.

- Brett

On 19/06/2011, at 4:34 PM, Kasun Gajasinghe wrote:

> Hi,
> We are in the process of integrating Maven in to Gentoo. Currently, we are
> trying to bootstrap maven. Our strategy is to integrate each and every
> sub-project of Maven-2.2.1 [1] separately. So, we first transformed these to
> an ant projects by generating the build.xml via `mvn ant:ant`. I know that
> Maven provides a build.xml in the parent, but we have to integrate each and
> every project separately. We will be moving to 3.x after 2.x is complete. We
> chose 2.x as it's much stable, and is much popular currently.
> 
> So far, we have successfully integrated project up-to maven-core in the
> build order. But, we are encountering an issue in maven-core. When invoked
> via mvn (mvn install), it passes the tests successfully (obviously!). But
> when I invoke the project via ant, a test fails with an ERROR.
> 
> I'm sending this to the dev group thinking this error is probably obvious to
> you all.
> 
> =================================
> test:
>    [mkdir] Created dir:
> /gentoo-sources/maven/maven-2/tags/maven-2.2.1/maven-core-2.2.1/target/test-reports
>    [junit] Running org.apache.maven.WagonSelectorTest
>    [junit] Testsuite: org.apache.maven.WagonSelectorTest
>    [junit] Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 2.361 sec
>    [junit] Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 2.361 sec
>    [junit]
>    [junit] Testcase: testSelectHttpWagonFromDefault took 0.358 sec
>    [junit]     Caused an ERROR
>    [junit] Error starting container
>    [junit] org.codehaus.plexus.PlexusContainerException: Error starting
> container
>    [junit]     at
> org.codehaus.plexus.DefaultPlexusContainer.start(DefaultPlexusContainer.java:795)
>    [junit]     at
> org.codehaus.plexus.PlexusTestCase.setUp(PlexusTestCase.java:121)
>    [junit]     at
> org.apache.maven.WagonSelectorTest.setUp(WagonSelectorTest.java:76)
>    [junit] Caused by:
> org.codehaus.plexus.component.repository.exception.ComponentRepositoryException:
> Component descriptor role:
> 'org.sonatype.plexus.components.sec.dispatcher.SecDispatcher',
> implementation:
> 'org.sonatype.plexus.components.sec.dispatcher.DefaultSecDispatcher', role
> hint: 'maven' has a hint, but there are other implementations that don't
>    [junit]     at
> org.codehaus.plexus.component.repository.DefaultComponentRepository.addComponentDescriptor(DefaultComponentRepository.java:184)
>    [junit]     at
> org.codehaus.plexus.DefaultPlexusContainer.addComponentDescriptor(DefaultPlexusContainer.java:515)
>    [junit]     at
> org.codehaus.plexus.DefaultPlexusContainer.discoverComponents(DefaultPlexusContainer.java:738)
>    [junit]     at
> org.codehaus.plexus.DefaultPlexusContainer.start(DefaultPlexusContainer.java:779)
>    [junit]
> 
> BUILD FAILED
> /gentoo-sources/maven/maven-2/tags/maven-2.2.1/maven-core-2.2.1/maven-build.xml:206:
> Test org.apache.maven.WagonSelectorTest failed
> 
> =================================
> 
> Any clues on getting rid of this error? I'm thinking whether the generated
> build.xml has some issue. Much appreciate your help!
> 
> The maven-build.xml is at [2]. The full ant output of the test failure is at
> [3]. I'm using maven-ant-plugin-2.3 with maven-2.2.1. The test fails with
> both ant 1.7.1 and 1.8.1. Please do let me know if any other information is
> needed.
> 
> [1]
> https://svn.apache.org/repos/asf/maven/maven-2/tags/maven-2.2.1/maven-core/
> [2] http://pastebin.com/9eWM0xjN
> [3] http://pastebin.com/vRC6qVa8
> 
> Thanks,
> --Kasun
> 
> -- 
> ~~~*******'''''''''''''*******~~~
> Kasun Gajasinghe,
> University of Moratuwa
> Blog: http://kasunbg.blogspot.com
> Twitter: http://twitter.com/kasunbg

--
Brett Porter
brett@apache.org
http://brettporter.wordpress.com/
http://au.linkedin.com/in/brettporter





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