You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Wayne Fay <wa...@gmail.com> on 2009/05/22 02:15:28 UTC

Re: How to create Hello World Projects using Maven for Spring, Hibernate, JPA, EJB, ActiveMQ?

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

1. What "results below"? You didn't include anything in your email.

2. If you read the openejb page, it says these examples can "be run...
with Maven". It doesn't say anything about there being archetypes for
each one of them. Instead, there's a zip file with all the samples
inside, and then you click around between directories to run/build
each one.

The listing of archetpes on the Maven User wiki is pretty complete, as
far as I am aware. There are no specific archetypes for "session
stateful ejb" -- just generic project/framework archetypes. Of course,
you're welcome to build something and contribute it back.

Perhaps you'd find Archy helpful/useful?
http://code.google.com/p/archy/

Wayne

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


RE: How to create Hello World Projects using Maven for Spring, Hibernate, JPA, EJB, ActiveMQ?

Posted by siegfried <si...@heintze.com>.
There was a nice archetype that created a simple spring hibernate that uses
dbunit. Now I cannot find it. Was it this one?
mvn org.apache.maven.plugins:maven-archetype-plugin:1.0-alpha-7:create
-DgroupId=www.signitek.com -DartifactId=demo-osgi-spring
-DarchetypeArtifactId -DarchetypeArtifactId=spring-osgi-bundle-archetype
-DarchetypeGroupId=org.springframework.osgi

I tried execute this and the results are below.


>
>-----Original Message-----
>From: Wayne Fay [mailto:waynefay@gmail.com] 
>Sent: Friday, May 22, 2009 1:18 PM
>To: Maven Users List
>Subject: Re: How to create Hello World Projects using Maven for Spring,
Hibernate, JPA, EJB, ActiveMQ?
>
>> Is http://docs.codehaus.org/display/MAVENUSER/Archetypes+List the best
list
>> of archetypes?
>
>As I sent in a previous email...
>The listing of archetpes on the Maven User wiki is pretty complete, as
>far as I am aware. There are no specific archetypes for "session
>stateful ejb" -- just generic project/framework archetypes. Of course,
>you're welcome to build something and contribute it back.
>
>Wayne
>

 [INFO] Scanning for projects...

Downloading:
http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-archetype-plugi
n/1.0-alpha-7/maven-archetype-plugin-1.0-alpha-7.pom

4/4K
4/4K
4K downloaded  (maven-archetype-plugin-1.0-alpha-7.pom)

Downloading:
http://repo1.maven.org/maven2/org/apache/maven/archetype/maven-archetype/1.0
-alpha-7/maven-archetype-1.0-alpha-7.pom

3/3K
3K downloaded  (maven-archetype-1.0-alpha-7.pom)

Downloading:
http://repo1.maven.org/maven2/org/apache/maven/archetype/maven-archetype-par
ent/2/maven-archetype-parent-2.pom

2/2K
2K downloaded  (maven-archetype-parent-2.pom)

Downloading:
http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-archetype-plugi
n/1.0-alpha-7/maven-archetype-plugin-1.0-alpha-7.jar

4/12K
8/12K
12/12K
12/12K
12K downloaded  (maven-archetype-plugin-1.0-alpha-7.jar)

[INFO]
------------------------------------------------------------------------

[INFO] Building Maven Default Project

[INFO]    task-segment:
[org.apache.maven.plugins:maven-archetype-plugin:1.0-alpha-7:create]
(aggregator-style)

[INFO]
------------------------------------------------------------------------

Downloading:
http://repo1.maven.org/maven2/org/apache/maven/archetype/maven-archetype-cor
e/1.0-alpha-7/maven-archetype-core-1.0-alpha-7.pom

1/1K
1K downloaded  (maven-archetype-core-1.0-alpha-7.pom)

Downloading:
http://repo1.maven.org/maven2/org/codehaus/plexus/plexus-velocity/1.1.2/plex
us-velocity-1.1.2.pom

4/7K
7/7K
7K downloaded  (plexus-velocity-1.1.2.pom)

Downloading:
http://repo1.maven.org/maven2/commons-collections/commons-collections/2.0/co
mmons-collections-2.0.pom

171/171b
171b downloaded  (commons-collections-2.0.pom)

Downloading:
http://repo1.maven.org/maven2/commons-logging/commons-logging-api/1.0.4/comm
ons-logging-api-1.0.4.pom

168/168b
168b downloaded  (commons-logging-api-1.0.4.pom)

