On 4/6/07, Lacoste, Dana <[EMAIL PROTECTED]> wrote:
Testing this has been exceedingly difficult (our project takes over an hour to build and some components are failing for me, so I keep tracking down changes rather than moving on to my testing :)But this SEEMS to work: In the parent pom (and all parent poms of affected antruns) add a build section that does nothing but call antrun. So if project looks like: project/pom.xml project/component1/pom.xml project/component1/libraryA/pom.xml project/component2/pom.xml project/component2/libraryB/pom.xml If I need to add an antrun with dependencies in LibraryB, but that Library depends on Library A (so if I'm building the whole project, LibraryA will always run first, but if I'm building LibraryB by itself, I can do so direct in its pom. I added the code below to project/pom.xml, project/component2/pom.xml, and project/component2/libraryB/pom.xml (well, technically that last one already worked, so I used the existing code, but the concept's the same.) This seems to make sure my dependencies are set, regardless of where I start the build or what order it's run in. It's silly and redundant, but it seems to work :) <build> <plugins> <plugin> <artifactId>maven-antrun-plugin</artifactId> <dependencies> <dependency> <groupId>ant</groupId> <artifactId>ant-nodeps</artifactId> <version>1.6.5</version> </dependency> <dependency> <groupId>jakarta-regexp</groupId> <artifactId>jakarta-regexp</artifactId> <version>1.4</version> </dependency> <dependency> <groupId>ant</groupId> <artifactId>ant-jakarta-regexp</artifactId> <version>1.6.1</version> </dependency> </dependencies> </plugin> </plugins> </build> What do you think? I'm fairly new to maven, so I'm trying to learn the intricacies of how it's supposed to work while I go along :) Thanks, Dana
Let's stay on list :) You implemented the work-around proposed by Brett: http://jira.codehaus.org/browse/MNG-1323#action_54948 So it looks like it should work.Kenney said underneath that there's no working work-around. I am not sure if that applies to your particular case. Hope for you that future version of maven won't break your solution... If I were you I would try maven 2.0.5 or 2.0.6 to see if that still works. If that still works, you should also probably follow the list and try any future release candidates for maven: you really want to catch regressions before they get into an official release. Cheers, Jerome --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
