Re: Skip dependencies
Because they're not optional, they just cannot be installed by Maven because they're in a YUM repository. But I guess the effect would be the same? Stephen Connolly wrote: why don't you just set true on your dependencies? 2009/11/24 Gajo Csaba : 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 deps = mavenProject.getDependencies(); Iterator 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 : 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 : 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: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Skip dependencies
why don't you just set true on your dependencies? 2009/11/24 Gajo Csaba : > 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 deps = mavenProject.getDependencies(); > Iterator 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 : >>> 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 : > > >> >> 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: users-unsubscr...@maven.apache.org >> For additional commands, e-mail: users-h...@maven.apache.org >> >> >> >> > > - > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org > For additional commands, e-mail: users-h...@maven.apache.org > > > - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org >>> >>> - >>> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org >>> For additional commands, e-mail: users-h...@maven.apache.org >>> >>> >> >> >> - >> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org >> For additional commands, e-mail: users-h...@maven.apache.org >> > > > - > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org > For additional commands, e-mail: users-h...@maven.apache.org > > - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Skip dependencies
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 deps = mavenProject.getDependencies(); Iterator 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 : 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 : 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: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Skip dependencies
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 : 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 : 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: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Skip dependencies
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 : > 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 : >> >>> >>> 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: users-unsubscr...@maven.apache.org >>> For additional commands, e-mail: users-h...@maven.apache.org >>> >>> >>> >> >> - >> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org >> For additional commands, e-mail: users-h...@maven.apache.org >> >> > > > - > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org > For additional commands, e-mail: users-h...@maven.apache.org > > - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Skip dependencies
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 : 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: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Skip dependencies
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 : > 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: users-unsubscr...@maven.apache.org > For additional commands, e-mail: users-h...@maven.apache.org > > - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org