soapui maven plugin jms not found - maven

I ran into an error trying to test a WS using soapui maven plugin :
15:06:45,391 ERROR [AbstractTestRunner] Exception during Test Execution
java.lang.NoClassDefFoundError: javax/jms/JMSException
at com.eviware.soapui.impl.wsdl.submit.RequestTransportRegistry.<clinit>(RequestTransportRegistry.java:47)
at com.eviware.soapui.impl.wsdl.WsdlRequest.submit(WsdlRequest.java:240)
at com.eviware.soapui.impl.wsdl.teststeps.WsdlTestRequestStep.run(WsdlTestRequestStep.java:419)
at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.runTestStep(AbstractTestCaseRunner.java:239)
at com.eviware.soapui.impl.wsdl.testcase.WsdlTestCaseRunner.runCurrentTestStep(WsdlTestCaseRunner.java:52)
at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.internalRun(AbstractTestCaseRunner.java:152)
at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.internalRun(AbstractTestCaseRunner.java:47)
at com.eviware.soapui.impl.wsdl.support.AbstractTestRunner.run(AbstractTestRunner.java:139)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)
Caused by: java.lang.ClassNotFoundException: javax.jms.JMSException
at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:50)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:244)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:230)
... 13 more
My pom is like the exemple on soapui website.
I'm trying to just run a simple test on my WS :
<pluginRepositories>
<pluginRepository>
<id>smartbear-sweden-plugin-repository</id>
<url>http://www.soapui.org/repository/maven2/</url>
</pluginRepository>
</pluginRepositories>
<properties>
<soapui.version>5.0.0</soapui.version>
</properties>
<build>
<plugins>
<plugin>
<groupId>com.smartbear.soapui</groupId>
<artifactId>soapui-maven-plugin</artifactId>
<version>${soapui.version}</version>
<executions>
<execution>
<phase>test</phase>
<goals>
<goal>test</goal>
</goals>
<configuration>
<projectFile>test-soapui-project.xml</projectFile>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
I tryed to add dependencies to jms in the the plugin and/or out the plugin.
Where this come from ?
Anyone got this error too ?
What am I missing ?

The proble is that JMS jar isn't present on maven central repo : http://mvnrepository.com/artifact/javax.jms/jms/1.1 try to download it you will get a 404.
Thanks to this answer : java.net maven repo - JMS artifact missing
I found it here : https://repository.jboss.org/nexus/content/groups/public/javax/jms/jms/1.1/ thanks JBoss.

Related

Maven Failsafe plugin - SurefireBooterForkException: There was an error in the forked process (TypeNotPresentExceptionProxy)

