maven archetypes

352 views
Skip to first unread message

Lachlan Deck

unread,
Dec 29, 2012, 1:05:33 AM12/29/12
to lif...@googlegroups.com
Hi there,

just reading through Exploring Lift atm (which would be good to bring up to date with lift 2.4 from 2.0)…
http://exploring.liftweb.net

… but anyway, I noticed, as it uses maven, that the latest archetypes for lift are still pointing to the old scala-tools repo and older versions of lift by default.

e.g., the archetype [ net.liftweb:lift-archetype-blank_2.9.1 ] prompts for either 2.4-M4 or 2.4-M5 by default for the liftVersion.

It would make sense to me for it to be just hard-coded to whatever's the latest release (2.4).

Are these things being managed by lift maintainers or independently?

cheers,

Lachlan

Lachlan Deck

unread,
Dec 29, 2012, 11:39:15 PM12/29/12
to lif...@googlegroups.com
Hi there,

should I raise an issue at Assembla or github to suggest updates for the archetypes that have been pushed to maven central?


vscaladoc.links.liftweb.baseurl:
https://oss.sonatype.org/content/groups/scala-tools/net/liftweb

The Lift version (I think) should just be 2.4  and remove choices for 2.4-M4 & 2.4-M5.

maven-scala-plugin should be replaced with:
<plugin>
       <groupId>net.alchim31.maven</groupId>
       <artifactId>scala-maven-plugin</artifactId>
       <version>3.1.0</version>
      <…>
</plugin>

Various other dependencies & plugins can be updated to more recent releases.

Diego Medina

unread,
Dec 31, 2012, 9:03:38 AM12/31/12
to Lift

Sure, open it on GitHub and then post the link here. We haven't published those in a while :(

Thanks

Diego
Sent from my android cell

--
--
Lift, the simply functional web framework: http://liftweb.net
Code: http://github.com/lift
Discussion: http://groups.google.com/group/liftweb
Stuck? Help us help you: https://www.assembla.com/wiki/show/liftweb/Posting_example_code
 
 
 

Lachlan Deck

unread,
Jan 2, 2013, 8:57:39 PM1/2/13
to lif...@googlegroups.com
Okay, Github ticket here:

I'm happy to contribute if you can point me to where these are kept / generated. It wasn't immediately obvious to me looking through the source.

Cheers,
Lachlan

Diego Medina

unread,
Jan 3, 2013, 12:53:30 AM1/3/13
to Lift
that would be awesome, the repository that was used (up until 2.4-M
... was this one:

https://github.com/lift/archetypes

I haven;t spent much time looking over them, but it would be great if
they generated the same updated code we now have for the templates
here:
https://github.com/lift/lift_25_sbt

Thanks

Diego
Diego Medina
Lift/Scala Developer
di...@fmpwizard.com
http://www.fmpwizard.com

Lachlan Deck

unread,
Jan 3, 2013, 5:21:47 PM1/3/13
to lif...@googlegroups.com
Cool. I'll look into it over the weekend and report back.

Lachlan Deck

unread,
Jan 22, 2013, 9:20:48 PM1/22/13
to lif...@googlegroups.com
I've pushed an initial number of changes to my fork of the archetypes here:
https://github.com/ldeck/archetypes

I've not added as yet archetypes for the lift_json or lift_mvc templates which were missing.
It'll be good to verify that the changes to the existing archetypes are acceptable so let me know what you think.

A couple of other thoughts:
- I'm not sure if it's really necessary to keep the sbt configs in the maven archetypes, as maintaining dependency changes between the two types is a bit of a hassle.
- I'm also thinking there's got to be an easier way for translating the sbt templates into maven archetypes. It's a bit of a chore doing the diff to do it manually.
- There's also the jpa templates in the maven archetypes which haven't found their way into the sbt equivalents. Was that intentional?

Cheers.

On 03/01/2013, at 4:53 PM, Diego Medina <di...@fmpwizard.com> wrote:

Diego Medina

unread,
Jan 22, 2013, 9:23:22 PM1/22/13
to Lift
On Tue, Jan 22, 2013 at 9:20 PM, Lachlan Deck <lachla...@gmail.com> wrote:
> lift_json or lift_mvc


I'll look at them real soon, but wanted to say, I don't think we need
the lift_json and lift_mvc translated to maven.

Let's have the maven arch. as a simple way to get maven users up an
running, and if they want to use other templates, then they can go and
create their own, or start using sbt. This will reduce the work for
all of us to maintain the sbt and maven samples.

Thanks for the work!


--
Diego Medina
Lift/Scala Developer
di...@fmpwizard.com
http://fmpwizard.telegr.am

Lachlan Deck

unread,
Feb 8, 2013, 7:38:25 AM2/8/13
to lif...@googlegroups.com
Hi Diego,

just a quick ping to see if you're still wanting to follow this up.

cheers,
Lachlan

Diego Medina

unread,
Feb 9, 2013, 10:23:55 AM2/9/13
to Lift
Hi,

Sorry for the delay, they look good to me, please send a pull request
and instruction on what I need to do to publish them to sonatype (I
have only publish artifacts using sbt).


Notes:

>- There's also the jpa templates in the maven archetypes which haven't found their way into the sbt equivalents. Was that intentional?
I think people who use sbt can simply add the jpa dependencies (or
maybe they don;t use jpa, I haven;t seen any complains about it).

> - I'm also thinking there's got to be an easier way for translating the sbt templates into maven archetypes. It's a bit of a chore doing the diff to do it manually.

if you find a way, that would be great, but I think we may have to go
through the pain of double updating the templates :)

