For Selenium WebDriver - Maven and initial pom.xml configuration - maven

I am new for Selenium Webdriver. When I start with the tool I came to know there are two things necessary to start with: Maven and pom.xml. But I didn't find the details on these things. Could anyone let know what is the meaning of these files and how do I create them.
Also I would be thankful, if someone could share some knowledge on the Selenium WebDriver like how do I start with the tool, and how to write a scripts - I have Java knowledge, so I can prefer to that language.
Thanks in advance :) awaiting to learn about the tools :)

Maven and it's pom.xml are not a must (but a recommended solution).
Their role in the process is just to add the selenium jar to your project.
You can manually add the Selenium jar file to your project by downloading the jar from http://docs.seleniumhq.org/download/ and adding it to your classpath.
OR,
https://code.google.com/p/selenium/downloads/list?can=1&q=&colspec=Filename+Summary+Uploaded+ReleaseDate+Size+DownloadCount
Selenium site has also the relevant documentation to get you started - http://docs.seleniumhq.org/docs/03_webdriver.jsp
Maven: http://maven.apache.org/

I would recommend starting with a pom.xml that looks like this. You will have to manually create the directories src/main/java, src/test/java, and src/test/resources, but after do so, if you run "mvn clean build", it will refresh and give you the proper perspective in Eclipse IDE. Maven can be confusing on a new project because it doesn't auto generate those directories. :
<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>SeleniumMavenExample</groupId>
<artifactId>SeleniumMavenExample</artifactId>
<version>0.0.1-SNAPSHOT</version>
<properties>
<selenium.version>2.39.0</selenium.version>
<maven.surefire.plugin.version>2.16</maven.surefire.plugin.version>
<testng.version>6.8.7</testng.version>
</properties>
<build>
<directory>target</directory>
<outputDirectory>target/classes</outputDirectory>
<finalName>${project.artifactId}-${project.version}</finalName>
<testOutputDirectory>target/test-classes</testOutputDirectory>
<sourceDirectory>src/main/java</sourceDirectory>
<testSourceDirectory>src/test/java</testSourceDirectory>
<resources>
<resource>
<directory>src/main/resources</directory>
</resource>
</resources>
<testResources>
<testResource>
<directory>src/test/resources</directory>
</testResource>
</testResources>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>${maven.surefire.plugin.version}</version>
<configuration>
<showSuccess>true</showSuccess>
<suiteXmlFiles>
<suiteXmlFile>src/test/resources/testng.xml</suiteXmlFile>
</suiteXmlFiles>
<configuration>
<systemPropertyVariables>
<build-name>${surefire.testng.build}</build-name>
</systemPropertyVariables>
<groups>${surefire.testng.groups}</groups>
<testFailureIgnore>true</testFailureIgnore>
</configuration>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>org.apache.metamodel</groupId>
<artifactId>MetaModel-full</artifactId>
<version>4.0.0-incubating</version>
</dependency>
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>${testng.version}</version>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>16.0.1</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>1.7.6</version>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>${selenium.version}</version>
</dependency>
<dependency>
<groupId>net.lightbody.bmp</groupId>
<artifactId>browsermob-proxy</artifactId>
<version>2.0-beta-9</version>
</dependency>
</dependencies>
</project>

Related

deployment of an ejb maven project from eclipse

