why don't you just set <optional>true</optional> on your dependencies?

2009/11/24 Gajo Csaba <[email protected]>:
> Regarding this subject, I've managed to "resolve" dependencies by removing
> them from the project. So my plugin will check if an rpm is installed, and
> if not, it will fail. If everything is ok, then the rpm dependency will be
> removed from the project, so that Maven cannot do the check on its own. This
> way, it will "skip" all rpm dependencies.
>
> List<Dependency> deps = mavenProject.getDependencies();
> Iterator<Dependency> diter = deps.iterator();
> while (diter.hasNext()) {
>  Dependency dep = diter.next();
>  if ("rpm".equals(dep.getType())) {
>     diter.remove();       // make Maven "forget" about this dependency
>     checkDependencyOnMyOwn(dep);
>  }
> }
>
> I'm now waiting for comments why this is a horrible butchering of Maven :)
>
> Regards, Csaba
>
>
> Gajo Csaba wrote:
>>
>> Ah cool, some of my colleagues are experimenting with it, I'll ask them
>> tomorrow!
>>
>>
>> Csaba Madai wrote:
>>>
>>> Have you tried Artifactory? It's not a plugin, but I assume it will do
>>> the job for you :)
>>>
>>> Csaba
>>>
>>> 2009/11/23 Gajo Csaba <[email protected]>:
>>>
>>>>
>>>> Hello Csaba :)
>>>>
>>>> The problem I might potentially have is that we use two repositories,
>>>> one is
>>>> Maven and the other is YUM. So it is possible for an artifact (rpm) to
>>>> be in
>>>> YUM, but not in the Maven repository. In this case, my plugin would
>>>> check if
>>>> it's in YUM and download it... otherwise it would fail. But it should
>>>> not
>>>> fail if it's not in the Maven repository.
>>>>
>>>> Regards, Csaba
>>>>
>>>>
>>>> Csaba Madai wrote:
>>>>
>>>>>
>>>>> Hi,
>>>>>
>>>>> I think thats the point of the dependency, to "be there", why do you
>>>>> use a dependency in your pom when it's not necesarry? :)
>>>>>
>>>>> Csaba
>>>>>
>>>>> 2009/11/23 Gajo Csaba <[email protected]>:
>>>>>
>>>>>
>>>>>>
>>>>>> Hello,
>>>>>>
>>>>>> Is there a way to write a plugin or something, which would check if a
>>>>>> dependency exists, and if it doesn't, then just skips it? Currently if
>>>>>> a
>>>>>> dependency is missing and cannot be downloaded, then the build will
>>>>>> fail.
>>>>>>
>>>>>> Thanks, Csaba
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> ---------------------------------------------------------------------
>>>>>> 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]
>>>>>
>>>>>
>>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> 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]
>>>
>>>
>>
>>
>> ---------------------------------------------------------------------
>> 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]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to