Using locally built archetypes

87 views
Skip to first unread message

Joseph Boyle

unread,
Sep 11, 2010, 4:25:32 PM9/11/10
to lif...@googlegroups.com
I build Lift from source and would like to use the archetypes that get built in the archetypes subdirectory. How can I do this?

Jeppe Nejsum Madsen

unread,
Sep 11, 2010, 4:51:48 PM9/11/10
to lif...@googlegroups.com
On Sat, Sep 11, 2010 at 10:25 PM, Joseph Boyle <boyle....@gmail.com> wrote:
> I build Lift from source and would like to use the archetypes that get built in the archetypes subdirectory. How can I do this?
>

IIRC, you can specify -DarchetypeCatalog=local on the maven command line.

/Jeppe

Joseph Boyle

unread,
Sep 11, 2010, 5:07:34 PM9/11/10
to lif...@googlegroups.com

Thanks, now I see you posted about that earlier. Now getting a different error though:

mvn -U archetype:generate -DarchetypeArtifactId=lift-archetype-blank -Darchetypeversion=3.0-SNAPSHOT -DarchetypeGroupId=net.liftweb -DgroupId=blank -DartifactId=blank -Dversion=0.1-SNAPSHOT -DarchetypeCatalog=local
[INFO] Scanning for projects...
[INFO] artifact org.scala-tools:maven-scala-plugin: checking for updates from central
[INFO] Searching repository for plugin with prefix: 'archetype'.
[INFO] org.apache.maven.plugins: checking for updates from central
[INFO] org.codehaus.mojo: checking for updates from central
[INFO] artifact org.apache.maven.plugins:maven-archetype-plugin: checking for updates from central
[INFO] ------------------------------------------------------------------------
[INFO] Building Unnamed - scalaconsole:scalaconsole:jar:1.0
[INFO] task-segment: [archetype:generate] (aggregator-style)
[INFO] ------------------------------------------------------------------------
[INFO] Preparing archetype:generate
[INFO] No goals needed for project - skipping
[INFO] [archetype:generate {execution: default-cli}]
[INFO] Generating project in Interactive mode
[INFO] Archetype [net.liftweb:lift-archetype-blank:3.0-SNAPSHOT] found in catalog local
[INFO] Using property: groupId = blank
[INFO] Using property: artifactId = blank
[INFO] Using property: version = 0.1-SNAPSHOT
[INFO] Using property: package = blank
[INFO] Using property: liftVersion = 3.0-SNAPSHOT
[INFO] Using property: scalaVersion = 2.7.7
Confirm properties configuration:
groupId: blank
artifactId: blank
version: 0.1-SNAPSHOT
package: blank
liftVersion: 3.0-SNAPSHOT
scalaVersion: 2.7.7
Y:
[ERROR] org.apache.maven.archetype.exception.InvalidPackaging: Unable to add module to the current project as it is not of packaging type 'pom'
org.apache.maven.archetype.exception.ArchetypeGenerationFailure: org.apache.maven.archetype.exception.InvalidPackaging: Unable to add module to the current project as it is not of packaging type 'pom'
at org.apache.maven.archetype.generator.DefaultFilesetArchetypeGenerator.generateArchetype(DefaultFilesetArchetypeGenerator.java:238)
at org.apache.maven.archetype.generator.DefaultArchetypeGenerator.processFileSetArchetype(DefaultArchetypeGenerator.java:136)
at org.apache.maven.archetype.generator.DefaultArchetypeGenerator.generateArchetype(DefaultArchetypeGenerator.java:106)
at org.apache.maven.archetype.generator.DefaultArchetypeGenerator.generateArchetype(DefaultArchetypeGenerator.java:149)
at org.apache.maven.archetype.generator.DefaultArchetypeGenerator.generateArchetype(DefaultArchetypeGenerator.java:209)
at org.apache.maven.archetype.DefaultArchetypeManager.generateProjectFromArchetype(DefaultArchetypeManager.java:71)
at org.apache.maven.archetype.mojos.CreateProjectFromArchetypeMojo.execute(CreateProjectFromArchetypeMojo.java:190)
at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:569)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:539)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:284)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
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:597)
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: org.apache.maven.archetype.exception.InvalidPackaging: Unable to add module to the current project as it is not of packaging type 'pom'
at org.apache.maven.archetype.common.DefaultPomManager.addModule(DefaultPomManager.java:98)
at org.apache.maven.archetype.generator.DefaultFilesetArchetypeGenerator.processPomWithParent(DefaultFilesetArchetypeGenerator.java:606)
at org.apache.maven.archetype.generator.DefaultFilesetArchetypeGenerator.processFilesetProject(DefaultFilesetArchetypeGenerator.java:551)
at org.apache.maven.archetype.generator.DefaultFilesetArchetypeGenerator.processFilesetModule(DefaultFilesetArchetypeGenerator.java:493)
at org.apache.maven.archetype.generator.DefaultFilesetArchetypeGenerator.generateArchetype(DefaultFilesetArchetypeGenerator.java:211)
... 25 more