Downloading:
http://repo1.maven.org/maven2/org/codehaus/plexus/plexus-container-default/1
.0-alpha-9/plexus-container-default-1.0-alpha-9.pom

1/1K
1K downloaded  (plexus-container-default-1.0-alpha-9.pom)

Downloading:
http://repo1.maven.org/maven2/org/apache/maven/shared/maven-downloader/1.0/m
aven-downloader-1.0.pom

1/1K
1K downloaded  (maven-downloader-1.0.pom)

Downloading:
http://repo1.maven.org/maven2/org/apache/maven/shared/maven-shared-component
s/4/maven-shared-components-4.pom

2/2K
2K downloaded  (maven-shared-components-4.pom)

Downloading:
http://repo1.maven.org/maven2/org/apache/maven/archetype/maven-archetype-cre
ator/1.0-alpha-7/maven-archetype-creator-1.0-alpha-7.pom

1/1K
1K downloaded  (maven-archetype-creator-1.0-alpha-7.pom)

Downloading:
http://repo1.maven.org/maven2/org/apache/maven/archetype/maven-archetype-mod
el/1.0-alpha-7/maven-archetype-model-1.0-alpha-7.pom

1/1K
1K downloaded  (maven-archetype-model-1.0-alpha-7.pom)

Downloading:
http://repo1.maven.org/maven2/org/codehaus/plexus/plexus-archiver/1.0-alpha-
5/plexus-archiver-1.0-alpha-5.pom

439/439b
439b downloaded  (plexus-archiver-1.0-alpha-5.pom)

Downloading:
http://repo1.maven.org/maven2/org/apache/maven/shared/maven-downloader/1.0/m
aven-downloader-1.0.jar

Downloading:
http://repo1.maven.org/maven2/plexus/plexus-utils/1.0.2/plexus-utils-1.0.2.j
ar

Downloading:
http://repo1.maven.org/maven2/org/apache/maven/archetype/maven-archetype-cor
e/1.0-alpha-7/maven-archetype-core-1.0-alpha-7.jar

Downloading:
http://repo1.maven.org/maven2/commons-logging/commons-logging-api/1.0.4/comm
ons-logging-api-1.0.4.jar

Downloading:
http://repo1.maven.org/maven2/org/codehaus/plexus/plexus-velocity/1.1.2/plex
us-velocity-1.1.2.jar

4/6K
6/6K
6K downloaded  (maven-downloader-1.0.jar)

Downloading:
http://repo1.maven.org/maven2/commons-collections/commons-collections/2.0/co
mmons-collections-2.0.jar

4/24K
8/24K
9/24K
9/24K 4/156K
9/24K 8/156K
9/24K 9/156K
9/24K 9/156K 4/25K
9/24K 9/156K 8/25K
9/24K 9/156K 9/25K
9/24K 9/156K 9/25K 4/7K
9/24K 9/156K 9/25K 7/7K
7K downloaded  (plexus-velocity-1.1.2.jar)

12/24K 9/156K 9/25K
12/24K 9/156K 9/25K 4/88K
12/24K 9/156K 9/25K 8/88K
12/24K 9/156K 9/25K 12/88K
12/24K 9/156K 9/25K 13/88K
12/24K 12/156K 9/25K 13/88K
12/24K 13/156K 9/25K 13/88K
12/24K 13/156K 13/25K 13/88K
12/24K 13/156K 15/25K 13/88K
Downloading:
http://repo1.maven.org/maven2/org/codehaus/plexus/plexus-archiver/1.0-alpha-
5/plexus-archiver-1.0-alpha-5.jar

16/24K 13/156K 15/25K 13/88K
16/24K 13/156K 15/25K 13/88K
20/24K 13/156K 15/25K 13/88K
24/24K 13/156K 15/25K 13/88K
24K downloaded  (maven-archetype-core-1.0-alpha-7.jar)

13/156K 15/25K 17/88K
13/156K 15/25K 21/88K
13/156K 15/25K 21/88K
16/156K 15/25K 21/88K
20/156K 15/25K 21/88K
24/156K 15/25K 21/88K
25/156K 15/25K 21/88K
25/156K 16/25K 21/88K
25/156K 20/25K 21/88K
25/156K 24/25K 21/88K
25/156K 25/25K 21/88K
25K downloaded  (commons-logging-api-1.0.4.jar)

25/156K 25/88K
25/156K 29/88K
25/156K 33/88K
25/156K 35/88K
Downloading:
http://repo1.maven.org/maven2/org/apache/maven/archetype/maven-archetype-cre
ator/1.0-alpha-7/maven-archetype-creator-1.0-alpha-7.jar

