Re: Maven feature request

2020-01-25 Thread Scott Wilson
Wow - thank you Robert. I'll check this out as well. I will send a LinkedIn connection request to you guys - please accept Scott On Sat, Jan 25, 2020 at 3:34 AM Robert Scholte wrote: > You might be interested in the bannedDependencies rule[1] of the Maven > Enforcer Plugin (The Loving Iron

Re: Maven feature request

2020-01-25 Thread Scott Wilson
Ok Thank you Elliotte. I've googled checkstyle so will read up on that. Another solution: I created a dependency-checker.cfg and .sh file that looks for my dependencies in the wrong places and fails if it finds any violations. It's not as elegant as a checkstyle rule but is a starting point and

Re: Maven feature request

2020-01-25 Thread Robert Scholte
You might be interested in the bannedDependencies rule[1] of the Maven Enforcer Plugin (The Loving Iron Fist of Maven™) Robert [1] https://maven.apache.org/enforcer/enforcer-rules/bannedDependencies.html On 25-1-2020 04:48:46, Scott Wilson wrote: Ok Thank you Elliotte. I've googled checkstyle

Re: Maven feature request

2020-01-24 Thread Scott Wilson
Thank you for replying Elliotte, I hired someone on Fiverr to try to figure out a workaround for this. He was not successful however he may have been close. He added < *classpathDependencyExcludes*> to the build path in the pom.xml. Can you take a look at the attached pom and see if there's

Re: Maven feature request

2020-01-24 Thread Elliotte Rusty Harold
That's not going to work for the same reason. classpathDependencyExcludes removes a jar from the classpath, and you need the jar in the classpath, at least in most circumstances. A custom checkstyle rule might solve your problem, but you can't do it by changing the classpath. On Fri, Jan 24, 2020

Re: Maven feature request

2020-01-24 Thread Paul Hammant
Selenium co-creator here (albeit v1), WebElement is pubic API and not impl-detail. If you're making a library for downstream *testing* teams to use, then selenium-java jumps from test-scope to prod-scope of course and is now a transitive dep. Many build/test tools makers are in the same place

Re: Maven feature request

2020-01-24 Thread Elliotte Rusty Harold
That's a really interesting idea and I can see the use of it. I'm not sure it fits with how scopes work in Maven or classpaths in Java though. A scope generally defines which jars are and are not added to the classpaths of which goals/plugins/stages, not which parts of the source tree can see

Re: Maven feature request

2020-01-23 Thread Scott Wilson
Hi Paul I write test automation and try to stick to a solid design. I find others break solid design principles so having a scope will prevent people from breaking some basic principles. For example, if using Selenium I've seen multiple people expose WebElement in a public method (that should

Re: Maven feature request

2020-01-22 Thread Karl Heinz Marbaise
Hi, On 23.01.20 00:59, Scott Wilson wrote: *Hi Robert and devs* *I have been using maven for a few years and I LOVE it!* *I have a feature request.* *(1) When adding a dependency to pom.xml the default scope is everywhere* *ie src/main/java/* *and src/tst/java/...* *(2) When

Re: Maven feature request

2020-01-22 Thread Alexander Bubenchikov
How do you want to run tests? If the dependency is not in classpath of running tests, but in classpath of main sources, then you just get an NoClassDefFoundError, isn't it? For me it looks like you need to put tests into another module, make it depend on main module and declare your

Re: Maven feature request

2020-01-22 Thread Paul Hammant
I'm interested in your need for this. Like, why do you need this? On Thu, Jan 23, 2020 at 7:17 AM Scott Wilson wrote: > *Hi Robert and devs* > > > *I have been using maven for a few years and I LOVE it!* > > > *I have a feature request.* > > > *(1) When adding a dependency to pom.xml the

Maven feature request

2020-01-22 Thread Scott Wilson
*Hi Robert and devs* *I have been using maven for a few years and I LOVE it!* *I have a feature request.* *(1) When adding a dependency to pom.xml the default scope is everywhere* *ie src/main/java/* *and src/tst/java/...* *(2) When adding as the scope then the dependency can ONLY