maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Baptiste MATHUS ...@batmat.net>
Subject Re: Dependency resolution kicks in too early
Date Mon, 11 Feb 2013 15:31:50 GMT
+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 <rwheeler@artifact-software.com>

> 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<users-unsubscribe@maven.apache.org>
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>
>>
>
> --
> Ron Wheeler
> President
> Artifact Software Inc
> email: rwheeler@artifact-software.com
> skype: ronaldmwheeler
> phone: 866-970-2435, ext 102
>
>
>
> ------------------------------**------------------------------**---------
> To unsubscribe, e-mail: users-unsubscribe@maven.**apache.org<users-unsubscribe@maven.apache.org>
> For additional commands, e-mail: users-help@maven.apache.org
>
> --
> Baptiste <Batmat> MATHUS - http://batmat.net
> Sauvez un arbre,
> Mangez un castor ! nbsp;! <users-help@maven.apache.org>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message