25/156K 39/88K
25/156K 43/88K
25/156K 44/88K
28/156K 44/88K
32/156K 44/88K
36/156K 44/88K
36/156K 44/88K
36/156K 44/88K 4/129K
36/156K 44/88K 8/129K
36/156K 44/88K 9/129K
36/156K 44/88K 12/129K
36/156K 48/88K 12/129K
36/156K 52/88K 12/129K
36/156K 52/88K 12/129K
36/156K 55/88K 12/129K
36/156K 55/88K 12/129K 4/23K
36/156K 55/88K 12/129K 8/23K
36/156K 55/88K 12/129K 9/23K
36/156K 59/88K 12/129K 9/23K
36/156K 63/88K 12/129K 9/23K
36/156K 63/88K 12/129K 9/23K
36/156K 67/88K 12/129K 9/23K
36/156K 71/88K 12/129K 9/23K
36/156K 72/88K 12/129K 9/23K
40/156K 72/88K 12/129K 9/23K
42/156K 72/88K 12/129K 9/23K
46/156K 72/88K 12/129K 9/23K
50/156K 72/88K 12/129K 9/23K
51/156K 72/88K 12/129K 9/23K
55/156K 72/88K 12/129K 9/23K
59/156K 72/88K 12/129K 9/23K
60/156K 72/88K 12/129K 9/23K
62/156K 72/88K 12/129K 9/23K
64/156K 72/88K 12/129K 9/23K
64/156K 72/88K 16/129K 9/23K
64/156K 72/88K 16/129K 9/23K
64/156K 76/88K 16/129K 9/23K
64/156K 80/88K 16/129K 9/23K
64/156K 80/88K 16/129K 9/23K
64/156K 82/88K 16/129K 9/23K
64/156K 86/88K 16/129K 9/23K
64/156K 88/88K 16/129K 9/23K
88K downloaded  (commons-collections-2.0.jar)

64/156K 16/129K 13/23K
64/156K 16/129K 16/23K
64/156K 16/129K 20/23K
64/156K 16/129K 23/23K
23K downloaded  (maven-archetype-creator-1.0-alpha-7.jar)

68/156K 16/129K
72/156K 16/129K
72/156K 16/129K
76/156K 16/129K
80/156K 16/129K
81/156K 16/129K
85/156K 16/129K
89/156K 16/129K
89/156K 16/129K
93/156K 16/129K
97/156K 16/129K
98/156K 16/129K
98/156K 20/129K
98/156K 24/129K
98/156K 25/129K
98/156K 28/129K
98/156K 32/129K
98/156K 36/129K
98/156K 36/129K
Downloading:
http://repo1.maven.org/maven2/org/apache/maven/archetype/maven-archetype-mod
el/1.0-alpha-7/maven-archetype-model-1.0-alpha-7.jar

102/156K 36/129K
106/156K 36/129K
108/156K 36/129K
112/156K 36/129K
116/156K 36/129K
116/156K 36/129K
120/156K 36/129K
123/156K 36/129K
127/156K 36/129K
131/156K 36/129K
134/156K 36/129K
135/156K 36/129K
139/156K 36/129K
143/156K 36/129K
147/156K 36/129K
151/156K 36/129K
155/156K 36/129K
156/156K 36/129K
156K downloaded  (plexus-utils-1.0.2.jar)

40/129K
44/129K
47/129K
51/129K
55/129K
56/129K
56/129K 4/18K
56/129K 8/18K
56/129K 12/18K
56/129K 12/18K
56/129K 13/18K
60/129K 13/18K
62/129K 13/18K
64/129K 13/18K
68/129K 13/18K
72/129K 13/18K
72/129K 13/18K
76/129K 13/18K
80/129K 13/18K
81/129K 13/18K
85/129K 13/18K
89/129K 13/18K
89/129K 13/18K
89/129K 17/18K
89/129K 18/18K
18K downloaded  (maven-archetype-model-1.0-alpha-7.jar)

93/129K
97/129K
98/129K
102/129K
106/129K
107/129K
111/129K
115/129K
115/129K
119/129K
123/129K
124/129K
128/129K
129/129K
129K downloaded  (plexus-archiver-1.0-alpha-5.jar)

[INFO] Setting property: classpath.resource.loader.class =>
'org.codehaus.plexus.velocity.ContextClassLoaderResourceLoader'.

[INFO] Setting property: velocimacro.messages.on => 'false'.

