Migration from maven to gradle: "gradle build" fails for WAR building task - maven

I am trying to rewrite pom.xml configuration into gradle script. The part concerning dependencies in pom looks like that:
<dependencies>
<!-- Spring -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>${org.springframework-version}</version>
<exclusions>
<!-- Exclude Commons Logging in favor of SLF4j -->
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
<version>${org.springframework-version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-aop</artifactId>
<version>${org.springframework-version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-orm</artifactId>
<version>${org.springframework-version}</version>
</dependency>
<!-- Spring security -->
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-core</artifactId>
<version>${spring.security.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-ldap</artifactId>
<version>${spring.security.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-config</artifactId>
<version>${spring.security.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-web</artifactId>
<version>${spring.security.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-taglibs</artifactId>
<version>${spring.security.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-acl</artifactId>
<version>${spring.security.version}</version>
</dependency>
<!-- Tiles dependancies -->
<dependency>
<groupId>org.apache.tiles</groupId>
<artifactId>tiles-api</artifactId>
<version>2.1.4</version>
</dependency>
<dependency>
<groupId>org.apache.tiles</groupId>
<artifactId>tiles-core</artifactId>
<version>2.1.4</version>
</dependency>
<dependency>
<groupId>org.apache.tiles</groupId>
<artifactId>tiles-jsp</artifactId>
<version>2.1.4</version>
</dependency>
<dependency>
<groupId>org.apache.tiles</groupId>
<artifactId>tiles-servlet</artifactId>
<version>2.1.4</version>
</dependency>
<!-- AspectJ -->
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjrt</artifactId>
<version>${org.aspectj-version}</version>
</dependency>
<!-- MySQL database driver -->
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.19</version>
</dependency>
<!-- PostgreSQL database driver -->
<dependency>
<groupId>postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>9.1-901.jdbc4</version>
</dependency>
<!-- Required by databases -->
<dependency>
<groupId>org.apache.derby</groupId>
<artifactId>derbyclient</artifactId>
<version>10.9.1.0</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-jdbc</artifactId>
<version>${org.springframework-version}</version>
</dependency>
<!-- Logging -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>${org.slf4j-version}</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>jcl-over-slf4j</artifactId>
<version>${org.slf4j-version}</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>${org.slf4j-version}</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.15</version>
<exclusions>
<exclusion>
<groupId>javax.mail</groupId>
<artifactId>mail</artifactId>
</exclusion>
<exclusion>
<groupId>javax.jms</groupId>
<artifactId>jms</artifactId>
</exclusion>
<exclusion>
<groupId>com.sun.jdmk</groupId>
<artifactId>jmxtools</artifactId>
</exclusion>
<exclusion>
<groupId>com.sun.jmx</groupId>
<artifactId>jmxri</artifactId>
</exclusion>
</exclusions>
<scope>runtime</scope>
</dependency>
<!-- #Inject -->
<dependency>
<groupId>javax.inject</groupId>
<artifactId>javax.inject</artifactId>
<version>1</version>
</dependency>
<!-- Servlet -->
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.5</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.servlet.jsp</groupId>
<artifactId>jsp-api</artifactId>
<version>2.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>jstl</artifactId>
<version>1.2</version>
</dependency>
<!-- Validation -->
<dependency>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
<version>1.0.0.GA</version>
</dependency>
<!-- Hibernate -->
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
<version>4.1.7.Final</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-validator</artifactId>
<version>4.3.0.Final</version>
</dependency>
<dependency>
<groupId>org.hibernate.javax.persistence</groupId>
<artifactId>hibernate-jpa-2.0-api</artifactId>
<version>1.0.1.Final</version>
</dependency>
<!-- DOM4j -->
<dependency>
<groupId>dom4j</groupId>
<artifactId>dom4j</artifactId>
<version>1.6.1</version>
</dependency>
<!-- Commons -->
<dependency>
<groupId>commons-beanutils</groupId>
<artifactId>commons-beanutils</artifactId>
<version>1.8.3</version>
</dependency>
<dependency>
<groupId>commons-collections</groupId>
<artifactId>commons-collections</artifactId>
<version>3.2.1</version>
</dependency>
<dependency>
<groupId>commons-digester</groupId>
<artifactId>commons-digester</artifactId>
<version>2.1</version>
</dependency>
<dependency>
<groupId>commons-fileupload</groupId>
<artifactId>commons-fileupload</artifactId>
<version>1.2.2</version>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.3</version>
</dependency>
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
<version>2.6</version>
</dependency>
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>1.1.1</version>
</dependency>
<!-- Language recognizer required by Spring -->
<dependency>
<groupId>antlr</groupId>
<artifactId>antlr</artifactId>
<version>2.7.7</version>
</dependency>
<!-- Test -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.7</version>
<scope>test</scope>
</dependency>
</dependencies>
Currently the part of gradle script responsible for dependencies looks like that:
//----------------------------------------------------------------------------
// SERVER'S DEPENDENCIES' CONFIGURATION
//----------------------------------------------------------------------------
configure(serverProjects) {
repositories {
mavenCentral()
maven { url 'http://repository.jboss.org/nexus/content/groups/public' }
}
}
// Spring Framework:
def springVersion = '3.1.0.RELEASE'
def springContext = "org.springframework:spring-context:${springVersion}"
def springMVC = "org.springframework:spring-webmvc:${springVersion}"
def springAOP = "org.springframework:spring-aop:${springVersion}"
def springORM = "org.springframework:spring-orm:${springVersion}"
def springJDBC = "org.springframework:spring-jdbc:${springVersion}"
// Spring Security:
def springSecurityVersion = '3.1.2.RELEASE'
def springSecurityCore = "org.springframework.security:spring-security-core:${springSecurityVersion}"
def springSecurityLDAP = "org.springframework.security:spring-security-ldap:${springSecurityVersion}"
def springSecurityConfig = "org.springframework.security:spring-security-config:${springSecurityVersion}"
def springSecurityWeb = "org.springframework.security:spring-security-web:${springSecurityVersion}"
def springSecurityTaglibs = "org.springframework.security:spring-security-taglibs:${springSecurityVersion}"
def springSecurityACL = "org.springframework.security:spring-security-acl:${springSecurityVersion}"
// Tiles:
def tilesVersion = '2.1.4'
def tilesCore = "org.apache.tiles:tiles-core:${tilesVersion}"
def tilesAPI = "org.apache.tiles:tiles-api:${tilesVersion}"
def tilesJSP = "org.apache.tiles:tiles-jsp:${tilesVersion}"
// AspectJ:
def aspectJVersion = '1.6.9'
def aspectJ = "org.aspectj:aspectjrt:${aspectJVersion}"
// Databases:
def apacheDerbyVersion = '10.9.1.0'
def apacheDerby = "org.apache.derby:derbyclient:${apacheDerbyVersion}"
def mySQLVersion = '5.1.19'
def mySQL = "mysql:mysql-connector-java:${mySQLVersion}"
def postgreSQLVersion = '9.1-901.jdbc4'
def postgreSQL = "postgresql:postgresql:${postgreSQLVersion}"
// Logging:
def slf4jVersion = '1.5.10'
def slf4jAPI = "org.slf4j:slf4j-api:${slf4jVersion}"
def slf4jJCL = "org.slf4j:jcl-over-slf4j:${slf4jVersion}"
def slf4jLog4J = "org.slf4j:slf4j-log4j12:${slf4jVersion}"
def log4JVersion = '1.2.15'
def log4J = "log4j:log4j:${log4JVersion}"
// Javax:
def javaxServletAPIVersion = '2.5'
def javaxServletAPI = "javax.servlet:servlet-api:${javaxServletAPIVersion}"
def javaxJspApiVersion = '2.1'
def javaxJspApi = "javax.servlet.jsp:jsp-api:${javaxJspApiVersion}"
def javaxJSTLVersion = '1.2'
def javaxJSTL = "javax.servlet:jstl:${javaxJSTLVersion}"
def javaxInjectVersion = '1'
def javaxInject = "javax.inject:javax.inject:${javaxInjectVersion}"
def javaxValidationVersion = '1.0.0.GA'
def javaxValidation = "javax.validation:validation-api:${javaxValidationVersion}"
// Hibernate:
def hibernateCoreVersion = '4.1.7.Final'
def hibernateCore = "org.hibernate:hibernate-core:${hibernateCoreVersion}"
def hibernateValidatorVersion = '4.3.0.Final'
def hibernateValidator = "org.hibernate:hibernate-validator:${hibernateValidatorVersion}"
def hibernateJPAVersion = '1.0.1.Final'
def hibernateJPA = "org.hibernate.javax.persistence:hibernate-jpa-2.0-api:${hibernateJPAVersion}"
// dom4j:
def dom4JVersion = '1.6.1'
def dom4J = "dom4j:dom4j:${dom4JVersion}"
// antlr:
def antlrVersion = '2.7.7'
def antlr = "antlr:antlr:${antlrVersion}"
// commons:
def commonsBeanUtilsVersion = '1.8.3'
def commonsBeanUtils = "commons-beanutils:commons-beanutils:${commonsBeanUtilsVersion}"
def commonsCollectionsVersion = '3.2.1'
def commonsCollections = "commons-collections:commons-collections:${commonsCollectionsVersion}"
def commonsDigesterVersion = '2.1'
def commonsDigester = "commons-digester:commons-digester:${commonsDigesterVersion}"
def commonsFileUploadVersion = '1.2.2'
def commonsFileUpload = "commons-fileupload:commons-fileupload:${commonsFileUploadVersion}"
def commonsIOVersion = '2.3'
def commonsIO = "commons-io:commons-io:${commonsIOVersion}"
def commonsLangVersion = '2.6'
def commonsLang = "commons-lang:commons-lang:${commonsLangVersion}"
def commonsLoggingVersion = '1.1.1'
def commonsLogging = "commons-logging:commons-logging:${commonsLoggingVersion}"
// JUnit4:
def jUnitVersion = '4.7'
def jUnit = "junit:junit:${jUnitVersion}"
project(':WARProject') {
dependencies {
// Spring Framework:
compile(springContext) {
exclude group: 'commons-logging', module: 'commons-logging'
}
compile(
springMVC, springAOP, springORM, springJDBC
)
// Spring Security:
compile(
springSecurityCore, springSecurityLDAP, springSecurityConfig,
springSecurityWeb, springSecurityTaglibs, springSecurityACL
)
// Tiles:
compile(
tilesCore, tilesAPI, tilesJSP
)
// AspectJ:
compile(aspectJ)
// Databases:
compile(
apacheDerby, mySQL, postgreSQL
)
// Logging:
compile(slf4jAPI)
runtime(
slf4jJCL, slf4jLog4J
)
runtime(log4J) {
exclude group: 'javax.mail', module: 'mail'
exclude group: 'javax.jms', module: 'jms'
exclude group: 'com.sun.jdmk', module: 'jmxtools'
exclude group: 'com.sun.jmx', module: 'jmxri'
}
// Javax:
compile(
javaxInject, javaxValidation, javaxJSTL
)
providedCompile(
javaxServletAPI, javaxJspApi
)
// Hibernate:
compile(
hibernateCore, hibernateValidator, hibernateJPA
)
// dom4j:
compile(dom4J)
// antlr:
compile(antlr)
// commons:
compile(
commonsBeanUtils, commonsCollections, commonsDigester,
commonsFileUpload, commonsIO, commonsLang,
commonsLogging
)
// JUnit:
testCompile(
jUnit
)
}
}
When I try to build the WAR file, I receive information that org.apache.log4j.Logger package doesn't exists. If I replace runtime with compile i receive error Artifact 'javax.jms:jms:1.1#jar' not found as if exclude clauses were completely ignored.
providedRuntime and providedCompile have the same results as respectively runtime and compile.
How should I modify script to build WAR file successfully?
EDIT:
gradle :WARProject:dependencies shown:
...
+--- org.slf4j:slf4j-log4j12:1.5.10 [default]
| +--- org.slf4j:slf4j-api:1.5.10 [compile,runtime,master] (*)
| \--- log4j:log4j:1.2.15 [compile,runtime,master]
| +--- javax.mail:mail:1.4 [compile,master,runtime]
| | \--- javax.activation:activation:1.1 [compile,master,runtime]
| +--- javax.jms:jms:1.1 [compile,master,runtime]
| +--- com.sun.jdmk:jmxtools:1.2.1 [compile,master,runtime]
| \--- com.sun.jmx:jmxri:1.2.1 [compile,master,runtime]
which means that gradle didn't excluded those dependencies (it's the only, place where javax.jms:jms occurs). I tries adding #jar at the end of definition, as well as adding transitive = false in exclusion block - with no result. What else should I try?

Actually log4j for version 1.2.15 is missing dependencies for maven for licensing issues. And a version of 1.2.16 for log4j is recommended.
try:
def log4JVersion = '1.2.15'
def log4J = "log4j:log4j:${log4JVersion}"
=>
def log4JVersion = '1.2.16'
def log4J = "log4j:log4j:${log4JVersion}"
or, you can exclude the jmx and jdmk if you don't need them in the gradle file. I see you exclude them in the pom, however, exclude declaration is missing in the gradle file.
Try add this:
configurations {
all*.exclude group: 'javax.jms', module: 'jms'
all*.exclude group: 'com.sun.jdmk', module: 'jmxtools'
all*.exclude group: 'com.sun.jmx', module: 'jmxri'
published
}
Cheers!

Related

Autowire JPA Repository with Hazelcast Map Store

I am using Spring-Boot, Spring-Data/JPA with Hazelcast client/server topology. I've been trying to use a MapStore as a Write-Behind buffer for my database through HazelcastRepository. My goal is to use a JpaRepository inside my MapStore to store sessions.
My current problem is that repository is not getting #Autowired, it always returns null.
Found this post about a similar situation, but it's not working because hazelcastClientInstance.getConfig().getManagedContext() is returning null.
Hazelcast configuration:
#Configuration
#EnableHazelcastRepositories(basePackages = {"com.xpto.database"})
#EnableJpaRepositories(basePackages = {"com.xpto.database"})
#ComponentScan(basePackages = {"com.xpto"})
public class HazelcastConfiguration {
#Bean
public SpringManagedContext managedContext() {
return new SpringManagedContext();
}
#Bean
HazelcastInstance hazelcastClientInstance(){
// Real all configuration from hazelcast-client file
ClientConfig clientConfig = null;
try {
clientConfig = new XmlClientConfigBuilder("hazelcast-client-config.xml").build().
setManagedContext(managedContext());
} catch (IOException e) {
e.printStackTrace();
}
return HazelcastClient.newHazelcastClient(clientConfig);
}
}
MapStore:
#SpringAware
public class SessionMapStore implements MapStore<String, Session>, MapLoaderLifecycleSupport {
private static final Logger LOGGER = LoggerFactory.getLogger(SessionMapStore.class);
#Autowired
private SessionsHCRepository sessionsHCRepository;
#Override
public void init(HazelcastInstance hazelcastClientInstance, Properties properties, String mapName) {
hazelcastClientInstance.getConfig().getManagedContext().initialize(this);
}
#Override
public void destroy() {
}
Repository:
#Repository
public interface SessionsHCRepository extends HazelcastRepository<SessionDB, String> {
}
pom file:
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.auth0</groupId>
<artifactId>java-jwt</artifactId>
<version>3.10.0</version>
</dependency>
<dependency>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
<version>2.0.1.Final</version>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.20</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<version>2.11.4</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.11.4</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.dataformat</groupId>
<artifactId>jackson-dataformat-xml</artifactId>
<version>2.11.0</version>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-spring-boot-starter-jaxws</artifactId>
<version>3.2.1</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-validation</artifactId>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.12.0</version>
</dependency>
<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
<version>1.15</version>
</dependency>
<dependency>
<groupId>org.apache.axis</groupId>
<artifactId>axis</artifactId>
<version>1.4</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.axis</groupId>
<artifactId>axis-jaxrpc</artifactId>
<version>1.4</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>wsdl4j</groupId>
<artifactId>wsdl4j</artifactId>
<version>1.6.2</version>
</dependency>
<dependency>
<groupId>javax.xml.rpc</groupId>
<artifactId>javax.xml.rpc-api</artifactId>
<version>1.1.2</version>
</dependency>
<dependency>
<groupId>commons-discovery</groupId>
<artifactId>commons-discovery</artifactId>
<version>0.5</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<dependency>
<groupId>com.oracle.database.jdbc</groupId>
<artifactId>ojdbc8</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>com.hazelcast</groupId>
<artifactId>hazelcast-all</artifactId>
<version>4.2.2</version>
</dependency>
<dependency>
<groupId>com.hazelcast</groupId>
<artifactId>spring-data-hazelcast</artifactId>
<version>1.0</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
</dependency>
</dependencies>

method level custom annotation doesn't work spring boot

I am trying to define custom annotation(LogMe) that should run before and after methods that are decorated with the annotation.
The annotation works fine for the spring identified methods - the ones defined with #GetMapping etc. however, the annotation on my custom written methods doesn't invoke AOP.
I have defined annotation as follows:
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
#Target(ElementType.METHOD)
#Retention(RetentionPolicy.RUNTIME)
public #interface LogMe {
My Aspect is like this:
#Configuration
#EnableAspectJAutoProxy
#Aspect
public class LogMeAspect {
#Pointcut("#annotation(com.api.logging.aspect.LogMe)")
public void loggableMethods() {}
#Around("loggableMethods()")
public Object serviceResponseTimeAdvice(ProceedingJoinPoint joinPoint) throws Throwable {
System.out.println(">>>>>>>>>>>REACHING TO PJP:"+joinPoint.getSignature().getName());
Object obj = joinPoint.proceed();
return obj;
}
}
spring.factories defined as follows (I am trying to access this aspect from dependency).
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
com.api.logging.aspect.LoggingAspect,\
com.api.logging.aspect.LogMeAspect
usage of the annotation:
public class Utils {
#LogMe
public String testing(int i, int j, String str) {
System.out.println("in testing");
testing2();
return i+j+str;
}
#LogMe
public void testing2() {
System.out.println("in testing 2");
}
I have the following dependencies for my aspect module.
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-aop</artifactId>
<version>2.4.5</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<version>2.4.5</version>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<optional>true</optional>
<version>1.18.20</version>
</dependency>
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjtools</artifactId>
<version>1.9.6</version>
</dependency>
<dependency>
<groupId>ch.qos.logback.contrib</groupId>
<artifactId>logback-json-classic</artifactId>
<version>${logback.contrib.version}</version>
</dependency>
<dependency>
<groupId>ch.qos.logback.contrib</groupId>
<artifactId>logback-jackson</artifactId>
<version>${logback.contrib.version}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.12.3</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
<version>2.12.3</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<version>2.12.3</version>
</dependency>
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjweaver</artifactId>
<version>1.8.13</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjrt</artifactId>
<version>1.7.4</version>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>${logback.version}</version>
</dependency>
<dependency>
<groupId>net.logstash.logback</groupId>
<artifactId>logstash-logback-encoder</artifactId>
<version>6.4</version>
</dependency>
I have following dependencies for the module from where I am calling the aspect. of course, one of it is the aspect dependency - spring-boot-api-logging
<!-- core -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<optional>true</optional>
</dependency>
<!-- matrix -->
<!-- kafka -->
<!-- tests -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<!-- database -->
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<!-- logging-->
<dependency>
<groupId>org.api.commons.logging</groupId>
<artifactId>spring-boot-api-logging</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency>

httpbuilder and apache.poi.workbook maven problems

In Maven POM file I have the following:
<dependency>
<groupId>org.codehaus.groovy.modules.http-builder</groupId>
<artifactId>http-builder</artifactId>
<version>0.7.1</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.5.2</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpcore</artifactId>
<version>4.4.5</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi</artifactId>
<version>3.17</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
<version>3.17</version>
</dependency>
<dependency>
<groupId>stax</groupId>
<artifactId>stax</artifactId>
<version>1.2.0</version>
</dependency>
I want to use Httpbuilder and Workbook in my project to parse Excel files.
def res = http.post("path": "....", "requestContentType": JSON, contentType: ContentType.BINARY)
Workbook book = WorkbookFactory.create(res.responseData)
Errors:
If I use my Maven dependencies
java.lang.LinkageError: loader constraint violation in interface itable
initialization: when resolving method "org.apache.xerces.dom.NodeImpl
If I add exclusion to stax or to httpbuilder
java.lang.NoSuchMethodError: javax.xml.parsers.DocumentBuilderFactory.setFeature(Ljava/lang/String;Z)V
If I delete stax dependency
javax.xml.stream.FactoryConfigurationError: Provider com.bea.xml.stream.EventFactory not found
Any ideas on how to use HttpBuilder with Workbook?
Exclude xerces from http-builder dependencies. In my case it solved problem
<dependency>
<groupId>org.codehaus.groovy.modules.http-builder</groupId>
<artifactId>http-builder</artifactId>
<version>0.7.1</version>
<exclusions>
<exclusion>
<groupId>xerces</groupId>
<artifactId>xercesImpl</artifactId>
</exclusion>
</exclusions>
</dependency>

maven surefire report plugin not running the test cases

I have configured surefire report plugin to my Spring+Maven based project to generate test report(s) and the surefire report plugin able to identify my test class but not running the test cases present in it.
Dependency used in pom.xml
<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-report-plugin</artifactId>
<version>2.18.1</version>
</plugin>
</plugins>
</reporting>
While building the project it genertes the result as bellow
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running com.thales.idct.controller.LopaReConfigControllerTest
Configuring TestNG with: org.apache.maven.surefire.testng.conf.TestNG652Configurator#1829ae5e
Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.225 sec
Results :
Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
[INFO]
Even the same things is present in *.html report as well.
Bellow is my test case code
#RunWith(SpringJUnit4ClassRunner.class)
#ContextConfiguration(loader=AnnotationConfigWebContextLoader.class)
#WebAppConfiguration
public class LopaReConfigControllerTest {
public static final MediaType APPLICATION_JSON_UTF8 = new MediaType(MediaType.APPLICATION_JSON.getType(), MediaType.APPLICATION_JSON.getSubtype(), Charset.forName("utf8"));
// Application dependency
private MockMvc mvc;
private LopaReConfigRepositoryImpl lopaImpl;
/*#Spy
#InjectMocks
LopaReConfigService lopaReConfigService = new LopaReConfigService();*/
#Mock
LopaReConfigService lopaReConfigService;
#Mock
CommonUtil commonUtil;
#Mock
ProcessLopaReconfigFile processLopaReconfigFile;
#Mock
DBImportRepository dbImportRepository;
#InjectMocks
MockHttpSession session;
#Autowired
WebApplicationContext context;
#InjectMocks
LopaReConfigController lopaReConfigController;
#Mock
UserSessionPool sessionPool;
// Building and Injecting mocked dependency(s) to controller
#Before
public void setup() {
// Process mock annotations
MockitoAnnotations.initMocks(this);
this.mvc = MockMvcBuilders.standaloneSetup(lopaReConfigController).build();
lopaImpl = new LopaReConfigRepositoryImpl();
}
#Test
public void test_getSeatLayoutDisplay() throws Exception {
// Construct JSON data to pass as parameter
BASeatkitDataFeeder seatKitDataFeeder = new BASeatkitDataFeeder();
Gson gson = new Gson();
CommonUtil util = new CommonUtil();
StringBuffer filePathBuff = new StringBuffer();
String jsonStub = "";
String columnXMl = "";
filePathBuff.append(util.getLopaReConfigPath("RAJESH-300ER", "RAJESH-300ER-B777-v300B"));
filePathBuff.append(LoadPropertyFiles.getInstance().getProperty("INPUT"));
//seatKitDataFeeder.setFilepath(XmlFilePath);
seatKitDataFeeder.setMode("");
seatKitDataFeeder.setFilename("");
seatKitDataFeeder.setBuildVersion("Base");
seatKitDataFeeder.setCarrierName("RAJESH-300ER");
seatKitDataFeeder.setDbId("1558");
seatKitDataFeeder.setDbName("RAJESH-300ER-B777-v300B");
seatKitDataFeeder.setSessionId(session.getId());
seatKitDataFeeder.setFilepath(filePathBuff.toString());
String seatKitXmlFilePath = filePathBuff.append(LoadPropertyFiles.getInstance().getProperty("XMLS")).toString();
columnXMl = filePathBuff.append(Constants.COLUMN_XML_FILENAME).toString();
BASeatKitInfo BAinfo = lopaImpl.getBASeatKit(seatKitXmlFilePath);
KitLayout kitLayout = lopaImpl.getBAColumnSeatKit(seatKitXmlFilePath+Constants.SEATKIT_COLUMN_XML_FILENAME,columnXMl);
// Mock the service results and feed
when(commonUtil.getLopaReConfigPath("RAJESH-300ER", "RAJESH-300ER-B777-v300B")).thenReturn(filePathBuff.toString());
when(lopaReConfigService.getBASeatKit(Mockito.anyString())).thenReturn(BAinfo);
when(lopaReConfigService.getBAColumnSeatKit(Mockito.anyString(),Mockito.anyString())).thenReturn(kitLayout);
// Construct JSON Object
jsonStub = gson.toJson(seatKitDataFeeder);
// Test method logic
mvc.perform(post("/getSeatLayoutDisplay")
.contentType(MediaType.APPLICATION_JSON).content(jsonStub))
.andExpect(status().isOk()) // After hitting specific URL/URI check the status code fall under 200 series
.andExpect(content().contentType(APPLICATION_JSON_UTF8)); // Check the return statement is JSON
//.andExpect(jsonPath("$.fieldErrors", hasSize(1)));
// Verify that the getBASeatKit() method of the lopaReConfigService is called only once during execution.
verify(lopaReConfigService, times(0)).getBASeatKit(seatKitXmlFilePath);
verify(lopaReConfigService, times(0)).getBAColumnSeatKit(seatKitDataFeeder.getFilepath(),columnXMl);
}
#Test
public void testGetBAColumnSeatKit() throws Exception{
BAColumnSeatkitDataFeeder seatKitDataFeeder = new BAColumnSeatkitDataFeeder();
Gson gson = new Gson();
CommonUtil util = new CommonUtil();
StringBuffer filePathBuff = new StringBuffer();
String jsonStub = "";
String columnXMl = "";
String centerXmlFilePath = "";
LopaReConfigController cntrl = PowerMockito.spy(lopaReConfigController);
seatKitDataFeeder.setMode("");
seatKitDataFeeder.setFileName("");
seatKitDataFeeder.setBuildVersion("Base");
seatKitDataFeeder.setCarrierName("BRITISH");
seatKitDataFeeder.setDbId("1514");
seatKitDataFeeder.setDbName("BRITISH-B787-PI-2-8");
seatKitDataFeeder.setSessionId(session.getId());
seatKitDataFeeder.setFilePath(filePathBuff.toString());
when(processLopaReconfigFile.getImportStatus(Integer.parseInt(seatKitDataFeeder.getDbId()))).thenReturn(Constants.SUCCESS);
filePathBuff = new StringBuffer(util.getLopaReConfigPath(seatKitDataFeeder.getCarrierName(),seatKitDataFeeder.getDbName()));
filePathBuff.append(LoadPropertyFiles.getInstance().getProperty("INPUT"));
String seatKitXmlFilePath = filePathBuff.append(LoadPropertyFiles.getInstance().getProperty("XMLS")).toString();
StringBuffer columnXmlFileBuf = new StringBuffer(filePathBuff);
columnXmlFileBuf.append(Constants.COLUMN_XML_FILENAME);
String leftXmlFilePath = filePathBuff.append(Constants.COLUMN_SEATKIT).toString();
String columnXmlFilePath = columnXmlFileBuf.toString();
if("Base".equalsIgnoreCase(seatKitDataFeeder.getBuildVersion())){
centerXmlFilePath = leftXmlFilePath;
} else {
centerXmlFilePath=lopaImpl.getLopaFilePath(seatKitDataFeeder.getBuildVersion(),seatKitDataFeeder.getDbId());
}
BASeatKitInfo seatKitInfo = lopaImpl.getBASeatKit(seatKitXmlFilePath);
KitLayout columnSeatKitLeft = lopaImpl.getBAColumnSeatKit(leftXmlFilePath,columnXmlFilePath);
KitLayout columnSeatKitCenter = lopaImpl.getBAColumnSeatKit(centerXmlFilePath,columnXmlFilePath);
Map<String,String> powerMap = lopaImpl.getPowerUnitInfo(seatKitXmlFilePath);
List<LayoutDesignVersionEntity> listLDVE = dbImportRepository.getLayoutDesignVersionList(Integer.parseInt(seatKitDataFeeder.getDbId()));
User user = new User();
user.setAirlineName("BRITISH-B787-PI-2-8");
user.setGroupName("FFF");
user.setLastLoginTime("12:12:12 10:09:09.656");
user.setPassword("FFF");
user.setUserName("FFF");
UserSessionPool.getInstance().addUser(user);
// when(commonUtil.getLopaReConfigPath(Mockito.anyString(),Mockito.anyString())).thenReturn(filePathBuff.toString());
//when(commonUtil.getLopaReConfigPath("RAJESH-300ER", "RAJESH-300ER-B777-v300B")).thenReturn(filePathBuff.toString());
when(commonUtil.getLopaReConfigPath("RAJESH-300ER", "RAJESH-300ER-B777-v300B")).thenReturn(filePathBuff.toString());
when(lopaReConfigService.getBASeatKit(seatKitXmlFilePath)).thenReturn(seatKitInfo);
when(lopaReConfigService.getBAColumnSeatKit(leftXmlFilePath,columnXmlFilePath)).thenReturn(columnSeatKitLeft);
when(lopaReConfigService.getBAColumnSeatKit(centerXmlFilePath,columnXmlFilePath)).thenReturn(columnSeatKitCenter);
when(lopaReConfigService.getPowerUnitInfo(seatKitXmlFilePath)).thenReturn(powerMap);
when(dbImportRepository.getLayoutDesignVersionList(Integer.parseInt(seatKitDataFeeder.getDbId()))).thenReturn(listLDVE);
jsonStub = gson.toJson(seatKitDataFeeder);
System.out.println(jsonStub);
PowerMockito.doNothing().when(cntrl,"isValidUser",seatKitDataFeeder.getSessionId());
mvc.perform(post("/getSeatKitAndLopaInfo")
.contentType(MediaType.APPLICATION_JSON).content(jsonStub))
.andExpect(status().isOk());//.andExpect(jsonPath("airline", "B787-8").exists());// After hitting specific URL/URI check the status code fall under 200 series
//.andExpect(content().contentType(APPLICATION_JSON_UTF8));// Check the return statement is JSON
verify(lopaReConfigService, times(0)).getBASeatKit(seatKitXmlFilePath);
}
}
How can I run test cases present in my test class..?
Is there any better test case reporting tool..?
My POM.xml file is as bellow
<build>
<finalName>${pom.artifactId}</finalName>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>${jdk.version}</source>
<target>${jdk.version}</target>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<!-- https://mvnrepository.com/artifact/org.jopendocument/jOpenDocument -->
<dependency>
<groupId>org.jopendocument</groupId>
<artifactId>jOpenDocument</artifactId>
<version>1.3</version>
</dependency>
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-archiver</artifactId>
<version>2.2</version>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.17</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>1.6.4</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-io</artifactId>
<version>1.3.2</version>
</dependency>
<dependency>
<groupId>commons-fileupload</groupId>
<artifactId>commons-fileupload</artifactId>
<version>1.2.2</version>
</dependency>
<dependency>
<groupId>commons-dbcp</groupId>
<artifactId>commons-dbcp</artifactId>
<version>1.2.2</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-orm</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.2.2</version>
</dependency>
<dependency>
<groupId>commons-httpclient</groupId>
<artifactId>commons-httpclient</artifactId>
<version>3.1</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context-support</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.0.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
<version>4.0.1.Final</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-validator</artifactId>
<version>4.2.0.Final</version>
</dependency>
<dependency>
<groupId>org.hibernate.javax.persistence</groupId>
<artifactId>hibernate-jpa-2.0-api</artifactId>
<version>1.0.1.Final</version>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.6</version>
</dependency>
<dependency>
<groupId>org.javassist</groupId>
<artifactId>javassist</artifactId>
<version>3.18.0-GA</version>
</dependency>
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>2.2.6</version>
</dependency>
<dependency>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
<version>20090211</version>
</dependency>
<dependency>
<groupId>org.springframework.ldap</groupId>
<artifactId>spring-ldap-core</artifactId>
<version>2.0.2.RELEASE</version>
</dependency>
<dependency>
<groupId>com.googlecode.json-simple</groupId>
<artifactId>json-simple</artifactId>
<version>1.1.1</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.0-alpha4</version>
</dependency>
<dependency>
<groupId>commons-net</groupId>
<artifactId>commons-net</artifactId>
<version>2.0</version>
</dependency>
<dependency>
<groupId>com.jcraft</groupId>
<artifactId>jsch</artifactId>
<version>0.1.53</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-compress</artifactId>
<version>1.9</version>
</dependency>
<dependency>
<groupId>com.itextpdf</groupId>
<artifactId>itextpdf</artifactId>
<version>5.5.8</version>
</dependency>
<dependency>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-client</artifactId>
<version>1.9.1</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi</artifactId>
<version>3.10-FINAL</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
<version>3.10-FINAL</version>
</dependency>
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>1.2</version>
</dependency>
<dependency>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-mapper-asl</artifactId>
<version>1.9.13</version>
</dependency>
<!-- http://mvnrepository.com/artifact/commons-lang/commons-lang -->
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
<version>2.6</version>
</dependency>
<!-- Unit testing dependency API's -->
<!--Testing -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
<scope>test</scope>
</dependency>
<!-- this is included in junit, make sure junit it version 4.11 -->
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-core</artifactId>
<version>1.3</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-library</artifactId>
<version>1.3</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-all</artifactId>
<version>1.9.5</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
<version>3.2.3.RELEASE</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.jayway.jsonpath</groupId>
<artifactId>json-path</artifactId>
<version>0.8.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.jayway.jsonpath</groupId>
<artifactId>json-path-assert</artifactId>
<version>0.8.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.powermock</groupId>
<artifactId>powermock-module-testng</artifactId>
<!-- <version>${powermock.version}</version> -->
<version>1.5.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.powermock</groupId>
<artifactId>powermock-api-mockito</artifactId>
<version>1.5.1</version>
<scope>test</scope>
</dependency>
</dependencies>
Please delete the maven-surefire-report-plugin from reporting tag place the bellow plugin inside the build tag
<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>${jdk.version}</source>
<target>${jdk.version}</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<properties>
<property>
<name>junit</name>
<value>true</value>
</property>
</properties>
</configuration>
</plugin>
</plugins>
</build>

arquillian #Drone injections always returning "about:blank" page

I am having this problem for 2 days now, and I am tending to think that something in my configuration is off. I'll post first my code and then explain:
public class MyTest extends Arquillian {
#Deployment(name = "MyPlatform", testable = false)
public static WebArchive createDeployment() {
WebArchive war;
war = ShrinkWrap
.create (WebArchive.class, "MyPlatform.war")
.merge (Maven
.resolver()
.loadPomFromFile("pom.xml")
.resolve("MyPlatform:My.Platform:war:0.0.1-SNAPSHOT")
.withoutTransitivity()
.asSingle(WebArchive.class));
return war;
}
#Drone
private PhantomJSDriver browser;
#ArquillianResource
private URL deploymentUrl;
#Test(dataProvider = Arquillian.ARQUILLIAN_DATA_PROVIDER)
#RunAsClient
public void should_login_successfully(#InitialPage LoginPage loginPage) {
System.out.println ("ACTUAL: " + browser.getCurrentUrl ());
System.out.println ("DEPLOYMENT URL: " + deploymentUrl.toExternalForm ());
loginPage.login ("demo", "demo");
Assert.assertEquals (deploymentUrl.toExternalForm () + "index.tm", "https://127.0.0.1:8443/MyPlatform/index.tm");
}
The #ArquillianResource injection works fine, and shows the correct URL. However the #Drone injection shows "about:blank". after some testing i found something weird:
if my war file is called something like MyPlatform.blabla.war, then the Drone trancates after the first "dot" and i get "http://127.0.0.1:8080/MyPlatform/login.tm" which is not what i deployed...so for some reason the #Drone is always trancating my deployment URL and cant seem to find the root of it.
here is my POM just in case
<dependency>
<groupId>org.jboss.shrinkwrap.resolver</groupId>
<artifactId>shrinkwrap-resolver-api-maven</artifactId>
<version>2.0.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jboss.shrinkwrap</groupId>
<artifactId>shrinkwrap-api</artifactId>
<version>1.2.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jboss.arquillian.protocol</groupId>
<artifactId>arquillian-protocol-servlet</artifactId>
<version>1.1.2.Final</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jboss.shrinkwrap</groupId>
<artifactId>shrinkwrap-impl-base</artifactId>
<version>1.2.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jboss.shrinkwrap.resolver</groupId>
<artifactId>shrinkwrap-resolver-impl-maven</artifactId>
<version>2.0.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jboss.arquillian</groupId>
<artifactId>arquillian-bom</artifactId>
<version>1.1.2.Final</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.jboss.arquillian.extension</groupId>
<artifactId>arquillian-drone-bom</artifactId>
<version>1.2.0.Final</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.jboss.arquillian.graphene</groupId>
<artifactId>graphene-webdriver</artifactId>
<version>2.0.1.Final</version>
<type>pom</type>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jboss.arquillian.graphene</groupId>
<artifactId>graphene-webdriver-spi</artifactId>
<version>2.0.1.Final</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jboss.arquillian.graphene</groupId>
<artifactId>graphene-webdriver-impl</artifactId>
<version>2.0.1.Final</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jboss.as</groupId>
<artifactId>jboss-as-arquillian-container-remote</artifactId>
<version>7.1.1.Final</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>6.3.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jboss.arquillian.testng</groupId>
<artifactId>arquillian-testng-container</artifactId>
<version>1.1.2.Final</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>bsh</groupId>
<artifactId>bsh</artifactId>
<version>2.0b4</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.3.1</version>
<scope>test</scope>
</dependency>
I would be greatful if someone can help me in solving this pickle..!
Typical, After I posted the question i found the problem, and it was simply that my applicaiton is running over SSL and phantomjs is not redirecting from 8080 -> 8443...
Now to figure out how to do this ...

Resources