That -U flag can save a lot of time (and frustration) so we could mention it in the guide... Also, the fact that you needed to define remoteRepositories should also be mentioned (it's valid for snapshot versions of the archetype)
On the other hand, if I omit it and delete the archetype artifacts from my local repo, it still works fine (maven 2.0.8, java 1.6.0) Anyway, can you add a JIRA for those enhancements? On Wed, Jul 2, 2008 at 7:51 PM, <[EMAIL PROTECTED]> wrote: > (this isn't a question - I found a solution) > > I have installed maven - it is functioning correctly. I have not installed or > configured anything else specific to it. > > I am simply trying to following the Tapestry Archetype explained here: > > http://tapestry.apache.org/tapestry4.1/tapestry-archetype/index.html > > When I used the command: > > mvn archetype:create -DarchetypeGroupId=org.apache.tapestry \ > -DarchetypeArtifactId=tapestry-archetype \ > -DarchetypeVersion=4.1.6-SNAPSHOT -DgroupId=org.example -DartifactId=myapp > > I get a warning: > > [INFO] [archetype:create] > [WARNING] No archetype repository found. > [WARNING] Specified archetype not found. > > And then I'm asked to pick an archetype. I'm new to maven, so I'm rather > confused (and seriously annoyed) that after specifying all these options - > it's > not found. > > So I got some help on #tapestry, it seems that I need to specify the remote > location of the repository containing the archetype's definition (and I > remember this was also mentioned in one of Howard's T5 posts: > http://tapestryjava.blogspot.com/2007/01/new-screencast-tapestry-maven-archetype.html). > > I think this will likely fix it (I mean, it's got to): > > mvn archetype:create -DarchetypeGroupId=org.apache.tapestry > -DarchetypeArtifactId=tapestry-archetype > -DremoteRepositories=http://people.apache.org/repo/m2-snapshot-repository/ > -DarchetypeVersion=4.1.6-SNAPSHOT -DgroupId=com.example -DartifactId=testapp > > Nope! Still -I get the warning and I'm being asked to pick one of the 36 > archetypes available to the version I'm running (maven 2.0.8) > > I have verified that there appears to be a archetypeVersion available at the > remote repository: > > http://people.apache.org/repo/m2-snapshot-repository/org/apache/tapestry/tapestry-archetype/ > > I figure that the remote repository concatenated with the groupId and > artifactId, you'd get that URL roughly (with a replace of . with /). > > Next suggestion (from #tapestry) is that I just use the 4.1.2 > archetypeVersion, > so I try that: > > mvn archetype:create -DarchetypeGroupId=org.apache.tapestry > -DarchetypeArtifactId=tapestry-archetype -DarchetypeVersion=4.1.2 > -DgroupId=org.example -DartifactId=myapp > > Again - same results (No archetype found). > > I decided to make some modifications and see if adding the remote repository > would fix it: > > mvn archetype:create -DarchetypeGroupId=org.apache.tapestry > -DarchetypeArtifactId=tapestry-archetype -DarchetypeVersion=4.1.2 > -DgroupId=org.example -DartifactId=myapp > -DremoteRepositories=http://people.apache.org/repo/m2-snapshot-repository/ > > Nope - same results (no archetype found) > > mvn archetype:create -DarchetypeGroupId=org.apache.tapestry > -DaArtifactId=tapestry-archetype -DarchetypeVersion=4.1.2-SNAPSHOT > -DgroupId=org.example -DartifactId=myapp > -DremoteRepositories=http://people.apache.org/repo/m2-snapshot-repository/ > > I know I'm missing something simple - and it's only because I'm just starting > to > use Maven that I don't see what it is. But I feel I've been a good effort to > figure out the issue; now, I'm out of ideas > > Then I remember - you're never really out of ideas until you've googled > everything thing you can think of regarding the problem. So I figure that > some > poor T4 developer has run into this before. Mailing lists might be the gold > mine > I'm looking for. > > BAM! Nabble to the rescue! It appears that someone had a similar issue with > archetype not being found: > > http://www.nabble.com/problems-with-Maven-archetype-td15754471s177.html > > It appears that -U is something to pay attention to! > > I give it a whirl: > > mvn -U archetype:create -DarchetypeGroupId=org.apache.tapestry > -DarchetypeArtifactId=tapestry-archetype > -DremoteRepositories=http://people.apache.org/repo/m2-snapshot-repository/ > -DarchetypeVersion=4.1.6-SNAPSHOT -DgroupId=com.gigism -DartifactId=testapp2 > > WOW! It works! > > I guess -U forces a check for updates on releases and snapshots on remote > repositories. > > Apparently, now that I have these updates - I could run the command without > the > option it'll work. So I do - and IT WORKS! > > My only complaint is that the Tapestry Maven Archetype example is written with > the idea that you may have just installed Maven (there's a link above the > command to where to download it). Yet there is no mention of needing -U or the > remote repository argument. > > Oh and I realized that since -U was no longer needed - maybe something would > be > up with the remote repository. I try, it works. Now, once you have checked > against remote repositories - you don't even need that argument is seems. > > But I'm curious - I'm defective? Is there some configuration of maven2 that I > missed? Or Should those arguments have been mentioned? > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Andreas Andreou - [EMAIL PROTECTED] - http://blog.andyhot.gr Tapestry / Tacos developer Open Source / JEE Consulting --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]