Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [m2e-dev] resolving implicit dependency in project configurator

Thanks.  This is helpful.  I'll have a look.

On Thu, May 31, 2012 at 9:49 AM, Fred Bricon <fbricon@xxxxxxxxx> wrote:
> For m2e-apt, I needed to add a plugin's dependencies to the classpath, so I
> ended up doing that (based on MavenModelManager#readDependencyTree ) :
> https://github.com/jbosstools/m2e-apt/blob/master/org.jboss.tools.maven.apt.core/src/org/jboss/tools/maven/apt/internal/utils/PluginDependencyResolver.java
>
> I usually let a custom buildparticipant (returned by the project
> configurator) doing the plugin invocation, like
> https://github.com/jbosstools/m2e-apt/blob/master/org.jboss.tools.maven.apt.core/src/org/jboss/tools/maven/apt/internal/processor/MavenProcessorBuildParticipant.java ,
> not sure if the runOn* attributes apply there though. Igor should know
> better.
>
>
>
> On Thu, May 31, 2012 at 6:31 PM, Andrew Eisenberg <andrew@xxxxxxxxxxxx>
> wrote:
>>
>> Some more, related questions.
>>
>> 1. It turns out that not only do I need to add a single dependency,
>> but I also need to add some transitive dependencies.  What is the
>> recommended way to track down transitive dependencies
>>
>> 2. The plugin that I am writing the configurator for already has a
>> lifecycle-mapping-metadata.xml included.  It has this action:
>>                        <action>
>>                                <execute>
>>
>> <runOnIncremental>true</runOnIncremental>
>>
>> <runOnConfiguration>false</runOnConfiguration>
>>                                </execute>
>>                        </action>
>> Now, the configurator needs to do more than just execute the plugin.
>> I first need to configure a few natures, add a few things to the
>> classpath, etc.  And then I need to execute the plugin.  What is the
>> recommended way of doing this?
>>
>> thanks for your help.
>>
>> Andrew
>>
>> On Wed, May 30, 2012 at 3:16 PM, Andrew Eisenberg <andrew@xxxxxxxxxxxx>
>> wrote:
>> > Yep.  This works.  Very nice.
>> >
>> > On Wed, May 30, 2012 at 1:16 PM, Andrew Eisenberg <andrew@xxxxxxxxxxxx>
>> > wrote:
>> >> Thanks.  I'll give this a try.
>> >>
>> >> On Wed, May 30, 2012 at 12:25 PM, Igor Fedorenko <igor@xxxxxxxxxxxxxx>
>> >> wrote:
>> >>> IMaven#resolve can be used to resolve an artifact from specified Maven
>> >>> repositories. This call will download the artifact if necessary. There
>> >>> is currently no proper way to force re-resolution of the artifact if
>> >>> it's available in maven local repository, but you may be able to use
>> >>> ArtifactRepository.setReleaseUpdatePolicy and/or
>> >>> .setSnapshotUpdatePolicy.
>> >>>
>> >>> --
>> >>> Regards,
>> >>> Igor
>> >>>
>> >>>
>> >>> On 12-05-30 1:39 PM, Andrew Eisenberg wrote:
>> >>>>
>> >>>> Hi all,
>> >>>>
>> >>>> I am creating a project configurator for a maven plugin and maven
>> >>>> extension.  The extension (among other things) adds an implicit
>> >>>> dependency to the project.  I would like to replicate this
>> >>>> functionality inside of the project configurator.  I know the
>> >>>> artifact, group, and version of the dependency.  My question is: how
>> >>>> to I resolve that to get a jar file in the local repo?  Furthermore,
>> >>>> if the artifact has not been downloaded yet, how do I force it to be
>> >>>> so?
>> >>>>
>> >>>> thanks,
>> >>>> _______________________________________________
>> >>>> m2e-dev mailing list
>> >>>> m2e-dev@xxxxxxxxxxx
>> >>>> https://dev.eclipse.org/mailman/listinfo/m2e-dev
>> >>>
>> >>> _______________________________________________
>> >>> m2e-dev mailing list
>> >>> m2e-dev@xxxxxxxxxxx
>> >>> https://dev.eclipse.org/mailman/listinfo/m2e-dev
>> _______________________________________________
>> m2e-dev mailing list
>> m2e-dev@xxxxxxxxxxx
>> https://dev.eclipse.org/mailman/listinfo/m2e-dev
>
>
>
>
> --
> "Have you tried turning it off and on again" - The IT Crowd


Back to the top