>- I'm not sure if it's really necessary to keep the sbt configs in the maven archetypes, as maintaining dependency changes between the two types is a bit of a hassle.


Do you mean, keeping files like this one:
https://github.com/ldeck/archetypes/blob/master/lift-archetype-basic/src/main/resources/archetype-resources/build.sbt

?


I would imagine that if people want a maven archetype, they will not
want to use sbt, so I would think it is ok to remove it (maybe more
than ok, it may be a better idea), so if people want an sbt project,
go download the templates we have for sbt, if they prefer maven, then
use these archetypes.

Thanks!

Diego
> ---
> You received this message because you are subscribed to the Google Groups "Lift" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to liftweb+u...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.

Lachlan Deck

unread,
May 2, 2013, 7:58:56 PM5/2/13
to lif...@googlegroups.com
Many apologies for the delay in following up on this… 

Just sent a pull request.

Here's the discussion / notes.

I've updated and tested all the archetypes and believe their ready for publishing for 2.5-SNAPSHOT.
For completeness, perhaps after publishing these we ought to look at publishing archetypes for lift 2.4?

Notes
--------
- resync'd the archetypes with the latest sbt templates (this week),
- updated the jpa templates for scala 2.9.1
- updated the jpa templates with Hibernate 4.2.0.Final & required persistence.xml format
- updated derby dialect appropriately for jpa templates
- All templates use port 8080 by default now (previously the jpa ones used 9090).
- updated all available dependency versions (except jetty)
- logback.xml renamed to default.logback.xml
- repositories now point to oss.sonatype.org
- removed all _root_ & semi-colons & nested package statements from source
- added an example of locale'd date picking format to lift-jpa-basic
- as previously mentioned all sbt references removed so as not to maintain both.

NB also: Jetty is stuck on 6.1.25 as otherwise it requires Java 7.

For deployment readiness I've also updated the super pom:
- added org.sonatype.oss:oss-parent as parent 
- distribution now points to relevant oss.sonatype.org repos

NB: I suggest having >= Maven 3.0.5 to build / deploy (rather than maven 2)


Questions / Suggestions / TODOs for archetypes (both sbt & maven)
-----------------------------------------------
- be good to have examples of unit, integration & perhaps even functional testing in the templates such that when generated / checked-out they come fully tested. For people who don't care about tests they can simple delete them, but for those that want test automation / coverage it'd help showcase testing of lift apps.
- be great to update all html to html5.
- given bootstrap is so popular these days, should they be setup by default for it?
- is there a CI for lift in general? Should jobs be set up for these?
- should we look at publishing archetypes for lift-2.4?

