Lately I've been doing lots of maven stuff.
I just released a new version of the web app I am working on and this version is going to production. Releases always are maven intensive tasks (for maven based build systems obviously), package the app, make sure data population scripts and schema creation ones are all good, deploy to new environment, run tests against it to ensure everything is ok, etc etc.
Tweaking maven to behave appropriately can sometimes be frustrating although, in this opportunity, I have to say that almost everything went smoothly.
One thing that I find tricky is the build profiles. I am obsessive with DRYing every single line of code i write and profiles do not make it easy in this regard. A feature I would love for maven to have is the ability to activate a profile from within another profile.
For example, I want to have a profile called mysql that defines the dependency on mysql, plus properties such as driver class name, hibernate dialect class name etc. I want to have another profile to define an environment, say nigthly as an example. Nightly consists of a server running an instance of tomcat to which I want maven to deploy the app every night and, a mysql server instance which will host the app's DB.
I don't wanna say mvn deploy -P nightly,mysql; instead I just wanna say mvn deploy -P nightly and the nightly knows to activate the mysql profile.
Overall I like maven and it is a very lively project with a very active comunity. I also like the fact that it has many detractors as this works in favor of making it better. I do wish it was released more often though.
Showing posts with label java. Show all posts
Showing posts with label java. Show all posts
Thursday, May 22, 2008
Tuesday, March 25, 2008
Validation Framework for java
Wouldn't it be nice to be able to do something like this:
and then be able to say something like:
The implications of something like this go beyond mere validation. IMHO it si an elegant solution that if built properly will improve the DRYness of the code across all layers of any java application.
This is the intention behind jsr-303. Emmanuel Bernard from jboss has more details here.
public class Address {
@NotEmpty @Max(50)
private String street1;
@Max(50)
private String street2;
@Max(9) @NotNull
private String zipcode;
...
}and then be able to say something like:
public class Order {
@Valid @NotNull private Address delivery;
}The implications of something like this go beyond mere validation. IMHO it si an elegant solution that if built properly will improve the DRYness of the code across all layers of any java application.
This is the intention behind jsr-303. Emmanuel Bernard from jboss has more details here.
Subscribe to:
Posts (Atom)