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<[email protected]>  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
[email protected]
http://brettporter.wordpress.com/
http://au.linkedin.com/in/brettporter





---------------------------------------------------------------------
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