Discussion:
does the maven-archetype-j2ee-simple work?
a***@nokia.com
2006-07-25 21:13:25 UTC
Permalink
Question as in the subject.

This is how I invoked it:

mvn archetype:create -DarchetypeGroupId=org.apache.maven.archetypes
-DarchetypeArtifactId=maven-archetype-j2ee-simple
-DarchetypeVersion=1.0-alpha-4
-DgroupId=ossj.jsr264
-DartifactId=oss_om_ri


And this is the error in the output:
################################################################################
[INFO] ResourceManager : found archetype-resources/servlets/servlet/src/main/webapp/WEB-INF/web.xml
with loader org.codehaus.plexus.velocity.ContextClassLoaderResourceLoader
[ERROR] ResourceManager : unable to find resource 'archetype-resources/site/pom.xml' in any resource loader.
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Error creating from archetype

Embedded error: Error processing templates.
Unable to find resource 'archetype-resources/site/pom.xml'
################################################################################


Indeed, if I take a look into the jar file from http://www.ibiblio.org/maven2/org/apache/maven/archetypes/maven-archetype-j2ee-simple/1.0-alpha-4/maven-archetype-j2ee-simple-1.0-alpha-4.jar
* the archetype-resources\pom.xml refers to the site project:
<modules>
<module>projects</module>
<module>primary-source</module>
<module>servlets</module>
<module>ejbs</module>
<module>ear</module>
<module>site</module>
</modules>

* there is no such project as archetype-resources\site

Also, I could not find a bug report for it at http://jira.codehaus.org/browse/ARCHETYPE. Is it really a bug, or am I doing something wrong?

_ __ _ _
//\ndreas.[|-bbert-[]/arroum(a)[|\|okia.com
`- `
Andreas Ebbert-Karroum
   Senior Software Design Engineer
Nokia Networks Services / Middleware
   phone: +49-211-94123928, fax: +49-211-9412-3838
   Heltorfer Straße 1, 40472 Düsseldorf, Germany

----------------------------------------------------------------------
This message is confidential. If you have received this message in error, please delete it from your system. You should not copy it for any purpose, or disclose its contents to any other person. Internet communications are not secure and therefore Nokia GmbH does not accept legal responsibility for the contents of this message as it has been transmitted over a public network. Thank you.
Nokia GmbH, Nokia Networks is a German Company. Further information about the Company is available from its principal offices at Heltorferstrasse 1, D-40472, Düsseldorf, Germany and from the website at http://www.nokia.com/
----------------------------------------------------------------------
a***@nokia.com
2006-07-25 21:18:35 UTC
Permalink
It works if I modify the following files in my local repository. It's a bad thing to do, I know, but otherwise it won't work at all:

1) maven-archetype-j2ee-simple-1.0-alpha-4.jar\archetype-resources\pom.xml:

<modules>
<module>projects</module>
<module>primary-source</module>
<module>servlets</module>
<module>ejbs</module>
<module>ear</module>
<!-- module>site</module -->
</modules>

2) maven-archetype-j2ee-simple-1.0-alpha-4.jar\META-INF\archetype.xml:

<resources>
<resource>pom.xml</resource>
<resource>ear/pom.xml</resource>
<resource>ejbs/src/main/resources/META-INF/ejb-jar.xml</resource>
<resource>ejbs/pom.xml</resource>
<resource>primary-source/pom.xml</resource>
<resource>projects/logging/pom.xml</resource>
<resource>projects/pom.xml</resource>
<resource>servlets/pom.xml</resource>
<resource>servlets/servlet/pom.xml</resource>
<resource>servlets/servlet/src/main/webapp/index.jsp</resource>
<resource>servlets/servlet/src/main/webapp/WEB-INF/web.xml</resource>
<!-- resource>site/pom.xml</resource>
<resource>site/src/site/site.xml</resource>
<resource>site/src/site/apt/site.apt</resource -->
</resources>

After I did that, the j2ee project was created and also a 'mvn install' worked fine.

_ __ _ _
//\ndreas.[|-bbert-[]/arroum(a)[|\|okia.com
`- `
Andreas Ebbert-Karroum
   Senior Software Design Engineer
Nokia Networks Services / Middleware
   phone: +49-211-94123928, fax: +49-211-9412-3838
   Heltorfer Straße 1, 40472 Düsseldorf, Germany

----------------------------------------------------------------------
This message is confidential. If you have received this message in error, please delete it from your system. You should not copy it for any purpose, or disclose its contents to any other person. Internet communications are not secure and therefore Nokia GmbH does not accept legal responsibility for the contents of this message as it has been transmitted over a public network. Thank you.
Nokia GmbH, Nokia Networks is a German Company. Further information about the Company is available from its principal offices at Heltorferstrasse 1, D-40472, Düsseldorf, Germany and from the website at http://www.nokia.com/
----------------------------------------------------------------------
-----Original Message-----
From: ext
ry.dev.java.net
repository.dev.java.net]
Sent: 25 July, 2006 21:27
Subject: does the maven-archetype-j2ee-simple work?
Question as in the subject.
mvn archetype:create
-DarchetypeGroupId=org.apache.maven.archetypes
-DarchetypeArtifactId=maven-archetype-j2ee-simple
-DarchetypeVersion=1.0-alpha-4
-DgroupId=ossj.jsr264
-DartifactId=oss_om_ri
###############################################################
#################
[INFO] ResourceManager : found
archetype-resources/servlets/servlet/src/main/webapp/WEB-INF/web.xml
with loader
org.codehaus.plexus.velocity.ContextClassLoaderResourceLoader
[ERROR] ResourceManager : unable to find resource
'archetype-resources/site/pom.xml' in any resource loader.
[INFO]
---------------------------------------------------------------
---------
[ERROR] BUILD ERROR
[INFO]
---------------------------------------------------------------
---------
[INFO] Error creating from archetype
Embedded error: Error processing templates.
Unable to find resource 'archetype-resources/site/pom.xml'
###############################################################
#################
Indeed, if I take a look into the jar file from
http://www.ibiblio.org/maven2/org/apache/maven/archetypes/maven
-archetype-j2ee-simple/1.0-alpha-4/maven-archetype-j2ee-simple-
1.0-alpha-4.jar
<modules>
<module>projects</module>
<module>primary-source</module>
<module>servlets</module>
<module>ejbs</module>
<module>ear</module>
<module>site</module>
</modules>
* there is no such project as archetype-resources\site
Also, I could not find a bug report for it at
http://jira.codehaus.org/browse/ARCHETYPE. Is it really a bug,
or am I doing something wrong?
_ __ _ _
//\ndreas.[|-bbert-[]/arroum(a)[|\|okia.com
`- `
Andreas Ebbert-Karroum
   Senior Software Design Engineer
Nokia Networks Services / Middleware
   phone: +49-211-94123928, fax: +49-211-9412-3838
   Heltorfer Straße 1, 40472 Düsseldorf, Germany
----------------------------------------------------------------------
This message is confidential. If you have received this
message in error, please delete it from your system. You
should not copy it for any purpose, or disclose its contents
to any other person. Internet communications are not secure
and therefore Nokia GmbH does not accept legal responsibility
for the contents of this message as it has been transmitted
over a public network. Thank you.
Nokia GmbH, Nokia Networks is a German Company. Further
information about the Company is available from its principal
offices at Heltorferstrasse 1, D-40472, Düsseldorf, Germany
and from the website at http://www.nokia.com/
----------------------------------------------------------------------
---------------------------------------------------------------------
Loading...