Chariot Training Classes

Training Courses

I run Chariot's training and mentoring services. We provide training in AngularJS, HTML5, Spring, Hibernate, Maven, Scala, and more.

Chariot Education Services

Technology

Chariot Emerging Tech

Learn about upcoming technologies and trends from my colleagues at Chariot Solutions.

Resources

Chariot Conferences

Podcasts

« Spring Roo and Web Flow, the Expergated Version... | Main | Spring JUnit Tests not Rolling Back? It may not be you... »
Saturday
Sep042010

Living on the Roo "edge" w/git

Yep, I'm officially a writer - look I even have over 40 reading glasses on!Writing a book against a moving target is, well, moving.  Sometimes I just need to work with the latest Roo from git, to see where it's going.  For a while, there were incompatibilities in the STS Roo shell support that kept me from doing this, but with a little fudging around, I figured out how to do it for the unreleased 1.1.0.M4 line.

These instructions assume you have a working roo-dev shell, and are able to mvn install and use GIT.  Once you follow the instructions, you'll potentially have a working STS install that works against the GIT build of Roo, so you can watch progress between builds.

Do you need this? Well, no, maybe not.  

I do, since what I'm writing a book on depends on a somewhat rapidly evolving framework.  Speaking of the book, we are releasing another MEAP soon that will add another chapter, and also fix a lot of the wording, typos and other issues from the first four chapters.  Look for that soon, and thanks to everyone who is reading those MEAPs and participating in the review process.  We truly value you!.

Steps

  • First, get the latest code by using git pull
  • Make sure it builds, using mvn install
  • Make an assembly of Roo - this creates a zip install that you can unzip so STS can see it.  Do it this way:  mvn assembly:assembly
  • Take the file it creates in ./target/org.springframework.roo.root-1.1.0.M4.zip and move it somewhere, unzip it.  You now have a spring-roo-1.1.0.M4 directory with a distribution of the GIT code head.  YAY!
  • Decide whether you want to use this version on the command line as your regular roo.  I don't, I still use roo-dev.  
  • In STS, make sure you're using an external maven build - go to STS -> Preferences, search for Maven, add an external installation for 2.2.1 (which you've downloaded by now, I hope)
  • Also in STS, go to STS -> Preferences, search for Roo, and add this new 1.1.0.M4 roo installation, making it the default (don't forget to switch back if you don't like what you see).
  • Open your 1.1.0.M4 project, and if it doesn't automatically configure as a Roo project, just add Roo project nature and if you're still getting trouble, add the AspectJ Tooling feature too (from the Spring right-click project menu).

Sorry this is jotted down so hastily.  This is more of a note for me than everyone else, but I figured others could benefit.

One other note - if you somehow had a custom maven repo that you configured, check your Maven settings carefully.  I had to make sure my Maven install was correct.  Also, if you forget to mvn install the Roo dev build, it won't install the JAR files into your repository and you won't be able to build your projects.  

Enjoy!

 

PrintView Printer Friendly Version

EmailEmail Article to Friend

Reader Comments (9)

hi,
I have downloaded the latest roo from the git repo, however it doesn't compile.
i use mvn install....


[INFO] Preparing source:jar
[WARNING] Removing: jar from forked lifecycle, to prevent recursive invocation.
[INFO] No goals needed for project - skipping
[INFO] [source:jar {execution: default}]
[INFO] [gpg:sign {execution: sign-artifacts}]
GPG Passphrase: *
gpg: no default secret key: secret key not available
gpg: signing failed: secret key not available
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR


mvn assembly:assembly also fails Missing:
----------
1) org.springframework.roo:org.springframework.roo.support:bundle:1.1.0.M4

Try downloading the file manually from the project website.

Then, install it using the command:
mvn install:install-file -DgroupId=org.springframework.roo -DartifactId=org.springframework.roo.support -Dversion=1.1.0.M4 -Dpackaging=bundle -Dfile=/path/to/file

Alternatively, if you host your own repository you can deploy the file there:
mvn deploy:deploy-file -DgroupId=org.springframework.roo -DartifactId=org.springframework.roo.support -Dversion=1.1.0.M4 -Dpackaging=bundle -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]

Path to dependency:
1) org.springframework.roo:org.springframework.roo.support.osgi:bundle:1.1.0.M4
2) org.springframework.roo:org.springframework.roo.support:bundle:1.1.0.M4

----------
1 required artifact is missing.

for artifact:
org.springframework.roo:org.springframework.roo.support.osgi:bundle:1.1.0.M4

