After one day effort and reading many topics about that, I have still the problem! I use Debian 8 jessie and used the below command to install maven:
apt-get install maven
and this is th result of this command: mvn -version
Apache Maven 3.0.5
Maven home: /usr/share/maven
Java version: 1.7.0_111, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-7-openjdk-amd64/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "3.16.0-4-amd64", arch: "amd64", family: "unix"
I also used this : git clone https://bitbucket.org/axelclk/info.bliki.wiki.git
to get the bliki. and I went to it's directory and tried this command:
mvn install -DskipTests
but i got this results:
root#localhost:/home/m/info.bliki.wiki# mvn install -DskipTests
[INFO] Scanning for projects...
[INFO] Inspecting build with total of 4 modules...
[INFO] Installing Nexus Staging features:
[INFO] ... total of 4 executions of maven-deploy-plugin replaced with nexus-staging-maven-plugin
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO]
[INFO] Bliki POM
[INFO] Bliki (Core)
[INFO] Bliki (PDF)
[INFO] Bliki (Addons)
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Bliki POM 3.1.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-javadoc-plugin:2.10.3:jar (attach-javadocs) # bliki ---
[INFO] Not executing Javadoc as the project is not a Java classpath-capable package
[INFO]
[INFO] --- maven-source-plugin:3.0.0:jar-no-fork (attach-sources) # bliki ---
[INFO]
[INFO] --- maven-install-plugin:2.4:install (default-install) # bliki ---
[INFO] Installing /home/m/info.bliki.wiki/pom.xml to /root/.m2/repository/info/bliki/wiki/bliki/3.1.1-SNAPSHOT/bliki-3.1.1-SNAPSHOT.pom
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Bliki (Core) 3.1.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- exec-maven-plugin:1.4.0:exec (git submodule update) # bliki-core ---
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) # bliki-core ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 25 resources
[INFO] Copying 9 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) # bliki-core ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 273 source files to /home/m/info.bliki.wiki/bliki-core/target/classes
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) # bliki-core ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 35 resources
[INFO] Copying 141 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) # bliki-core ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 95 source files to /home/m/info.bliki.wiki/bliki-core/target/test-classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] /home/m/info.bliki.wiki/bliki-core/src/test/java/info/bliki/api/query/ParseTest.java:[15,9] cannot access java.util.concurrent.CompletableFuture
class file for java.util.concurrent.CompletableFuture not found
[ERROR] /home/m/info.bliki.wiki/bliki-core/src/test/java/info/bliki/extensions/scribunto/engine/lua/LuaTestBase.java:[65,17] cannot access java.util.Optional
class file for java.util.Optional not found
[ERROR] /home/m/info.bliki.wiki/bliki-core/src/test/java/info/bliki/wiki/filter/HTTPUrlFilterTest.java:[12,9] cannot access java.util.OptionalDouble
class file for java.util.OptionalDouble not found
[ERROR] /home/m/info.bliki.wiki/bliki-core/src/test/java/info/bliki/wiki/filter/HTTPUrlFilterTest.java:[20,9] cannot access java.util.OptionalInt
class file for java.util.OptionalInt not found
[ERROR] /home/m/info.bliki.wiki/bliki-core/src/test/java/info/bliki/wiki/filter/HTTPUrlFilterTest.java:[25,9] cannot access java.util.OptionalLong
class file for java.util.OptionalLong not found
[ERROR] /home/m/info.bliki.wiki/bliki-core/src/test/java/info/bliki/wiki/filter/HTTPUrlFilterTest.java:[31,9] cannot access java.time.ZonedDateTime
class file for java.time.ZonedDateTime not found
[ERROR] /home/m/info.bliki.wiki/bliki-core/src/test/java/info/bliki/wiki/filter/HTTPUrlFilterTest.java:[36,9] cannot access java.time.LocalDateTime
class file for java.time.LocalDateTime not found
[ERROR] /home/m/info.bliki.wiki/bliki-core/src/test/java/info/bliki/wiki/filter/HTTPUrlFilterTest.java:[41,9] cannot access java.time.OffsetDateTime
class file for java.time.OffsetDateTime not found
[ERROR] /home/m/info.bliki.wiki/bliki-core/src/test/java/info/bliki/wiki/filter/HTTPUrlFilterTest.java:[46,9] cannot access java.time.OffsetTime
class file for java.time.OffsetTime not found
[ERROR] /home/m/info.bliki.wiki/bliki-core/src/test/java/info/bliki/wiki/filter/HTTPUrlFilterTest.java:[51,9] cannot access java.time.LocalTime
class file for java.time.LocalTime not found
[ERROR] /home/m/info.bliki.wiki/bliki-core/src/test/java/info/bliki/wiki/filter/HTTPUrlFilterTest.java:[56,9] cannot access java.time.LocalDate
class file for java.time.LocalDate not found
[ERROR] /home/m/info.bliki.wiki/bliki-core/src/test/java/info/bliki/wiki/filter/HTTPUrlFilterTest.java:[62,9] cannot access java.util.stream.Stream
class file for java.util.stream.Stream not found
[INFO] 12 errors
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Bliki POM ......................................... SUCCESS [3.093s]
[INFO] Bliki (Core) ...................................... FAILURE [14.456s]
[INFO] Bliki (PDF) ....................................... SKIPPED
[INFO] Bliki (Addons) .................................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 20.122s
[INFO] Finished at: Fri Sep 30 21:30:18 IRST 2016
[INFO] Final Memory: 25M/227M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:testCompile (default-testCompile) on project bliki-core: Compilation failure: Compilation failure:
[ERROR] /home/m/info.bliki.wiki/bliki-core/src/test/java/info/bliki/api/query/ParseTest.java:[15,9] cannot access java.util.concurrent.CompletableFuture
[ERROR] class file for java.util.concurrent.CompletableFuture not found
[ERROR] /home/m/info.bliki.wiki/bliki-core/src/test/java/info/bliki/extensions/scribunto/engine/lua/LuaTestBase.java:[65,17] cannot access java.util.Optional
[ERROR] class file for java.util.Optional not found
[ERROR] /home/m/info.bliki.wiki/bliki-core/src/test/java/info/bliki/wiki/filter/HTTPUrlFilterTest.java:[12,9] cannot access java.util.OptionalDouble
[ERROR] class file for java.util.OptionalDouble not found
[ERROR] /home/m/info.bliki.wiki/bliki-core/src/test/java/info/bliki/wiki/filter/HTTPUrlFilterTest.java:[20,9] cannot access java.util.OptionalInt
[ERROR] class file for java.util.OptionalInt not found
[ERROR] /home/m/info.bliki.wiki/bliki-core/src/test/java/info/bliki/wiki/filter/HTTPUrlFilterTest.java:[25,9] cannot access java.util.OptionalLong
[ERROR] class file for java.util.OptionalLong not found
[ERROR] /home/m/info.bliki.wiki/bliki-core/src/test/java/info/bliki/wiki/filter/HTTPUrlFilterTest.java:[31,9] cannot access java.time.ZonedDateTime
[ERROR] class file for java.time.ZonedDateTime not found
[ERROR] /home/m/info.bliki.wiki/bliki-core/src/test/java/info/bliki/wiki/filter/HTTPUrlFilterTest.java:[36,9] cannot access java.time.LocalDateTime
[ERROR] class file for java.time.LocalDateTime not found
[ERROR] /home/m/info.bliki.wiki/bliki-core/src/test/java/info/bliki/wiki/filter/HTTPUrlFilterTest.java:[41,9] cannot access java.time.OffsetDateTime
[ERROR] class file for java.time.OffsetDateTime not found
[ERROR] /home/m/info.bliki.wiki/bliki-core/src/test/java/info/bliki/wiki/filter/HTTPUrlFilterTest.java:[46,9] cannot access java.time.OffsetTime
[ERROR] class file for java.time.OffsetTime not found
[ERROR] /home/m/info.bliki.wiki/bliki-core/src/test/java/info/bliki/wiki/filter/HTTPUrlFilterTest.java:[51,9] cannot access java.time.LocalTime
[ERROR] class file for java.time.LocalTime not found
[ERROR] /home/m/info.bliki.wiki/bliki-core/src/test/java/info/bliki/wiki/filter/HTTPUrlFilterTest.java:[56,9] cannot access java.time.LocalDate
[ERROR] class file for java.time.LocalDate not found
[ERROR] /home/m/info.bliki.wiki/bliki-core/src/test/java/info/bliki/wiki/filter/HTTPUrlFilterTest.java:[62,9] cannot access java.util.stream.Stream
[ERROR] class file for java.util.stream.Stream not found
[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/MojoFailureException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <goals> -rf :bliki-core
I am newbie in Linux and don't know alot about it's commands and Errors! I also Added these lines to my pom.XML file but it had no sense!
<dependencies>
<dependency>
<groupId>info.bliki.wiki</groupId>
<artifactId>bliki-core</artifactId>
<version>3.1.0</version>
</dependency>
</dependencies>
<dependencies>
<dependency>
<groupId>info.bliki.wiki</groupId>
<artifactId>bliki-core</artifactId>
<version>3.1.1-SNAPSHOT</version>
</dependency>
</dependencies>
<repositories>
<repository>
<id>sonatype-snapshots</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
</repository>
</repositories>
This is my pom.XML file contents:
<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>info.bliki.wiki</groupId>
<artifactId>bliki</artifactId>
<packaging>pom</packaging>
<name>Bliki POM</name>
<version>3.1.1-SNAPSHOT</version>
<description>
The Bliki API is a Java-based Wiki to HTML renderer with MediaWiki syntax support.
</description>
<url>https://bitbucket.org/axelclk/info.bliki.wiki</url>
<organization>
<name>Java Wikipedia API (Bliki engine)</name>
<url>https://bitbucket.org/axelclk/info.bliki.wiki</url>
</organization>
<developers>
<developer>
<id>axelclk</id>
<name>Axel Kramer</name>
</developer>
<developer>
<id>jberkel</id>
<name>Jan Berkel</name>
</developer>
</developers>
<scm>
<connection>scm:git:https://bitbucket.org/axelclk/info.bliki.wiki.git</connection>
<developerConnection>scm:git:ssh://git#bitbucket.org/axelclk/info.bliki.wiki.git</developerConnection>
<tag>master</tag>
<url>https://bitbucket.org/axelclk/info.bliki.wiki/src</url>
</scm>
<issueManagement>
<system>Bitbucket</system>
<url>https://bitbucket.org/axelclk/info.bliki.wiki/issues</url>
</issueManagement>
<ciManagement>
<url>https://drone.io/bitbucket.org/axelclk/info.bliki.wiki</url>
</ciManagement>
<licenses>
<license>
<name>Eclipse Public License 1.0</name>
<url>http://www.opensource.org/licenses/eclipse-1.0.php</url>
<distribution>repo</distribution>
</license>
<license>
<name>GNU Lesser General Public License - v 2.1 or later</name>
<url>http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html</url>
<distribution>repo</distribution>
</license>
</licenses>
<modules>
<module>bliki-core</module>
<module>bliki-pdf</module>
<module>bliki-addons</module>
</modules>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>info.bliki.wiki</groupId>
<artifactId>bliki-core</artifactId>
<version>3.1.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>info.bliki.wiki</groupId>
<artifactId>bliki-pdf</artifactId>
<version>3.1.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>info.bliki.wiki</groupId>
<artifactId>bliki-addons</artifactId>
<version>3.1.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.3.6</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.4</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-compress</artifactId>
<version>1.8.1</version>
</dependency>
<dependency>
<groupId>org.luaj</groupId>
<artifactId>luaj-jse</artifactId>
<version>3.0.1</version>
</dependency>
<dependency>
<groupId>org.apache.derby</groupId>
<artifactId>derby</artifactId>
<version>10.12.1.1</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.7.21</version>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>1.1.7</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.google.code.findbugs</groupId>
<artifactId>jsr305</artifactId>
<version>3.0.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
<version>3.3.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-all</artifactId>
<version>1.10.17</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>software.betamax</groupId>
<artifactId>betamax-junit</artifactId>
<version>2.0.0</version>
<scope>test</scope>
</dependency>
</dependencies>
</dependencyManagement>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>2.6</version>
<configuration>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
<encoding>UTF-8</encoding>
<compilerArgs>
<arg>-Werror</arg>
<arg>-Xlint:all</arg>
</compilerArgs>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>2.5.3</version>
<configuration>
<tagNameFormat>#{project.version}</tagNameFormat>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.10.3</version>
<configuration>
<additionalparam>-Xdoclint:none</additionalparam>
</configuration>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>3.0.0</version>
<executions>
<execution>
<id>attach-sources</id>
<phase>verify</phase>
<goals>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-scm-plugin</artifactId>
<version>1.9.4</version>
<configuration>
<connectionType>developerConnection</connectionType>
</configuration>
</plugin>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.6.6</version>
<extensions>true</extensions>
<configuration>
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
<serverId>sonatype-oss-staging</serverId>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.18.1</version>
<configuration>
<argLine>-Dio.netty.leakDetectionLevel=simple -Dfile.encoding=UTF-8</argLine>
<!--<excludedGroups>info.bliki.annotations.IntegrationTest</excludedGroups>-->
</configuration>
</plugin>
</plugins>
</build>
<distributionManagement>
<repository>
<id>sonatype-oss-staging</id>
<url>https://oss.sonatype.org/content/repositories/staging</url>
</repository>
<snapshotRepository>
<id>sonatype-oss-snapshots</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
<uniqueVersion>false</uniqueVersion>
</snapshotRepository>
</distributionManagement>
<profiles>
<profile>
<id>release</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>1.6</version>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
<repositories>
<repository>
<id>sonatype</id>
<url>https://oss.sonatype.org/content/groups/public/</url>
</repository>
</repositories>
</project>
<dependencies>
<dependency>
<groupId>info.bliki.wiki</groupId>
<artifactId>bliki-core</artifactId>
<version>3.1.0</version>
</dependency>
</dependencies>
<dependencies>
<dependency>
<groupId>info.bliki.wiki</groupId>
<artifactId>bliki-core</artifactId>
<version>3.1.1-SNAPSHOT</version>
</dependency>
</dependencies>
<repositories>
<repository>
<id>sonatype-snapshots</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
</repository>
</repositories>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.4</version>
</plugin>
</plugins>
</pluginManagement>
</build>
You are using Java version 1.7.
java.util.concurrent.CompletableFuture, java.util.Optional, java.util.OptionalDouble, java.time.ZonedDateTime, etc are all new features introduced in Java 1.8. They are not present in Java 1.7.
To get rid of these errors, update your Java version to 1.8.
Related
I am trying to configure maven project with TestNG to get Browserstack Automate reports inside Jenkins builds following official manual https://www.browserstack.com/automate/jenkins
The full log is here https://codeshare.io/2KgwqX
But I am getting error:
[ERROR] Failed to execute goal com.browserstack:automate-maven-plugin:0.7.2-SNAPSHOT:test-compile (default) on project xxx: Execution default of goal com.browserstack:automate-maven-plugin:0.7.2-SNAPSHOT:test-compile failed: multiple points -> [Help 1]
My pom file 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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.xxx</groupId>
<artifactId>xxx</artifactId>
<version>4.0.0</version>
<packaging>jar</packaging>
<properties>
<jdk.source.version>1.8.0_131</jdk.source.version>
<jdk.target.version>1.8.0_131</jdk.target.version>
</properties>
<repositories>
<repository>
<id>sonatype-nexus-snapshots</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>sonatype-nexus-snapshots</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
</pluginRepository>
</pluginRepositories>
<dependencies>
<dependency>
<groupId>com.browserstack</groupId>
<artifactId>automate-testassist</artifactId>
<version>0.7.2-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>6.11</version>
</dependency>
<dependency>
<groupId>javax.mail</groupId>
<artifactId>mail</artifactId>
<version>1.5.0-b01</version>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>3.4.0</version>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.8.1</version>
</dependency>
<dependency>
<groupId>com.dev9</groupId>
<artifactId>webdriver-utils</artifactId>
<version>1.6</version>
</dependency>
<dependency>
<groupId>com.codeborne</groupId>
<artifactId>selenide</artifactId>
<version>4.5.1</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.7.22</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>1.7.22</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
<version>2.8.2</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>2.8.2</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.9.0.pr4</version>
</dependency>
</dependencies>
<build>
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>2.7</version>
<configuration>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.18.1</version>
<configuration>
<suiteXmlFiles>
<suiteXmlFile>${suitexml.file}</suiteXmlFile>
</suiteXmlFiles>
<systemPropertyVariables>
<profileId>${profileId}</profileId>
<config>${config}</config>
</systemPropertyVariables>
</configuration>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.3</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<groupId>com.browserstack</groupId>
<artifactId>automate-maven-plugin</artifactId>
<version>0.7.2-SNAPSHOT</version>
<configuration>
<source>${jdk.source.version}</source>
<target>${jdk.target.version}</target>
<complianceLevel>${jdk.source.version}</complianceLevel>
</configuration>
<executions>
<execution>
<goals>
<goal>test-compile</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<!-- profiles -->
<profiles>
<!--profile>
<id>allow-snapshots</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<repositories>
<repository>
<id>snapshots-repo</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
</profile-->
<profile>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<id>local</id>
<properties>
<profileId>local</profileId>
<suitexml.file>src/test/resources/testng.local.xml</suitexml.file>
<dataCollector>s16</dataCollector>
<scriptFile>xxx</scriptFile>
<pjID>xxx</pjID>
<environment></environment>
<config>local.conf.json</config>
</properties>
</profile>
<profile>
<id>dev</id>
<properties>
<profileId>dev</profileId>
<dataCollector>s16</dataCollector>
<scriptFile>xxx</scriptFile>
<pjID>xxx</pjID>
<suitexml.file>src/test/resources/testng.xml</suitexml.file>
<environment></environment>
<config>parallel.conf.json</config>
</properties>
</profile>
<profile>
<id>staging</id>
<properties>
<profileId>staging</profileId>
<activeByDefault>true</activeByDefault>
<dataCollector>s16</dataCollector>
<scriptFile>xxx</scriptFile>
<pjID>xxx</pjID>
<suitexml.file>src/test/resources/testng.xml</suitexml.file>
<environment></environment>
<config>parallel.conf.json</config>
</properties>
</profile>
<profile>
<id>live</id>
<properties>
<profileId>live</profileId>
<dataCollector>s16</dataCollector>
<scriptFile>xxx</scriptFile>
<pjID>xxx</pjID>
<suitexml.file>src/test/resources/testng.xml</suitexml.file>
<environment></environment>
<config>parallel.conf.json</config>
</properties>
</profile>
</profiles>
The full output
/usr/lib/jvm/java-8-openjdk-amd64/bin/java -Dmaven.multiModuleProjectDirectory=/home/xxx/repos/selenium-tests/xxx-tests -Dmaven.home=/home/xxx/.local/share/JetBrains/Toolbox/apps/xxx/ch-0/172.3317.53/plugins/maven/lib/maven3 -Dclassworlds.conf=/home/xxx/.local/share/JetBrains/Toolbox/apps/IDEA-U/ch-0/172.3317.53/plugins/maven/lib/maven3/bin/m2.conf -javaagent:/home/xxx/.local/share/JetBrains/Toolbox/apps/IDEA-U/ch-0/172.3317.53/lib/idea_rt.jar=34649:/home/xxx/.local/share/JetBrains/Toolbox/apps/IDEA-U/ch-0/172.3317.53/bin -Dfile.encoding=UTF-8 -classpath /home/xxx/.local/share/JetBrains/Toolbox/apps/IDEA-U/ch-0/172.3317.53/plugins/maven/lib/maven3/boot/plexus-classworlds-2.5.2.jar org.codehaus.classworlds.Launcher -Didea.version=2017.2 clean test -Plocal
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building xxx 4.0.0
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) # xxx ---
[INFO] Deleting /home/xxx/repos/selenium-tests/xxx-tests/target
[INFO]
[INFO] --- maven-resources-plugin:2.7:resources (default-resources) # xxx ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 2 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.3:compile (default-compile) # xx ---
[INFO] Changes detected - recompiling the module!
[WARNING] File encoding has not been set, using platform encoding UTF-8, i.e. build is platform dependent!
[INFO] Compiling 9 source files to /home/xxx/repos/selenium-tests/xxx-tests/target/classes
[INFO] /home/xxx/repos/selenium-tests/xxx-tests/src/main/java/webdriver/WebDriverFactory.java: /home/xxx/repos/selenium-tests/xxx-tests/src/main/java/webdriver/WebDriverFactory.java uses unchecked or unsafe operations.
[INFO] /home/xxx/repos/selenium-tests/xxx-tests/src/main/java/webdriver/WebDriverFactory.java: Recompile with -Xlint:unchecked for details.
[INFO]
[INFO] --- maven-resources-plugin:2.7:testResources (default-testResources) # xxx ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 4 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.3:testCompile (default-testCompile) # xxx ---
[INFO] Changes detected - recompiling the module!
[WARNING] File encoding has not been set, using platform encoding UTF-8, i.e. build is platform dependent!
[INFO] Compiling 13 source files to /home/xxx/repos/selenium-tests/xxx-tests/target/test-classes
[INFO] /home/xxx/repos/selenium-tests/xxx-tests/src/test/java/com/xxx/TestNgTestBase.java: Some input files use unchecked or unsafe operations.
[INFO] /home/xxx/repos/selenium-tests/xxx-tests/src/test/java/com/xxx/TestNgTestBase.java: Recompile with -Xlint:unchecked for details.
[INFO]
[INFO] --- automate-maven-plugin:0.7.2-SNAPSHOT:test-compile (default) # xxx ---
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.969 s
[INFO] Finished at: 2017-07-14T16:47:29+02:00
[INFO] Final Memory: 30M/471M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.browserstack:automate-maven-plugin:0.7.2-SNAPSHOT:test-compile (default) on project xxx: Execution default of goal com.browserstack:automate-maven-plugin:0.7.2-SNAPSHOT:test-compile failed: multiple points -> [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/PluginExecutionException
Process finished with exit code 1
The problem was just in java version as a string, I have changed to
<properties>
<jdk.source.version>1.8</jdk.source.version>
<jdk.target.version>1.8</jdk.target.version>
</properties>
I am trying to use jetty plugin for a grails project. I am currently using jdk 1.6.0_45. It seems that the jre version used by jdk 1.6 is a little old one for jetty plugin and it generates the following error.
Fatal error during compilation org.apache.tools.ant.BuildException: java.lang.UnsupportedClassVersionError: org/eclipse/jetty/plus/webapp/EnvConfiguration : Unsupported major.minor version 51.0 (Use --stacktrace to see the full trace)
To resolve this error I have added a code in the pom.xml to use java source 1.7. The code is something like this.
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
But still I continue to get the same error. Can any body please help me out.
I am posting my entire pom.xml and the error that I am getting
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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.mycompany</groupId>
<artifactId>grails-mongo-demo</artifactId>
<packaging>grails-app</packaging>
<version>0.1</version>
<name>grails-mongo-demo</name>
<description>grails-mongo-demo</description>
<properties>
<grails.version>2.4.2</grails.version>
<h2.version>1.3.170</h2.version>
</properties>
<dependencies>
<dependency>
<groupId>org.grails</groupId>
<artifactId>grails-dependencies</artifactId>
<version>${grails.version}</version>
<type>pom</type>
</dependency>
<dependency>
<groupId>org.grails</groupId>
<artifactId>grails-test</artifactId>
<version>${grails.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.grails</groupId>
<artifactId>grails-plugin-testing</artifactId>
<version>${grails.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.spockframework</groupId>
<artifactId>spock-core</artifactId>
<version>0.7-groovy-2.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<version>${h2.version}</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.grails</groupId>
<artifactId>grails-datastore-test-support</artifactId>
<version>1.0-grails-2.4</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.grails.plugins</groupId>
<artifactId>scaffolding</artifactId>
<version>2.1.2</version>
<scope>compile</scope>
<type>zip</type>
</dependency>
<dependency>
<groupId>org.grails.plugins</groupId>
<artifactId>cache</artifactId>
<version>1.1.7</version>
<scope>compile</scope>
<type>zip</type>
</dependency>
<dependency>
<groupId>org.grails.plugins</groupId>
<artifactId>asset-pipeline</artifactId>
<version>1.8.11</version>
<scope>compile</scope>
<type>zip</type>
</dependency>
<dependency>
<groupId>org.grails.plugins</groupId>
<artifactId>jquery</artifactId>
<version>1.11.1</version>
<scope>runtime</scope>
<type>zip</type>
</dependency>
<dependency>
<groupId>org.grails.plugins</groupId>
<artifactId>webxml</artifactId>
<version>1.4.1</version>
<type>zip</type>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.grails.plugins</groupId>
<artifactId>mongodb</artifactId>
<version>3.0.2</version>
<scope>compile</scope>
<type>zip</type>
</dependency>
<dependency>
<groupId>org.grails.plugins</groupId>
<artifactId>jetty</artifactId>
<version>3.0.0</version>
<type>zip</type>
</dependency>
</dependencies>
<build>
<pluginManagement />
<plugins>
<!-- Disables the Maven surefire plugin for Grails applications, as we have our own test runner -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.17</version>
<configuration>
<skip>true</skip>
</configuration>
<executions>
<execution>
<id>surefire-it</id>
<phase>integration-test</phase>
<goals>
<goal>test</goal>
</goals>
<configuration>
<skip>false</skip>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-clean-plugin</artifactId>
<version>2.4.1</version>
<configuration>
<filesets>
<fileset>
<directory>plugins</directory>
<includes>
<include>**/*</include>
</includes>
<followSymlinks>false</followSymlinks>
</fileset>
</filesets>
</configuration>
</plugin>
<plugin>
<groupId>org.grails</groupId>
<artifactId>grails-maven-plugin</artifactId>
<version>2.4.3</version>
<configuration>
<grailsVersion>${grails.version}</grailsVersion>
</configuration>
<extensions>true</extensions>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
</plugins>
</build>
<repositories>
<repository>
<id>grails</id>
<name>grails</name>
<url>http://repo.grails.org/grails/core</url>
</repository>
<repository>
<id>grails-plugins</id>
<name>grails-plugins</name>
<url>http://repo.grails.org/grails/plugins</url>
</repository>
</repositories>
<profiles>
<profile>
<id>tools</id>
<activation>
<property>
<name>java.vendor</name>
<value>Sun Microsystems Inc.</value>
</property>
</activation>
<dependencies>
<dependency>
<groupId>com.sun</groupId>
<artifactId>tools</artifactId>
<version>${java.version}</version>
<scope>system</scope>
<systemPath>${java.home}/../lib/tools.jar</systemPath>
</dependency>
</dependencies>
</profile>
</profiles>
</project>
Error
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building grails-mongo-demo 0.1
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) # grails-mongo-demo ---
[INFO] Deleting /mnt/data/Work/Tutorials/Practice/grails/grails-mongo-demo/target
[INFO] Deleting /mnt/data/Work/Tutorials/Practice/grails/grails-mongo-demo/plugins (includes = [**/*], excludes = [])
[INFO]
[INFO] --- grails-maven-plugin:2.4.3:clean (default-clean) # grails-mongo-demo ---
4 Sep, 2014 6:28:00 PM org.codehaus.groovy.runtime.m12n.MetaInfExtensionModule newModule
WARNING: Module [groovy-all] - Unable to load extension class [org.codehaus.groovy.runtime.NioGroovyMethods]
4 Sep, 2014 6:28:00 PM org.codehaus.groovy.runtime.m12n.MetaInfExtensionModule newModule
WARNING: Module [groovy-all] - Unable to load extension class [org.codehaus.groovy.runtime.NioGroovyMethods]
|Loading Grails 2.4.2
|Configuring classpath
|Running pre-compiled script
.
|Environment set to development
....................
|Application cleaned.
[INFO]
[INFO] --- grails-maven-plugin:2.4.3:validate (default-validate) # grails-mongo-demo ---
[INFO]
[INFO] --- grails-maven-plugin:2.4.3:init (default-init) # grails-mongo-demo ---
[INFO]
[INFO] --- grails-maven-plugin:2.4.3:config-directories (default-config-directories) # grails-mongo-demo ---
[INFO]
[INFO] --- grails-maven-plugin:2.4.3:maven-compile (default-maven-compile) # grails-mongo-demo ---
4 Sep, 2014 6:28:32 PM org.codehaus.groovy.runtime.m12n.MetaInfExtensionModule newModule
WARNING: Module [groovy-all] - Unable to load extension class [org.codehaus.groovy.runtime.NioGroovyMethods]
4 Sep, 2014 6:28:32 PM org.codehaus.groovy.runtime.m12n.MetaInfExtensionModule newModule
WARNING: Module [groovy-all] - Unable to load extension class [org.codehaus.groovy.runtime.NioGroovyMethods]
|Loading Grails 2.4.2
|Configuring classpath
|Running pre-compiled script
.
|Environment set to development
......
|Installing zip jetty-3.0.0.zip...
...
|Installed plugin jetty-3.0.0
.............
|Installing zip webxml-1.4.1.zip...
...
|Installed plugin webxml-1.4.1
.............
|Installing zip asset-pipeline-1.8.11.zip...
...
|Installed plugin asset-pipeline-1.8.11
..................
|Installing zip cache-1.1.7.zip...
...
|Installed plugin cache-1.1.7
..............
|Installing zip scaffolding-2.1.2.zip...
...
|Installed plugin scaffolding-2.1.2
..............
|Installing zip jquery-1.11.1.zip...
...
|Installed plugin jquery-1.11.1
..............
|Installing zip mongodb-3.0.2.zip...
...
|Installed plugin mongodb-3.0.2
...................
|Compiling 87 source files
.Error
|
Fatal error during compilation org.apache.tools.ant.BuildException: java.lang.UnsupportedClassVersionError: org/eclipse/jetty/plus/webapp/EnvConfiguration : Unsupported major.minor version 51.0 (Use --stacktrace to see the full trace)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 47.500 s
[INFO] Finished at: 2014-09-04T18:28:42+05:30
[INFO] Final Memory: 10M/102M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.grails:grails-maven-plugin:2.4.3:maven-compile (default-maven-compile) on project grails-mongo-demo: Forked Grails VM exited with 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
I'm new to maven and can't understand how to get some examples from a book I have (O'Reilly's "Enterprise JavaBeans 3.1") running. It says to use the command "mvn clean install" to run the examples, but things don't work for me. When I go the folder where the pom.xml is, I get the following feedback:
$ mvn clean install[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building JBoss EJB 3.x Examples - Chapter 4: Calculator Service EJBs 1.1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) # jboss-ejb3-examples-ch04-firstejb ---
[INFO] Deleting /Users/jonathanpomper/Desktop/oreilly-ejb-6thedition-book-examples-master/ch04-firstejb/target
[INFO]
[INFO] --- maven-enforcer-plugin:1.0-beta-1:enforce (enforce-maven-environment) # jboss-ejb3-examples-ch04-firstejb ---
[INFO]
[INFO] --- maven-resources-plugin:2.4.3:resources (default-resources) # jboss-ejb3-examples-ch04-firstejb ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory /Users/jonathanpomper/Desktop/oreilly-ejb-6thedition-book-examples-master/ch04-firstejb/src/main/resources
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) # jboss-ejb3-examples-ch04-firstejb ---
[INFO] Compiling 11 source files to /Users/jonathanpomper/Desktop/oreilly-ejb-6thedition-book-examples-master/ch04-firstejb/target/classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] Failure executing javac, but could not parse the error:
/bin/sh: /bin/javac: No such file or directory
[INFO] 1 error
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 7.530s
[INFO] Finished at: Mon Mar 10 18:17:56 EDT 2014
[INFO] Final Memory: 27M/218M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (default-compile) on project jboss-ejb3-examples-ch04-firstejb: Compilation failure
[ERROR] Failure executing javac, but could not parse the error:
[ERROR] /bin/sh: /bin/javac: No such file or directory
[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/MojoFailureException
I have tried following the help link it provides, but I am stuck…any help would be awesome! Thanks in advance!
EDIT: Here is the POM.xml:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<!-- Parent Information -->
<parent>
<groupId>org.jboss.ejb3.examples</groupId>
<artifactId>jboss-ejb3-examples-build</artifactId>
<version>1.1.0-SNAPSHOT</version>
<relativePath>../build/pom.xml</relativePath>
</parent>
<!-- Model Version -->
<modelVersion>4.0.0</modelVersion>
<!-- Artifact Information -->
<artifactId>jboss-ejb3-examples-ch04-firstejb</artifactId>
<name>JBoss EJB 3.x Examples - Chapter 4: Calculator Service EJBs</name>
<description>Example to accompany O'Reilly "Enterprise Java Beans 6th Edition" Chapter 4</description>
<dependency>
<groupId>org.jboss.as</groupId>
<artifactId>jboss-as-spec-api</artifactId>
<type>pom</type>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
</dependency>
<!-- Arquillian Test Harness -->
<dependency>
<groupId>org.jboss.as</groupId>
<artifactId>jboss-as-arquillian-container-managed</artifactId>
</dependency>
<dependency>
<groupId>org.jboss.arquillian.junit</groupId>
<artifactId>arquillian-junit-container</artifactId>
</dependency>
<dependency>
<groupId>org.jboss.as</groupId>
<artifactId>jboss-as-dist</artifactId>
<type>zip</type>
<scope>test</scope>
</dependency>
<!--
HACK:
Currently the ARQ Managed Container is not exporting
all deps needed to run, at a minimum, jboss-threads
AS7-1557
-->
<dependency>
<groupId>org.jboss.as</groupId>
<artifactId>jboss-as-build</artifactId>
<type>pom</type>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>javax.faces</groupId>
<artifactId>jsf-impl</artifactId>
</exclusion>
<exclusion>
<groupId>xalan</groupId>
<artifactId>serializer</artifactId>
</exclusion>
</exclusions>
</dependency>
<profile>
<!-- Declare the "Integration Test" Profile -->
<id>it</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<build>
<plugins>
<!-- Get AS and put into "target" -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>unpack</id>
<phase>pre-integration-test</phase> <!-- So run before testing -->
<goals>
<goal>unpack</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>org.jboss.as</groupId>
<artifactId>jboss-as-dist</artifactId>
<version>${version.org.jboss.as.7}</version>
<type>zip</type>
<overWrite>false</overWrite>
<outputDirectory>${project.build.directory}</outputDirectory>
</artifactItem>
</artifactItems>
</configuration>
</execution>
</executions>
</plugin>
<!-- Surefire -->
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<executions>
<execution>
<id>integration-test</id>
<phase>integration-test</phase>
<goals>
<goal>test</goal>
</goals>
<configuration>
<redirectTestOutputToFile>true</redirectTestOutputToFile>
<trimStackTrace>false</trimStackTrace>
<printSummary>true</printSummary>
<includes>
<include>**/*IntegrationTestCase.java</include>
</includes>
<forkMode>once</forkMode>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
The Java_Home was not set/set improperly. Working now!
Hi I have a problem with maven. I want to run my app but when I am typing "clean install jetty:run" I am getting this error:
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building frontend 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[WARNING] The POM for laud.b2b:logic:jar:0.0.1-SNAPSHOT is missing, no dependency information available
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.585s
[INFO] Finished at: Sat Jul 13 20:17:27 CEST 2013
[INFO] Final Memory: 6M/15M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project Frontend: Could not resolve dependencies for project laud.b2b:Frontend:war:0.0.1-SNAPSHOT: Failure to find laud.b2b:logic:jar:0.0.1-SNAPSHOT in http://maven.vaadin.com/vaadin-addons was cached in the local repository, resolution will not be reattempted until the update interval of vaadin-addons has elapsed or updates are forced -> [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/DependencyResolutionException
"logic" is a second project in my workspace.
I don`t know what to do to resolve this error. I've searched whole internet and I can do nothing with it...
My pom.xml from Frontend project:
<?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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<artifactId>laud.b2b-root</artifactId>
<groupId>laud.b2b</groupId>
<version>0.0.1-SNAPSHOT</version>
</parent>
<groupId>laud.b2b</groupId>
<artifactId>Frontend</artifactId>
<packaging>war</packaging>
<version>0.0.1-SNAPSHOT</version>
<name>frontend</name>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<vaadin.version>7.1.0</vaadin.version>
<vaadin.plugin.version>${vaadin.version}</vaadin.plugin.version>
<org.springframework.version>3.0.5.RELEASE</org.springframework.version>
</properties>
<repositories>
<repository>
<id>vaadin-addons</id>
<url>http://maven.vaadin.com/vaadin-addons</url>
</repository>
<repository>
<id>vaadin-snapshots</id>
<url>http://oss.sonatype.org/content/repositories/vaadin-snapshots/</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>vaadin-snapshots</id>
<url>http://oss.sonatype.org/content/repositories/vaadin-snapshots/</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
</snapshots>
</pluginRepository>
</pluginRepositories>
<dependencies>
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-server</artifactId>
<version>${vaadin.version}</version>
</dependency>
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-client-compiled</artifactId>
<version>${vaadin.version}</version>
</dependency>
<!-- Needed when using the widgetset optimizer (custom ConnectorBundleLoaderFactory).
For widgetset compilation, vaadin-client-compiler is automatically added
on the compilation classpath by vaadin-maven-plugin so normally there is
no need for an explicit dependency. -->
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-client-compiler</artifactId>
<version>${vaadin.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-client</artifactId>
<version>${vaadin.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-push</artifactId>
<version>${vaadin.version}</version>
</dependency>
<dependency>
<groupId>laud.b2b</groupId>
<artifactId>logic</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-themes</artifactId>
<version>${vaadin.version}</version>
</dependency>
<dependency>
<groupId>ru.xpoft.vaadin</groupId>
<artifactId>spring-vaadin-integration</artifactId>
<version>2.0.1</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.0.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId>
<version>${org.springframework.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
<version>${org.springframework.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-core</artifactId>
<version>${org.springframework.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-config</artifactId>
<version>${org.springframework.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-web</artifactId>
<version>${org.springframework.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>${org.springframework.version}</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>1.6.6</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.6.6</version>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.16</version>
</dependency>
</dependencies>
<profiles>
<profile>
<id>compile-widgetset</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
<!-- As we are doing "inplace" GWT compilation, ensure the widgetset -->
<!-- directory is cleaned properly -->
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<version>2.4.1</version>
<configuration>
<filesets>
<fileset>
<directory>src/main/webapp/VAADIN/widgetsets</directory>
</fileset>
</filesets>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.2</version>
<configuration>
<failOnMissingWebXml>false</failOnMissingWebXml>
</configuration>
</plugin>
<plugin>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-maven-plugin</artifactId>
<version>${vaadin.plugin.version}</version>
<configuration>
<extraJvmArgs>-Xmx512M -Xss1024k</extraJvmArgs>
<!-- <runTarget>mobilemail</runTarget> -->
<!-- We are doing "inplace" but into subdir VAADIN/widgetsets. This
way compatible with Vaadin eclipse plugin. -->
<webappDirectory>${basedir}/src/main/webapp/VAADIN/widgetsets</webappDirectory>
<hostedWebapp>${basedir}/src/main/webapp/VAADIN/widgetsets</hostedWebapp>
<noServer>true</noServer>
<!-- Remove draftCompile when project is ready -->
<draftCompile>false</draftCompile>
<compileReport>true</compileReport>
<style>OBF</style>
<strict>true</strict>
<runTarget>http://localhost:8080/</runTarget>
</configuration>
<executions>
<execution>
<configuration></configuration>
<goals>
<goal>clean</goal>
<goal>resources</goal>
<goal>update-theme</goal>
<goal>update-widgetset</goal>
<goal>compile-theme</goal>
<goal>compile</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
</plugins>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<configuration>
<scanIntervalSeconds>3</scanIntervalSeconds>
</configuration>
</plugin>
<!--This plugin's configuration is used to store Eclipse m2e settings
only. It has no influence on the Maven build itself. -->
<plugin>
<groupId>org.eclipse.m2e</groupId>
<artifactId>lifecycle-mapping</artifactId>
<version>1.0.0</version>
<configuration>
<lifecycleMappingMetadata>
<pluginExecutions>
<pluginExecution>
<pluginExecutionFilter>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-maven-plugin</artifactId>
<versionRange>[7.1.0,)</versionRange>
<goals>
<goal>resources</goal>
<goal>update-widgetset</goal>
<goal>compile</goal>
</goals>
</pluginExecutionFilter>
<action>
<ignore></ignore>
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
</project>
(AD2)
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building frontend 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) # Frontend ---
[INFO] Deleting C:\Users\mateu\git\LPMavenProblem\laud\laud.b2b-root\Frontend\target
[INFO]
[INFO] --- maven-resources-plugin:2.5:resources (default-resources) # Frontend ---
[debug] execute contextualize
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory C:\Users\mateu\git\LPMavenProblem\laud\laud.b2b-root\Frontend\src\main\resources
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) # Frontend ---
[INFO] Compiling 2 source files to C:\Users\mateu\git\LPMavenProblem\laud\laud.b2b-root\Frontend\target\classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] Unable to locate the Javac Compiler in:
C:\Program Files (x86)\Java\jre7\..\lib\tools.jar
Please ensure you are using JDK 1.4 or above and
not a JRE (the com.sun.tools.javac.Main class is required).
In most cases you can change the location of your Java
installation by setting the JAVA_HOME environment variable.
[INFO] 1 error
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.744s
[INFO] Finished at: Sat Jul 13 21:13:52 CEST 2013
[INFO] Final Memory: 8M/19M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (default-compile) on project Frontend: Compilation failure
[ERROR] Unable to locate the Javac Compiler in:
[ERROR] C:\Program Files (x86)\Java\jre7\..\lib\tools.jar
[ERROR] Please ensure you are using JDK 1.4 or above and
[ERROR] not a JRE (the com.sun.tools.javac.Main class is required).
[ERROR] In most cases you can change the location of your Java
[ERROR] installation by setting the JAVA_HOME environment variable.
[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/MojoFailureException
Most probably you haven't installed all the dependencies you need to build the frontend artifact. If frontend depends on laud.b2b.logic, you must first install this artifact to your local repository before you can build artifacts that depend on it, i.e.:
Go to the logic source tree and execute mvn install
Then go to the frontend and try the build process again
Maybe it's a good idea to create a root pom.xml for all sub-projects and specify them as modules, then start the build process from the new root project. Maven will compile and install them in the correct order.
References:
Multi-module projects in Maven
I am a complete beginner with Maven. I've been following the book Maven By Example. In the section 6.13 the author demonstrates making a JAR with the dependencies included via the command
mvn install assembly assembly
I followed the example in chapter 6, except I skipped the parts with unit testing. I went back through them to make sure I didn't skip a step. However when I tried the above command I got this error output:
[INFO]
[INFO] --- maven-jar-plugin:2.3.2:jar (default-jar) # simple-weather ---
[INFO]
[INFO] <<< maven-assembly-plugin:2.2-beta-5:assembly (default-cli) # simple-weather <<<
[INFO]
[INFO] --- maven-assembly-plugin:2.2-beta-5:assembly (default-cli) # simple-weather ---
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.094s
[INFO] Finished at: Wed Mar 21 15:53:03 EDT 2012
[INFO] Final Memory: 5M/10M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-assembly-plugin:2.2-beta-5:assembly (default-cli) on project simple-weather: Error readi
ng assemblies: No assembly descriptors found. -> [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
C:\home\Projects\simple-weather>
The problem is with the jar-with-dependencies descriptor in the plugins section. I googled around a bit, but didn't find a different way to do it from the book. So, I would be interested to know where I am going wrong.
Here is my pom.xml:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.sonatype.mavenbook.custom</groupId>
<artifactId>simple-weather</artifactId>
<version>1.0</version>
<packaging>jar</packaging>
<name>simple-weather</name>
<url>http://www.sonatype.com</url>
<licenses>
<license>
<name>Apache 2</name>
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
<distribution>repo</distribution>
<comments>A business-friendly OSS license</comments>
</license>
</licenses>
<organization>
<name>Sonatype</name>
<url>http://www.sonatype.com</url>
</organization>
<developers>
<developer>
<id>jason</id>
<name>Jason Van Zyl</name>
<email>jason#maven.org</email>
<url>http://www.sonatype.com</url>
<organization>Sonatype</organization>
<organizationUrl>http://www.sonatype.com</organizationUrl>
<roles>
<role>developer</role>
</roles>
<timezone>-6</timezone>
</developer>
</developers>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.14</version>
</dependency>
<dependency>
<groupId>dom4j</groupId>
<artifactId>dom4j</artifactId>
<version>1.6.1</version>
</dependency>
<dependency>
<groupId>jaxen</groupId>
<artifactId>jaxen</artifactId>
<version>1.1.1</version>
</dependency>
<dependency>
<groupId>velocity</groupId>
<artifactId>velocity</artifactId>
<version>1.5</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.5</source>
<target>1.5</target>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
</configuration>
</plugin>
</plugins>
</build>
</project>
Thanks much in advance for any clues.
The problem is you have your descriptor refs configured for the compile plugin instead of the assembly plugin.
Add this to your /build/plugins section
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.3</version>
<configuration>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
</configuration>
</plugin>
and remove the below from your compiler plugin config as it is not doing anything.
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>