Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes Ant, Maven and Other Build Tools and the fly likes How to create Hello World projects using Maven for Hibernate, JPA, EJB, ActiveMQ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "How to create Hello World projects using Maven for Hibernate, JPA, EJB, ActiveMQ?" Watch "How to create Hello World projects using Maven for Hibernate, JPA, EJB, ActiveMQ?" New topic
Author

How to create Hello World projects using Maven for Hibernate, JPA, EJB, ActiveMQ?

Siegfried Heintze
Ranch Hand

Joined: Aug 11, 2000
Posts: 381
I'm trying to start a simple project as per the instructions at http://docs.codehaus.org/display/MAVENUSER/Archetypes+List.

I have MAVEN_HOME defined correctly (I hope).
I have MAVEN_HOME/bin in my path.
I'm using cygwin/bash on XP.

I'm getting the results below. What am I doing wrong? I want to start a simple "hello world" hibernate project and a simple JPA project.

Why are there no archetypes for entity bmp/cmp and session stateful/stateless and message ejbs? Where can I learn how to create simple "hello world" starter projects for these?

I found http://openejb.apache.org/examples.html and tried them and when they would not work, I posted in the ejb forum. But now that I see the results below, I'm wondering if it is a maven problem instead of a bad openejb example.


Thanks,
Siegfried

Martijn Verburg
author
Bartender

Joined: Jun 24, 2003
Posts: 3274
    
    5

Maven is not finding the goal it needs in the version of the plugin you've specified. You'll need to make sure that:

1.) Maven is correctly downloading its plugins (try mvn help:compile)
2.) If 1.) is OK, then try specifying the latest version of the archetype plugin in your POM (latest version can be found on their website)


Cheers, Martijn - Blog,
Twitter, PCGen, Ikasan, My The Well-Grounded Java Developer book!,
My start-up.
Siegfried Heintze
Ranch Hand

Joined: Aug 11, 2000
Posts: 381

I'm not sure I understand what you are suggesting I do. This does not look good, however!






Martijn Verburg
author
Bartender

Joined: Jun 24, 2003
Posts: 3274
    
    5

Nope that's not good . Maven needs to go out to the Internet in order to get it's various plugins etc. Chnaces are you havea proxy server in place that is blocking this access. Luckily Maven has a section in its configuration to bypass this, see here.
Siegfried Heintze
Ranch Hand

Joined: Aug 11, 2000
Posts: 381
Renaming .m2 in my %HOMEPATH% to save.m2 seems to have solved the problem.
Thanks!
Siegfried
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5812
    
    7

If renaming worked, then I wonder if the issue was that you messed up your settings.xml file or if your local repository got corrupted. You might want to determine which it is or else it might bite you again.


JBoss In Action
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to create Hello World projects using Maven for Hibernate, JPA, EJB, ActiveMQ?
 
Similar Threads
How to run OpenEJB Examples?
Axis 2 with maven
Maven archetypes broken?
Not Getting Started with Maven - Archtype plugin Not found
Wanted: Spring tutorials with Maven (or Ant)