I get this strange stacktrace when running mvn clean verify -P P1
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-failsafe-plugin:2.21.0:verify (default) on project prj-name: There are test failures.
[ERROR]
[ERROR] Please refer to C:\path\to\project\target\failsafe-reports for the individual test results.
[ERROR] Please refer to dump files (if any exist) [date]-jvmRun[N].dump, [date].dumpstream and [date]-jvmRun[N].dumpstream.
[ERROR] org.apache.maven.surefire.booter.SurefireBooterForkException: There was an error in the forked process
[ERROR] sun.reflect.annotation.TypeNotPresentExceptionProxy
[ERROR] at org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:658)
[ERROR] at org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:533)
[ERROR] at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:278)
[ERROR] at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:244)
[ERROR] at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeProvider(AbstractSurefireMojo.java:1149)
What does it mean?
Maven pom.xml:
<profiles>
<profile>
<id>P1</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>2.21.0</version>
<executions>
<execution>
<id>integration-tests</id>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
<configuration>
<encoding>UTF-8</encoding>
<!-- Includes integration tests -->
<includes>
<include>**/integration/*.java</include>
<include>**/integration/*/*.java</include>
</includes>
<argLine>-Xmx1024m -XX:MaxPermSize=256m</argLine>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
UPDATE
There's a surefire dumpstream file
ForkStarter IOException: For input string: "1;5".
org.apache.maven.plugin.surefire.booterclient.output.MultipleFailureException: For input string: "1;5"
at org.apache.maven.plugin.surefire.booterclient.output.ThreadedStreamConsumer$Pumper.<init>(ThreadedStreamConsumer.java:58)
at org.apache.maven.plugin.surefire.booterclient.output.ThreadedStreamConsumer.<init>(ThreadedStreamConsumer.java:110)
at org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:596)
at org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:533)
at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:278)
at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:244)
at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeProvider(AbstractSurefireMojo.java:1149)
at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeAfterPreconditionsChecked(AbstractSurefireMojo.java:978)
at org.apache.maven.plugin.surefire.AbstractSurefireMojo.execute(AbstractSurefireMojo.java:854)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:137)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:154)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:146)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.builder.multithreaded.MultiThreadedBuilder$1.call(MultiThreadedBuilder.java:200)
at org.apache.maven.lifecycle.internal.builder.multithreaded.MultiThreadedBuilder$1.call(MultiThreadedBuilder.java:196)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Because of garbage in string variables and occasional IndexOutOfBoundsException / ConcurrentModificationException in logs it seems like a concurrency issue.
This GitHub issue - [#6254] Maven-failsafe-plugin fails to execute integration tests - and the related discussion helped me to solve my problem.
It's a bug. It turns out that newer Failsafe plugin versions (2.19.0 and later) don't work well with Spring Boot 1.4 (or later). Workaround is to downgrade the maven-failsafe-plugin to 2.18.1. Here's the updated pom.xml:
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<!-- I don't specify version at all (Spring Boot can autoconfigure plugin version) -->
<executions>
<execution>
<!-- changed <id> to <phase>, but I don't know whether it's important or not. -->
<phase>integration-test</phase>
<!-- ... no changes here: the same as in the question ... -->
</execution>
</executions>
</plugin>
</plugins>
I followed the solution proposed here:
https://github.com/spring-projects/spring-boot/issues/6254#issuecomment-307151464
Currently, I have failsafe plugin 2.22.0 and I'm able to use this version and not downgrade by explicitly configuring the classesDirectory property:
<classesDirectory>${project.build.outputDirectory}</classesDirectory>
Example:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>2.22.0</version>
<configuration>
...
<classesDirectory>${project.build.outputDirectory}</classesDirectory>
...
</configuration>
<executions>
<execution>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
</execution>
</executions>
</plugin>
Another variant of the workaround is described later in the same Github issue thread: https://github.com/spring-projects/spring-boot/issues/6254#issuecomment-343470070
<classesDirectory>${project.build.directory}/${artifactId}.jar.original</classesDirectory>
Note (2020-02-27): maven-failsafe-plugin version 3.0.0-M4 still needs these workarounds :-(
My testng class was having LoginPageTest.java, I removed .java and worked perfectly fine. :)
<classes>
<class name="com.qa.Backend.tests.LoginPageTest"/>
</classes>
I used to get the problem and mostly the problem is initializing instance variables. Check your instance variables that are working in local and if working check when they are running in CI/CD pipeline.
Another workaround is to configure a classifier for the repackaged jar. This allows Failsafe to use the original jar:
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<classifier>exec</classifier>
</configuration>
</plugin>
This problem is due to a combination of a change in the Failsafe plugin and a change in the layout of a repackaged jar file in Boot 1.4. As of Failsafe 2.19, target/classes is no longer on the classpath and the project's built jar is used instead. In the case of a Boot app, that's the repackaged jar. In 1.4, the application's classes were moved from the root of the jar to the BOOT-INF/classes directory. This prevents them from being loaded by Failsafe.
src: GitHub Issues

Maven + SoapUI ClassNotFoundException(com.microsoft.sqlserver.jdbc.SQLServerDriver)

need a little bit of help with Maven and SoapUI. The long-term plan is to integrate my SoapUI tests with Jenkins, however, i'm unfortunately falling down at the first hurdle, when getting my tests to run with Maven. Whenever I run my SoapUI tests via maven on the command line I keep getting the following error:
2017-09-20 10:03:06,977 ERROR [errorlog]
java.lang.ClassNotFoundException:
com.microsoft.sqlserver.jdbc.SQLServerDriver
java.lang.ClassNotFoundException:
com.microsoft.sqlserver.jdbc.SQLServerDriver at
org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:50)
at
org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadClass(ClassRealm.java:271)
at
org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:247)
at
org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:239)
at java.lang.Class.forName0(Native Method) at
java.lang.Class.forName(Class.java:264) at
groovy.sql.Sql.loadDriver(Sql.java:701) at
groovy.sql.Sql.newInstance(Sql.java:483) at
groovy.sql.Sql$newInstance.call(Unknown Source) at
org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45)
at
org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
at
org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:120)
at Script1.run(Script1.groovy:13) at
com.eviware.soapui.support.scripting.groovy.SoapUIGroovyScriptEngine.run(SoapUIGroovyScriptEngine.java:100)
at
com.eviware.soapui.impl.wsdl.teststeps.WsdlGroovyScriptTestStep.run(WsdlGroovyScriptTestStep.java:154)
at
com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.runTestStep(AbstractTestCaseRunner.java:239)
at
com.eviware.soapui.impl.wsdl.testcase.WsdlTestCaseRunner.runCurrentTestStep(WsdlTestCaseRunner.java:52)
at
com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.internalRun(AbstractTestCaseRunner.java:152)
at
com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.internalRun(AbstractTestCaseRunner.java:47)
at
com.eviware.soapui.impl.wsdl.support.AbstractTestRunner.run(AbstractTestRunner.java:139)
at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266) at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Now, As far as I'm aware I have included all the necessary dependencies. Here is a copy of my pom file. It's a simple one, I've borrowed from the internet and tweaked the usual bit.
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.smartbear.samples</groupId>
<artifactId>soapui-maven-plugin</artifactId>
<packaging>jar</packaging>
<version>1.0-SNAPSHOT</version>
<name>Maven 2 SoapUI Sample</name>
<url>http://maven.apache.org</url>
<pluginRepositories>
<pluginRepository>
<id>SmartBearPluginRepository</id>
<url>http://www.soapui.org/repository/maven2/</url>
</pluginRepository>
</pluginRepositories>
<build>
<plugins>
<plugin>
<groupId>com.smartbear.soapui</groupId>
<artifactId>soapui-maven-plugin</artifactId>
<version>5.0.0</version>
<configuration>
<outputFolder>logs</outputFolder>
<printReport>true</printReport>
<junitReport>true</junitReport>
<projectFile>test-testing-test-Service-API-soapui-project.xml</projectFile>
</configuration>
<dependencies>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.31</version>
</dependency>
</dependencies>
<executions>
<execution>
<phase>test</phase>
<goals>
<goal>test</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
Can anybody spot any obvious mistakes I've made? have I missed something? Is there some setup/configuration I'm not aware of within Maven/SoapUI?
he searches for sqlserver dependency
<dependency>
<groupId>com.microsoft.sqlserver</groupId>
<artifactId>mssql-jdbc</artifactId>
<version>{version}</version>
</dependency>
but mysql dependancy found in pom file

Jacoco - "Caused by: java.lang.ClassNotFoundException: org.jacoco.agent.rt.internal_6da5971.Offline"

Trying to get coverage via jacoco using offline instrumentation (can't use on-the-fly instrumentation: due to powermock testcases) for a maven project.Added the jacocoagent.jar to classpath in surefire plugin as shown below. Renamed the "org.jacoco.agent-0.7.7.201606060606-runtime.jar" (from local maven repository) to "jacocoagent.jar" and kept that in the same folder where this pom.xml is residing.I'm hitting the below exception even after adding it to classpath.
snippet of pom.xml (surefire - plugin configuration)
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<forkmode>once</forkmode>
<additionalClasspathElements>
<additionalClasspathElement>jacocoagent.jar</additionalClasspathElement>
</additionalClasspathElements>
</configuration>
</plugin>
Exception seen on console:
#############
Number of foreign imports: 1
import: Entry[import from realm ClassRealm[maven.api, parent: null]]
-----------------------------------------------------
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:166)
... 21 more
Caused by: java.lang.NoClassDefFoundError: org/jacoco/agent/rt/internal_6da5971/Offline
at com.cisco.ise.ups.modelframework.hibernate.OracleNamingStrategy.$jacocoInit(OracleNamingStrategy.java)
at com.cisco.ise.ups.modelframework.hibernate.OracleNamingStrategy.<clinit>(OracleNamingStrategy.java)
at sun.misc.Unsafe.ensureClassInitialized(Native Method)
at sun.reflect.UnsafeFieldAccessorFactory.newFieldAccessor(UnsafeFieldAccessorFactory.java:43)
at sun.reflect.ReflectionFactory.newFieldAccessor(ReflectionFactory.java:142)
at java.lang.reflect.Field.acquireFieldAccessor(Field.java:1082)
at java.lang.reflect.Field.getFieldAccessor(Field.java:1063)
at java.lang.reflect.Field.get(Field.java:387)
at com.cisco.ise.ups.build.WorkflowRunnerMojo.namingStrategyInstance(WorkflowRunnerMojo.java:335)
at com.cisco.ise.ups.build.WorkflowRunnerMojo.setupWorkflowEnvironment(WorkflowRunnerMojo.java:514)
at com.cisco.ise.ups.build.WorkflowRunnerMojo.execute(WorkflowRunnerMojo.java:816)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
... 21 more
Caused by: java.lang.ClassNotFoundException: org.jacoco.agent.rt.internal_6da5971.Offline
at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:50)
at org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadClass(ClassRealm.java:271)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:247)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:239)
... 33 more
[ERROR]
###############
Steps followed:
"mvn compile" .
"mvn org.jacoco:jacoco-maven-plugin:instrument"
"mvn test" - Exception raised at this step.
Please let me know of how to get rid of this exception ? Was that the right place to add classpath?? (in surefire plugin) OR should it be specified some where??
Thank you.
The classpath stuff on the surefire plugin is not necessary. You need to add a dependency to each module that has tests, like this:
<dependency>
<groupId>org.jacoco</groupId>
<artifactId>org.jacoco.agent</artifactId>
<classifier>runtime</classifier>
<scope>test</scope>
<version>${your.jacoco.version}</version>
</dependency>
Make sure you don't miss the "classifier" part, or it won't work.
Full example from PowerMock project
dr. macphail's trance article on getting Sonar + JaCoCo + PowerMock did the job for me:
<!-- Provide information for coverage per test -->
<profile>
<id>coverage-per-test</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.20</version>
<configuration>
<argLine>${argLine} -Xverify:none</argLine>
<properties>
<property>
<name>listener</name>
<value>org.sonar.java.jacoco.JUnitListener</value>
</property>
</properties>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>org.sonarsource.java</groupId>
<artifactId>sonar-jacoco-listeners</artifactId>
<version>4.9.0.9858</version>
<scope>test</scope>
</dependency>
</dependencies>
</profile>
As mentioned in the comments section of the blog post :
In case your default argLine is not “simple” you might need to use the following snippet:
{argLine} -XX:-UseSplitVerifier
Otherwise you might run into ClassNotFoundException – e.g. java.lang.ClassNotFoundException: org.jacoco.agent.rt.RT

Error when when generating Doxygen documentation with the Doxygen maven plugin

I am trying to use the Maven Doxygen Plugin. I added that in the pom.xml of my project:
<reporting>
<plugins>
<plugin>
<groupId>net.sf.doodleproject</groupId>
<artifactId>doxygen-maven-plugin</artifactId>
<version>2.2</version>
</plugin>
</plugins>
</reporting>
<pluginRepositories>
<pluginRepository>
<id>doodleproject-repo</id>
<name>DoodleProject Maven 2 Repository</name>
<url>http://doodleproject.sourceforge.net/maven2/release</url>
<releases>
<enabled>true</enabled>
</releases>
</pluginRepository>
</pluginRepositories>
And I launch the command:
mvn -X net.sf.doodleproject:doxygen-maven-plugin:report
And I have this error:
[ERROR] Failed to execute goal net.sf.doodleproject:doxygen-maven-plugin:2.2:report (default-cli) on project project: An error has occurred in Doxygen report generation.
Failed to generate Doxygen documentation. -> [Help 1] org.apache.maven.lifecycle.LifecycleExecutionException:
Failed to execute goal net.sf.doodleproject:doxygen-maven-plugin:2.2:report (default-cli) on project amc: An error has occurred in Doxygen report generation.
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217)
Caused by: org.apache.maven.plugin.MojoExecutionException: An error has occurred in Doxygen report generation.
at org.apache.maven.reporting.AbstractMavenReport.execute(AbstractMavenReport.java:83)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
Caused by: org.apache.maven.reporting.MavenReportException: Failed to generate Doxygen documentation.
at net.sf.doodleproject.mavenite.doxygen.DoxygenReport.executeReport(DoxygenReport.java:299)
at org.apache.maven.reporting.AbstractMavenReport.generate(AbstractMavenReport.java:131)
Doxygen is working well when I use it on my project without the maven plugin.
There is something else to do to use the plugin?
Thanks for your help,
I tried with another plugin: com.soebes.maven.plugins.dmg and it's working.
My pom.xml:
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
<plugin>
<groupId>com.soebes.maven.plugins.dmg</groupId>
<artifactId>doxygen-maven-plugin</artifactId>
<configuration>
<projectName>${project.artifactId}</projectName>
<projectNumber>${project.version}</projectNumber>
<optimizeOutputJava>true</optimizeOutputJava>
<extractAll>true</extractAll>
<extractStatic>true</extractStatic>
<recursive>true</recursive>
<exclude>.git</exclude>
<recursive>true</recursive>
<umlLook>true</umlLook>
<haveGraph>true</haveGraph>
<generateLatex>false</generateLatex>
<generateHtml>true</generateHtml>
<outputDirectory>${basedir}/doxygen_doc</outputDirectory>
</configuration>
</plugin>
</plugins>
</build>
<pluginRepositories>
<pluginRepository>
<id>doodleproject-repo</id>
<name>DoodleProject Maven 2 Repository</name>
<url>http://doodleproject.sourceforge.net/maven2/release</url>
<releases>
<enabled>true</enabled>
</releases>
</pluginRepository>
</pluginRepositories>
Try this plugin. Worked great for me:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
<failOnError>false</failOnError>
</configuration>
</plugin>

Maven classpath trouble with Maven-selenium plugin

We're using Maven 3.0.3 and using the Maven Selenium plugin to attempt to start a Selenium server. We have this dependency in our pom ...
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-server</artifactId>
<version>2.19.0</version>
<classifier>noexe</classifier>
</dependency>
Then in the pre-integration phase we try and start Selenium server ...
<build>
...
<plugins>
...
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>selenium-maven-plugin</artifactId>
<version>1.1</version>
<executions>
<execution>
<id>start</id>
<phase>pre-integration-test</phase>
<goals>
<goal>start-server</goal>
</goals>
<configuration>
<background>true</background>
<logOutput>true</logOutput>
</configuration>
</execution>
</executions>
</plugin>
But the server fails to start with the error ...
java.lang.NoClassDefFoundError: org/openqa/selenium/server/SeleniumServer
Caused by: java.lang.ClassNotFoundException: org.openqa.selenium.server.SeleniumServer
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
Could not find the main class: org.openqa.selenium.server.SeleniumServer. Program will exit.
Exception in thread "main"
I have verified that the dependency above contains the missing class. How else can I troubleshoot this classpath problem or can you tell what is wrong with the setup I've listed here?
Thanks, - Dave

Resources