Verification
---------------
to verify all this yourself (or follow the steps I did)

#
# install archetypes locally
#
$ cd archetypes
$ mvn clean install

#
# generate a sample project from each and run all their tests
#
$ mkdir -p /tmp/lift-archetypes
$ cd /tmp/lift-archetypes
$ for type in blank basic jpa-blank-single jpa-blank jpa-basic mvc; do \
 mvn -B archetype:generate -DarchetypeGroupId=net.liftweb \
             -DarchetypeArtifactId=lift-archetype-${type}_2.9.1 \
             -DarchetypeVersion=2.5-SNAPSHOT \
             -DgroupId=demo.code \
             -DartifactId=lift-${type} \
             -Dversion=1.0-SNAPSHOT; \
  cd lift-${type}; \
  mvn clean install; \
  cd ..; \
done

#
# verify jetty:run for single-module projects
#
$ for type in blank basic jpa-blank-single mvc; do cd lift-${type}; mvn jetty:run; cd ..; done

#
# verify jetty:run for multi-module projects
#
$ for type in jpa-blank jpa-basic; do cd lift-${type}/web; mvn jetty:run; cd ../..; done

Publishing
--------------
deploying to central snapshots repo should be a case of…

#1 ~/.m2/settings.xml
-------------
<settings>
  ...
  <servers>
    <server>
      <id>sonatype-nexus-snapshots</id>
      <username>your-jira-id</username>
      <password>your-jira-pwd</password>
    </server>
    <server>
      <id>sonatype-nexus-staging</id>
      <username>your-jira-id</username>
      <password>your-jira-pwd</password>
    </server>
  </servers>
  ...
</settings>

Instructions at [1] & [2] below. 
The stack overflow Q&A may help also [3].

Let me know if there's any problems, or indeed any suggestions for improvement!

cheers,
Lachlan Deck


References (for publishing to Maven Central):
--

Lachlan Deck

unread,
May 3, 2013, 8:44:15 PM5/3/13
to Joseph Boyle, lif...@googlegroups.com
<keeping on the list>

On 04/05/2013, at 12:49 AM, Joseph Boyle <boyle....@gmail.com> wrote:

> Is maven 3.0.4-3 (which Ubuntu is giving me) equivalent or is it missing something from 3.0.5?

Anything > 3.0 should be fine. Maven 2 should be compatible, but in reality the meta-data in the local repo (at the least) is slightly different.
Maven 3 has more predictable dependency ordering (i.e., as per pom). So unless you have a reason to stay on v2, I'd use the latest.

> It does have Java 7 though - will the archetypes use Java 7 if available and should I use a newer Jetty?

Minimum of java 6. If you want to use the latest version of Jetty it appears to have been compiled against Java 7.
So for the archetypes I've not made that the default given scala 2.9.1 doesn't require Java 7.

Diego Medina

unread,
May 3, 2013, 10:22:25 PM5/3/13
to Lift
Thanks for the work!

I'll go over your email in more detail later this weekend and if all
goes well, I'll be merging your pull req.

Thanks

Diego
> --
> --

Lachlan Deck

unread,
May 4, 2013, 5:16:27 AM5/4/13
to lif...@googlegroups.com
Thanks Diego,

If the plan is to just release snapshot versions at this time, then...
I believe you'll just need the authentication settings in your ~/.m2/settings.xml file and then do:
$ mvn clean deploy -DperformRelease=true -Dgpg.passphrase=**** [-Dgpg.keyname=foo]


I wonder, however, if it's worth trying to push out releases in tandem with lift frameworks. That way they're always available and tested against the latest.


I should have linked to these as well for your reference…

maven gpg plugin:
https://docs.sonatype.org/display/Repository/How+To+Generate+PGP+Signatures+With+Maven
http://maven.apache.org/plugins/maven-gpg-plugin/usage.html

Preparing a release
http://maven.apache.org/maven-release/maven-release-plugin/examples/prepare-release.html
http://maven.apache.org/maven-release/maven-release-plugin/prepare-mojo.html
http://maven.apache.org/plugins/maven-gpg-plugin/usage.html