Ross Mellgren

unread,
Sep 11, 2010, 5:22:44 PM9/11/10
to lif...@googlegroups.com
I don't have any clue if it's related to your problem, but it does appear you're using the "master" branch, which is set to 3.0-SNAPSHOT. As far as I know this branch is not really used or update to date right now -- you should probably use 2.x-2.8_devel instead.

-Ross

> --
> You received this message because you are subscribed to the Google Groups "Lift" group.
> To post to this group, send email to lif...@googlegroups.com.
> To unsubscribe from this group, send email to liftweb+u...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.
>

Joseph Boyle

unread,
Sep 11, 2010, 8:01:23 PM9/11/10
to lif...@googlegroups.com
Thanks for the branch tip. 2.x-2.8_devel builds ~/.m2/repository/net/liftweb/lift-archetype-basic_2.8.0/2.1-SNAPSHOT/lift-archetype-basic_2.8.0-2.1-SNAPSHOT.jar (note the altered archetype name!). Still getting the same error though when I use this archetype.

mvn -U archetype:generate -DarchetypeArtifactId=lift-archetype-blank_2.8.0 -Darchetypeversion=2.1-SNAPSHOT -DarchetypeGroupId=net.liftweb -DgroupId=blank -DartifactId=blank -Dversion=0.1-SNAPSHOT -DarchetypeCatalog=local


[INFO] Scanning for projects...
[INFO] artifact org.scala-tools:maven-scala-plugin: checking for updates from central
[INFO] Searching repository for plugin with prefix: 'archetype'.
[INFO] org.apache.maven.plugins: checking for updates from central
[INFO] org.codehaus.mojo: checking for updates from central
[INFO] artifact org.apache.maven.plugins:maven-archetype-plugin: checking for updates from central
[INFO] ------------------------------------------------------------------------
[INFO] Building Unnamed - scalaconsole:scalaconsole:jar:1.0
[INFO] task-segment: [archetype:generate] (aggregator-style)
[INFO] ------------------------------------------------------------------------
[INFO] Preparing archetype:generate
[INFO] No goals needed for project - skipping
[INFO] [archetype:generate {execution: default-cli}]
[INFO] Generating project in Interactive mode

[INFO] Archetype [net.liftweb:lift-archetype-blank_2.8.0:2.1-SNAPSHOT] found in catalog local


[INFO] Using property: groupId = blank
[INFO] Using property: artifactId = blank
[INFO] Using property: version = 0.1-SNAPSHOT
[INFO] Using property: package = blank

[INFO] Using property: liftVersion = 2.1-SNAPSHOT
[INFO] Using property: scalaVersion = 2.8.0


Confirm properties configuration:
groupId: blank
artifactId: blank
version: 0.1-SNAPSHOT
package: blank

liftVersion: 2.1-SNAPSHOT
scalaVersion: 2.8.0


Y:
[ERROR] org.apache.maven.archetype.exception.InvalidPackaging: Unable to add module to the current project as it is not of packaging type 'pom'
org.apache.maven.archetype.exception.ArchetypeGenerationFailure: org.apache.maven.archetype.exception.InvalidPackaging: Unable to add module to the current project as it is not of packaging type 'pom'
at org.apache.maven.archetype.generator.DefaultFilesetArchetypeGenerator.generateArchetype(DefaultFilesetArchetypeGenerator.java:238)

Ross Mellgren

unread,
Sep 11, 2010, 8:04:12 PM9/11/10
to lif...@googlegroups.com
Yeah, my maven-fu is not strong enough to answer off the top of my head, sorry. What's the rest of the exception look like?

-Ross

Reply all
Reply to author
Forward
0 new messages