Something very strange is happening.
I have the following dependency in my pom.xml:
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-junit</artifactId>
<version>1.2.5</version>
<type>pom</type>
<scope>test</scope>
</dependency>
The project compiles perfectly.
But as soon as I change the cucumber version in this dependency to 1.2.6 I get an error when compling the progect:
Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project gp-it-test-product: Fatal error compiling
I also attempted to use the most recent cucumber version:
<!-- https://mvnrepository.com/artifact/io.cucumber/cucumber-junit -->
<dependency>
<groupId>io.cucumber</groupId>
<artifactId>cucumber-junit</artifactId>
<version>6.10.1</version>
<scope>test</scope>
</dependency>
But I got the same error. Why is this happening? Version 1.2.5 works OK
It was moved to another group io.cucumber after version 1.2.5 check the maven repository
Okay, I finally solved this. The problem was not in maven, but in cucumber. It appeared that some old packages that I was using in my code disappeared, so I had to change all old imports to new ones and also make some other changes in accordance with the new version to make it work. Nullpointer exception that I posted was due to changed package of Scenario class.
Related
After Selenium, testNG, I just started using Cucumber and Maven. First I created a cucumber project without using <scope>test</scope> for dependency. Like this:
<dependency>
<groupId>io.cucumber</groupId>
<artifactId>cucumber-java</artifactId>
<version>7.5.0</version>
</dependency>
But I had a problem. The changes I made in the step definitions were not being applied without building the project. With some research I added this <scope>test</scope> for cucumber. And the problem was solved. (This is also how I resolved a classpath error I got for testng.)
But how does adding scope test make a difference? Why are we adding it?
i added the followinig dependency for my project to connect to the database:
<dependency>
<groupId>com.ibm.db2.jcc</groupId>
<artifactId>db2jcc4</artifactId>
<version>4.19.26</version>
</dependency>
Since the connection to my database gets refused (ERRORCODE=-4499, SQLSTATE=08001) i tried to add a newer driver
<dependency>
<groupId>com.ibm.db2.jcc</groupId>
<artifactId>db2jcc4</artifactId>
<version>11.1</version>
<scope>system</scope>
<systemPath>${basedir}/lib/com/ibm/db2/jcc/db2jcc4/11.1/db2jcc4-11.1.jar</systemPath>
</dependency>
I installed the jar with the maven install comand in my project directory. It created a lib folder with everything in it.
However i now get the following error:
Dependency for driver-class com.ibm.db2.jcc.DB2Driver is missing!
The maven project is definitly able to locate the jar-file.
There is a second dependency you are missing :
<dependency>
<groupId>com.ibm.db2</groupId>
<artifactId>db2jcc_license_cu</artifactId>
<version>11.1</version>
<systemPath>${basedir}/lib/com/ibm/db2/jcc/db2jcc4/11.1/db2jcc_license_cu.jar</systemPath>
</dependency>
Found on nacho4d's blog
I added grid-renderers-collection-addon to my pom.xml in a maven project:
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>grid-renderers-collection-addon</artifactId>
<version>0.94</version>
</dependency>
Now everything is broken, even if I remove the addon from pom.xml again.
I get the message:
Failed to load the widgetset: ./../../VAADIN/widgetsets/AppWidgetset/AppWidgetset.nocache.js?1519127577157
I really want to use the addon, but I don't even know which is the latest version. I looked at solutions that involved having a ProjectWidgetSet.gwt.xml file, but I don't know where to get this file from.
vaadin.version is 8.1.1 not sure the addon is matching this version
I fixed the error by commenting out an important artifact in pom.xml, launching the service (aborting because of errors), then adding the artifact again.
It was this artifact:
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-spring-boot-starter</artifactId>
</dependency>
What is the maven dependency i should add for
import javax.mail.*;
import javax.mail.internet.*;
Adding the maven dependency from here http://mvnrepository.com/artifact/javax.mail/mail/1.5.0-b01 makes some of the jersey dependencies unable to retrieve error. What do you think is going wrong?
The version 1.6.3 had been the last version of JavaMail; since 2019-07-03, the new name for it is "Jakarta Mail".
Together with the name change also the Maven coordinates got different:
<dependency>
<groupId>com.sun.mail</groupId>
<artifactId>jakarta.mail</artifactId>
<version>…</version>
</dependency>
The project homepage can be found here: https://eclipse-ee4j.github.io/mail/
We are using following dependency:
<dependency>
<groupId>com.sun.mail</groupId>
<artifactId>javax.mail</artifactId>
</dependency>
I'm trying to upgrade my struts2 web app from guice2.0 to guice3.0.
I'm trying to test it out using maven jetty.
I've successfully upgraded my pom.xml to use the correct version and groupId for the 3.0 release, but if I call mvn jetty:run
I see that it is trying to download
guice-3.0-no_deps.jar
which throws a build error and can't be found the central repository?
I don't get this error if I don't include any guice extensions.
Any ideas?
Thanks
I posted this question also to the guice user group.
This is the answer I received.
The guice-3.0-no_deps.jar is a build-time artifact that's used to compile the extensions, but is not required at runtime - it's not on maven central because the Guice team didn't want people depending on this "uber-jar" by mistake. The extensions have an optional dependency to guice-3.0-no_deps.jar (so they can compile) but they also have a non-optional dependency to guice-3.0.jar for the runtime case.
Well-behaved maven plugins should see that the the no_deps dependency is optional and not throw a build error if it's missing, so this sounds like a bug in the jetty plugin. To workaround the Jetty bug you can explicitly hide this dependency as follows:
<dependency>
<groupId>com.google.inject.extensions</groupId>
<artifactId>guice-struts2</artifactId>
<version>3.0</version>
<exclusions>
<exclusion>
<groupId>com.google.inject</groupId>
<artifactId>guice</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.google.inject</groupId>
<artifactId>guice</artifactId>
<version>3.0</version>
</dependency>
Note that we can't do this in the original build pom because we still need the no_deps dependency when doing the original compilation.