Hi 
Cannot reproduce on Apache NetBeans 12 b5, windows 10. Only the junit are added 
not the selenium.

Best Regards
Eric

-----Message d'origine-----
De : Tim Boudreau <[email protected]> 
Envoyé : lundi 25 mai 2020 00:20
À : [email protected]
Objet : Re: Gratuitous selenium dependencies added to Maven projects

Just reproduced it again on a NetBeans module project, on a different machine 
than I usually use for coding - different userdir, version of NetBeans, etc.  
I'm curious if anyone else can.  Steps to reproduce:

1. Clone this repo:
git clone [email protected]:timboudreau/ANTLR4-Plugins-for-NetBeans.git

2.  Check out the commit I was working against:
cd ANTLR4-Plugins-for-NetBeans
git checkout 6c0fd2dbd76ab09182cafc937a961d4ff5abe391

3. Build it once
mvn -Dmaven.test.skip.exec=true clean install

4.  Open the subproject antlr-utils in the IDE, let it load and expand its one 
package

5.  Right click the class Criteria.java and choose *Tools | Create/Update
Tests*

6.  Accept the defaults, change nothing in the dialog (which contains no 
mention of Selenium), just click *OK* (note this means you are selecting JUnit 
as the test framework, even though the parent project depends on JUnit 4 and 
that's what should be used - perhaps this is the trigger?).

then see if this pile of dependencies gets added to the pom.xml (and the build 
will fail because of dependency convergence - Selenium is sloppy about 
dependency management) - note both JUnit 4 and JUnit are added, *and *the 
parent pom specifies a different version of JUnit 4 which the version spec
overrides:

        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-api</artifactId>
            <version>5.6.0</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-params</artifactId>
            <version>5.6.0</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-engine</artifactId>
            <version>5.6.0</version>
            <scope>test</scope>
        </dependency>
        <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>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <scope>test</scope>
            <version>4.11</version>
        </dependency>


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

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



Reply via email to