Not using Selenium to test a NetBeans module, no :-)

I have written one library a long time ago which is part of this library
collection - https://github.com/timboudreau/mastfrog-parent and it has
happened in projects that used some other library with the same parent
POM.  But it's hard to believe that would be a path by which something
could assume that.  It can happen to projects completely unrelated to
Selenium or even web development.

A few times it has been especially painful, since either it drags in a
dependency on an older version of JUnit, or creates a dependency version
conflict the enforcer plugin complains about, and then I find that three
libraries deep, something got that damned selenium dependency added to it,
so it's hauling in a version of, say, log4j that conflicts with another
project.  Very annoying, and in particular, IDEs should not ever do this
sort of thing without checking with the user.

-Tim


On Mon, May 18, 2020 at 3:10 PM John Mc <[email protected]> wrote:

> Hi Tim,
>
> I cant help you with answering how its happening, as I've never used
> Selenium in NetBeans, but I think your right that its NetBeans adding it:
>
> https://github.com/apache/netbeans/blob/accdbada0a9c5105bd3f06e435024230c1618316/java/selenium2.maven/src/org/netbeans/modules/selenium2/maven/Selenium2MavenSupportImpl.java
>
> Do you have any Selenium Tests, or Unit Test, and NetBeans somehow assumed
> you wanted Selenium included?
>
> Regards
>
> John
>
> On Mon, 18 May 2020 at 19:59, Tim Boudreau <[email protected]> wrote:
>
> > Every now and then, maybe once every few months over the last few years,
> > I'll be working on a Maven project - maybe something completely unrelated
> > to web development (at the moment it just happened to a NetBeans module
> > project) - when I will notice the build behaving weirdly or downloading
> > things that could not possibly be dependencies of it.  And I will find
> that
> > some pom.xml file within the project has had this added to it:
> >
> >         <dependency>
> >             <groupId>org.seleniumhq.selenium</groupId>
> >             <artifactId>selenium-java</artifactId>
> >             <scope>test</scope>
> >             <version>2.44.0</version>
> >         </dependency>
> >         <dependency>
> >             <groupId>com.opera</groupId>
> >             <artifactId>operadriver</artifactId>
> >             <scope>test</scope>
> >             <version>1.5</version>
> >             <exclusions>
> >                 <exclusion>
> >                     <groupId>org.seleniumhq.selenium</groupId>
> >                     <artifactId>selenium-remote-driver</artifactId>
> >                 </exclusion>
> >             </exclusions>
> >         </dependency>
> >
> > It seems pretty clear that NetBeans is doing this - but what?  And why?
> > Accidental keyboard shortcut?  Something else?
> >
> > Thanks,
> >
> > Tim
> >
> > --
> > http://timboudreau.com
> >
>


-- 
http://timboudreau.com

Reply via email to