>>>If I simply add dependency in module "B"'s pom.xml -- it will use "A" from repository, and if I did not do "mvn deploy" there would not be one!
If you build from Top Parent then Reactor will know what to compile first and second. Don't try to compile module B directly, in which case B resolves A from repository. Subir -----Original Message----- From: Ilya Kazakevich [mailto:kazakev...@devexperts.com] Sent: Wednesday, January 27, 2010 2:38 AM To: users@maven.apache.org Subject: Dependencies in multi-module project Hello. Say, I have two projects: A and B. I always want them to be compiled and deployed in one time and I decided to use multi-module project: In the upper directory I've created pom.xml with the following content: <modules> <module>A</module> <module>B</module> </modules> And it works fine. But module B depends on module A. When I do some changes in A and run "mvn compile" on the top level, I want both modules to be recompiled and module "B" should be compiled with newly compiled "A". How can I do it? If I simply add dependency in module "B"'s pom.xml -- it will use "A" from repository, and if I did not do "mvn deploy" there would not be one! Of course I can add "system" dependency to module "B" and hardcode path to module "A" (like "../A/target/classes") but that's an ugly hack. What is the best way to do that? Thanks. ==================== WBR, Ilya Kazakevich --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org Please do not print this email unless it is absolutely necessary. The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments. WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. www.wipro.com --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org