I'm about to leave for Phuket for a few days, will follow up on this when I get back. I'd like to get this sorted... so folks stop complaining about them being broken ;-)

--jason


On Aug 20, 2008, at 2:53 PM, Raphaël Piéroni wrote:

Hi Jason,

To have gmaven archetypes in the internal catalog, please add the
archetypes to the list (on mavenuser's confluence)
It will be taken into account on the next release, as i take care of
generating the internal catalog from this list before any release.

Meanwhile, you can create a catalog file. take the internal catalog as
an example (in archetype-common project/ src/main/resources IIRC)
in a catalog if you don't define a repository URL, the base URL of the
catalog is assumed to be the root of the repository.

If you need any help on this, please just ask for help.


Regards,


Raphaël

PS to any one interrested, i would like to make a release 2.0-alpha4 soon

2008/8/20 Jason Dillon <[EMAIL PROTECTED]>:
Hiya, I'm getting lots of user reports of problems using the GMaven
archetypes... could be my fault for not really understanding how the new
stuff works fully.  But seems like folks that don't already have the
artifacts in their local repo (most users) can't use them. I _thought_ that
this would simply work for them:

<snip>
mvn archetype:generate
-DarchetypeGroupId=org.codehaus.groovy.maven.archetypes
-DarchetypeArtifactId=gmaven-archetype-basic -Dversion=1.0-rc-3
</snip>

I also tried setting {{-DarchetypeCatalog=remote}}, but that fails with:

<snip>
INFO] [archetype:generate]
[INFO] Generating project in Interactive mode
[WARNING] Error reading archetype catalog http://repo1.maven.org/maven2
org.apache.maven.wagon.ResourceDoesNotExistException: Unable to locate
resource in repository
      at
org .apache .maven .wagon .providers .http.LightweightHttpWagon.fillInputData(LightweightHttpWagon.java: 100)
      at org.apache.maven.wagon.StreamWagon.get(StreamWagon.java:68)
      at
org .apache .maven .archetype .source .RemoteCatalogArchetypeDataSource .getArchetypeCatalog(RemoteCatalogArchetypeDataSource.java:74)
      at
org .apache .maven .archetype.DefaultArchetype.getRemoteCatalog(DefaultArchetype.java: 203)
      at
org .apache .maven .archetype.DefaultArchetype.getRemoteCatalog(DefaultArchetype.java: 192)
      at
org .apache .maven .archetype .ui .DefaultArchetypeSelector .getArchetypesByCatalog(DefaultArchetypeSelector.java:244)
      at
org .apache .maven .archetype .ui .DefaultArchetypeSelector .selectArchetype(DefaultArchetypeSelector.java:74)
      at
org .apache .maven .archetype .mojos .CreateProjectFromArchetypeMojo .execute(CreateProjectFromArchetypeMojo.java:180)
      at
org .apache .maven .plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java: 451)
      at
org .apache .maven .lifecycle .DefaultLifecycleExecutor .executeGoals(DefaultLifecycleExecutor.java:558)
      at
org .apache .maven .lifecycle .DefaultLifecycleExecutor .executeStandaloneGoal(DefaultLifecycleExecutor.java:512)
      at
org .apache .maven .lifecycle .DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java: 482)
      at
org .apache .maven .lifecycle .DefaultLifecycleExecutor .executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:330)
      at
org .apache .maven .lifecycle .DefaultLifecycleExecutor .executeTaskSegments(DefaultLifecycleExecutor.java:227)
      at
org .apache .maven .lifecycle .DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:142) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java: 336)
      at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129)
      at org.apache.maven.cli.MavenCli.main(MavenCli.java:287)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at
sun .reflect .NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at
sun .reflect .DelegatingMethodAccessorImpl .invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at
org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
      at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
      at
org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
      at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: java.io.FileNotFoundException:
http://repo1.maven.org/maven2/archetype-catalog.xml
      at
sun .net .www .protocol .http.HttpURLConnection.getInputStream(HttpURLConnection.java:1168)
      at
org .apache .maven .wagon .providers .http.LightweightHttpWagon.fillInputData(LightweightHttpWagon.java: 83)
      ... 25 more
[WARNING] Specified archetype not found.
[INFO] No archetype defined. Using maven-archetype-quickstart
(org.apache.maven.archetypes:maven-archetype-quickstart:1.0)
</snip>

* * *

So, my question is how can a user use the new archetype plugin with an
archetype that is not in the "internal" catalog?

I have played a little with the "local" catalog, which seems to allow the GMaven archetypes to resolve, though it ignores the version (if I ask for a
release, but I have previously built a snapshot, I get the snapshot
version).

Anyways, I could use some advise on what is the proper/supported way to use
custom archetypes.  I have 2 of them right now:


http://repo1.maven.org/maven2/org/codehaus/groovy/maven/archetypes/gmaven-archetype-basic/

http://repo1.maven.org/maven2/org/codehaus/groovy/maven/archetypes/gmaven-archetype-mojo/

Thanks,

--jason



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to