from the specified remote repositories:
spring-roo-repository (http://spring-roo-repository.springsource.org/release),
ibiblio.org (http://mirrors.ibiblio.org/pub/mirrors/maven2)

how did u manage to build it?

also when I tried to use the roo spring-roo-1.1.0.M3 adding it to the STS it kept complaining that lib directory is missing .
I would realy like to use M4 because I need it for gwt and https://jira.springframework.org/browse/ROO-1307?page=com.atlassian.jira.plugin.system.issuetabpanels%3Achangehistory-tabpanel
blocks it

September 5, 2010 | Unregistered Commentervito

Ok, the main reason you have a problem is that you need to install GPG (a pretty-good-privacy system). You then have to sign a key and make sure you remember the key signing password.

During the build, it will ask you to provide that signing key. The reason is that the build is signed so it can be loaded to the maven repositories. I don't know why they make us do this in a development build, but once you do it once, it is set for that point forward.

Let me know if this helps.

September 7, 2010 | Registered CommenterKen Rimple

Thanks for the post!
while doing the mvn install I get:

Downloading: http://spring-roo-repository.springsource.org/release/org/springframework/roo/wrapping/org.springframework.roo.wrapping.hapax/2.3.4.0001/org.springframework.roo.wrapping.hapax-2.3.4.0001.pom
[INFO] Unable to find resource 'org.springframework.roo.wrapping:org.springframework.roo.wrapping.hapax:pom:2.3.4.0001' in repository spring-roo-repository (http://spring-roo-repository.springsource.org/release)

and

Try downloading the file manually from the project website.

Then, install it using the command:
mvn install:install-file -DgroupId=org.springframework.roo.wrapping -DartifactId=org.springframework.roo.wrapping.hapax -Dversion=2.3.4.0001 -Dpackaging=jar -Dfile=/path/to/file

which I do, but, when starting roo m4 I get:
Welcome to Spring Roo. For assistance press TAB or type "hint" then hit ENTER.
roo> ERROR: Error starting file:/Users/dhc4z/springsource/spring-roo-1.1.0.M4/bundle/org.springframework.roo.addon.gwt-1.1.0.M4.jar (org.osgi.framework.BundleException: Unresolved constraint in bundle org.springframework.roo.addon.gwt [19]: package; (package=hapax))

Any Ideas?

September 10, 2010 | Unregistered Commenterchestnut

Doug,

Sure, I do. There is only one dependency in the project that you have to build separately, and that's wrapping. Do a 'cd' to the ./mapping directory under the roo-git source tree, and do a mvn install there. Then, cd back to the main directory and do a mvn install. If you look in the wrapping directory, you'll see a readme.txt that mentions that you have to do this.

Sorry for not including it.

Ken

September 19, 2010 | Registered CommenterKen Rimple

Thanks Ken, your post made it possible for me to build the 1.1.0RC source on JDK 1.5 under Mac OS X 10.5.8 PPC and have it run, unlike the RC1 distribution.

I'm looking to sign up for MEAP on your book. Unfortunately I can't afford it yet, but it's in my list. Thank you for writing it.

October 17, 2010 | Unregistered CommenterMiB

Hi,

I'm currently working with Roo-1.1.5 and I'm able to build roo-source in my development machine (Windows XP). Now I'want to use the same dev shell from with in STS. For that, I'm trying to create an assembly. The command is failing with the following message

[INFO] Final Memory: 47M/494M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-assembly-plugin:2.2-beta-5:assembly (default-cli) on project org.springframework.roo.root: Error reading assemblies: No assembly descriptors found. -> [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]

Steps described in the provided readme.txt and script file are specific to *nix platforms. Please help me to solve this issue.

Thanks,
Kallada

November 2, 2011 | Unregistered CommenterKallada

Why do you want to run 1.1.5 from the Roo-dev command? I think assembly was broken before 1.2 -I had a jira ticket against it.

November 9, 2011 | Registered CommenterKen Rimple

Yes. https://jira.springsource.org/browse/ROO-2591

The fix is in there if you want to patch.

November 9, 2011 | Registered CommenterKen Rimple

I do. There is only one dependency in the project that you have to build separately, and that's wrapping. Do a 'cd' to the ./mapping directory under the roo-git source tree, and do a mvn install there. Then, cd back to the main directory and do a mvn install. If you look in the wrapping directory, you'll see a readme.txt that mentions that you have to do this.

June 5, 2015 | Unregistered CommenterMy Home

PostPost a New Comment

Enter your information below to add a new comment.

My response is on my own website »
Author Email (optional):
Author URL (optional):
Post:
 
Some HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>