I'm facing a weird problem and was not able to find somebody out there having the same behaviour creating a maven ear-ejb project in eclipse.
I have a parent pom that looks like this:
<modules>
<module>ear</module>
<module>ejb</module>
</modules>
<build>
<plugins>
<plugin>
<artifactId>maven-eclipse-plugin</artifactId>
<configuration>
<wtpversion>2.0</wtpversion>
</configuration>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
</plugins>
</build>
the pom.xml from the ejb project:
<build>
<sourceDirectory>ejbModule</sourceDirectory>
<resources>
<resource>
<directory>ejbResources</directory>
</resource>
<resource>
<directory>ejbModule</directory>
<excludes>
<exclude>**/*.java</exclude>
</excludes>
</resource>
</resources>
<plugins>
<plugin>
<artifactId>maven-ejb-plugin</artifactId>
<version>2.3</version>
<configuration>
<ejbVersion>3.1</ejbVersion>
<archive>
<manifest>
<addClasspath>true</addClasspath>
</manifest>
</archive>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>javax</groupId>
<artifactId>javaee-api</artifactId>
<version>6.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>3.2.4.RELEASE</version>
<scope>provided</scope>
</dependency>
</dependencies>
and finally the pom.xml of the ear project:
<build>
<plugins>
<plugin>
<artifactId>maven-ear-plugin</artifactId>
<version>2.8</version>
<configuration>
<version>6</version>
<defaultLibBundleDir>lib</defaultLibBundleDir>
<modules>
<ejbModule>
<groupId>com.coba.test</groupId>
<artifactId>jms-test-ejb</artifactId>
<uri>jms-test-ejb.jar</uri>
</ejbModule>
</modules>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>com.coba.test</groupId>
<artifactId>jms-test-ejb</artifactId>
<version>${project.version}</version>
<type>ejb</type>
</dependency>
</dependencies>
When running mvn eclipse:eclipse on the projects I am able to import them as existing projects and all natures and references are ok. When I run mvn clean package and deploy the ear to the server (tested on a websphere 8, jboss 7 and 8) the application (a single mdb) starts and acts as expected. BUT when I try to run the project from within eclipse no class from the shipped dependencies is found. When looking into the deployment assembly of the projects then (how it should be) all dependencies are listed in the ear project and the none of them appears in the ejb project. I had a look at the maven-eclipse-plugin and it does explicitly write the to deployed components to the ear project, so I think this is the way it should be. But when I manually add the classpath entries to the deployment assembly to the ejb project the application gets deployed and starts without any Problems.
Is this a Problem of my project setting or a maven-eclipse-plugin bug? Does anybody had this problem himself?
Thx for reading
Markus
EDIT:
I dot not use the m2eclipse plugin.

TestNG exception when running from Maven

I have a suite of selenium tests divided as java classes. I have a driver script wherein, I create the testng xml suite programmatically and run it. It all works fine when invoked from eclipse or ant. I wanted to replace ant with maven and run the tests. But getting this exception.
[TestRunner] Running the tests in 'TestClass10' with parallel mode:false
[RunInfo] Adding method selector: org.testng.internal.XmlMethodSelector#6076ab2 priority: 10
ERROR::org.testng.TestNGException:
Cannot instantiate class com.prt.regressionsuite.test10.TestClass10
===== Invoked methods
TestDriver.runTestSuite()[pri:0, instance:com.prt.driver.TestDriver#5c73a7ab] 1551083435
POM.xml
<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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.prt</groupId>
<artifactId>B_Selenium_RC</artifactId>
<packaging>jar</packaging>
<version>1.0-SNAPSHOT</version>
<name>B_Selenium_RC</name>
<url>http://maven.apache.org</url>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.2.1</version>
<executions>
<execution>
<goals>
<goal>java</goal>
</goals>
</execution>
</executions>
<configuration>
<mainClass>com.prt.driver.TestDriver</mainClass>
<systemProperties>
<systemProperty>
<timestamp>${timestamp}</timestamp>
</systemProperty>
<systemProperty>
<datestamp>${datestamp}</datestamp>
</systemProperty>
</systemProperties>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>net.sourceforge.jexcelapi</groupId>
<artifactId>jxl</artifactId>
<version>2.6.12</version>
</dependency>
<dependency>
<groupId>com.oracle</groupId>
<artifactId>ojdbc14</artifactId>
<version>10.2.0.2.0</version>
</dependency>
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>6.8</version>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium.server</groupId>
<artifactId>selenium-server</artifactId>
<version>1.0.3-standalone</version>
</dependency>
</dependencies>
</project>
Searched online forums but could not get any solution to this. Please help on this.
When tested by using testng xml and surefire plug in, it showed the actual error about a missing data file. Solved the exception after including the file.
Have to say testng exception message is not really helpful when using the "creating testng programmatically" option.

Configuring jetty:run to use the "final" lib folder

I have a Maven project using a war overlay. As outlined in this answer, one problem with WAR overlays is that they seem to effectively sidestep Maven's dependency resolution. This results in build and/or runtime verification errors.
Fortunately, there is a solution - using the overlay/excludes configuration directives. This ensures that the resultant WAR will only have what you want.
However, it seems that the jetty:run uses the war plugin's work directory for library resolution (which does contain the "bad" JAR).
The problem is avoided by using either jetty:run-war or jetty:run-exploded.
However,
as most of our projects run fine using jetty:run,
and jetty-run with scanInterval is very convenient during development,
I'd like to know whether it's possible to add some configuration changes to the POM that would force the run goal to use the target lib folder?
For illustration purposes, here's the specific example:
the project uses the org.apache.solr:solr:3.6.2 overlay,
the overlay includes an old version of Guava, r05, while our code uses a more recent one, 14.0.1,
as stated before, while the target artifact war is fine, jetty:run includes the r05 version into the classpath, which causes verification errors in our code.
Here's the example POM:
<?xml version="1.0" encoding="UTF-8" ?>
<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.example</groupId>
<artifactId>solr.archetype.examination</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>war</packaging>
<name>A Solr project</name>
<properties>
<solr.version>3.6.2</solr.version>
<solr.port>8983</solr.port>
</properties>
<dependencies>
<dependency>
<groupId>org.apache.solr</groupId>
<artifactId>solr-core</artifactId>
<version>${solr.version}</version>
</dependency>
<dependency>
<groupId>org.apache.solr</groupId>
<artifactId>solr</artifactId>
<version>${solr.version}</version>
<type>war</type>
</dependency>
<dependency>
<groupId>org.apache.solr</groupId>
<artifactId>solr-solrj</artifactId>
<version>${solr.version}</version>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>14.0.1</version>
</dependency>
</dependencies>
<build>
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.5.1</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.3</version>
<configuration>
<overlays>
<overlay>
<groupId>org.apache.solr</groupId>
<artifactId>solr</artifactId>
<excludes>
<exclude>**/guava-r05.jar</exclude>
</excludes>
</overlay>
</overlays>
</configuration>
</plugin>
<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>maven-jetty-plugin</artifactId>
<version>6.1.25</version>
<configuration>
<scanIntervalSeconds>10</scanIntervalSeconds>
<stopKey>foo</stopKey>
<stopPort>9999</stopPort>
<contextPath>/solr</contextPath>
<connectors>
<connector implementation="org.mortbay.jetty.nio.SelectChannelConnector">
<port>${solr.port}</port>
<maxIdleTime>60000</maxIdleTime>
</connector>
</connectors>
<systemProperties>
<systemProperty>
<name>solr.data.dir</name>
<value>target/data</value>
</systemProperty>
</systemProperties>
</configuration>
</plugin>
</plugins>
</build>
</project>

