a simple mvn clean package process takes about 9 minutes…no so bad, it could be worst, for example if you build the entire security project….please be patient 🙂

For those kind of projects here I recall you some useful tips building with maven…

Use the maven reactor plugin: in short terms it allows to resume your build process where last fails has placed or simlply from where you specify:

In my case I pasted the RateLimiter module structure based on its dependencies, not alphabetically… Now assume you’ve got a fail at RateLimiterCounterMapProviderImpl module, if you run a simple “mvn clean install” you are running a complete rate limiter project build, instead of that try: –resume-from or -rf

mvn clean package –rf RateLimiterCounterMapProviderImpl

That command just runs RateLimiterCounterMapProviderImpl, RateLimiterCounterCassandraProviderImpl and RateLimiterProviderImpl.

__________________________________________________

Also you can specify a particular module or project to run with the use of –projects or -pl

mvn clean package –pl RateLimiterCounterMapProviderImpl

That build just the indicated project. You can specifiy one or more projects separated by comma.

__________________________________________________

Another option could be, build my project and its dependencies: –also-make or -am

That builds RateLimiterCounterMapProviderImpl and RateLimiterProviderImpl

__________________________________________________

An easy one, working in offline mode: –offline or -o

mvn clean package -o RateLimiterCounterMapProviderImpl

That will not try to download the artifacts from remote repos, you’re an isolated developer 🙂

__________________________________________________

Sometimes I use my own Nexus repo (see Continuous Integration in Local post), so I need to change some
configurations in my maven setting files, to be honest I use two files: –settings or -s

mvn -s ~/.m2/settingsnexus.xml clean package

__________________________________________________
If you are familiar with maven I’m pretty sure you’ve hit your head on the table more than once and you finally decided to manually delete the your .m2 repo. The –update-snapshots or -U option could helps in those annoying times

mvn -U clean package

This will force to download the artifacts despite mvn does not consider them obsoletes.
__________________________________________________

That is a common dependency section in a pom.xml file. But you can specify the version in different ways:
1.8.5 => “Soft” requirement on 1.8.5 as a recommendation
[1.8.5] => “Hard” requirement on 1.8.5
[1.8.1,1.8.5] => Any between 1.8.1 and 1.8.5
[1.8.1,1.8.5) => Any between 1.8.1 and 1.8.4.99….
[1.8.5,) => Any above or equals to 1.8.5
(,1.8.1],[1.8.5,)=> Any below or equals to 1.8.1 OR any above or equals 1.8.5.
__________________________________________________

What-if fails

By default maven works with –fail-fast or -ff option. That is the multi-module build stops as soon a module fails.

This time I’m gonna write about how to play in Turmeric with RESTful requests.

First of all we need a deployed service, any, in our Web Server, in my case Jetty 7, indeed, I use jetty-turmeric , this is a customized Jetty for running our Turmeric engine and deploying services in one or two simple steps…basically for simple but comprehensive tests.

The service I use is a sample EchoService, already included under the Turmeric Runtime module. So, under our WebServer/webapp folder we have a folder called example-echoservice. example-echoservice

So, there are two simple steps you want to perform, first of all you need to update your deployment descriptor file for a propper intrepretation of your new URL, that is adding a wild card in your Servlet Mapping:

Also you can specify a pipeline process into the ServiceConfig.xml to provide Authentication, Rate Limiter capabilities or maybe custom handler to improve your service governance, but this deserves another post 🙂