Maven's multiproject plug-in is a very useful tool on a large project that's been organized into several sub-projects. Using the dependencies the reactor figures out the correct order in which to build the entire project. However Maven gets in its own way when doing such builds. Here's how:
Consider a multiproject with sibling sub-projects that are interdependent. Having been bitten one too many times for not doing so, I have become fastidious about maven cleaning before every build. Just as with any other plugin, when you invoke clean, Maven checks the dependencies. However, when this happens the first time the multiproject is being built, the dependencies cannot satisfied and so the build quits with a failed dependency.
If you are wondering why get so anal about cleaning and that it isn't needed before the first-ever build, consider setting up your builds to be managed by CruiseControl. That's an automated process and needs to be given the goal(s) that must be executed at every build cycle.
So, the only solution I know is to perform a one-off build manually without a clean and then let CruiseControl loose. Can you suggest a better alternative?
Speaking of cleaning and multiprojects, why doesn't multiproject:clean clean the root directory? Why do I have to maven clean multiproject:clean?
Thursday, July 21, 2005
Monday, June 13, 2005
Reasons to attend a NoFluffJustStuff conference
I just spent the last three days at my third NoFluffJustStuff conference -- the Research Triangle Software Symposium. My brain is full and I am wiped and extremely invigorated!! It is my annual shot-in-the-arm booster that makes me look forward to going to work! Here are some of my reasons why you shouldn't miss the next opportunity. (Of course you can also see their top-10 reasons):
The speakers: The speakers are uniformly exceptional. They not only know what they are talking about, they want to be on the stage and are good at it. Further, they don't mind answering questions -- and not just during the session. Speakers are routinely found mingling with the attendees at lunch and breaks.
Constant innovations: In the three years that I've been attending these conferences, it has constantly been evolving, never leaving well enough alone. First it was end-of-day keynotes, then it was the introduction of .Net topics, then it was BOFs, web-site with speaker blogs, etc etc.
Timely topics:At any given time there are invariably 5 active sessions. The topics being discussed at these session are not only of high quality, they are timely. Let's take the latest conference. There were sessions on AJAX, Tapestry, Spring, Hibernate, Ruby, Rails, the list goes on.
Doesn't cut corners: The high quality doesn't stop with the speakers and the sessions, it includes the other amenities. You get all the session materials on CD, with binders, in a nice laptop carrying case (another innovation for this year). Meals (read: breakfasts, lunches, snacks and opening night dinner) during the conference are provided. Jay Zimmerman (the organizer) could very easily have just thrown in the "continental breakfast" fare. But meals here would put most restaurants to shame. There is of course the obligatory raffle during the conference. Even there this one outshines. There are two raffles. At the recent conference, up for grabs were books, an iPod and the new Sony PSP.
I think there are about 28 events over the course of the year at different locations across the US. So, if you are in the country, chances are, there is one in your neighborhood. Don't miss it.
The speakers: The speakers are uniformly exceptional. They not only know what they are talking about, they want to be on the stage and are good at it. Further, they don't mind answering questions -- and not just during the session. Speakers are routinely found mingling with the attendees at lunch and breaks.
Constant innovations: In the three years that I've been attending these conferences, it has constantly been evolving, never leaving well enough alone. First it was end-of-day keynotes, then it was the introduction of .Net topics, then it was BOFs, web-site with speaker blogs, etc etc.
Timely topics:At any given time there are invariably 5 active sessions. The topics being discussed at these session are not only of high quality, they are timely. Let's take the latest conference. There were sessions on AJAX, Tapestry, Spring, Hibernate, Ruby, Rails, the list goes on.
Doesn't cut corners: The high quality doesn't stop with the speakers and the sessions, it includes the other amenities. You get all the session materials on CD, with binders, in a nice laptop carrying case (another innovation for this year). Meals (read: breakfasts, lunches, snacks and opening night dinner) during the conference are provided. Jay Zimmerman (the organizer) could very easily have just thrown in the "continental breakfast" fare. But meals here would put most restaurants to shame. There is of course the obligatory raffle during the conference. Even there this one outshines. There are two raffles. At the recent conference, up for grabs were books, an iPod and the new Sony PSP.
I think there are about 28 events over the course of the year at different locations across the US. So, if you are in the country, chances are, there is one in your neighborhood. Don't miss it.
Thursday, May 12, 2005
Freeware installer recommendation?
I have been using Null Soft's product and frankly, I just don't get the NSI scripting language. It just seems too arcane and doesn't seem to flow right -- if you know what I mean. I spend more time digging through the help docs and Googling to figure out how to get something going.
I would welcome any alternative tool recommendation -- freeware of, course :) My target environment is Windows and so the tool doesn't have to be cross-platform capable.
I would welcome any alternative tool recommendation -- freeware of, course :) My target environment is Windows and so the tool doesn't have to be cross-platform capable.
Tuesday, May 10, 2005
Visualizing Web Logic's domain configuration
Web Logic's config.xml is the center of WL universe. This is what WL uses to keep track of all servers, deployments, services etc and is one gnarly XML file. Yes it isn't for human consumption but it helps to be able to read it when diagnosing problems. Now you have a handy-dandy XSL stylesheet that'll present this file in HTML. Element names are hyperlinks. Following these links takes you to the appropriate reference documentation page. Now, why didn't I think of that? This works with IE and Firefox although with the latter it doesn't work for a
file:// URL. Any ideas why?Attributes: I can't place the actual blog where I came across this tip. So thank you, anonymous.
Wednesday, April 20, 2005
StrutsTestCase and Tokens
How does one get around the usage of Struts tokens when unit testing using StrutsTestCase? If the action class under tests for duplicate submissions using tokens,
it'll always fail. This is because, the token is set in the request by the tag and of course when running a StrutsTestCase, the JSP isn't involved.
The application functions correctly, however, I cannot run my unit tests :(
if(isTokenValid(request) == false) {
// don't perform the action and route the user
// to an appropriate location
}
it'll always fail. This is because, the token is set in the request by the
The application functions correctly, however, I cannot run my unit tests :(
Thursday, April 07, 2005
Clustering mutable objects
One of things a clusterable application server (for example, Web Logic) does for an application is to broadcast objects placed in the user's session. This happens (at least with Web Logic) whenever the application invokes the setAttribute method of the HttpSession interface. This has a subtle impact when the thing being placed in the session is a mutable object. To explain, first consider a simple (non-mutable) example
1: String name = "John";
2: session.setAttribute("username", name);
The application server will serialize the value associated with the key username to all the nodes in the cluster. Now suppose that the node executing the above steps turns around and changes the value of name. IOW
1: String name = "John";
2: session.setAttribute("username", name);
..
15: name = "Mary";
16: String sessionValue = (String)session.getAttribute("username");
Since Java passes a copy of a reference to a method call, sessionValue is guaranteed to be John -- on all the nodes. No harm. No foul.
Now consider placing a mutable object such as a java.util.List in the session.
Now consider placing a mutable object such as a java.util.List in the session.
1: List cart = new ArrayList();
2: session.setAttribute("shoppingcart", cart);
Just as with the String before, this will get propagated to all the nodes in the cluster. Now suppose the cart is updated in one of the nodes:
1: List cart = new ArrayList();
2: session.setAttribute("shoppingcart", cart);
..
19: cart.add(aLineItem);
..
// More business logic
25: List sessionValue = (List)session.getAttribute("shoppingcart");
26: System.out.println("Cart size = " + sessionValue.size());
Now, line 26 above will display different values depending on the node on which it was executed. The node which added the item to the cart will display Cart size = 1 while the others will display Cart size = 0.
This is bad! This can be avoided if we place an item in the session as the last step of responding to a user request. Application development and application deployment are -- in large part -- independent activities. This is an instance where the developer needs to be aware that (s)he is developing an application that's going to be deployed to a clustered environment.
Monday, March 07, 2005
Jira's service -- Legendary or just a legend
[Updated: See end of posting]
Recently, we came across some critical problems with our Jira installation. When we couldn't figure out/fix the problem ourselves, I posted a support request to Jira's support site. In response, I received a request for additional information. Since the request involved a fairly sizeable attachment I wrote back to clarify the request. Didn't get a response. I decided to send the attachment anyway and updated the support request with the required information and waited for a response. That was 4 days ago...The silence is deafening.
When you stick your neck out so far and claim "Legendary services"....well, you have to deliver. Atlassian's web-site quotes Jeff Bezos
"If you have an unhappy customer on the Internet, he doesn't tell his six friends, he tells his 6,000 friends"
The trouble is, there is no apparent way to escalate an issue. I couldn't find a phone number to call or any other email addresses -- other than for sales. I finally located a contact page. I filled out the form stressing the urgency of our problem and asking about an escalation process. Still not a peep.
We were considering purchasing Confluence. The one reservation that I had thus far was the lack of coherent documentation. I am now wondering if going for Confluence would be wise given the trouble I'm having with Jira; which, btw has excellent documentation.
I realize the irony of using javablogs to publish my gripe...
[Update: Mar 9 2005 2300]
Since originally posting the above, I have heard back from Atlassian. I hope the timing was just a coincidence.
The problems are being handled.
Recently, we came across some critical problems with our Jira installation. When we couldn't figure out/fix the problem ourselves, I posted a support request to Jira's support site. In response, I received a request for additional information. Since the request involved a fairly sizeable attachment I wrote back to clarify the request. Didn't get a response. I decided to send the attachment anyway and updated the support request with the required information and waited for a response. That was 4 days ago...The silence is deafening.
When you stick your neck out so far and claim "Legendary services"....well, you have to deliver. Atlassian's web-site quotes Jeff Bezos
"If you have an unhappy customer on the Internet, he doesn't tell his six friends, he tells his 6,000 friends"
The trouble is, there is no apparent way to escalate an issue. I couldn't find a phone number to call or any other email addresses -- other than for sales. I finally located a contact page. I filled out the form stressing the urgency of our problem and asking about an escalation process. Still not a peep.
We were considering purchasing Confluence. The one reservation that I had thus far was the lack of coherent documentation. I am now wondering if going for Confluence would be wise given the trouble I'm having with Jira; which, btw has excellent documentation.
I realize the irony of using javablogs to publish my gripe...
[Update: Mar 9 2005 2300]
Since originally posting the above, I have heard back from Atlassian. I hope the timing was just a coincidence.
The problems are being handled.
Tuesday, January 25, 2005
Struts and checkboxes
The following is a reminder to those working on implementing checkboxes on their pages.
It is essential that you implement the
An important side note (one that cost me quite a while): The
and
For a web UI, you need to implement the latter. If you use your IDE's intellisense, it is easy to accidentally pick the former since it shows up first in the list of choices.
It is essential that you implement the
ActionForm's reset() method. In this method, you must set the fields that populate the checkboxes to false. The reason is that an HTTP request only includes values for selected checkboxes. Any de-selected box will not be a part of the request and so the server-side will be none the wiser that a user un-checked a box.
An important side note (one that cost me quite a while): The
reset() method is overloaded with the following variants
void reset(ActionMapping mapping, ServletRequest request)
and
void reset(ActionMapping mapping, HttpServletRequest request)
For a web UI, you need to implement the latter. If you use your IDE's intellisense, it is easy to accidentally pick the former since it shows up first in the list of choices.
Friday, October 29, 2004
President Edwards? A mathematical possibility
Stephen Marmon's article paints the scenario in which we could have John Edwards in the Oval office come Jan 2005. Interesting, if not anything.
Thursday, October 14, 2004
Google your desktop -- Sweet!
The new Google Desktop Search is really a nice extrapolation (or is it really an intrapolation) of what Google does for the Internet.
You can now just as easily search the contents of your desktop -- including Outlook-based emails. Even nicer, when you search the web using Google, it prefaces the search results with hits on your local machine!
You can now just as easily search the contents of your desktop -- including Outlook-based emails. Even nicer, when you search the web using Google, it prefaces the search results with hits on your local machine!
Tuesday, September 28, 2004
JSF & Struts to co-exist?
Craig McClanahan, the creator of Struts and one of the leaders in the JSF 1.0 spec sees a world where JSF is a souped up presentation layer for a Struts-controlled application. He writes at length about this in his blog.
Friday, September 17, 2004
Continuous Integration Tools' Feature Matrix
Found an interesting feature matrix comparing various CI tools.
Aside: I got to this point from some article referring to Damage Control. I looked high and low at the site to see what is Damage Control. I could only infer that it is a tool in the same genre as CruiseControl. Sure could use better introductory docco. There is a lot of information if you already know what it is and what you need.
Aside: I got to this point from some article referring to Damage Control. I looked high and low at the site to see what is Damage Control. I could only infer that it is a tool in the same genre as CruiseControl. Sure could use better introductory docco. There is a lot of information if you already know what it is and what you need.
Tuesday, September 14, 2004
AOP popularity inhibitors
Dion Almaer writes about the growing interest in aspect oriented programming. There are, however, several hurdles to large scale adoption of AOP as one of the tricks of the trade.
- Using AOP requires not only a recognition of the cross-cutting concerns but also a paradigm shift programming practices. Conversely once you get into it, everthing starts looking like a cross-cutting concern. It is easy to confuse a candidate for method extraction refactoring with a concern
- Another inhibitor is tooling support. For better or for worse we are only as good as our IDE will let us be. It is hard to decipher logic that has been advised without proper in-place annotations. Eclipse's AJDT goes a long way. However if you use Spring's AOP, you are SOL. So you find that AOP is not applied unless the pain (of not using it) is unbearable
- Using AOP doesn't -- in most cases -- allow you to do something you couldn't do without it. It just makes it easier, nay logical. If on the other hand if it opened new avenues, it would have taken off gangbusters
- Arcane terminology is also a barrier to acceptance
Tuesday, September 07, 2004
Customize passwords by application
With Nic Wolff's nifty script you can now manage the passwords for all the countless sites that need one without having to remember countless different ones. Simply remember a master key, provide the domain you are accessing and it generate a nasty looking one. Very cool!
Surely, you aren't using the same one everywhere...Yeah! Right!
Attribute: Jon Udell's blog
Surely, you aren't using the same one everywhere...Yeah! Right!
Attribute: Jon Udell's blog
Hey NASA! There's got to be a better way
NASA is going to use Hollywood stunt helicopter pilots to snag a space capsule from mid-air. Now if I had suggested some such escapade I would have been laughed off the lot. How about a splashdown in the ocean? The Russians have been doing hard earth landings -- with astronauts, nyet cosmonauts on board -- since the sixties....
Oh! And if I am looking for some mid-air snagging, I don't know about going with a company called Vertigo!
All jokes aside....good luck NASA. I hope you pull it off.
Oh! And if I am looking for some mid-air snagging, I don't know about going with a company called Vertigo!
All jokes aside....good luck NASA. I hope you pull it off.
Thursday, September 02, 2004
System tray notification for CruiseControl
You can now get feedback for your CruiseControl builds right on your Windows' system tray. Checkout pragmatic automation for instructions.
Eclipse annoyances...
For all the wonderful things it does, Eclipse is aggravating about other things. . For example
Code completion not really helpful
Code completion is nice if it is a little intelligent about it. For example, if I type
Pressing CTRL+SPACE should automatically populate
Paste doesn't work if you have a code segmet folded
Say, you have a block of text in the clipboard buffer. You want to paste it thusly
It won't work! The first paste operation (CTRL+V: on Windows) unfolds the folded section. (Pray Why?). A second paste operation will then actually paste it.
Aaaargh! Wherefore art thou IDEA?
Code completion not really helpful
Code completion is nice if it is a little intelligent about it. For example, if I type
Monkey m = (M
Pressing CTRL+SPACE should automatically populate
Monkey as the default for a cast operation instead of giving me a list of gazillion things that it knows about starting with M.
Paste doesn't work if you have a code segmet folded
Say, you have a block of text in the clipboard buffer. You want to paste it thusly
-- Desired paste location ---
--- Next line is the beginning of a folded section ---
It won't work! The first paste operation (CTRL+V: on Windows) unfolds the folded section. (Pray Why?). A second paste operation will then actually paste it.
Aaaargh! Wherefore art thou IDEA?
The aliens are coming....The aliens are coming!
For the last year or so, the SETI project has been following some unusual radio signals from a sector of space detected by the Arecibo observatory. Lately, while most of those signals have disappeared, one of them has become more pronounced.
Now, apparently there is a universal "Ahoy! mate" signal. Scientists poring over the SETI logs have matched the frequency of the signals to the aforementioned greeting. They feel that it is highly unusual for a natural phenomenon to repeatedly send such a signal.
Read more about SHGbo2+14a (now isn't that a cute name) at the Guardian.
Now, apparently there is a universal "Ahoy! mate" signal. Scientists poring over the SETI logs have matched the frequency of the signals to the aforementioned greeting. They feel that it is highly unusual for a natural phenomenon to repeatedly send such a signal.
Read more about SHGbo2+14a (now isn't that a cute name) at the Guardian.
Saturday, August 28, 2004
Broadband (VoIP) Phone Rocks!
I have just had my broadband phone service from AT&T for a week and so far it's been outstanding!
After having agonized over it for months researching the technology and comparing offerings from various I settled on AT&T cecause (a) They claimed their differentiator was call quality and (b) because I had a 30-day risk free trial and so I had nothing to lose. An added incentive was $19.99 per month offer during the current promotion.
So far, I have been quite pleased. The call quality has been very good. In fact my international calls have been perceptibly clearer than my original land-line service.
Pros
If you are hesitating because the phone adapter that hooks to the cable/DSL modem has only one phone outlet, don't worry. You simply connect that to the traditional phone wall outlet. Since phone lines are wired in parallel all of them will go live!
After having agonized over it for months researching the technology and comparing offerings from various I settled on AT&T cecause (a) They claimed their differentiator was call quality and (b) because I had a 30-day risk free trial and so I had nothing to lose. An added incentive was $19.99 per month offer during the current promotion.
So far, I have been quite pleased. The call quality has been very good. In fact my international calls have been perceptibly clearer than my original land-line service.
Pros
- Great price
- Lot of features
- Voice mail -- Can check online, can receive email notification of voice mail
- Call forwarding, waiting, caller id etc etc
- Can set up multiple phones to ring at the same time to locate you ...cool!
- When you lose power you'll lose phone service -- Since I lose power maybe once a year, I can live with that
- You have to dial 10 digits even to call your neighbor -- I think in some bigger locales people already have to do that even with their land-lines
- You may not be able to keep your existing phone number. This is dependent on whether or not the provider has coverage in my area. If I had gone with Vonage, for example, I could not have kept my existing number. This was a very important for me
If you are hesitating because the phone adapter that hooks to the cable/DSL modem has only one phone outlet, don't worry. You simply connect that to the traditional phone wall outlet. Since phone lines are wired in parallel all of them will go live!
Subscribe to:
Posts (Atom)