Re: Maven, woapplication-archetype not found when using the local catalog
Re: Maven, woapplication-archetype not found when using the local catalog
- Subject: Re: Maven, woapplication-archetype not found when using the local catalog
- From: Lachlan Deck <email@hidden>
- Date: Mon, 8 Dec 2008 18:34:29 +1100
Hi Will,
On 08/12/2008, at 3:21 PM, William Hatch wrote:
On Dec 7, 2008, at 10:39 PM, Lachlan Deck wrote:
okay - so you've installed the nightlies from apple also.
Yes, that was from an earlier attempt over the summer; the 5.4.3 has
been installed via the wiki info, so that should be good. I don't
care about the other snapshots; certainly not the 5.4.2 one.
Cool.
mvn -e archetype:generate -DarchetypeCatalog=local
and then selecting "1" when presented with this prompt:
Choose archetype: 1: local -> woapplication-archetype
(WebObjects Application Archetype) 2: local -> woframework-
archetype (WebObjects Framework Archetype) Choose a number:
(1/2): 1
it ultimately fails with this:
Can you try the following:
mvn archetype:generate -DarchetypeArtifactId=woapplication-
archetype -DarchetypeGroupId=org.objectstyle.woproject.maven2 -
DarchetypeVersion=2.0.16 -DarchetypeRepository=http://webobjects.mdimension.com/maven2/releases
Got this as a result:
<...
[INFO]
------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO]
------------------------------------------------------------------------
Thought so.
And then after having done so, repeat what you did above.
org.apache.maven.BuildFailureException: The desired archetype
does not exist (org.objectstyle.woproject.maven2:woapplication-
archetype:2.0.16)
it appears to be trying to grab this from here:
Downloading: http://repo1.maven.org/maven2/org/objectstyle/woproject/maven2/woapplication-archetype/2.0.16/woapplication-archetype-2.0.16.jar
and it's not there.
It seems to me it's trying to add the actual archetype to the
local repository,
Correct. You've not got it installed (yet).
Right, so that doc should be updated then;
I've added a tip here on this page...
http://wiki.objectstyle.org/confluence/display/WOL/woapplication-archetype
... which is the page referenced to from here:
http://wiki.objectstyle.org/confluence/display/WOL/Quick+Start
I had the archetype-catalog.xml file, but not the archetype, so when
trying it, it failed.
Right. That could be a bug with the maven archetype:generate plugin...
er, no .. my bad:
It documents the following: "The repository where to find the
archetype. OPTIONAL . When ommitted, the archetype is searched for in
the repository where the catalog comes from."
@see http://maven.apache.org/plugins/maven-archetype-plugin/specification/archetype-catalog.html
So I've updated the wiki (with a tip and updated the archetype-
catalog.xml to reference the repository explicitly)
http://wiki.objectstyle.org/confluence/display/WOL/woapplication-archetype
Anyway, now when I run the above it creates a project with a pretty
funky directory layout, but it appears to be correct. Except that
it's not using 5.4.3, but rather 5.4.2. I'm going to try and figure
out how to make it not do that, as well as how to modify it so it
will include wonder support and a true war by default.
When following the prompts and it asks you .. is this correct. Say no.
Then it'll show you *all* the properties. e.g.,
ldeck$ mvn archetype:generate -DarchetypeCatalog=local,internal
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'archetype'.
[INFO]
------------------------------------------------------------------------
[INFO] Building Maven Default Project
[INFO] task-segment: [archetype:generate] (aggregator-style)
[INFO]
------------------------------------------------------------------------
[INFO] Preparing archetype:generate
[INFO] No goals needed for project - skipping
[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] [archetype:generate]
[INFO] Generating project in Interactive mode
[INFO] No archetype defined. Using maven-archetype-quickstart
(org.apache.maven.archetypes:maven-archetype-quickstart:1.0)
Choose archetype:
1: local -> woapplication-archetype (WOProject WO App 2.0.16)
2: local -> woframework-archetype (WOProject WO FMWK 2.0.16)
3: local -> woapplication-archetype (WOProject WO App 2.0.17-SNAPSHOT)
4: local -> woframework-archetype (WOProject WO FMWK 2.0.17-SNAPSHOT)
5: internal -> appfuse-basic-jsf (AppFuse archetype for creating a web
application with Hibernate, Spring and JSF)
6: internal -> appfuse-basic-spring (AppFuse archetype for creating a
web application with Hibernate, Spring and Spring MVC)
7: internal -> appfuse-basic-struts (AppFuse archetype for creating a
web application with Hibernate, Spring and Struts 2)
8: internal -> appfuse-basic-tapestry (AppFuse archetype for creating
a web application with Hibernate, Spring and Tapestry 4)
9: internal -> appfuse-core (AppFuse archetype for creating a jar
application with Hibernate and Spring and XFire)
10: internal -> appfuse-modular-jsf (AppFuse archetype for creating a
modular application with Hibernate, Spring and JSF)
<...>
45: internal -> lift-archetype-basic (The basic (liftweb) project)
46: internal -> cocoon-22-archetype-block-plain ([http://cocoon.apache.org/2.2/maven-plugins/
])
47: internal -> cocoon-22-archetype-block ([http://cocoon.apache.org/2.2/maven-plugins/
])
48: internal -> cocoon-22-archetype-webapp ([http://cocoon.apache.org/2.2/maven-plugins/
])
Choose a number:
(1
/
2
/
3
/
4
/
5
/
6
/
7
/
8
/
9
/
10
/
11
/
12
/
13
/
14
/
15
/
16
/
17
/
18
/
19
/
20
/
21
/
22
/
23
/
24
/
25
/26/27/28/29/30/31/32/33/34/35/36/37/38/39/40/41/42/43/44/45/46/47/48)
19: : 1
Define value for groupId: : foo
Define value for artifactId: : bar
Define value for version: 1.0-SNAPSHOT: :
Define value for package: : foo.bar.appserver
Confirm properties configuration:
WebObjectsVersion: 5.4.2
WonderSupport: no
WonderVersion: 5.0.0-SNAPSHOT
TrueWarSupport: no
groupId: foo
artifactId: bar
version: 1.0-SNAPSHOT
package: foo.bar.appserver
Y: : n
Define value for WebObjectsVersion: 5.4.2: : 5.4.3
Define value for WonderSupport: no: : yes
Define value for WonderVersion: 5.0.0-SNAPSHOT: :
Define value for TrueWarSupport: no: : yes
Define value for groupId: : foo.bar
Define value for artifactId: : baz
Define value for version: 1.0-SNAPSHOT: :
Define value for package: : foo.bar.appserver
Confirm properties configuration:
WebObjectsVersion: 5.4.3
WonderSupport: yes
WonderVersion: 5.0.0-SNAPSHOT
TrueWarSupport: yes
groupId: foo.bar
artifactId: baz
version: 1.0-SNAPSHOT
package: foo.bar.appserver
Y: :
[INFO]
------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 1 minute 41 seconds
[INFO] Finished at: Mon Dec 08 18:14:48 EST 2008
[INFO] Final Memory: 8M/15M
[INFO]
------------------------------------------------------------------------
ldeck$
Now that you know the properties expected ... you can do this:
ip-144:dum ldeck$ mvn archetype:generate -DarchetypeCatalog=local -
DWebObjectsVersion=5.4.3 -DWonderSupport=yes -DWonderVersion=5.0.0-
SNAPSHOT -DTrueWarSupport=yes
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'archetype'.
[INFO]
------------------------------------------------------------------------
[INFO] Building Maven Default Project
[INFO] task-segment: [archetype:generate] (aggregator-style)
[INFO]
------------------------------------------------------------------------
[INFO] Preparing archetype:generate
[INFO] No goals needed for project - skipping
[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] [archetype:generate]
[INFO] Generating project in Interactive mode
[INFO] No archetype defined. Using maven-archetype-quickstart
(org.apache.maven.archetypes:maven-archetype-quickstart:1.0)
Choose archetype:
1: local -> woapplication-archetype (WOProject WO App 2.0.16)
2: local -> woframework-archetype (WOProject WO FMWK 2.0.16)
3: local -> woapplication-archetype (WOProject WO App 2.0.17-SNAPSHOT)
4: local -> woframework-archetype (WOProject WO FMWK 2.0.17-SNAPSHOT)
Choose a number: (1/2/3/4): 1
Define value for groupId: : test
Define value for artifactId: : me
Define value for version: 1.0-SNAPSHOT: :
Define value for package: : testing.appserver
Confirm properties configuration:
WebObjectsVersion: 5.4.3
WonderSupport: yes
WonderVersion: 5.0.0-SNAPSHOT
TrueWarSupport: yes
groupId: test
artifactId: me
version: 1.0-SNAPSHOT
package: testing.appserver
Y: :
[INFO]
------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 44 seconds
[INFO] Finished at: Mon Dec 08 18:33:27 EST 2008
[INFO] Final Memory: 8M/15M
[INFO]
------------------------------------------------------------------------
ldeck$
And then finally onto the real goal of modifying the dependencies in
the project's pom such that I can declare all externals as
"provided" and NOT shove them all into the resulting war. Thanks for
all the help, I'll let you know how we make out. Totally psyched
now;-)
Cool. Have fun...
and not being able to find it as it's looking in the wrong place.
Am I completely wrong here?
Thanks Lachlan, I'm sure I'm getting pretty close, just need to
clear up these last few details.
No worries... we'll get there.
with regards,
--
Lachlan Deck
with regards,
--
Lachlan Deck
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden