Giter Site home page Giter Site logo

Comments (6)

bonigarcia avatar bonigarcia commented on August 20, 2024

In order to package the library, you just need the following Maven command (the -DskipTests argument is used to avoid running test, which is causing that exception, maybe because you don't have Edge installed in your Windows machine):

mvn package -DskipTests

You the resulting jar will be located inside the target folder.

In addition, you can find all the version of WebDriverManager on Maven Central.

from webdrivermanager.

jamiejackson avatar jamiejackson commented on August 20, 2024

Thanks, @bonigarcia. I later noticed that this is available on the Maven repo.

However, would you happen to know how to build it with runtime dependencies?

I'm trying to put this into a project that's not Maven (and not directly Java). Maybe there's a way to get Maven in that project to place the jars, but it seems easiest just to build the uber jar and place it manually.

from webdrivermanager.

jamiejackson avatar jamiejackson commented on August 20, 2024

I'm stumbling along, but I think I found a way:

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-shade-plugin</artifactId>
        <version>2.4.3</version>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>shade</goal>
            </goals>
            <configuration>
              <artifactSet>
                <excludes>
                  <exclude>org.apache.maven:tests</exclude>
                </excludes>
              </artifactSet>
            </configuration>
          </execution>
        </executions>
      </plugin>

Although I end with a jar whose contents seem complete, I'm having trouble while trying to use it (No configuration setting found for key 'wdm'). I don't know if you'd have any clue how to fix that, but I thought I'd try you.

Lucee 4.5.2.018 Error (com.typesafe.config.ConfigException$Missing)
Message No configuration setting found for key 'wdm'
Cause   com.typesafe.config.ConfigException$Missing
Stacktrace  The Error Occurred in
E:\www\cfselenium\test.cfm: line 7 
5: driverManager = variables.javaFactory.createObject("io.github.bonigarcia.wdm.MarionetteDriverManager");
6: // dump(var=driverManager.getInstance().setup(), abort=true);
7: driverManager.getInstance().setup();
8: driver = variables.javaFactory.createObject("org.openqa.selenium.firefox.MarionetteDriver");
9: </cfscript>

Java Stacktrace No configuration setting found for key 'wdm'
    at com.typesafe.config.impl.SimpleConfig.findKey(SimpleConfig.java:124):124
    at com.typesafe.config.impl.SimpleConfig.find(SimpleConfig.java:147):147
    at com.typesafe.config.impl.SimpleConfig.find(SimpleConfig.java:159):159
    at com.typesafe.config.impl.SimpleConfig.find(SimpleConfig.java:164):164
    at com.typesafe.config.impl.SimpleConfig.getString(SimpleConfig.java:206):206
    at io.github.bonigarcia.wdm.WdmConfig.getString(WdmConfig.java:46):46
    at io.github.bonigarcia.wdm.MarionetteDriverManager.getDriverVersion(MarionetteDriverManager.java:105):105
    at io.github.bonigarcia.wdm.BrowserManager.setup(BrowserManager.java:95):95
    at io.github.bonigarcia.wdm.BrowserManager.setup(BrowserManager.java:80):80
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method):-2
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source):-1
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source):-1
    at java.lang.reflect.Method.invoke(Unknown Source):-1
    at lucee.runtime.reflection.pairs.MethodInstance.invoke(MethodInstance.java:55):55
    at lucee.runtime.reflection.Reflector.callMethod(Reflector.java:857):857
    at lucee.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues(VariableUtilImpl.java:756):756
    at lucee.runtime.PageContextImpl.getFunction(PageContextImpl.java:1590):1590
    at test_cfm$cf.call(E:\www\cfselenium\test.cfm:7):7
    at lucee.runtime.PageContextImpl.doInclude(PageContextImpl.java:951):951
    at lucee.runtime.listener.ClassicAppListener._onRequest(ClassicAppListener.java:56):56
    at lucee.runtime.listener.MixedAppListener.onRequest(MixedAppListener.java:36):36
    at lucee.runtime.PageContextImpl.execute(PageContextImpl.java:2262):2262
    at lucee.runtime.PageContextImpl.execute(PageContextImpl.java:2225):2225
    at lucee.runtime.engine.CFMLEngineImpl.serviceCFML(CFMLEngineImpl.java:456):456
    at lucee.loader.servlet.CFMLServlet.service(CFMLServlet.java:47):47
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:790):790
    at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:85):85
    at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62):62
    at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36):36
    at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:131):131
    at io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:57):57
    at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43):43
    at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:46):46
    at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:64):64
    at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:60):60
    at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:77):77
    at io.undertow.security.handlers.AbstractSecurityContextAssociationHandler.handleRequest(AbstractSecurityContextAssociationHandler.java:43):43
    at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43):43
    at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43):43
    at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:285):285
    at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:264):264
    at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:81):81
    at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:175):175
    at io.undertow.server.Connectors.executeRootHandler(Connectors.java:202):202
    at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:802):802
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source):-1
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source):-1
    at java.lang.Thread.run(Unknown Source):-1

Timestamp   6/11/16 12:53:13 PM EDT

from webdrivermanager.

jamiejackson avatar jamiejackson commented on August 20, 2024

It doesn't seem to be picking up the properties from application.properties (which is in the root of the jar). If I dump the config from WdmConfig.getString():

    public static String getString(String key) {
        System.out.println("key:"+ key);
        System.out.println(WdmConfig.getInstance().conf.toString());
        return WdmConfig.getInstance().conf.getString(key);
    }

...I don't see any of the wdm. properties:

{
    "awt":{
        "toolkit":"sun.awt.windows.WToolkit"
    },
    "cfx":{
        "bin":{
            "path":"C:\\Users\\15037\\.CommandBox\\engine\\cfml\\server\\lucee-server\\context\\bin"
        }

    },
    "coldfusion":{
        "classPath":"E:\\www\\cfselenium\\WEB-INF\\cfusion/lib/updates/,E:\\www\\cfselenium\\WEB-INF\\cfusion/lib/,E:\\www\\cfselenium\\WEB-INF\\cfusion/lib/axis2,E:\\www\\cfselenium\\WEB-INF\\cfusion/gateway/lib/,E:\\www\\cfselenium\\WEB-INF\\cfusion/../cfform/jars,E:\\www\\cfselenium\\WEB-INF\\cfusion/../flex/jars,E:\\www\\cfselenium\\WEB-INF\\cfusion/lib/oosdk/lib,E:\\www\\cfselenium\\WEB-INF\\cfusion/lib/oosdk/classes",
        "home":"E:\\www\\cfselenium\\WEB-INF\\cfusion",
        "jsafe":{
            "defaultalgo":"FIPS186Random"
        },
        "libPath":"E:\\www\\cfselenium\\WEB-INF\\cfusion/lib",
        "rootDir":"E:\\www\\cfselenium\\WEB-INF\\cfusion"
    },
    "file":{
        "encoding":{
            "pkg":"sun.io"
        },
        "separator":"\\"},"flex":{"dir":"E:\\www\\cfselenium\\WEB-INF\\cfform"},"jacob":{"dll":{"name":"jacob-x64.dll","path":"C:\\Users\\15037\\.CommandBox\\engine\\cfml\\server\\lucee-server\\context\\bin\\jacob-x64.dll"}},"java":{"awt":{"graphicsenv":"sun.awt.Win32GraphicsEnvironment","printerjob":"sun.awt.windows.WPrinterJob"},"class":{"path":"C:\\Users\\15037\\.CommandBox\\lib\\runwar-3.4.5.jar;C:\\Users\\15037\\.CommandBox/lib/lucee-inst.jar","version":"52.0"},"endorsed":{"dirs":"C:\\ProgramFiles\\Java\\jre1.8.0_25\\lib\\endorsed"},"ext":{"dirs":"C:\\ProgramFiles\\Java\\jre1.8.0_25\\lib\\ext;C:\\WINDOWS\\Sun\\Java\\lib\\ext"},"home":"C:\\ProgramFiles\\Java\\jre1.8.0_25","io":{"tmpdir":"C:\\Users\\15037\\AppData\\Local\\Temp\\"
    },
    "library":{
        "path":"E:\\www\\cfselenium\\WEB-INF\\cfusion/lib"
    },
    "nixlibrary":{
        "path":"E:\\www\\cfselenium\\WEB-INF\\cfusion/lib"
    },
    "runtime":{
        "name":"Java(TM) SE Runtime Environment",
        "version":"1.8.0_25-b18"
    },
    "security":{
        "auth":{
            "policy":"E:\\www\\cfselenium\\WEB-INF\\cfusion/lib/neo_jaas.policy"
        },
        "policy":"E:\\www\\cfselenium\\WEB-INF\\cfusion/lib/coldfusion.policy"
    },
    "specification":{
        "name":"Java Platform API Specification",
        "vendor":"Oracle Corporation",
        "version":"1.8"
    },
    "util":{
        "logging":{
            "ConsoleHandler":{
                "formatter":"java.util.logging.SimpleFormatter"
            },
            "SimpleFormatter":{
                "format":"%1$tY-%1$tm-%1$td %1$tH:%1$tM:%1$tS %4$s %3$s %5$s%6$s%n"
            }

        }

    },
    "vendor":{
        "url":{
            "bug":"http://bugreport.sun.com/bugreport/"
        }

    },
    "version":"1.8.0_25",
    "vm":{
        "info":"mixed mode",
        "name":"Java HotSpot(TM) 64-Bit Server VM",
        "specification":{
            "name":"Java Virtual Machine Specification",
            "vendor":"Oracle Corporation",
            "version":"1.8"
        },
        "vendor":"Oracle Corporation",
        "version":"25.25-b02"
    }
},
"javax":{
    "net":{
        "ssl":{
            "trustStore":"C:\\Users\\15037\\.CommandBox\\engine\\cfml\\server\\lucee-server\\context\\security\\cacerts"
        }

    }
},
"line":{
    "separator":"\r\n"
},
"oracle":{
    "jdbc":{
        "V8Compatible":"true"
    }
},
"org":{
    "owasp":{
        "esapi":{
            "resources":"C:\\Users\\15037\\.CommandBox\\engine\\cfml\\server\\lucee-server\\context\\properties"
        }

    }
},
"os":{
    "arch":"amd64",
    "name":"Windows 7",
    "version":"6.1"
},
"path":{
    "separator":";"
},
"sun":{
    "arch":{
        "data":{
            "model":"64"
        }

    },
    "awt":{
        "enableExtraMouseButtons":"true"
    },
    "boot":{
        "class":{
            "path":"C:\\Program Files\\Java\\jre1.8.0_25\\lib\\resources.jar;C:\\Program Files\\Java\\jre1.8.0_25\\lib\\rt.jar;C:\\Program Files\\Java\\jre1.8.0_25\\lib\\sunrsasign.jar;C:\\Program Files\\Java\\jre1.8.0_25\\lib\\jsse.jar;C:\\Program Files\\Java\\jre1.8.0_25\\lib\\jce.jar;C:\\Program Files\\Java\\jre1.8.0_25\\lib\\charsets.jar;C:\\Program Files\\Java\\jre1.8.0_25\\lib\\jfr.jar;C:\\Program Files\\Java\\jre1.8.0_25\\classes"
        },
        "library":{
            "path":"C:\\Program Files\\Java\\jre1.8.0_25\\bin"
        }

    },
    "cpu":{
        "endian":"little",
        "isalist":"amd64"
    },
    "desktop":"windows",
    "io":{
        "unicode":{
            "encoding":"UnicodeLittle"
        }

    },
    "java":{
        "command":"C:\\Users\\15037\\.CommandBox\\lib\\runwar-3.4.5.jar --port 3337 --host 127.0.0.1 --debug=false --stop-port 3338 --processname cfselenium [lucee@4 4.5.2+018] --log-dir C:\\Users\\15037\\.CommandBox/server/204184B1B098D893536041E7D28298B1-cfselenium/lucee-cf-engine-4.5.2.018/logs --open-browser true --open-url http://127.0.0.1:3337 --cfengine-name lucee --server-name cfselenium --tray-icon C:\\Users\\15037\\.CommandBox\\cfml\\system\\config\\server-icons\\trayicon-lucee-32px.png --tray-config C:\\Users\\15037\\.CommandBox/lib/traymenu-lucee.json --directoryindex true --cfml-web-config C:\\Users\\15037\\.CommandBox/server/204184B1B098D893536041E7D28298B1-cfselenium/lucee-cf-engine-4.5.2.018 --cfml-server-config C:\\Users\\15037\\.CommandBox/engine/cfml/server/ --timeout 120 -war E:\\www\\cfselenium --lib-dirs C:\\Users\\15037\\.CommandBox/lib --urlrewrite-enable false --background false",
        "launcher":"SUN_STANDARD"
    },
    "jnu":{
        "encoding":"Cp1252"
    },
    "management":{
        "compiler":"HotSpot 64-Bit Tiered Compilers"
    },
    "nio":{
        "ch":{
            "bugLevel":""
        }

    },
    "os":{
        "patch":{
            "level":"Service Pack 1"
        }

    }
},
"user":{
    "country":"US",
    "dir":"E:\\Users\\15037\\Downloads\\commandbox-win-3.1.0",
    "home":"C:\\Users\\15037",
    "language":"en",
    "name":"15037",
    "script":"",
    "timezone":"America/New_York",
    "variant":""
}
}

from webdrivermanager.

bonigarcia avatar bonigarcia commented on August 20, 2024

No clue. The configuration keys for WebDriverManger are in the application.properties file. All of them start with wdm., but none of them is simply wdm. I don't know where is the problem, sorry.

from webdrivermanager.

jamiejackson avatar jamiejackson commented on August 20, 2024

No problem. I think this problem is very particular to the way that I'm accessing the jar from Lucee, because i have no problem running my uber-Jar from Java.

from webdrivermanager.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.