Run mvn install once to install all artifacts into your local repo. Then, assuming you didn't change module1 and only change module2, you should be able to run mvn package from the module2 directory.
If you make changes in module1 as well as module2, then you will need to run from the root/parent, or run mvn from module1 and then go into module2 and run mvn again. In short, no, Maven will not do what you "expect". Wayne On 3/4/08, carioca <[EMAIL PROTECTED]> wrote: > > Hi, > > I have a multi module project in the form: > > pom.xml > module1 > pom.xml > module2 > pom.xml > > Module2 depends on module1. > Both modules have the master project as parent project. > I manage to compile the master project by using "mvn package" from the > master project's base directory. > However, when I try to compile only module2 using "mvn package" from the > module2's base directory I get the message that module1 is missing. > I would expect that maven compile module1 (because it's a dependency of > module2) and then compile module2. > > In a multi module project, is it possible to compile modules that have > dependencies in other modules without compiling the entire master project? > > Thanks. > -- > View this message in context: > http://www.nabble.com/Compiling-only-submodules-in-multi-module-projects-tp15825207s177p15825207.html > Sent from the Maven - Users mailing list archive at Nabble.com. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
