• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Building Archetypes

 
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi gang,

Reaching out for the incredible help here at JR, once again.

So, now that I have gotten over most of the humps and learning curve of Maven, I am spreading my (still wet) wings a bit, and trying to create an Archetype for our development team.

We use Spring, Struts, and Velocity, plus a couple of other systems such as JUnit, Cobertura, and PMD. I could not find a provided archetype that set things up like this (closest was one of the AppFuse archetypes), so I figured I'd roll it myself.

I have it all together, but when I go to compile/install it I am getting errors that I cannot resolve.

First question, is there a way to do this from within eclipse?

Next, I first tried to use:

which I ran from the command line within my project root.

I get the following error:

Unable to find resource 'org.apache.maven.plugins:maven-archetype-plugin:plugin:12-SNAPSHOT' in repository central (http://central)


I am using Nexus Repo Manager, and have my settings.xml pointed to our repo as the mirror for *

When I tried to research that I found an article saying that archetype was deprecated and to use archetypeng instead. So I tried:

and I get:

The plugin 'org.apache.maven.plugins:maven-archetypeng-plugin' does not exist or no valid version could be found.



I noticed that org.apache.maven.plugins was not the proper groupId, so I changed to:

and I get:

The plugin 'org.apache.maven.plugins:maven-org.codehaus.mevenide.archetypeng-plugin' does not exist or no valid version could be found.


What am I doing wrong??!?!

Thanks,

Chris
 
author
Posts: 3285
13
Mac OS X Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What version of Maven are you using? Remember from 2.0.9 onwards the versions of plugins (including archetype) are 'locked' in the super POM and you may need to override that if there is a newer version than what comes default with your version of Maven.

Another thing to fdo is to actually go to the maven central repo via your web browser and make sure that the plugin version that you're looking for actually exists (if it does then you've probably got a Nexus config issue).
 
Christopher Burns
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Martijn,

I am running v2.1.0 of Maven.

Part of the problem is that I cannot find the bloody plugin anywhere... It isn't in org.apache.maven.plugins. I can't find it in org.codehaus.mojo either.

In the Apache docs at in the Attributes section it says:

This plugin goal has been deprecated: Please use the generate mojo instead.



But I cannot find the generate mojo anywhere either.

Is all of this documentation stale, or am I really missing something again?

Thanks,

Chris

BTW - I am assuming you are Dutch from the spelling of your name... true? Are you in Holland, or the US?
 
Christopher Burns
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ok... got it, finally...



worked.

But now, I am not understanding the mechanism that mapped my generic archetype:create-from-project to the 12-SNAPSHOT version. Can you 'splain that?

C
 
Martijn Verburg
author
Posts: 3285
13
Mac OS X Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Chris,

Yes I'm Dutch, but raised mainly in NZ and now resident of the UK (until I move on again) .

[Edit] Ah didn't see your new post. The reason is that the super pom references a default version (the lock down from 2.0.9 builds I mentioned before), so you had to manually override.

Yes the docs in some places aren't great, one small hint is that maven the definitive guide gets constantly updated _online_ only at the sonatype site, it's worth checking out for the latest info.
 
Christopher Burns
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Got it. Thanks for clearing that up, and, once again, for the help.

Dutch, NZ, UK... that must make for a very interesting accent!
 
Martijn Verburg
author
Posts: 3285
13
Mac OS X Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You're welcome and apparently my accent is still mainly Kiwi and reasonable shocking!
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic