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: William Hatch <email@hidden>
- Date: Sun, 07 Dec 2008 23:21:44 -0500
On Dec 7, 2008, at 10:39 PM, Lachlan Deck wrote:
I've got:
5.4.2 _SNAPSHOT
5.4.3
5.4.3_SNAPSHOT
and six other maven-metadata*.xml files
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.
You'll see a list of folders (one per version) for that framework
each of which contain the relevant jar etc.
I've been able to successfully install the WO snapshots
Do you mean the nightlies from Apple? How did you install?
Just be careful if you copied the apple nightlies over the top of
your current repo install of WO as it'll bork your catalog xml
file (in the above dir for example).
I just ran the wobootstrap:install mojo as documented here: http://wiki.objectstyle.org/confluence/display/WOL/maven-wobootstrap-plugin
I should have been more clear; I don't think this actually gives
the nightly snapshots from apple,
No it doesn't. wobootstrap:install grabs *released* versions of the
frameworks from /Library/WebObjects/lib, by default. The nightlies
you've downloaded from apple were probably copied in via the Finder
or otherwise.
but rather installs your local libraries into the local repos,
correct?
Yes. You can use woboostrap:deploy too.
Thanks for pointing out the distinction.
So by installing Apple's by copy/paste or similar you'll want to re-
install the released versions to ensure the xml files in those dirs
are referencing all the versions actually available.
Right, see above.
Or just don't include the nightlies at all until Apple (or
woproject) provides a tool for importing them properly using maven.
Probably wise;-)
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] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'archetype'.
[INFO] org.objectstyle.woproject.maven2: checking for updates from
mdimension.releases
[INFO] org.apache.maven.plugins: checking for updates from
mdimension.releases
[INFO] org.codehaus.mojo: checking for updates from mdimension.releases
[INFO] artifact org.apache.maven.plugins:maven-archetype-plugin:
checking for updates from mdimension.releases
[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] Archetype defined by properties
Downloading: http://webobjects.mdimension.com/maven2/releases/org/objectstyle/woproject/maven2/woapplication-archetype/2.0.16/woapplication-archetype-2.0.16.jar
20K downloaded
Define value for groupId: : com.my.apps
Define value for artifactId: : MavenTest
Define value for version: 1.0-SNAPSHOT: : 1.0
Define value for package: com.my.apps: : com.my.application
Confirm properties configuration:
WebObjectsVersion: 5.4.2
WonderSupport: no
WonderVersion: 5.0.0-SNAPSHOT
TrueWarSupport: no
groupId: com.my.apps
artifactId: MavenTest
version: 1.0
package: com.my.application
Y: : Y
[WARNING] org.apache.velocity.runtime.exception.ReferenceException:
reference : template = archetype-resources/pom.xml [line 40,column
34] : ${woversion} is not a valid reference.
[WARNING] org.apache.velocity.runtime.exception.ReferenceException:
reference : template = archetype-resources/pom.xml [line 45,column
34] : ${woversion} is not a valid reference.
[WARNING] org.apache.velocity.runtime.exception.ReferenceException:
reference : template = archetype-resources/pom.xml [line 50,column
34] : ${woversion} is not a valid reference.
[INFO]
------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 1 minute 10 seconds
[INFO] Finished at: Sun Dec 07 22:52:04 EST 2008
[INFO] Final Memory: 8M/14M
[INFO]
------------------------------------------------------------------------
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 had the archetype-
catalog.xml file, but not the archetype, so when trying it, it failed.
I was thinking it would have grabbed it then, and I see with the above
command you're specifying the repository for it explicitly. 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. 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;-)
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
_______________________________________________
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