+1. The right approach is to use a MRM. You were unlucky to find an article that is actually more a quite dirty hack than a solution.
You shouldn't put dependencies inside your SCM. Put those dependencies once into the maven repository manager, and be happy with a clean and simple build. Cheers 2013/2/11 Ron Wheeler <[email protected]> > Why not just load these stray orphans into your MRM once and then treat > them and normal dependencies. > > Ron > > > On 11/02/2013 4:17 AM, Reinhard Nägele wrote: > >> Hello, >> >> A couple of years ago I used a plugin execution in the validate phase to >> bootstrap jars that were not available on Maven Central as suggested in >> [1]. I needed to do the same thing again today but noticed that this >> approach does not seem to work any more with Maven 3. Right after running >> Maven, dependency resolution kicks in making the build fail even before the >> install plugin gets a chance to install the missing dependency. Here's what >> I'm doing: >> >> <plugin> >> <groupId>org.apache.maven.**plugins</groupId> >> <artifactId>maven-install-**plugin</artifactId> >> <executions> >> <execution> >> <id>boostrap-some-depencency</**id> >> <goals> >> <goal>install-file</goal> >> </goals> >> <phase>validate</phase> >> <configuration> >> <groupId>com.some.groupid</**groupId> >> <artifactId>some-artifact</**artifactId> >> <version>${some.artifact.**version}</version> >> <packaging>jar</packaging> >> <file>bootstrap-lib/some-**artifact-${some.artifact.**version}.jar</file> >> <sources>bootstrap-lib/some-**artifact-${some.artifact.**version}-sources.jar</sources> >> >> </configuration> >> </execution> >> </executions> >> </plugin> >> ... >> <dependency> >> <groupId>com.some.groupid</**groupId> >> <artifactId>some-artifact</**artifactId> >> <version>${some.artifact.**version}</version> >> </dependency> >> ... >> <properties> >> <some.artifact.version>1.2.3</**some.artifact.version> >> </properties> >> >> [1] http://www.blackbit.be/2010/**04/15/maven-automatically-** >> install-dependencies-during-**build/<http://www.blackbit.be/2010/04/15/maven-automatically-install-dependencies-during-build/> >> >> Is this no longer possible? I'd really prefer this approach over using a >> system dependency. >> >> Thanks, >> Reinhard >> >> >> ------------------------------**------------------------------**--------- >> To unsubscribe, e-mail: >> users-unsubscribe@maven.**apache.org<[email protected]> >> For additional commands, e-mail: [email protected] >> >> >> > > -- > Ron Wheeler > President > Artifact Software Inc > email: [email protected] > skype: ronaldmwheeler > phone: 866-970-2435, ext 102 > > > > ------------------------------**------------------------------**--------- > To unsubscribe, e-mail: > users-unsubscribe@maven.**apache.org<[email protected]> > For additional commands, e-mail: [email protected] > > -- > Baptiste <Batmat> MATHUS - http://batmat.net > Sauvez un arbre, > Mangez un castor ! nbsp;! <[email protected]> >
