Hi Andrew,
I'm just a little suspicious about whether you are actually picking up a
locally built archetype or not. Since I haven't yet uploaded the
updated version of the archetype to the snapshot repo, there's one quick
way to find out: does the following command:
mvn antrun:run -D exec=dnd
run up the DnD viewer when executed from the root project of your
generated project? If so, then I guess everything is fine. If not,
then I suspect you are still working with the archetype downloaded from
the Apache snapshot repo.
Just checking the mvn documentation [1], it looks like a slightly
shorter way of forcing mvn archetype:generate to pick up from your local
repo would be to use:
mvn archetype:generate \
-DarchetypeGroupId=org.apache.isis.support \
-DarchetypeArtifactId=quickstart-archetype \
-DarchetypeVersion=0.1.2-incubating-SNAPSHOT \
-DarchetypeCatalog=internal
I must admit that I did think that the archetypeVersion wouldn't be
needed because mvn defaults to the latest, and the archetypeCatalog also
would not be needed because it defaults to remote,local but would then
fall back to using your internal catalogue since the archetype is not in
remote's catalog (see [1]). But, whatever, if it's working for you,
then that's good enough I guess.
Cheers
Dan
[1]
http://maven.apache.org/archetype/maven-archetype-plugin/generate-mojo.html
On 09/04/2011 12:06, Andrew Moores wrote:
Hi Dan
I dropped the archetypeCatalog property from my maven build and when I run:
mvn archetype:generate \
-DarchetypeGroupId=org.apache.isis.support \
-DarchetypeArtifactId=quickstart-archetype
I end up with a standard empty Maven project because Maven doesn't resolve the
archetype from my local repo.
After a couple of attempts I found the following worked:
mvn -o archetype:generate \
-DarchetypeGroupId=org.apache.isis.support \
-DarchetypeArtifactId=quickstart-archetype \
-DarchetypeVersion=0.1.2-incubating-SNAPSHOT \
-DarchetypeRepository=/Users/andrewmoores/development/applications/maven/repository
The archetypeVersion is required. It could be that I need to specify the
archetypeRepository because I'm using a non-standard location for my local repo.
So, happy days. I've built locally, created the archetype and then created an
example project from my local build of the archetype. The following modules
were created:
dom
fixture
objstore-default
quickrun
tests-bdd
tests-junit
viewer-html
viewer-restful
viewer-scimpi
viewer-wicket
I did note that if you run this without the -o option you get the following
info messages:
[INFO] Unable to find resource
'org.apache.isis.support:quickstart-archetype:jar:0.1.2-incubating-SNAPSHOT' in
repository quickstart-archetype-repo
(/Users/andrewmoores/development/applications/maven/repository)
[INFO] Unable to find resource
'org.apache.isis.support:quickstart-archetype:pom:0.1.2-incubating-SNAPSHOT' in
repository quickstart-archetype-repo
(/Users/andrewmoores/development/applications/maven/repository)
But it still creates a new Isis project.
Regards
Andrew
On 9 Apr 2011, at 09:59, Dan Haywood wrote:
Hi Andrew,
You're right, those instructions on the wiki "smoke test" page need updating.
Here's the scoop: when we first entered the incubator I wanted to document how to build
the source and try out an example app, mostly for the benefit of the other contributors
but also for anyone else (early adopter "users") who might be interested in
exploring/trying out Isis prior to us having pushed out our first formal release.
Since then I've got our archetype working and published to the apache snapshot
repo, which means that early adopters don't need to go to all the hassle of
building source etc. But, as you've pointed out, that page on the wiki doesn't
quite say that.
That said, the version of the archetype on the snapshot repo is a little
out-of-date; I've updated it recently to also build/package a self-contained
jar in the quickrun module. So if you do build from source then you can try
out this updated version (just miss out the 'archetypeCatalog' parameter so
that mvn picks up from your local repo on ~/.m2
Cheers,
Dan
Sent from my iPhone
On 8 Apr 2011, at 18:12, Andrew Moores<[email protected]> wrote:
Hi
I've just built from source and created a new app following the instructions on
the quick start page (http://incubator.apache.org/isis/quickstart-app.html). I
don't see how this is testing what I've just built? Did it create the new app
using the artifacts installed into my local repos when I built from source?
(Maybe, this more of a Maven question).
Thanks
Andrew