Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6692579
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T05:53:01+00:00 2026-05-26T05:53:01+00:00

I’m trying to use m2eclipse api to import projects by archetype. my code is

  • 0

I’m trying to use m2eclipse api to import projects by archetype.
my code is here:

    RemoteCatalogFactory remoteCatalogFactory = new RemoteCatalogFactory("http:/server1/archetype-catalog.xml", null, true);
    ArchetypeCatalog catalog = remoteCatalogFactory.getArchetypeCatalog();
    List<Archetype> archetypes = catalog.getArchetypes();
    for (Archetype archetype : archetypes){
        System.out.println(archetype.getArtifactId());
    }

m2eclipse version is:0.12.1.
Got below exception:

1) Error injecting: org.sonatype.maven.wagon.AhcWagon
  at ClassRealm[plexus.core, parent: null]
  while locating org.apache.maven.wagon.Wagon annotated with @com.google.inject.name.Named(value=http)

1 error
    at com.google.inject.internal.InjectorImpl$4.get(InjectorImpl.java:958)
    at com.google.inject.Scopes$1$1.get(Scopes.java:59)
    at org.sonatype.guice.bean.locators.LazyQualifiedBean.getValue(LazyQualifiedBean.java:66)
    at org.sonatype.guice.plexus.locators.LazyPlexusBean.getValue(LazyPlexusBean.java:54)
    at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:247)
    ... 38 more
Caused by: java.lang.TypeNotPresentException: Type org.sonatype.maven.wagon.AhcWagon not present
    at org.sonatype.guice.bean.reflect.URLClassSpace.loadClass(URLClassSpace.java:94)
    at org.sonatype.guice.bean.reflect.NamedClass.load(NamedClass.java:46)
    at org.sonatype.guice.bean.reflect.AbstractDeferredClass.get(AbstractDeferredClass.java:48)
    at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:40)
    at com.google.inject.internal.InjectorImpl$4$1.call(InjectorImpl.java:949)
    at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:995)
    at com.google.inject.internal.InjectorImpl$4.get(InjectorImpl.java:945)
    ... 42 more
Caused by: java.lang.ClassNotFoundException: org.sonatype.maven.wagon.AhcWagon
    at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:50)
    at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:244)
    at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:230)
    at org.sonatype.guice.bean.reflect.URLClassSpace.loadClass(URLClassSpace.java:90)

During debug, I found bundleloader is using org.maven.ide.eclipse’s bundle classloader to load AhcWagon class.
because maven embedder bundle haven’t export AhcWagon’s package, so can’t load it.

But my question is: caller(plexus-classworlds.jar) is in maven embedder bundle and AhcWagon(in wagon-ahc.jar) is in the same bundle. Why not use maven embedder’s bundle loader to load AhcWagon?

Am I something wrong to use this API?

That’s great! If there is any sample code.

Regards
Simon

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T05:53:02+00:00Added an answer on May 26, 2026 at 5:53 am

    m2eclipse0.12.1’s bug, need to export org.sonatype.maven.wagon in manifest.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to understand how to use SyndicationItem to display feed which is
I want use html5's new tag to play a wav file (currently only supported
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I'm trying to use string.replace('’','') to replace the dreaded weird single-quote character: ’ (aka
Basically, what I'm trying to create is a page of div tags, each has
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I am trying to loop through a bunch of documents I have to put
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.