I am getting below error while building Jar file. I am stuck with this issue from so long please advice.
Failed to execute goal net.alchim31.maven:scala-maven-plugin:4.5.6:compile (default) on project Clinical_CDF: Execution default of goal net.alchim31.maven:scala-maven-plugin:4.5.6:compile failed: Compilation failed
below is my pom.xml, I am trying to clone my git branch in intellij, after that trying to create a code but before that I am not even able to resolve dependencies . below is the content/xml code from pom.xml
<?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.optum.csgbdptenant.clinical.cdf</groupId>
<artifactId>Clinical_CDF</artifactId>
<version>4.0-SNAPSHOT</version>
<url>http://maven.apache.org</url>
<properties>
<java.version>1.8</java.version>
<scala.version>2.11.8</scala.version>
<scala.binary.version>2.11.8</scala.binary.version>
<spark.version>2.4.4.0-mapr-630</spark.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<repositories>
<repository>
<id>scala-tools.org</id>
<name>Scala-tools Maven2 Repository</name>
<url>http://scala-tools.org/repo-releases</url>
</repository>
<repository>
<id>mapr-releases</id>
<url>http://repository.mapr.com/maven/</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
<releases>
<enabled>true</enabled>
</releases>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>scala-tools.org</id>
<name>Scala-tools Maven2 Repository</name>
<url>http://scala-tools.org/repo-releases</url>
</pluginRepository>
</pluginRepositories>
<dependencies>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-nop</artifactId>
<version>1.7.12</version>
</dependency>
<dependency>
<groupId>org.apache.spark</groupId>
<artifactId>spark-core_2.11</artifactId>
<version>2.4.4.1-mapr-630</version>
</dependency>
<dependency>
<groupId>org.apache.spark</groupId>
<artifactId>spark-sql_2.11</artifactId>
<version>2.4.4.1-mapr-630</version>
</dependency>
<dependency>
<groupId>net.liftweb</groupId>
<artifactId>lift-json_2.11</artifactId>
<version>3.4.1</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-csv</artifactId>
<version>1.4</version>
</dependency>
<!-- <dependency>-->
<!-- <groupId>org.apache.spark</groupId>-->
<!-- <artifactId>spark-hive_2.11</artifactId>-->
<!-- <version>2.4.4.0-mapr-630</version>-->
<!-- </dependency>-->
<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-client</artifactId>
<version>2.7.0-mapr-1803-r1</version>
</dependency>
<!--<dependency>-->
<!--<groupId>org.scalatest</groupId>-->
<!--<artifactId>scalatest_2.11</artifactId>-->
<!--<version>3.0.1</version>-->
<!--<scope>test</scope>-->
<!--</dependency>-->
<dependency>
<groupId>org.scalactic</groupId>
<artifactId>scalactic_2.11</artifactId>
<version>3.0.5</version>
</dependency>
<dependency>
<groupId>org.scalatest</groupId>
<artifactId>scalatest_2.11</artifactId>
<version>3.0.5</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.scala-lang</groupId>
<artifactId>scala-library</artifactId>
<version>${scala.version}</version>
</dependency>
<dependency>
<groupId>org.scala-lang</groupId>
<artifactId>scala-compiler</artifactId>
<version>${scala.version}</version>
</dependency>
<!-- https://mvnrepository.com/artifact/com.github.nscala-time/nscala-time -->
<dependency>
<groupId>com.github.nscala-time</groupId>
<artifactId>nscala-time_2.11</artifactId>
<version>2.22.0</version>
</dependency>
<dependency>
<groupId>com.mapr.db</groupId>
<artifactId>maprdb-spark</artifactId>
<version>${spark.version}</version>
</dependency>
<dependency>
<groupId>org.apache.spark</groupId>
<artifactId>spark-streaming_2.11</artifactId>
<version>2.1.0-mapr-1710</version>
<scope>provided</scope>
</dependency>
<!--<dependency>-->
<!--<groupId>org.apache.hbase</groupId>-->
<!--<artifactId>hbase</artifactId>-->
<!--<version>1.1.13.0-mapr-630</version>-->
<!--</dependency>-->
<dependency>
<groupId>org.elasticsearch</groupId>
<artifactId>elasticsearch-spark-20_2.10</artifactId>
<version>6.2.3</version>
</dependency>
<!-- <dependency>-->
<!-- <groupId>org.apache.hive</groupId>-->
<!-- <artifactId>hive-hbase-handler</artifactId>-->
<!-- <version>2.3.6-mapr-1912</version>-->
<!-- </dependency>-->
<dependency>
<groupId>org.json4s</groupId>
<artifactId>json4s-native_2.11</artifactId>
<version>3.7.0-M2</version>
</dependency>
<!-- https://mvnrepository.com/artifact/com.hortonworks/shc-core -->
<dependency>
<groupId>org.apache.hbase</groupId>
<artifactId>hbase-spark</artifactId>
<version>1.1.8-mapr-1904</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.hadoop/hadoop-common -->
<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-common</artifactId>
<version>2.4.1-mapr-1408</version>
</dependency>
<dependency>
<groupId>com.optum.csgbdptenant.Common</groupId>
<artifactId>Common</artifactId>
<version>6.4</version>
<scope>system</scope>
<systemPath>${project.basedir}/jars/Common-6.4.jar</systemPath>
</dependency>
<dependency>
<groupId>PBEEncryption_Optum</groupId>
<artifactId>PBEEncryption_Optum</artifactId>
<scope>system</scope>
<version>1.0</version>
<systemPath>${project.basedir}/jars/PBEEncryption_Optum.jar</systemPath>
</dependency>
<!-- <dependency>
<groupId>org.apache.hive</groupId>
<artifactId>hive-jdbc</artifactId>
<version>2.0.0</version>
</dependency> -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<sourceDirectory>scripts/src/main/scala</sourceDirectory>
<resources>
<resource>
<directory>scripts/src/main/resources</directory>
</resource>
</resources>
<testSourceDirectory>scripts/src/test/scala</testSourceDirectory>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.1.2</version>
<configuration>
<archive>
<manifest>
<addClasspath>true</addClasspath>
<classpathPrefix>lib/</classpathPrefix>
<mainClass>Acquire</mainClass>
</manifest>
</archive>
</configuration>
</plugin>
<plugin>
<groupId>net.alchim31.maven</groupId>
<artifactId>scala-maven-plugin</artifactId>
<version>4.5.6</version>
<executions>
<execution>
<goals>
<goal>compile</goal>
<goal>testCompile</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<includes>
<include>**/*TESTS*.*</include>
</includes>
</configuration>
<!--<configuration>-->
<!--<skipTests>false</skipTests>-->
<!--</configuration>-->
</plugin>
<plugin>
<groupId>org.scalatest</groupId>
<artifactId>scalatest-maven-plugin</artifactId>
<version>1.0</version>
<configuration>
<reportsDirectory>${project.build.directory}/surefire-reports</reportsDirectory>
<junitxml>.</junitxml>
<skipTests>false</skipTests>
<testFailureIgnore>false</testFailureIgnore>
<filereports>WDF TestSuite.txt</filereports>
</configuration>
<executions>
<execution>
<id>test</id>
<goals>
<goal>test</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
adding the log also
[INFO]
[INFO] ----------< com.optum.csgbdptenant.clinical.cdf:Clinical_CDF >----------
[INFO] Building Clinical_CDF 4.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) # Clinical_CDF ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory C:\Users\sbhatt56\IdeaProjects\CASE_DETAIL_FACT\scripts\src\main\resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) # Clinical_CDF ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- scala-maven-plugin:4.5.6:compile (default) # Clinical_CDF ---
[WARNING] Expected all dependencies to require Scala version: 2.11.8
[WARNING] net.liftweb:lift-json_2.11:3.4.1 requires scala version: 2.11.12
[WARNING] Multiple versions of scala libraries detected!
[INFO] Using incremental compilation using Mixed compile order
[INFO] Compiler bridge file: C:\Users\sbhatt56\.sbt\1.0\zinc\org.scala-sbt\org.scala-sbt-compiler-bridge_2.11-1.5.8-bin_2.11.8__52.0-1.5.8_20211211T222914.jar
[INFO] compiling 14 Scala sources to C:\Users\sbhatt56\IdeaProjects\CASE_DETAIL_FACT\target\classes ...
[ERROR] C:/Users/sbhatt56/IdeaProjects/CASE_DETAIL_FACT/scripts/src/main/scala/member_policy.scala:5: expected class or object definition
[ERROR] one error found
Code testing
object RDDWithSession {
def main(args: Array[String]): Unit = {
//val sparkSession=SparkSession.builder()
val sparkSession = SparkSession.builder()
.appName("RRDSparkSession")
.config("hive.metastore.uris","thrift://apsrp07754.uhc.com:11848")
.enableHiveSupport()
.master("local")
.getOrCreate()
var recordcounts = ""
var notifymsg = ""
val updateddate = sparkSession.sql(s"select distinct update_dt from clinical.mbr_cse_pol_ref SORT by date(update_dt) DESC LIMIT 3")
notifymsg = s"Updated Records : $updateddate"
}
Thanks for the help !!
Related
After i changed the version of my spring webflux (spring boot 2.2.0.m3 to 2.2.2.RELEASE ) and r2dbc (spring-data-r2dbc 1.0.0.M2 to 1.0.0.RELEASE) and r2dbc-postgresql (1.0.0.M7 to 0.8.0.M8) project i keep getting this error
java.lang.IllegalArgumentException: Identifier 'password' is not a valid identifier. Should be of the pattern '\$([\d]+)'.
at io.r2dbc.postgresql.ExtendedQueryPostgresqlStatement.getIndex(ExtendedQueryPostgresqlStatement.java:197) ~[r2dbc-postgresql-0.8.0.RC2.jar:0.8.0.RC2]
Suppressed: reactor.core.publisher.FluxOnAssembly$OnAssemblyException: Error has been observed at the following site(s):
|_ checkpoint ⇢ SQL "SELECT * FROM rc_user_account WHERE email = $1 AND password = $2" [DatabaseClient]
My pom.xml is here
<?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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.2.2.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>com.netax</groupId>
<artifactId>...</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>...</name>
<description>..</description>
<properties>
<flyway.version>6.1.1</flyway.version>
<java.version>1.8</java.version>
<snippetsDirectory>${project.build.directory}/generated-snippets</snippetsDirectory>
<jwt.version>0.10.5</jwt.version>
<spring-restdocs.version>2.0.3.RELEASE</spring-restdocs.version>
<postgres.driver.version>9.3-1104-jdbc41</postgres.driver.version>
<!-- test server fields -->
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-releasetrain</artifactId>
<version>Moore-SR3</version>
<scope>import</scope>
<type>pom</type>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-webflux</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.projectreactor</groupId>
<artifactId>reactor-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.restdocs</groupId>
<artifactId>spring-restdocs-mockmvc</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.jsonwebtoken</groupId>
<artifactId>jjwt-api</artifactId>
<version>${jwt.version}</version>
</dependency>
<dependency>
<groupId>io.jsonwebtoken</groupId>
<artifactId>jjwt-impl</artifactId>
<version>${jwt.version}</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>io.jsonwebtoken</groupId>
<artifactId>jjwt-jackson</artifactId>
<version>${jwt.version}</version>
<scope>runtime</scope>
</dependency>
<!-- https://mvnrepository.com/artifact/commons-io/commons-io -->
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.6</version>
</dependency>
<!-- other dependency elements omitted -->
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-r2dbc</artifactId>
<version>1.0.0.RELEASE</version>
</dependency>
<!-- a R2DBC driver -->
<!-- <dependency>-->
<!-- <groupId>io.r2dbc</groupId>-->
<!-- <artifactId>r2dbc-h2</artifactId>-->
<!-- <version>1.0.0.M6</version>-->
<!-- <exclusions>-->
<!-- <exclusion>-->
<!-- <groupId>com.h2database</groupId>-->
<!-- <artifactId>h2</artifactId>-->
<!-- </exclusion>-->
<!-- </exclusions>-->
<!-- </dependency>-->
<!-- https://mvnrepository.com/artifact/com.h2database/h2 -->
<!-- <dependency>-->
<!-- <groupId>com.h2database</groupId>-->
<!-- <artifactId>h2</artifactId>-->
<!-- <version>1.4.197</version>-->
<!-- </dependency>-->
<dependency>
<groupId>org.flywaydb</groupId>
<artifactId>flyway-core</artifactId>
<version>${flyway.version}</version>
</dependency>
<dependency>
<groupId>io.r2dbc</groupId>
<artifactId>r2dbc-postgresql</artifactId>
<version>0.8.0.RC2</version>
</dependency>
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-vision</artifactId>
<version>1.74.0</version>
</dependency>
<dependency>
<groupId>com.github.Cloudmersive</groupId>
<artifactId>Cloudmersive.APIClient.Java</artifactId>
<version>v2.75</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.mvel/mvel2 -->
<dependency>
<groupId>org.mvel</groupId>
<artifactId>mvel2</artifactId>
<version>2.4.4.Final</version>
</dependency>
<dependency>
<groupId>org.reflections</groupId>
<artifactId>reflections</artifactId>
<version>0.9.11</version>
</dependency>
<dependency>
<groupId>org.jooq</groupId>
<artifactId>jooq</artifactId>
<version>3.12.3</version>
</dependency>
<dependency>
<groupId>org.jooq</groupId>
<artifactId>jooq-meta</artifactId>
<version>3.12.3</version>
</dependency>
<dependency>
<groupId>org.jooq</groupId>
<artifactId>jooq-codegen</artifactId>
<version>3.12.3</version>
</dependency>
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>${postgres.driver.version}</version>
</dependency>
<!-- https://mvnrepository.com/artifact/io.projectreactor.kafka/reactor-kafka -->
<dependency>
<groupId>io.projectreactor.kafka</groupId>
<artifactId>reactor-kafka</artifactId>
<version>1.2.1.RELEASE</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.springframework.kafka/spring-kafka -->
<dependency>
<groupId>org.springframework.kafka</groupId>
<artifactId>spring-kafka</artifactId>
<version>2.3.4.RELEASE</version>
</dependency>
</dependencies>
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
<repository>
<id>repository.spring.milestone</id>
<name>Spring Milestone Repository</name>
<url>http://repo.spring.io/milestone</url>
</repository>
<repository>
<id>central</id>
<name>Maven Central</name>
<url>https://repo1.maven.org/maven2</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>spring-snapshots</id>
<url>https://repo.spring.io/snapshot</url>
</pluginRepository>
<pluginRepository>
<id>spring-milestones</id>
<url>https://repo.spring.io/milestone</url>
</pluginRepository>
</pluginRepositories>
<build>
<plugins>
<plugin>
<groupId>org.asciidoctor</groupId>
<artifactId>asciidoctor-maven-plugin</artifactId>
<version>1.5.8</version>
<executions>
<execution>
<id>generate-docs</id>
<phase>prepare-package</phase>
<goals>
<goal>process-asciidoc</goal>
</goals>
<configuration>
<backend>html</backend>
<doctype>book</doctype>
<attributes>
<snippets>${snippetsDirectory}</snippets>
</attributes>
<sourceDirectory>src/docs/asciidocs</sourceDirectory>
<outputDirectory>target/generated-docs</outputDirectory>
</configuration>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>org.springframework.restdocs</groupId>
<artifactId>spring-restdocs-asciidoctor</artifactId>
<version>${spring-restdocs.version}</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
<configuration>
<profiles>
<profile>dev</profile>
<profile>test</profile>
<profile>qa</profile>
</profiles>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.5.1</version>
<executions>
<!-- Replacing default-compile as it is treated specially by maven -->
<execution>
<id>default-compile</id>
<phase>none</phase>
</execution>
<!-- Replacing default-testCompile as it is treated specially by maven -->
<execution>
<id>default-testCompile</id>
<phase>none</phase>
</execution>
<execution>
<id>java-compile</id>
<phase>compile</phase>
<goals>
<goal>compile</goal>
</goals>
</execution>
<execution>
<id>java-test-compile</id>
<phase>test-compile</phase>
<goals>
<goal>testCompile</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.flywaydb</groupId>
<artifactId>flyway-maven-plugin</artifactId>
<version>${flyway.version}</version>
<dependencies>
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>${postgres.driver.version}</version>
<scope>runtime</scope>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
My failed business logic is like above
public Mono<LoggedIn> login(LoginRequest request) {
return Hashing.hashPassword(request.getPassword())
.flatMap(hashedPassword -> {
log.info(hashedPassword);
return userAccountRepository.findByUsernameAndPassword(request.getUsername(), hashedPassword);
})
.doOnError(throwable -> log.error(throwable.getMessage(), throwable))
.doOnNext(userAccountEntity -> log.info("Login attempt : {}", userAccountEntity))
.switchIfEmpty(Mono.error(ErrorHandlerFactory.newException(ErrorCode.USER_NOT_FOUND_ERROR)))
.map(userAccount -> {
String accessToken = util.generateToken(userAccount.getUuid(), Role.USER);
return LoggedIn.builder()
.name(userAccount.getFirstName())
.surname(userAccount.getLastName())
.profilePictureUrl(Optional.empty())
.company(Company.builder().name("Netax AS").description("description here").build()) // todo fix here
.accessToken(accessToken)
.build(); // todo omitted feature
});}
Could you help me to find why i'm getting this error ?
I got the same error.
I don't know what is your repository looks like, but in mine:
#Query("select id, title from user where title ilike $1")
Flux<User> findAllSpecial(String title);
error "java.lang.IllegalArgumentException: Identifier 'title' is not a valid identifier. Should be of the pattern '\$([\d]+)'."
#Query("select id, title from user where title ilike :title")
Flux<User> findAllSpecial(String title);
works.
I am working on a build file utilizing dependencies from scala and spark packages, etc, on Java 1.8 and Scala 2.10.5.
The build is throwing up on the jackson-bind package. I have added the entire pom and the exception I see:
Exception
central (https://repo.maven.apache.org/maven2, releases=true, snapshots=false)
[ERROR] : ClientProtocolException:
Invalid redirect URI: http://blog.goodstuff.im/repo-releases/com/fasterxml/jackson/core/jackson-databind/[2.7.0,)/jackson-databind-[2.7.0,).jar:
Illegal character in path at index 83: http://blog.goodstuff.im/repo-releases/com/fasterxml/jackson/core/jackson-databind/[2.7.0,)/jackson-databind-[2.7.0,).jar
Tried the exclusion tags, it is still failing with an error:
ClientProtocolException: Invalid redirect URI:
http://blog.goodstuff.im/repo-releases/com/fasterxml/jackson/core/jackson-databind/[2.7.0,)/jackson-databind-[2.7.0,).jar:
Illegal character in path at index 83:
http://blog.goodstuff.im/repo-releases/com/fasterxml/jackson/core/jackson-databind/[2.7.0,)/jackson-databind-[2.7.0,).jar
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
My pom.xml file:
<?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.mycompany</groupId>
<artifactId>c-platform</artifactId>
<version>3.0.0-SNAPSHOT</version>
<name>${project.version} - ${project.artifactId}</name>
<packaging>pom</packaging>
<parent> <groupId>com.mycompany</groupId>
<artifactId>c-parent</artifactId>
<version>3.0.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<repositories>
<repository>
<id>Nexus</id>
<url>…-snapshots/</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
<repository>
<id> Nexus shapshot</id>
<url>../nexus/content/groups/public</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
<repository>
<id>Cloudera</id>
<url>https://repository.cloudera.com/artifactory/cloudera-repos</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
<repository>
<id>scala-tools.org</id>
<name>Scala-tools Maven2 Repository</name>
<url>http://scala-tools.org/repo-releases</url>
</repository>
<repository>
<id>maven2-repository.dev.java.net</id>
<name>Java.net Repository for Maven</name>
<url>http://download.java.net/maven/2/</url>
<layout>default</layout>
</repository>
</repositories>
<!-- list all dependencies - begin -->
<dependencies>
<dependency>
<groupId>org.scala-lang</groupId>
<artifactId>scala-library</artifactId>
<version>${scala.version}</version>
</dependency>
<dependency>
<groupId>com.maxmind.geoip2</groupId>
<artifactId>geoip2</artifactId>
<version>2.7.0</version>
</dependency>
<dependency>
<groupId>com.databricks</groupId>
<artifactId>spark-csv_2.10</artifactId>
<version>${spark.csv.version}</version>
</dependency>
<dependency>
<groupId>org.apache.spark</groupId>
<artifactId>spark-core_2.10</artifactId>
<version>${spark.version}</version>
</dependency>
<dependency>
<groupId>org.apache.spark</groupId>
<artifactId>spark-sql_2.10</artifactId>
<version>${spark.version}</version>
</dependency>
<dependency>
<groupId>org.apache.spark</groupId>
<artifactId>spark-mllib_2.10</artifactId>
<version>${spark.version}</version>
</dependency>
<dependency>
<groupId>org.apache.spark</groupId>
<artifactId>spark-hive_2.10</artifactId>
<version>${spark.version}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.module</groupId>
<artifactId>jackson-module-scala_2.11</artifactId>
<version>2.7.3</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.7.3</version>
<exclusions>
<exclusion>
<artifactId>jackson-annotations</artifactId>
<groupId>com.fasterxml.jackson.core</groupId>
</exclusion>
<exclusion>
<artifactId>jackson-core</artifactId>
<groupId>com.fasterxml.jackson.core</groupId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
<!-- list all dependencies - emd -->
<build>
<sourceDirectory>src/main/scala</sourceDirectory>
<testSourceDirectory>src/test/scala</testSourceDirectory>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.1.0</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<relocations>
<relocation>
<pattern>com.fasterxml.jackson.**</pattern>
<shadedPattern>com.shaded.fasterxml.jackson#1</shadedPattern>
</relocation>
</relocations>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.scala-tools</groupId>
<artifactId>maven-scala-plugin</artifactId>
<version>2.10</version>
<executions>
<execution>
<goals>
<goal>compile</goal>
</goals>
<configuration>
<args>
<arg>-dependencyfile</arg>
<arg>${project.build.directory}/.scala_dependencies</arg>
</args>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.7.0</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
<showDeprecation>true</showDeprecation>
<showWarnings>true</showWarnings>
</configuration>
</plugin>
</plugins>
</build>
</project>
It seems that jackson-databind 2.7.3 brings as transitive dependencies jackson-annotations and jackson-core 2.7.0 which might cause some dependency conflict in your build.
I couldn't reproduce exactly, your errors, since I don't have your entire pom. But I would suggest you fix the dependency conflict by:
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.7.3</version>
<exclusions>
<exclusion>
<artifactId>jackson-annotations</artifactId>
<groupId>com.fasterxml.jackson.core</groupId>
</exclusion>
<exclusion>
<artifactId>jackson-core</artifactId>
<groupId>com.fasterxml.jackson.core</groupId>
</exclusion>
</exclusions>
</dependency>
Now you jackon-bind wil miss "jackson-core" and jackson-annotation, but you could add them to the pom with the proper version (2.7.3) and apply the exclusion trick.
Disclaimer: I am new to Scala and trying to create a sample Scala Maven project using simple scala archtype in IntelliJ IDEA. IntelliJ version is 14.1.2
Below is my pom file, I did change the Scala version to 2.11.6 from 2.7 which the archetype generates by default.
<!-- language: lang-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>learn.rxscala</groupId>
<artifactId>rxscala-reactive-course-play</artifactId>
<version>1.0.0-SNAPSHOT</version>
<inceptionYear>2008</inceptionYear>
<properties>
<scala.version>2.11.6</scala.version>
<slf4j.version>1.7.5</slf4j.version>
<reactivex.version>0.23.0</reactivex.version>
<rx.scala.compat.version>2.11</rx.scala.compat.version>
<scala.async.version>0.9.2</scala.async.version>
</properties>
<repositories>
<repository>
<id>scala-tools.org</id>
<name>Scala-Tools Maven2 Repository</name>
<url>http://scala-tools.org/repo-releases</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>scala-tools.org</id>
<name>Scala-Tools Maven2 Repository</name>
<url>http://scala-tools.org/repo-releases</url>
</pluginRepository>
</pluginRepositories>
<dependencies>
<dependency>
<groupId>org.scala-lang</groupId>
<artifactId>scala-library</artifactId>
<version>${scala.version}</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.10</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.specs</groupId>
<artifactId>specs</artifactId>
<version>1.2.5</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.reactivex</groupId>
<artifactId>rxscala_${rx.scala.compat.version}</artifactId>
<version>${reactivex.version}</version>
</dependency>
<dependency>
<groupId>org.scala-lang.modules</groupId>
<artifactId>scala-async_${rx.scala.compat.version}</artifactId>
<version>${scala.async.version}</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>${slf4j.version}</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>${slf4j.version}</version>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.17</version>
</dependency>
</dependencies>
<build>
<sourceDirectory>src/main/scala</sourceDirectory>
<testSourceDirectory>src/test/scala</testSourceDirectory>
<plugins>
<plugin>
<groupId>org.scala-tools</groupId>
<artifactId>maven-scala-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>compile</goal>
<goal>testCompile</goal>
</goals>
</execution>
</executions>
<configuration>
<scalaVersion>${scala.version}</scalaVersion>
<args>
<arg>-target:jvm-1.5</arg>
</args>
</configuration>
</plugin>
</plugins>
</build>
<reporting>
<plugins>
<plugin>
<groupId>org.scala-tools</groupId>
<artifactId>maven-scala-plugin</artifactId>
<configuration>
<scalaVersion>${scala.version}</scalaVersion>
</configuration>
</plugin>
</plugins>
</reporting>
</project>
On running Maven test, I keep getting following error -
[WARNING] error: error while loading JUnit4, Scala signature JUnit4 has wrong version
[WARNING] expected: 5.0
[WARNING] found: 4.1 in JUnit4.class
I am not sure how to fix this problem?
Just make sure you use the up-to-date scala-archetype-simple, because IDEA requires new scala-archetype-simple to work with. But by default IDEA does not provide the correct scala-srchetype-simple to choose, you need to type in the right one by yourself.
It is like.
groupId:net.alchim31.maven
artifactId:scala-archetype-simple
version:1.6
packaging:maven-archetype
I had this issue as well and while trying to correct the ver number manually I found that simple using terminal or CMD you can just build a new project.
Using the mvn commands ensures that your project is built with the correct ver.
mvn -B archetype:generate -DarchetypeGroupId=org.apache.maven.archetypes -DgroupId=com.mycompany.app -DartifactId=my-app
Reference: http://maven.apache.org/guides/getting-started/index.html
trying to deploy war to heroku
using maven 3.2.5
mvn clean heroku:deploy-war
getting this exception:
[ERROR] Failed to execute goal com.heroku.sdk:heroku-maven-plugin:0.3.0:deploy-war (default-cli) on project MyApp: Failed to deploy application: There was an exception invoking the remote service: HTTP(404): https://api.heroku.com/apps/MyApp/config-vars -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.heroku.sdk:heroku-maven-plugin:0.3.0:deploy-war (default-cli) on project MyApp: Failed to deploy application
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:120)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:355)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:155)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:584)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:216)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:160)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.apache.maven.plugin.MojoFailureException: Failed to deploy application
at com.heroku.sdk.maven.DeployWarMojo.execute(DeployWarMojo.java:58)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:132)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
... 19 more
Caused by: com.heroku.sdk.deploy.Curl$CurlException: There was an exception invoking the remote service: HTTP(404)
at com.heroku.sdk.deploy.Curl.handleResponse(Curl.java:94)
at com.heroku.sdk.deploy.Curl.get(Curl.java:22)
at com.heroku.sdk.deploy.App.getConfigVars(App.java:139)
at com.heroku.sdk.deploy.App.deploy(App.java:77)
at com.heroku.sdk.deploy.App.deploy(App.java:93)
at com.heroku.sdk.deploy.WarApp.deploy(WarApp.java:38)
at com.heroku.sdk.maven.DeployWarMojo.execute(DeployWarMojo.java:54)
... 21 more
Caused by: java.io.FileNotFoundException: https://api.heroku.com/apps/MyApp/config-vars
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1624)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:254)
at com.heroku.sdk.deploy.Curl.handleResponse(Curl.java:90)
... 27 more
this is how my pom looks like:
<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.avi</groupId>
<artifactId>MyApp</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>war</packaging>
<description>My GoTickets Web App</description>
<inceptionYear>2014</inceptionYear>
<properties>
<scala.version>2.11.4</scala.version>
<spray.version>1.3.1</spray.version>
<akka.version>2.3.8</akka.version>
</properties>
<repositories>
<repository>
<id>scala-tools.org</id>
<name>Scala-Tools Maven2 Repository</name>
<url>http://scala-tools.org/repo-releases</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>scala-tools.org</id>
<name>Scala-Tools Maven2 Repository</name>
<url>http://scala-tools.org/repo-releases</url>
</pluginRepository>
</pluginRepositories>
<dependencies>
<dependency>
<groupId>org.scala-lang</groupId>
<artifactId>scala-library</artifactId>
<version>${scala.version}</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.9</version>
<scope>test</scope>
</dependency>
<dependency>
<scope>test</scope>
<groupId>org.specs2</groupId>
<artifactId>specs2-core_2.11</artifactId>
<version>2.4.15</version>
</dependency>
<dependency>
<scope>test</scope>
<groupId>com.typesafe.akka</groupId>
<artifactId>akka-testkit_2.11</artifactId>
<version>${akka.version}</version>
</dependency>
<dependency>
<groupId>org.scalatest</groupId>
<artifactId>scalatest_2.11</artifactId>
<version>2.2.3</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.spray</groupId>
<artifactId>spray-can</artifactId>
<version>${spray.version}</version>
</dependency>
<dependency>
<groupId>io.spray</groupId>
<artifactId>spray-routing</artifactId>
<version>${spray.version}</version>
</dependency>
<dependency>
<groupId>io.spray</groupId>
<artifactId>spray-json_2.11</artifactId>
<version>${spray.version}</version>
</dependency>
<dependency>
<groupId>com.typesafe.akka</groupId>
<artifactId>akka-actor_2.11</artifactId>
<version>${akka.version}</version>
</dependency>
<dependency>
<groupId>com.typesafe.akka</groupId>
<artifactId>akka-slf4j_2.11</artifactId>
<version>${akka.version}</version>
</dependency>
<dependency>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.5</version>
</dependency>
</dependencies>
<build>
<sourceDirectory>src/main/scala</sourceDirectory>
<testSourceDirectory>src/test/scala</testSourceDirectory>
<plugins>
<plugin>
<groupId>net.alchim31.maven</groupId>
<artifactId>scala-maven-plugin</artifactId>
<version>3.2.0</version>
<executions>
<execution>
<goals>
<goal>compile</goal>
<goal>testCompile</goal>
</goals>
</execution>
</executions>
<configuration>
<scalaVersion>${scala.version}</scalaVersion>
</configuration>
</plugin>
<plugin>
<groupId>com.heroku.sdk</groupId>
<artifactId>heroku-maven-plugin</artifactId>
<version>0.3.0</version>
<configuration>
<appName>MyApp</appName>
</configuration>
</plugin>
</plugins>
</build>
</project>
Your appName is incorrect in the Heroku plugin configuration. Heroku apps must start with a letter and can only contain lowercase letters, numbers, and dashes. Therefore MyApp cannot be correct.
Check your apps page in the Heroku dashboard and find the name of your application then update the configuration accordingly. Here is an example of the plugin config with a randomly named Heroku app:
<plugin>
<groupId>com.heroku.sdk</groupId>
<artifactId>heroku-maven-plugin</artifactId>
<version>0.3.0</version>
<configuration>
<appName>hidden-badlands-1234</appName>
</configuration>
</plugin>
I am using a maven project (v3.1.1) which I use for selenium automation. I have already hosted my project in Jenkins(in localhost) and trying to compile the project from the Jenkins itself.
com.eh.base
com.eh.pageobjects
com.eh.tests
[I am not using the structure like src\main\resource]
The maven plugin in Jenkins will achieve the compile process. I tried using maven plugin 2.2.1 as well as 3.1.1 with compile goal, it didn't work. In order to replicate this within the eclipse level. I tried to compile the maven project from the command prompt using the commands mvn clean, mvn compile.
BUILD RESULTS:
D:\Shaw\Shaw\Projects\Branch\MyProject>mvn compile
[INFO] Scanning for projects...
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) # MyProject ---
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources,
i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory D:\Shaw\Shaw\Projects\Branch\MyProject\src\main\resources
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) # MyProject ---
[INFO] No sources to compile
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.352s
[INFO] Finished at: Thu Feb 13 01:36:23 IST 2014
[INFO] Final Memory: 10M/108M
[INFO] ------------------------------------------------------------------------
From this, I hoping that it will compile and generate the class files in the /target/classes. But this has not done so. Since I am using the custom package for my project, I think I should try maven archetype. Please advice.
Please let me know if I missed anything.
POM file:
<?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>
<artifactId>MyProject</artifactId>
<groupId>com.eh</groupId>
<version>1.0</version>
<packaging>jar</packaging>
<name>MyProject</name>
<description>A sample Maven project that demonstrates how to integrate Sauce OnDemand with WebDriver tests that run using JUnit
</description>
<dependencies>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.15</version>
<exclusions>
<exclusion>
<groupId>com.sun.jmx</groupId>
<artifactId>jmxri</artifactId>
</exclusion>
<exclusion>
<groupId>com.sun.jdmk</groupId>
<artifactId>jmxtools</artifactId>
</exclusion>
<exclusion>
<groupId>javax.jms</groupId>
<artifactId>jms</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
<version>1.6</version>
</dependency>
<dependency>
<groupId>jlibs</groupId>
<artifactId>jlibs-xml</artifactId>
<version>1.0.0</version>
<scope>system</scope>
<systemPath>${project.basedir}/lib/jlibs-xml.jar</systemPath>
</dependency>
<dependency>
<groupId>BaseLibrary</groupId>
<artifactId>BaseLibrary</artifactId>
<version>1.0.0</version>
<scope>system</scope>
<systemPath>${project.basedir}/lib/BaseLibrary.jar</systemPath>
</dependency>
<dependency>
<groupId>jlibs</groupId>
<artifactId>jlibs-examples</artifactId>
<version>1.0.0</version>
<scope>system</scope>
<systemPath>${project.basedir}/lib/jlibs-examples.jar</systemPath>
</dependency>
<dependency>
<groupId>jlibs</groupId>
<artifactId>jlibs-greplog</artifactId>
<version>1.0.0</version>
<scope>system</scope>
<systemPath>${project.basedir}/lib/jlibs-greplog.jar</systemPath>
</dependency>
<dependency>
<groupId>jlibs</groupId>
<artifactId>jlibs-jdbc</artifactId>
<version>1.0.0</version>
<scope>system</scope>
<systemPath>${project.basedir}/lib/jlibs-jdbc.jar</systemPath>
</dependency>
<dependency>
<groupId>jlibs</groupId>
<artifactId>jlibs-nblr</artifactId>
<version>1.0.0</version>
<scope>system</scope>
<systemPath>${project.basedir}/lib/jlibs-nblr.jar</systemPath>
</dependency>
<dependency>
<groupId>jlibs</groupId>
<artifactId>jlibs-nbp</artifactId>
<version>1.0.0</version>
<scope>system</scope>
<systemPath>${project.basedir}/lib/jlibs-nbp.jar</systemPath>
</dependency>
<dependency>
<groupId>jlibs</groupId>
<artifactId>jlibs-swing</artifactId>
<version>1.0.0</version>
<scope>system</scope>
<systemPath>${project.basedir}/lib/jlibs-swing.jar</systemPath>
</dependency>
<dependency>
<groupId>jlibs</groupId>
<artifactId>jlibs-wadl</artifactId>
<version>1.0.0</version>
<scope>system</scope>
<systemPath>${project.basedir}/lib/jlibs-wadl.jar</systemPath>
</dependency>
<dependency>
<groupId>jlibs</groupId>
<artifactId>jlibs-xmldog</artifactId>
<version>1.0.0</version>
<scope>system</scope>
<systemPath>${project.basedir}/lib/jlibs-xmldog.jar</systemPath>
</dependency>
<dependency>
<groupId>TestNGFileGenerator</groupId>
<artifactId>TestNGFileGenerator</artifactId>
<version>1.0.0</version>
<scope>system</scope>
<systemPath>${project.basedir}/lib/TestNGFileGenerator.jar</systemPath>
</dependency>
<dependency>
<groupId>jlibs</groupId>
<artifactId>jlibs-core</artifactId>
<version>1.0.0</version>
<scope>system</scope>
<systemPath>${project.basedir}/lib/jlibs-core.jar</systemPath>
</dependency>
<dependency>
<groupId>SauceREST</groupId>
<artifactId>SauceREST</artifactId>
<version>1.0.0</version>
<scope>system</scope>
<systemPath>${project.basedir}/lib/SauceREST.jar</systemPath>
</dependency>
<dependency>
<groupId>com.google.inject</groupId>
<artifactId>guice</artifactId>
<version>3.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>2.33.0</version>
<type>jar</type>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.github.detro.ghostdriver</groupId>
<artifactId>phantomjsdriver</artifactId>
<version>1.0.3</version>
</dependency>
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>6.3</version>
<type>jar</type>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>velocity</groupId>
<artifactId>velocity</artifactId>
<version>1.4</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.uncommons</groupId>
<artifactId>reportng</artifactId>
<version>1.1.2</version>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
<version>3.8</version>
</dependency>
<dependency>
<groupId>org.jsoup</groupId>
<artifactId>jsoup</artifactId>
<version>1.7.2</version>
<type>jar</type>
<scope>compile</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.14</version>
<configuration>
<suiteXmlFiles>
<suiteXmlFile>testng.xml</suiteXmlFile>
</suiteXmlFiles>
<properties>
:
<property>
<name>org.uncommons.reportng.escape-output</name>
<value>false</value>
</property>
<property>
<name>usedefaultlisteners</name>
<value>false</value>
</property>
<property>
<name>listener</name>
<value>org.uncommons.reportng.HTMLReporter,org.uncommons.reportng.JUnitXMLReporter</value>
</property>
</properties>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-report-plugin</artifactId>
<version>2.14</version>
<configuration>
<showSuccess>false</showSuccess>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<!-- put your configurations here -->
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.3</version>
<executions>
<execution>
<phase>test</phase>
<configuration>
<tasks>
<zip destfile="${project.basedir}/target/surefire-reports/reports.zip"
basedir="${project.basedir}/target/surefire-reports/"
includes="**/*.html,**/*.xml,**/*.css"
/>
</tasks>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<repositories>
<repository>
<id>sauce-eh</id>
<name>sauce_quickstart</name>
<url>file://${project.basedir}/lib</url>
</repository>
<repository>
<id>java-net</id>
<url>http://download.java.net/maven/2</url>
</repository>
<repository>
<id>saucelabs-repository</id>
<url>https://repository-saucelabs.forge.cloudbees.com/release</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
</project>
I strongly recommend you to follow the default folder layout of Maven. That will make your life easier.
src/
├── main
│ ├── java
│ └── resources
└── test
├── java
└── resources
It is not recommended to tinker with the default folder structure of Maven projects. It seems that you have got rid of main/src and test altogether. I am not sure how, where or whether you are storing your test classes. Not having tests for your code can be costly in the long run.
Anyway, if you do decide to stick with your non-standard project structure, you will have to set the path to the source code as follows:
<project>
<build>
<sourceDirectory>src</sourceDirectory>
</build>
</project>
This will inform Maven that your source code is under src instead of src/main/java. If you also have resource files, such as XML or properties files, you will have to pass their locations to Maven as well using build/resources tag.