On Mar 29, 2011, at 7:24 PM, Stephen Williams wrote: > On 3/29/11 6:36 PM, Gary Gregory wrote: >> Wait! I'm not done or I'm loosing my marbles... > > ... > As I noticed this note, seems like a good point to interject a Maven war > story: > > I do not like Maven. I know I should, but it seems too complicated and too > hard to use on complex projects. I may get over it, when I have a good > reason. I'm living in CMake land now, compiling C++ and Java code, and > (using JavaGlue (a fork of XBiG)) generating, compiling, and linking > Java->C++ code for native and Android apps. It seems much cleaner, handles > cross-platform very well, and it is easier to avoid ant/gmake/maven spaghetti > code. Not as powerful as Maven probably, but easier for most project use. > > A bit over a year ago I was on a project that had way too much code (class > diarrhea (600+ for a 3 tier application) etc.) written by a Russian off-shore > team. They had a long-running and memory hog (6+GB!) Maven build. At > runtime, various OSGi bits were used to tie the application together, mainly > meaning that it was impossible to follow the whole flow to figure out how > certain parts of the app were triggered. And there was no detailed > documentation and they refused to refactor. > > Anyway, at one point I'd written a good chunk of code using Google Protocol > buffers in a message-oriented way (the code assumes synchronous RPC) using > the nice Apache Netty framework. Plus we used RabbitMQ on another tier. > Grudgingly following the (wrong!) project rule of not checking in things > until they were working, I finished a complete version. After testing, I > decided to dig into integrating the build of that module into Maven. > Noticing that Eclipse had a 'create Maven project file' (or something like > that), I figured I'd give it a try. Assuming that build errors would lead me > to the next step, I asked Eclipse for a project build. > > Every buffer my mouse ran over in Eclipse blanked. What? Wait! Arghh... > The first thing the generated Maven build did was to delete all of my source > code. I've used a lot of build systems for a lot of years, but didn't > anticipate that possibility. I checked all tmp, cache, and other areas. No > trace of any source code. > > So, in shock and not happy for half a day, kicking myself for not making > copies in a dozen places, I started being resigned to writing the code from > scratch. Probably I would remember most of the difficult solutions. > > Then, I noticed that the class files were still there. (Delete the source > code but not the class files? Perverted!) For about a day, I tried all of > the Java decompilers that I could find. Most of them couldn't handle JDK1.5 > class files. Finally, one worked almost perfectly and I recovered over 98% > of my code. No comments of course, and its a good thing we weren't > obfuscating at that point. > > So, lesson learned: Don't use Maven! ;-) > No, the other one: make copies of your code through multiple means until it > is completely safe. I hadn't lost code (or any data through paranoid backups > that have survived about 20 hard drive failures over the years) for a long > time. It will be a very long time before it happens again. > > sdw > -- > Stephen D. Williams s...@lig.net stephendwilli...@gmail.com LinkedIn: > http://sdw.st/in V:650-450-UNIX (8649) V:866.SDW.UNIX V:703.371.9362 > F:703.995.0407 AIM:sdw Skype:StephenDWilliams Yahoo:sdwlignet Resume: > http://sdw.st/gres Personal: http://sdw.st facebook.com/sdwlig > twitter.com/scienteer
I have no idea what you did, but Maven won't delete your source code doing a mvn clean install unless you've placed your source files under the "target" subdirectory. This could have just as easily been something Eclipse did to you as much as Maven. Maybe you should stop using Eclipse then. Ralph --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org For additional commands, e-mail: dev-h...@commons.apache.org