e.g., use
$ mvn release:prepare [-DdrynRun=true -DpushChanges=false] -DreleaseVersion=2.5-RC5 -DdevelopmentVersion=2.5-SNAPSHOT

NB: you'll be prompted by sonatype for the relevant gpg passphase etc


Performing a release
http://maven.apache.org/maven-release/maven-release-plugin/examples/perform-release.html
http://maven.apache.org/maven-release/maven-release-plugin/perform-mojo.html
$ mvn release:perform -Darguments="-Dgpg.passphase=*** [-Dgpg.keyname=foo]"


This might also help:
http://jroller.com/holy/entry/releasing_a_project_to_maven

fmpwizard

unread,
Jun 9, 2013, 11:19:15 PM6/9/13
to lif...@googlegroups.com
Hi,

Ok, so I just try this:


mvn clean deploy


on the top level folder for the archetypes repo

/Users/diego.medina/Desktop/work/lift/archetypes


and I got:

[INFO] --- maven-deploy-plugin:2.5:deploy (default-deploy) @ archetypes_2.9.1 ---
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Lift Archetypes ................................... FAILURE [6.038s]
[INFO] lift-archetype-blank_2.9.1 ........................ SKIPPED
[INFO] lift-archetype-basic_2.9.1 ........................ SKIPPED
[INFO] lift-archetype-jpa-blank-single_2.9.1 ............. SKIPPED
[INFO] lift-archetype-jpa-blank_2.9.1 .................... SKIPPED
[INFO] lift-archetype-jpa-basic_2.9.1 .................... SKIPPED
[INFO] lift-archetype-mvc_2.9.1 .......................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 15.457s
[INFO] Finished at: Sun Jun 09 23:14:56 EDT 2013
[INFO] Final Memory: 5M/81M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.5:deploy (default-deploy) on project archetypes_2.9.1: Failed to deploy artifacts: Could not transfer artifact net.liftweb:archetypes_2.9.1:pom:2.5-20130610.031456-1 from/to ossrh-snapshots (http://oss.sonatype.org/content/repositories/snapshots): Failed to transfer file: http://oss.sonatype.org/content/repositories/snapshots/net/liftweb/archetypes_2.9.1/2.5-SNAPSHOT/archetypes_2.9.1-2.5-20130610.031456-1.pom. Return code is: 401 -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:


which may be because I don't know what to put in

 ~/.m2/settings.xml f

can you paste the format of what that file is supposed to have?

Thanks

  Diego

Lachlan Deck

unread,
Jun 10, 2013, 2:43:09 AM6/10/13
to lif...@googlegroups.com
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
                      http://maven.apache.org/xsd/settings-1.0.0.xsd">
  <localRepository/>
  <interactiveMode/>
  <usePluginRegistry/>
  <offline/>
  <pluginGroups/>
  <servers/>
  <mirrors/>
  <proxies/>
  <profiles/>
  <activeProfiles/>
</settings>

You'll probably only need the servers section to specify passwords. Everything else (I imagine) should be self-contained within the pom already.

So,
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
                      http://maven.apache.org/xsd/settings-1.0.0.xsd">
  ...
  <servers>
    <server>
      <id>server001</id>
      <username>my_login</username>
      <password>my_password</password>
      <privateKey>${user.home}/.ssh/id_dsa</privateKey>
      <passphrase>some_passphrase</passphrase>
      <filePermissions>664</filePermissions>
      <directoryPermissions>775</directoryPermissions>
      <configuration></configuration>
    </server>
  </servers>
  ...
</settings>


If you need encrypted passwords:

Other helpful references:


Diego Medina

unread,
Jun 11, 2013, 11:07:31 PM6/11/13
to Lift
hm, even after adding the settings.xml file I got:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.5:deploy (default-deploy) on project archetypes_2.9.1: Failed to deploy artifacts: Could not transfer artifact net.liftweb:archetypes_2.9.1:pom:2.5-20130612.030638-1 from/to ossrh-snapshots (http://oss.sonatype.org/content/repositories/snapshots): Failed to transfer file: http://oss.sonatype.org/content/repositories/snapshots/net/liftweb/archetypes_2.9.1/2.5-SNAPSHOT/archetypes_2.9.1-2.5-20130612.030638-1.pom. Return code is: 401 -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.5:deploy (default-deploy) on project archetypes_2.9.1: Failed to deploy artifacts: Could not transfer artifact net.liftweb:archetypes_2.9.1:pom:2.5-20130612.030638-1 from/to ossrh-snapshots (http://oss.sonatype.org/content/repositories/snapshots): Failed to transfer file: http://oss.sonatype.org/content/repositories/snapshots/net/liftweb/archetypes_2.9.1/2.5-SNAPSHOT/archetypes_2.9.1-2.5-20130612.030638-1.pom. Return code is: 401
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:319)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
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.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: org.apache.maven.plugin.MojoExecutionException: Failed to deploy artifacts: Could not transfer artifact net.liftweb:archetypes_2.9.1:pom:2.5-20130612.030638-1 from/to ossrh-snapshots (http://oss.sonatype.org/content/repositories/snapshots): Failed to transfer file: http://oss.sonatype.org/content/repositories/snapshots/net/liftweb/archetypes_2.9.1/2.5-SNAPSHOT/archetypes_2.9.1-2.5-20130612.030638-1.pom. Return code is: 401
at org.apache.maven.plugin.deploy.DeployMojo.execute(DeployMojo.java:189)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
... 19 more
Caused by: org.apache.maven.artifact.deployer.ArtifactDeploymentException: Failed to deploy artifacts: Could not transfer artifact net.liftweb:archetypes_2.9.1:pom:2.5-20130612.030638-1 from/to ossrh-snapshots (http://oss.sonatype.org/content/repositories/snapshots): Failed to transfer file: http://oss.sonatype.org/content/repositories/snapshots/net/liftweb/archetypes_2.9.1/2.5-SNAPSHOT/archetypes_2.9.1-2.5-20130612.030638-1.pom. Return code is: 401
at org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy(DefaultArtifactDeployer.java:141)
at org.apache.maven.plugin.deploy.DeployMojo.execute(DeployMojo.java:148)
... 21 more
Caused by: org.sonatype.aether.deployment.DeploymentException: Failed to deploy artifacts: Could not transfer artifact net.liftweb:archetypes_2.9.1:pom:2.5-20130612.030638-1 from/to ossrh-snapshots (http://oss.sonatype.org/content/repositories/snapshots): Failed to transfer file: http://oss.sonatype.org/content/repositories/snapshots/net/liftweb/archetypes_2.9.1/2.5-SNAPSHOT/archetypes_2.9.1-2.5-20130612.030638-1.pom. Return code is: 401
at org.sonatype.aether.impl.internal.DefaultDeployer.deploy(DefaultDeployer.java:284)
at org.sonatype.aether.impl.internal.DefaultDeployer.deploy(DefaultDeployer.java:215)
at org.sonatype.aether.impl.internal.DefaultRepositorySystem.deploy(DefaultRepositorySystem.java:480)
at org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy(DefaultArtifactDeployer.java:137)
... 22 more
Caused by: org.sonatype.aether.transfer.ArtifactTransferException: Could not transfer artifact net.liftweb:archetypes_2.9.1:pom:2.5-20130612.030638-1 from/to ossrh-snapshots (http://oss.sonatype.org/content/repositories/snapshots): Failed to transfer file: http://oss.sonatype.org/content/repositories/snapshots/net/liftweb/archetypes_2.9.1/2.5-SNAPSHOT/archetypes_2.9.1-2.5-20130612.030638-1.pom. Return code is: 401
at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$4.wrap(WagonRepositoryConnector.java:949)
at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$4.wrap(WagonRepositoryConnector.java:940)
at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$PutTask.flush(WagonRepositoryConnector.java:864)
at org.sonatype.aether.connector.wagon.WagonRepositoryConnector.put(WagonRepositoryConnector.java:466)
at org.sonatype.aether.impl.internal.DefaultDeployer.deploy(DefaultDeployer.java:278)
... 25 more
Caused by: org.apache.maven.wagon.TransferFailedException: Failed to transfer file: http://oss.sonatype.org/content/repositories/snapshots/net/liftweb/archetypes_2.9.1/2.5-SNAPSHOT/archetypes_2.9.1-2.5-20130612.030638-1.pom. Return code is: 401
at org.apache.maven.wagon.providers.http.LightweightHttpWagon.finishPutTransfer(LightweightHttpWagon.java:205)
at org.apache.maven.wagon.AbstractWagon.putTransfer(AbstractWagon.java:413)
at org.apache.maven.wagon.AbstractWagon.transfer(AbstractWagon.java:392)
at org.apache.maven.wagon.AbstractWagon.putTransfer(AbstractWagon.java:365)
at org.apache.maven.wagon.StreamWagon.put(StreamWagon.java:163)
at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$PutTask.run(WagonRepositoryConnector.java:825)
at org.sonatype.aether.connector.wagon.WagonRepositoryConnector.put(WagonRepositoryConnector.java:465)
... 26 more
[ERROR]
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:


any other clues?

Lachlan Deck

unread,
Jun 11, 2013, 11:36:31 PM6/11/13
to lif...@googlegroups.com
According to the following article, a 401 is a failed auth.

Have you read / followed the above?

<…>

Diego Medina

unread,
Jun 12, 2013, 12:23:07 AM6/12/13
to Lift
got it!



I had to change the server id in settings.xml to match the snapshot server id from the pom

so, what do we need to change to publish the arch. for 2.5 final?

Diego




--
--
Lift, the simply functional web framework: http://liftweb.net
Code: http://github.com/lift
Discussion: http://groups.google.com/group/liftweb
Stuck? Help us help you: https://www.assembla.com/wiki/show/liftweb/Posting_example_code
 
---
You received this message because you are subscribed to the Google Groups "Lift" group.
To unsubscribe from this group and stop receiving emails from it, send an email to liftweb+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Galder Zamarreño

unread,
Jun 12, 2013, 6:20:35 AM6/12/13
to lif...@googlegroups.com
Although not strictly maven archetypes, Escalante comes with some Maven-based Lift quickstarts to get you started writing:

- A Lift persistence app which stores data in an Escalante deployed data source: https://github.com/escalante/escalante-quickstart/tree/master/persistence-lift

So far only the HelloWorld app is using Lift 2.5 (other use Lift 2.4, but for no other reason that to show that you can deploy apps with both Lift versions in a single Escalante instance), but I hope to upgrade the other quickstarts for next release.

If you need a hand with them, let me know! :)

Cheers,

Lachlan Deck

unread,
Jun 12, 2013, 4:23:50 PM6/12/13
to lif...@googlegroups.com
Excellent.

I believe you need to open a JIRA with sonatype, and populate your ~/.m2/settings.xml with your credentials

<settings>
  ...
  <servers>
    <server>
      <id>sonatype-nexus-snapshots</id>
      <username>your-jira-id</username>
      <password>your-jira-pwd</password>
    </server>
    <server>
      <id>sonatype-nexus-staging</id>
      <username>your-jira-id</username>
      <password>your-jira-pwd</password>
    </server>
  </servers>
  ...
</settings>


Then to prepare the release…
$ mvn release:clean
$ mvn release:prepare [-DdryRun=true] -DpushChanges=false -DreleaseVersion=2.5 -DdevelopmentVersion=2.5.1-SNAPSHOT -DautoVersionSubmodules=true

NB: you may be prompted by sonatype for the relevant gpg pass phase etc


Then to perform the release from the tag that was created:
$ mvn release:perform [-DdryRun=true] -DlocalCheckout=true -Darguments="-Dgpg.passphase=*** [-Dgpg.keyname=foo]"

if all goes well:
$ git push --all && git push --tags

Then (I assume) you can deploy the 2.5.1-SNAPSHOT archetypes from master as you did before for 2.5-SNAPSHOT
$ mvn clean deploy...


It might be good to add some jenkins targets for the current snapshots to verify that a project can be generated and tests run successfully (which simultaneously verifies dependency resolution). What do you think?


To avoid gpg prompts in future etc the following might help:


@see Preparing a release
More complex workflow example (using git flow):
Though I'd use mvn release:branch goal with similar args as to release:prepare.

Diego Medina

unread,
Jun 13, 2013, 12:29:46 AM6/13/13
to Lift
Awesome, they worked!

I updated the wiki
and tested locally and was able to build a blank and basic project using the archetypes.

Thank you so much for all the help to get them ready!

Now, the other templates on the liftweb.net site are not for scala 2.9.,1 any more, I upgraded them to 2.10, and considering that most people new to Lift will want to use the newer version of scala, could you send a new pull req to update the archetypes to the new version of scala too? Note that specs2 will need to be a diff version too (you can look at the ones we use here

fior reference .

Again, thanks!








--
--
Lift, the simply functional web framework: http://liftweb.net
Code: http://github.com/lift
Discussion: http://groups.google.com/group/liftweb
Stuck? Help us help you: https://www.assembla.com/wiki/show/liftweb/Posting_example_code
 
---
You received this message because you are subscribed to the Google Groups "Lift" group.
To unsubscribe from this group and stop receiving emails from it, send an email to liftweb+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Lachlan Deck

unread,
Jun 13, 2013, 1:18:10 AM6/13/13
to lif...@googlegroups.com
Great. I'll update the archetypes for scala 2.10 asap.

Question: what versions of scala are you building 2.5.x and 2.6 against? Should the archetypes be built for each of those targets?

Diego Medina

unread,
Jun 13, 2013, 1:22:44 AM6/13/13
to Lift
2.5 is built for 2.9.1 2.9.1-1 2.9.2 2.10, 2.6 is also building for those versions, but things may change as we start working more and more on 2.6

but I think that building the archetypes for all those versions is overkill.

I just saw that the latest version of scala is 2.10.2, so maybe just use that for the archetypes. Also, users can easily change the scala version at the time they create their project, by not accepting the default, so if they really want a diff version of scala, they can change it there.

Thanks

  Diego

Lachlan Deck

unread,
Jun 13, 2013, 1:24:39 AM6/13/13
to lif...@googlegroups.com
Cool. Thanks.
Less work == a good thing™ :-)

Lachlan Deck

unread,
Jul 7, 2013, 10:07:11 AM7/7/13
to lif...@googlegroups.com
Hi Diego,

I've got the changes (locally) for the archetypes for  lift-2.5.1-SNAPSHOT and scala-2.10[.2] ready to push.
Shall I open a new ticket?

Diego Medina

unread,
Jul 7, 2013, 10:17:39 AM7/7/13
to Lift
great!, sure

Lachlan Deck

unread,
Jul 7, 2013, 11:57:40 AM7/7/13
to lif...@googlegroups.com
Done.


Let me know if there's any problems.

cheers, Lachlan

Diego Medina

unread,
Jul 8, 2013, 8:18:47 PM7/8/13
to Lift
I got back form a mini vacation today, I'll be looking at the pull request in the next few days, thanks!

Jason Cwik

unread,
Sep 9, 2013, 11:09:22 AM9/9/13
to lif...@googlegroups.com
Can you please publish the new archetype soon?  If you're running the latest Eclipse (Kepler), ScalaIDE only supports scala 2.10 so there's no ready-made archetype that will work.

Diego Medina

unread,
Sep 9, 2013, 11:49:34 PM9/9/13
to Lift
On Mon, Sep 9, 2013 at 11:09 AM, Jason Cwik <ja...@cwik.org> wrote:
Can you please publish the new archetype soon?  If you're running the latest Eclipse (Kepler), ScalaIDE only supports scala 2.10 so there's no ready-made archetype that will work.


Done :)

See this wiki fir the exact parameters


I'll send a separate email to announce them.

Thanks

  Diego



--
Diego Medina
Lift/Scala consultant
di...@fmpwizard.com
http://fmpwizard.telegr.am
Reply all
Reply to author
Forward
0 new messages