[INFO] Setting property: resource.loader => 'classpath'.

[INFO] Setting property: resource.manager.logwhenfound => 'false'.

[INFO] ************************************************************** 

[INFO] Starting Jakarta Velocity v1.4

[INFO] RuntimeInstance initializing.

[INFO] Default Properties File:
org\apache\velocity\runtime\defaults\velocity.properties

[INFO] Default ResourceManager initializing. (class
org.apache.velocity.runtime.resource.ResourceManagerImpl)

[INFO] Resource Loader Instantiated:
org.codehaus.plexus.velocity.ContextClassLoaderResourceLoader

[INFO] ClasspathResourceLoader : initialization starting.

[INFO] ClasspathResourceLoader : initialization complete.

[INFO] ResourceCache : initialized. (class
org.apache.velocity.runtime.resource.ResourceCacheImpl)

[INFO] Default ResourceManager initialization complete.

[INFO] Loaded System Directive:
org.apache.velocity.runtime.directive.Literal

[INFO] Loaded System Directive: org.apache.velocity.runtime.directive.Macro

[INFO] Loaded System Directive: org.apache.velocity.runtime.directive.Parse

[INFO] Loaded System Directive:
org.apache.velocity.runtime.directive.Include

[INFO] Loaded System Directive:
org.apache.velocity.runtime.directive.Foreach

[INFO] Created: 20 parsers.

[INFO] Velocimacro : initialization starting.

[INFO] Velocimacro : adding VMs from VM library template :
VM_global_library.vm

[ERROR] ResourceManager : unable to find resource 'VM_global_library.vm' in
any resource loader.

[INFO] Velocimacro : error using  VM library template VM_global_library.vm :
org.apache.velocity.exception.ResourceNotFoundException: Unable to find
resource 'VM_global_library.vm'

[INFO] Velocimacro :  VM library template macro registration complete.

[INFO] Velocimacro : allowInline = true : VMs can be defined inline in
templates

[INFO] Velocimacro : allowInlineToOverride = false : VMs defined inline may
NOT replace previous VM definitions

[INFO] Velocimacro : allowInlineLocal = false : VMs defined inline will be
global in scope if allowed.

[INFO] Velocimacro : initialization complete.

[INFO] Velocity successfully started.

[INFO] [archetype:create]

[INFO] Defaulting package to group ID: www.signitek.com

[INFO]
------------------------------------------------------------------------

[ERROR] BUILD ERROR

[INFO]
------------------------------------------------------------------------

[INFO] Error creating from archetype

Embedded error: Archetype does not exist.
Unable to determine the release version



Try downloading the file manually from the project website.



Then, install it using the command: 

    mvn install:install-file -DgroupId=org.springframework.osgi
-DartifactId=spring-osgi-bundle-archetype -Dversion=RELEASE -Dpackaging=jar
-Dfile=/path/to/file



Alternatively, if you host your own repository you can deploy the file
there: 

    mvn deploy:deploy-file -DgroupId=org.springframework.osgi
-DartifactId=spring-osgi-bundle-archetype -Dversion=RELEASE -Dpackaging=jar
-Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]





  org.springframework.osgi:spring-osgi-bundle-archetype:jar:RELEASE







[INFO]
------------------------------------------------------------------------

[INFO] For more information, run Maven with the -e switch

[INFO]
------------------------------------------------------------------------

[INFO] Total time: 8 seconds

[INFO] Finished at: Sat Sep 12 19:36:12 PDT 2009

[INFO] Final Memory: 5M/10M

[INFO]
------------------------------------------------------------------------


Compilation exited abnormally with code 1 at Sat Sep 12 19:36:13


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


Re: How to create Hello World Projects using Maven for Spring, Hibernate, JPA, EJB, ActiveMQ?

Posted by Wayne Fay <wa...@gmail.com>.
> Is http://docs.codehaus.org/display/MAVENUSER/Archetypes+List the best list
> of archetypes?

As I sent in a previous email...
The listing of archetpes on the Maven User wiki is pretty complete, as
far as I am aware. There are no specific archetypes for "session
stateful ejb" -- just generic project/framework archetypes. Of course,
you're welcome to build something and contribute it back.

Wayne

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


RE: How to create Hello World Projects using Maven for Spring, Hibernate, JPA, EJB, ActiveMQ?

Posted by siegfried <si...@heintze.com>.
Renaming .m2 to save.m2 seems to have fixed the problem. Thanks!

Is http://docs.codehaus.org/display/MAVENUSER/Archetypes+List the best list
of archetypes?