Maven profile execution

I have a problem and could not identify the reason until now.
I have a maven project that has several modules. One of these modules is the webservices client.
So, during development, when running the install in maven, it needs to access the local server to generate the client. When I run the plugin to generate the release of the project, clients should point to the production server.
To do this I set as a key property ${server.address} which is used to point to the server when generating the clients. There is one profile which, when active, this key property rewrites the address to the production server.
What's going on? Running mvn install is generating correctly, ie, pointing to the local server. When I generate the release using the command mvn release:prepare -B release:perform -Denv=prd is not rewriting the variable as it should.
The strange thing is that if I run mvn install -Denv=prd, it generates correctly, pointing to the production server.
Could someone give me a hint of what to change to work also in release cycle?
<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>groupId</groupId>
<artifactId>artifactId</artifactId>
<version>0.0.2-SNAPSHOT</version>
<packaging>jar</packaging>
<properties>
<server.address>http://localhost:8080</server.address>
</properties>
<profiles>
<profile>
<id>prd</id>
<activation>
<property>
<name>env</name>
<value>prd</value>
</property>
</activation>
<properties>
<server.address>http://srvprd009:8080</server.address>
</properties>
</profile>
</profiles>
<build>
<sourceDirectory>src/main/java</sourceDirectory>
<resources>
<resource>
<directory>src/main/resources</directory>
</resource>
</resources>
<testSourceDirectory>src/test/java</testSourceDirectory>
<testResources>
<testResource>
<directory>src/test/resources</directory>
</testResource>
</testResources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-eclipse-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-codegen-plugin</artifactId>
<executions>
<execution>
<id>generate-client</id>
<phase>generate-sources</phase>
<configuration>
<sourceRoot>src/main/gen</sourceRoot>
<wsdlOptions>
<wsdlOption>
<wsdl>${server.address}/services/utilities?wsdl</wsdl>
<extraargs>
<extraarg>-p</extraarg>
<extraarg>${project.package}</extraarg>
<extraarg>-impl</extraarg>
<extraarg>-verbose</extraarg>
<extraarg>-frontend</extraarg>
<extraarg>jaxws21</extraarg>
<extraarg>-xjc-XhashCode</extraarg>
<extraarg>-xjc-Xequals</extraarg>
</extraargs>
</wsdlOption>
</wsdlOptions>
</configuration>
<goals>
<goal>wsdl2java</goal>
</goals>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-frontend-jaxws</artifactId>
<version>${cxf.version}</version>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-transports-http</artifactId>
<version>${cxf.version}</version>
</dependency>
<dependency>
<groupId>org.jvnet.jaxb2_commons</groupId>
<artifactId>jaxb2-basics</artifactId>
<version>0.6.4</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-clean-plugin</artifactId>
<version>${maven-clean-plugin.version}</version>
<configuration>
<filesets>
<fileset>
<directory>src/main/gen</directory>
<includes>
<include>**/*.*</include>
</includes>
</fileset>
</filesets>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>${build-helper-maven-plugin.version}</version>
<executions>
<execution>
<phase>generate-sources</phase>
<goals>
<goal>add-source</goal>
</goals>
<configuration>
<sources>
<source>src/main/gen</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>ts-core</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>corporate-tools.fragmental.security</groupId>
<artifactId>basic-ws-client</artifactId>
<version>${fragmental.version}</version>
</dependency>
<!-- JEE -->
<dependency>
<groupId>javax.j2ee</groupId>
<artifactId>j2ee</artifactId>
<version>1.4</version>
<scope>provided</scope>
</dependency>
<!-- JAX-WS -->
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>1.1.1</version>
</dependency>
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>${jaxws.version}</version>
</dependency>
<dependency>
<groupId>javax.xml.ws</groupId>
<artifactId>jaxws-api</artifactId>
<version>${jaxws.version}</version>
<exclusions>
<exclusion>
<groupId>javax.xml.soap</groupId>
<artifactId>saaj-api</artifactId>
</exclusion>
<exclusion>
<artifactId>jsr250-api</artifactId>
<groupId>javax.annotation</groupId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
</project>
The release plugin has a kinda strange (for me ;)) usage with special properties and forwarding them to the real goal executed. If you use normal profile argument -Pprod this would work. However most other arguments you add at mvn call are ignored. So could you try the following one:
mvn release:prepare -B release:perform -Darguments="-Denv=prd"
I believe you are using Maven 2.0.x right?
If I remember correctly, property overriding in profile is not working fine at or before Maven 2.0.7. Upgrade to latest 2.0.x (2.0.11) or even 2.2.x/3.0.x will work as you expected.
However, a bit off topic, I believe you are accessing the server to get the WSDL right? I don't think it is a good idea especially for release build, because it is making the build non-reproducible. Consider putting the WSDL with the source code (at least for release build) to make build reproducible.
I fixed my problem creating two profiles, assuming that first has de dafault activation = true and set my server.address to localhost.
The second profile that set server.address to prd server is called by command line directly by -P prd
So, when I execute with no arguments, the default profile sets the server.address to localhost:8080 and when I execute the release, I use -P prd and the release works fine.
thank you for your answers.

External jar found in Maven Web Application but not when being deployed

I recently created a Maven Web Application through Netbeans 7.3, using GlassFish 3.1.2. In this I use an external jar, so I added it in pom.xml:
<dependencies>
...
<dependency>
<groupId>be-fedict-eid-trust-service-client</groupId>
<artifactId>eid-trust-service-client</artifactId>
<version>1.0.1.RC5</version>
</dependency>
...
</dependencies>
It shows up correctly and I can refer it in my Bean. BUT when I deploy the application, I get an error that the class in the jar (which I referred to without problems before) can not be found.
java.lang.NoClassDefFoundError: be/fedict/trust/xkms2/XKMSServiceFactory
Since I'm not that familiar with Maven, I don't know how and where I can fix this. Looking at the generated WAR file, the jar is there correctly. I set addClasspath to true so it is in the Classpath of the Manifest, but this doesn't seem to help.
My libraries are in WEB-INF/lib and my Bean is in WEB-INF/classes.
Any thoughts or general directions to what this problem may be? I found this topic: Spring Web App with Maven dependency - class not found during deploy
but I don't see how I can make it work for me (assuming he found a solution).
Thanks in advance!
My full pom.xml:
<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>ISB</groupId>
<artifactId>eID</artifactId>
<version>1.0</version>
<packaging>war</packaging>
<name>eID</name>
<repositories>
<repository>
<id>e-contract</id>
<url>https://www.e-contract.be/maven2</url>
</repository>
</repositories>
<properties>
<endorsed.dir>${project.build.directory}/endorsed</endorsed.dir>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>javax</groupId>
<artifactId>javaee-web-api</artifactId>
<version>6.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>be-fedict-eid-applet</groupId>
<artifactId>eid-applet-shared</artifactId>
<version>1.1.0.RC2</version>
</dependency>
<dependency>
<groupId>be.fedict.eid-applet</groupId>
<artifactId>eid-applet-service</artifactId>
<version>1.1.0.RC2</version>
</dependency>
<dependency>
<groupId>be-fedict-eid-applet</groupId>
<artifactId>eid-applet-service-spi</artifactId>
<version>1.1.0.RC2</version>
</dependency>
<dependency>
<groupId>be-fedict-eid-applet</groupId>
<artifactId>eid-applet-package</artifactId>
<version>1.1.0.RC2</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>be-fedict-eid-trust-service-client</groupId>
<artifactId>eid-trust-service-client</artifactId>
<version>1.0.1.RC5</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
<compilerArguments>
<endorseddirs>${endorsed.dir}</endorseddirs>
</compilerArguments>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.2</version>
<configuration>
<archive>
<manifest>
<addClasspath>true</addClasspath>
</manifest>
</archive>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.1</version>
<executions>
<execution>
<id>copy</id>
<phase>process-resources</phase>
<goals>
<goal>copy</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>be-fedict-eid-applet</groupId>
<artifactId>eid-applet-package</artifactId>
<version>1.1.0.RC2</version>
<type>jar</type>
<outputDirectory>${project.build.directory}/${project.artifactID}</outputDirectory>
</artifactItem>
</artifactItems>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
I'm not sure it has anything to do with your POM. I suspect it's the libraries used in the target container (Glassfish) -- a classpath issue. Each container does classloading a little differently. This question & answer might give you some ideas. If there are two, different versions of this artifact, one in container, one in your POM, you will have to tell the container which to use. WebLogic uses a weblogic.xml file for this.

Resources