Archetype build fails
As part of #309 I've made changes to the archetypes. When switching back to master, I can no longer build/install the archetypes. It seems that, when trying to build a sample project based on the archetype, it uses the old archetype installed previously not the one being tested.
As can be seen in the log below, it doesn't install the archetype jar before creating a sample project based on the archetype.
[INFO] ------------------------------------------------------------------------
[INFO] Building lift-archetype-blank
[INFO] task-segment: [install]
[INFO] ------------------------------------------------------------------------
[INFO] [enforcer:enforce {execution: default}]
[INFO] [resources:resources {execution: default-resources}]
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 13 resources
[INFO] [scala:compile {execution: default}]
[INFO] Checking for multiple versions of scala
[INFO] includes = [**/*.scala,**/*.java,]
[INFO] excludes = []
[WARNING] No source files found.
[INFO] [resources:testResources {execution: default-testResources}]
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /Users/jeppe/projects/lift/liftweb/archetypes/lift-archetype-blank/src/test/resources
[INFO] [scala:testCompile {execution: default}]
[INFO] Checking for multiple versions of scala
[INFO] includes = [**/*.scala,**/*.java,]
[INFO] excludes = []
[WARNING] No source files found.
[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:jar {execution: default-jar}]
[INFO] [archetype:add-archetype-metadata {execution: default-add-archetype-metadata}]
[INFO] [source:jar-no-fork {execution: default}]
[INFO] Building jar: /Users/jeppe/projects/lift/liftweb/archetypes/lift-archetype-blank/target/lift-archetype-blank-2.0-SNAPSHOT-sources.jar
[INFO] [invoker:install {execution: default}]
[INFO] Installing /Users/jeppe/projects/lift/liftweb/archetypes/pom.xml to /Users/jeppe/.m2/repository/net/liftweb/archetypes/2.0-SNAPSHOT/archetypes-2.0-SNAPSHOT.pom
[INFO] Installing /Users/jeppe/projects/lift/liftweb/resources/lift-parent/pom.xml to /Users/jeppe/.m2/repository/net/liftweb/lift-parent/2.0-SNAPSHOT/lift-parent-2.0-SNAPSHOT.pom
[INFO] Installing /Users/jeppe/projects/lift/liftweb/archetypes/lift-archetype-blank/pom.xml to /Users/jeppe/.m2/repository/net/liftweb/lift-archetype-blank/2.0-SNAPSHOT/lift-archetype-blank-2.0-SNAPSHOT.pom
[INFO] Installing /Users/jeppe/projects/lift/liftweb/archetypes/lift-archetype-blank/target/lift-archetype-blank-2.0-SNAPSHOT.jar to /Users/jeppe/.m2/repository/net/liftweb/lift-archetype-blank/2.0-SNAPSHOT/lift-archetype-blank-2.0-SNAPSHOT.maven-archetype
[INFO] Installing /Users/jeppe/projects/lift/liftweb/archetypes/lift-archetype-blank/target/lift-archetype-blank-2.0-SNAPSHOT-sources.jar to /Users/jeppe/.m2/repository/net/liftweb/lift-archetype-blank/2.0-SNAPSHOT/lift-archetype-blank-2.0-SNAPSHOT-sources.jar
[INFO] [archetype:integration-test {execution: default-integration-test}]
[INFO] [invoker:run {execution: default}]
[INFO] Building: sample
[INFO] [INFO] Scanning for projects...
[INFO] [INFO] Searching repository for plugin with prefix: 'archetype'.
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] [INFO] Building Maven Default Project
[INFO] [INFO] task-segment: [archetype:generate] (aggregator-style)
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] [INFO] Preparing archetype:generate
[INFO] [INFO] No goals needed for project - skipping
[INFO] [INFO] Setting property: classpath.resource.loader.class => 'org.codehaus.plexus.velocity.ContextClassLoaderResourceLoader'.
[INFO] [INFO] Setting property: velocimacro.messages.on => 'false'.
[INFO] [INFO] Setting property: resource.loader => 'classpath'.
[INFO] [INFO] Setting property: resource.manager.logwhenfound => 'false'.
[INFO] [INFO] [archetype:generate {execution: default-cli}]
[INFO] [INFO] Generating project in Batch mode
[INFO] [INFO] Archetype defined by properties
[INFO] [INFO] snapshot net.liftweb:lift-archetype-blank:2.0-SNAPSHOT: checking for updates from lift-archetype-blank-repo
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] [INFO] BUILD SUCCESSFUL
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] [INFO] Total time: 5 seconds
[INFO] [INFO] Finished at: Fri Feb 12 09:43:02 CET 2010
[INFO] [INFO] Final Memory: 13M/80M
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] [INFO] Scanning for projects...
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] [INFO] Building sample-project Project
[INFO] [INFO] task-segment: [clean, verify]
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] [INFO] [clean:clean {execution: default-clean}]
[INFO] [INFO] [resources:resources {execution: default-resources}]
[INFO] [WARNING] Using platform encoding (MacRoman actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] [INFO] Copying 0 resource
[INFO] [INFO] [yuicompressor:compress {execution: default}]
[INFO] [INFO] nb warnings: 0, nb errors: 0
[INFO] [INFO] [compiler:compile {execution: default-compile}]
[INFO] [INFO] Nothing to compile - all classes are up to date
[INFO] [INFO] [scala:compile {execution: default}]
[INFO] [INFO] Checking for multiple versions of scala
[INFO] [INFO] includes = [**/*.scala,**/*.java,]
[INFO] [INFO] excludes = []
[INFO] [INFO] /Users/jeppe/projects/lift/liftweb/archetypes/lift-archetype-blank/target/it/sample/sample-project/src/main/scalaπ info: compiling
[INFO]
[INFO] [INFO] Compiling 2 source files to /Users/jeppe/projects/lift/liftweb/archetypes/lift-archetype-blank/target/it/sample/sample-project/target/classes at 1265964195161
[INFO] [ERROR] /Users/jeppe/projects/lift/liftweb/archetypes/lift-archetype-blank/target/it/sample/sample-project/src/main/scala/bootstrap/liftweb/Boot.scala:17: error: not found: value Log4JLogBoot
[INFO] [INFO] LogBoot.loggerSetup = Log4JLogBoot.setup
[INFO] [INFO] ^
[INFO] [ERROR] one error found
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] [ERROR] BUILD ERROR
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] [INFO] wrap: org.apache.commons.exec.ExecuteException: Process exited with an error: 1(Exit value: 1)
[INFO]
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] [INFO] For more information, run Maven with the -e switch
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] [INFO] Total time: 15 seconds
[INFO] [INFO] Finished at: Fri Feb 12 09:43:20 CET 2010
[INFO] [INFO] Final Memory: 31M/80M
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] ..FAILED (25.0 s)
[INFO] The build exited with code 1. See /Users/jeppe/projects/lift/liftweb/archetypes/lift-archetype-blank/target/it/sample/build.log for details.
[INFO] -------------------------------------------------
[INFO] Build Summary:
[INFO] Passed: 0, Failed: 1, Errors: 0, Skipped: 0
[INFO] -------------------------------------------------
[ERROR] The following builds failed:
[ERROR] * sample
[INFO] -------------------------------------------------
As can be seen in the log below, it doesn't install the archetype jar before creating a sample project based on the archetype.
[INFO] ------------------------------------------------------------------------
[INFO] Building lift-archetype-blank
[INFO] task-segment: [install]
[INFO] ------------------------------------------------------------------------
[INFO] [enforcer:enforce {execution: default}]
[INFO] [resources:resources {execution: default-resources}]
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 13 resources
[INFO] [scala:compile {execution: default}]
[INFO] Checking for multiple versions of scala
[INFO] includes = [**/*.scala,**/*.java,]
[INFO] excludes = []
[WARNING] No source files found.
[INFO] [resources:testResources {execution: default-testResources}]
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /Users/jeppe/projects/lift/liftweb/archetypes/lift-archetype-blank/src/test/resources
[INFO] [scala:testCompile {execution: default}]
[INFO] Checking for multiple versions of scala
[INFO] includes = [**/*.scala,**/*.java,]
[INFO] excludes = []
[WARNING] No source files found.
[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:jar {execution: default-jar}]
[INFO] [archetype:add-archetype-metadata {execution: default-add-archetype-metadata}]
[INFO] [source:jar-no-fork {execution: default}]
[INFO] Building jar: /Users/jeppe/projects/lift/liftweb/archetypes/lift-archetype-blank/target/lift-archetype-blank-2.0-SNAPSHOT-sources.jar
[INFO] [invoker:install {execution: default}]
[INFO] Installing /Users/jeppe/projects/lift/liftweb/archetypes/pom.xml to /Users/jeppe/.m2/repository/net/liftweb/archetypes/2.0-SNAPSHOT/archetypes-2.0-SNAPSHOT.pom
[INFO] Installing /Users/jeppe/projects/lift/liftweb/resources/lift-parent/pom.xml to /Users/jeppe/.m2/repository/net/liftweb/lift-parent/2.0-SNAPSHOT/lift-parent-2.0-SNAPSHOT.pom
[INFO] Installing /Users/jeppe/projects/lift/liftweb/archetypes/lift-archetype-blank/pom.xml to /Users/jeppe/.m2/repository/net/liftweb/lift-archetype-blank/2.0-SNAPSHOT/lift-archetype-blank-2.0-SNAPSHOT.pom
[INFO] Installing /Users/jeppe/projects/lift/liftweb/archetypes/lift-archetype-blank/target/lift-archetype-blank-2.0-SNAPSHOT.jar to /Users/jeppe/.m2/repository/net/liftweb/lift-archetype-blank/2.0-SNAPSHOT/lift-archetype-blank-2.0-SNAPSHOT.maven-archetype
[INFO] Installing /Users/jeppe/projects/lift/liftweb/archetypes/lift-archetype-blank/target/lift-archetype-blank-2.0-SNAPSHOT-sources.jar to /Users/jeppe/.m2/repository/net/liftweb/lift-archetype-blank/2.0-SNAPSHOT/lift-archetype-blank-2.0-SNAPSHOT-sources.jar
[INFO] [archetype:integration-test {execution: default-integration-test}]
[INFO] [invoker:run {execution: default}]
[INFO] Building: sample
[INFO] [INFO] Scanning for projects...
[INFO] [INFO] Searching repository for plugin with prefix: 'archetype'.
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] [INFO] Building Maven Default Project
[INFO] [INFO] task-segment: [archetype:generate] (aggregator-style)
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] [INFO] Preparing archetype:generate
[INFO] [INFO] No goals needed for project - skipping
[INFO] [INFO] Setting property: classpath.resource.loader.class => 'org.codehaus.plexus.velocity.ContextClassLoaderResourceLoader'.
[INFO] [INFO] Setting property: velocimacro.messages.on => 'false'.
[INFO] [INFO] Setting property: resource.loader => 'classpath'.
[INFO] [INFO] Setting property: resource.manager.logwhenfound => 'false'.
[INFO] [INFO] [archetype:generate {execution: default-cli}]
[INFO] [INFO] Generating project in Batch mode
[INFO] [INFO] Archetype defined by properties
[INFO] [INFO] snapshot net.liftweb:lift-archetype-blank:2.0-SNAPSHOT: checking for updates from lift-archetype-blank-repo
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] [INFO] BUILD SUCCESSFUL
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] [INFO] Total time: 5 seconds
[INFO] [INFO] Finished at: Fri Feb 12 09:43:02 CET 2010
[INFO] [INFO] Final Memory: 13M/80M
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] [INFO] Scanning for projects...
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] [INFO] Building sample-project Project
[INFO] [INFO] task-segment: [clean, verify]
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] [INFO] [clean:clean {execution: default-clean}]
[INFO] [INFO] [resources:resources {execution: default-resources}]
[INFO] [WARNING] Using platform encoding (MacRoman actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] [INFO] Copying 0 resource
[INFO] [INFO] [yuicompressor:compress {execution: default}]
[INFO] [INFO] nb warnings: 0, nb errors: 0
[INFO] [INFO] [compiler:compile {execution: default-compile}]
[INFO] [INFO] Nothing to compile - all classes are up to date
[INFO] [INFO] [scala:compile {execution: default}]
[INFO] [INFO] Checking for multiple versions of scala
[INFO] [INFO] includes = [**/*.scala,**/*.java,]
[INFO] [INFO] excludes = []
[INFO] [INFO] /Users/jeppe/projects/lift/liftweb/archetypes/lift-archetype-blank/target/it/sample/sample-project/src/main/scalaπ info: compiling
[INFO]
[INFO] [INFO] Compiling 2 source files to /Users/jeppe/projects/lift/liftweb/archetypes/lift-archetype-blank/target/it/sample/sample-project/target/classes at 1265964195161
[INFO] [ERROR] /Users/jeppe/projects/lift/liftweb/archetypes/lift-archetype-blank/target/it/sample/sample-project/src/main/scala/bootstrap/liftweb/Boot.scala:17: error: not found: value Log4JLogBoot
[INFO] [INFO] LogBoot.loggerSetup = Log4JLogBoot.setup
[INFO] [INFO] ^
[INFO] [ERROR] one error found
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] [ERROR] BUILD ERROR
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] [INFO] wrap: org.apache.commons.exec.ExecuteException: Process exited with an error: 1(Exit value: 1)
[INFO]
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] [INFO] For more information, run Maven with the -e switch
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] [INFO] Total time: 15 seconds
[INFO] [INFO] Finished at: Fri Feb 12 09:43:20 CET 2010
[INFO] [INFO] Final Memory: 31M/80M
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] ..FAILED (25.0 s)
[INFO] The build exited with code 1. See /Users/jeppe/projects/lift/liftweb/archetypes/lift-archetype-blank/target/it/sample/build.log for details.
[INFO] -------------------------------------------------
[INFO] Build Summary:
[INFO] Passed: 0, Failed: 1, Errors: 0, Skipped: 0
[INFO] -------------------------------------------------
[ERROR] The following builds failed:
[ERROR] * sample
[INFO] -------------------------------------------------
Leave a comment
on 2010-02-12 10:05 *
By jeppenejsum
Minor update. It does install something, but not the required jar:
Installing /Users/jeppe/projects/lift/liftweb/archetypes/lift-archetype-blank/target/lift-archetype-blank-2.0-SNAPSHOT.jar to /Users/jeppe/.m2/repository/net/liftweb/lift-archetype-blank/2.0-SNAPSHOT/lift-archetype-blank-2.0-SNAPSHOT.maven-archetype
Installing /Users/jeppe/projects/lift/liftweb/archetypes/lift-archetype-blank/target/lift-archetype-blank-2.0-SNAPSHOT.jar to /Users/jeppe/.m2/repository/net/liftweb/lift-archetype-blank/2.0-SNAPSHOT/lift-archetype-blank-2.0-SNAPSHOT.maven-archetype
on 2010-02-12 10:13 *
By jeppenejsum
More updates. If I rm -rf ~/.m2/repository/net/liftweb, the build also fails, but with this:
[INFO] [INFO] snapshot net.liftweb:lift-archetype-blank:2.0-SNAPSHOT: checking for updates from lift-archetype-blank-repo
[INFO] Downloading: /Users/jeppe/.m2/repository/net/liftweb/lift-archetype-blank/2.0-SNAPSHOT/lift-archetype-blank-2.0-SNAPSHOT.jar
[INFO] [INFO] Unable to find resource 'net.liftweb:lift-archetype-blank:jar:2.0-SNAPSHOT' in repository lift-archetype-blank-repo (/Users/jeppe/.m2/repository)
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] [ERROR] BUILD FAILURE
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] [INFO] The desired archetype does not exist (net.liftweb:lift-archetype-blank:2.0-SNAPSHOT)
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] [INFO] snapshot net.liftweb:lift-archetype-blank:2.0-SNAPSHOT: checking for updates from lift-archetype-blank-repo
[INFO] Downloading: /Users/jeppe/.m2/repository/net/liftweb/lift-archetype-blank/2.0-SNAPSHOT/lift-archetype-blank-2.0-SNAPSHOT.jar
[INFO] [INFO] Unable to find resource 'net.liftweb:lift-archetype-blank:jar:2.0-SNAPSHOT' in repository lift-archetype-blank-repo (/Users/jeppe/.m2/repository)
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] [ERROR] BUILD FAILURE
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] [INFO] The desired archetype does not exist (net.liftweb:lift-archetype-blank:2.0-SNAPSHOT)
[INFO] [INFO] ------------------------------------------------------------------------
on 2010-02-12 10:13 *
By jeppenejsum
Summary changed from Archetype build seems to be wrong to Archetype build fails
on 2010-02-12 13:09 *
By Indrajit Raychaudhuri
Assigned to set to indrajitr
Status changed from New to Accepted
Can you please run mvn install -X from the archetypes/lift-archetype-blank directory and attach the output?
file:dkitGOf_Wr36H0eJe5aVNr: Log from mvn install -X
on 2010-02-12 17:35 *
By jeppenejsum
Note I can't reproduce it if I do mvn install -X in
archetypes/lift-archetype-blank
or
archetypes/
but only if I do it in the root.
I clear out my Lift repo first rm -rf ~/.m2/repository/net/liftweb
archetypes/lift-archetype-blank
or
archetypes/
but only if I do it in the root.
I clear out my Lift repo first rm -rf ~/.m2/repository/net/liftweb
on 2010-02-13 08:00 *
By Indrajit Raychaudhuri
maven-artifact-manager in Maven 2.2.0 and it's friends are culprit. Use Maven 2.2.1 instead.
Confirmed that upgrading to Maven 2.2.1 solves the problem.
It might make sense to enforce Maven 2.2.1 during the build.
on 2010-02-28 20:21 *
By Indrajit Raychaudhuri
Type changed from Defect to Task
Milestone changed from Post 2.0 to Lift 2.0-M3
Status changed from New to Test