>
>> Ooops!  Do I need to delete me repository?
>>
>> [INFO] Required goal not found: archetype:generate in
>> org.apache.maven.plugins:maven-archetype-plugin:1.0-alpha-7
>
>If you look at the documentation, you'll see the generate goal was not
>added until 2.0-alpha-4, so this error message is correct. Your
>archetype plugin is WAY out of date.
>
>> [INFO] The plugin 'org.apache.maven.plugins:maven-help-plugin' does not
>> exist or  no valid version could be found
>
>Try again with "mvn -U -e archetype:generate" and "mvn -U
>help:compile". If that doesn't work, you could try deleting your local
>repo cache and things would probably start working again. It sounds
>like you've managed to mess up some metadata, or something.
>
>Wayne
>


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


Re: How to create Hello World Projects using Maven for Spring, Hibernate, JPA, EJB, ActiveMQ?

Posted by Wayne Fay <wa...@gmail.com>.
> Ooops!  Do I need to delete me repository?
>
> [INFO] Required goal not found: archetype:generate in
> org.apache.maven.plugins:maven-archetype-plugin:1.0-alpha-7

If you look at the documentation, you'll see the generate goal was not
added until 2.0-alpha-4, so this error message is correct. Your
archetype plugin is WAY out of date.

> [INFO] The plugin 'org.apache.maven.plugins:maven-help-plugin' does not
> exist or  no valid version could be found

Try again with "mvn -U -e archetype:generate" and "mvn -U
help:compile". If that doesn't work, you could try deleting your local
repo cache and things would probably start working again. It sounds
like you've managed to mess up some metadata, or something.

Wayne

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


RE: How to create Hello World Projects using Maven for Spring, Hibernate, JPA, EJB, ActiveMQ?

Posted by siegfried <si...@heintze.com>.
Ooops!  Do I need to delete me repository?


Sorry: here it is!

bash-3.2$ mvn -e archetype:generate   
+ Error stacktraces are turned on.   
[INFO] Scanning for projects...   
[INFO] Searching repository for plugin with prefix: 'archetype'.   
[INFO]
------------------------------------------------------------------------   
[ERROR] BUILD FAILURE   
[INFO]
------------------------------------------------------------------------   
[INFO] Required goal not found: archetype:generate in
org.apache.maven.plugins:m   
aven-archetype-plugin:1.0-alpha-7  
[INFO]
------------------------------------------------------------------------   
[INFO] Trace   
org.apache.maven.BuildFailureException: Required goal not found:
archetype:gener   
ate in org.apache.maven.plugins:maven-archetype-plugin:1.0-alpha-7  
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.getMojoDescriptor   
(DefaultLifecycleExecutor.java:1802)   
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.segmentTaskListBy   
AggregationNeeds(DefaultLifecycleExecutor.java:446)   
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLi   
fecycleExecutor.java:176)   
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:356)   
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:137)   
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:356)   
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)   
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.   
java:39)   
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces   
sorImpl.java:25)   
        at java.lang.reflect.Method.invoke(Method.java:597)   
        at
org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)   
        at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)   
        at
org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)   
  
        at org.codehaus.classworlds.Launcher.main(Launcher.java:375)   
[INFO]
------------------------------------------------------------------------   
[INFO] Total time: < 1 second   
[INFO] Finished at: Thu May 21 01:04:52 PDT 2009  
[INFO] Final Memory: 1M/4M   
[INFO]
------------------------------------------------------------------------   
bash-3.2$   
  
bash-3.2$ mvn -v   
Apache Maven 2.1.0 (r755702; 2009-03-18 12:10:27-0700)   
Java version: 1.6.0  
Java home: c:\Program Files\Java\jdk1.6.0\jre   
Default locale: en_US, platform encoding: Cp1252   
OS name: "windows 2003" version: "5.2" arch: "x86" Family: "windows"  
bash-3.2$   
C:\Documents and Settings\Administrator\temp>mvn help:compile
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'help'.
[INFO] artifact org.apache.maven.plugins:maven-help-plugin: checking for
updates
 from central
[INFO]
------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO]
------------------------------------------------------------------------
[INFO] The plugin 'org.apache.maven.plugins:maven-help-plugin' does not
exist or
 no valid version could be found
[INFO]
------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 1 second
[INFO] Finished at: Thu May 21 21:26:05 PDT 2009
[INFO] Final Memory: 1M/4M
[INFO]
------------------------------------------------------------------------
C:\Documents and Settings\Administrator\temp>

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