I'm trying to run a GitHub repo that uses Java and Maven, but I ran into an error while using mvn clean install. I would ask this question in the GitHub thread (linked below), but the author hasn't responded to previous issues. When I run the command I get this error:
Failed to execute goal on project tu: Could not resolve dependencies for project com.vaguehope.tu:tu:jar:1.1-SNAPSHOT: Failed to collect dependencies at args4j:args4j:jar:2.0.21: Failed to read artifact descriptor for args4j:args4j:jar:2.0.21: Could not transfer artifact args4j:args4j:pom:2.0.21 from/to maven-default-http-blocker (http://0.0.0.0/): Blocked mirror for repositories: [maven.jenkins-ci.org (http://maven.jenkins-ci.org/content/repositories/releases/, default, releases)] -> [Help 1]
Here is the pom file:
<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.vaguehope.tu</groupId>
<artifactId>tu</artifactId>
<version>1.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>tu</name>
<properties>
<java.version>1.7</java.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<args4j.version>2.0.21</args4j.version>
<commonsio.version>2.4</commonsio.version>
<logback.version>1.0.9</logback.version>
<slf4j.version>1.7.2</slf4j.version>
<junit.version>4.11</junit.version>
<hamcrest.version>1.3</hamcrest.version>
<mockito.version>1.9.5</mockito.version>
<powermock.version>1.5</powermock.version>
</properties>
<prerequisites>
<maven>2.2.1</maven>
</prerequisites>
<build>
<plugins>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.4</version>
<configuration>
<archive>
<manifest>
<mainClass>com.vaguehope.tu.Main</mainClass>
</manifest>
</archive>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
</configuration>
<executions>
<execution>
<id>assembly</id>
<phase>install</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.0</version>
<configuration>
<source>${java.version}</source>
<target>${java.version}</target>
</configuration>
</plugin>
</plugins>
</build>
<repositories>
<repository>
<id>maven.jenkins-ci.org</id>
<url>http://maven.jenkins-ci.org/content/repositories/releases/</url>
<layout>default</layout>
<releases>
<enabled>true</enabled>
<checksumPolicy>fail</checksumPolicy>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
<dependencies>
<!-- CLI -->
<dependency>
<groupId>args4j</groupId>
<artifactId>args4j</artifactId>
<version>${args4j.version}</version>
</dependency>
<!-- Util -->
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>${commonsio.version}</version>
</dependency>
<!-- Logging -->
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>${logback.version}</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>${slf4j.version}</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>jul-to-slf4j</artifactId>
<version>${slf4j.version}</version>
</dependency>
<!-- Testing. -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>${junit.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-library</artifactId>
<version>${hamcrest.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>${mockito.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.powermock</groupId>
<artifactId>powermock-module-junit4</artifactId>
<version>${powermock.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.powermock</groupId>
<artifactId>powermock-api-mockito</artifactId>
<version>${powermock.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
</project>
Here is the original GitHub post:
https://github.com/haku/tu
Seems the repository URL is not accessible .
Try updating the repo URL to maven central:
https://repo1.maven.org/maven2
Remove the repositories tag basically from pom.xml.
Share settings.xml if it doesn't help.
The problem is that HTTP repositories are blocked by default since this change to Maven. Maven developers are trying to force people to use HTTPS. This happened a long time after that repo was last touched 4 years ago, which is why the original authors had no problems. See also:
How to disable maven blocking external HTTP repositores?
It seems maven.jenkins-ci.org doesn't exist any more anyway. You can trivially remove the whole dependency on that repo by bumping this version from 2.0.21 to 2.0.22. The latter exists in Maven Central, and the former does not - hence why the original author(s) needed to add a separate repo declaration to get it from somewhere else.
<args4j.version>2.0.22</args4j.version>
Then you can delete the whole <repositories> section
<repositories>
<repository>
<id>maven.jenkins-ci.org</id>
<url>http://maven.jenkins-ci.org/content/repositories/releases/</url>
<layout>default</layout>
<releases>
<enabled>true</enabled>
<checksumPolicy>fail</checksumPolicy>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
A different solution, related to a corporate environment, is that we are slowly moving out of maven to another dep/build tool, but there is still a 'corporate' settings.xml file defined.
So just rename it to a different file (instead of deleting), like mv settings.xml settings-backup.xml, and returning maven again, would help you to check if it's the issue.
Related
I cannot seem to resolve dependencies in my POM. This project was working for me earlier this morning and is currently working on another machine, but somehow now my project is so borked that all my dependencies are broken, all my imports and most of my classes are just red underlines. I want to go back to where I'm no longer having dependency/pom/maven errors and can search for the original desiredCapabilities errors.
Environment:
MacOS
Apache Maven 3.6.3
Java 8 and 11 are installed on my machine
Project SDK: Java 11
IDE: IntelliJ
Appium 1.16.0
Trying to solve the original problem:
1. Mvn clean install, with and without -U
2. Right click on project > Maven -> reimport
3. Tried to open on eclipse but this project uses graphql and I got errors that there weren't marketplace options for what I needed
4. Restarted intelliJ
5. Restarted my computer
6. Build -> Build project, rebuild project
7. Deleted my .m2 directory and tried a mvn clean install/mvn install etc, but this is where all my artifacts started breaking. Almost all dependencies now say "Dependency not found" when I hover
8. Tried updating maven indices from the pom
9. Blew out the repo and re-cloned it
10. Reverted to a previous commit
The current error on mvn clean install is: [ERROR] Failed to execute goal on project mobile-app-automation: Could not resolve dependencies for project com.automation.cm:mobile-app-automation:jar:1.0-SNAPSHOT: Failed to collect dependencies at org.seleniumhq.selenium:selenium-java:jar:3.141.59: Failed to read artifact descriptor for org.seleniumhq.selenium:selenium-java:jar:3.141.59: Could not transfer artifact org.seleniumhq.selenium:selenium-java:pom:3.141.59 from/to central (http://jcenter.bintray.com): Authorization failed for http://jcenter.bintray.com/org/seleniumhq/selenium/selenium-java/3.141.59/selenium-java-3.141.59.pom 403 Forbidden -> [Help 1]
mvn compile gives the error: "Failure to find org.seleniumhq.selenium:selenium-java:pom:3.141.59 in https://jitpack.io was cached in the local repository, resolution will not be reattempted until the update interval of jitpack.io has elapsed or updates are forced
"
Here is my pom, 90% of the dependencies are red:
<?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.automation.cm</groupId>
<artifactId>mobile-app-automation</artifactId>
<version>1.0-SNAPSHOT</version>
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
<repository>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>central</id>
<name>bintray</name>
<url>http://jcenter.bintray.com</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>3.141.59</version>
</dependency>
<dependency>
<groupId>io.appium</groupId>
<artifactId>java-client</artifactId>
<version>7.2.0</version>
</dependency>
<dependency>
<groupId>com.github.annaFedorchenko</groupId>
<artifactId>automation-xray-integration-library</artifactId>
<version>1.0</version>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>java-hamcrest</artifactId>
<version>2.0.0.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>java-hamcrest</artifactId>
<version>2.0.0.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.saucelabs</groupId>
<artifactId>saucerest</artifactId>
<version>1.0.40</version>
<scope>test</scope>
</dependency>
<!-- DEPENDENCIES FOR THE API TESTING -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
<version>RELEASE</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<version>2.9.4</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.9.4</version>
</dependency>
<!-- https://mvnrepository.com/artifact/com.jayway.restassured/rest-assured -->
<dependency>
<groupId>com.jayway.restassured</groupId>
<artifactId>rest-assured</artifactId>
<version>2.9.0</version>
<scope>test</scope>
</dependency>
<!-- https://mvnrepository.com/artifact/org.projectlombok/lombok -->
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.10</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.jayway.restassured</groupId>
<artifactId>rest-assured</artifactId>
<version>RELEASE</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.googlecode.json-simple</groupId>
<artifactId>json-simple</artifactId>
<version>1.1.1</version>
</dependency>
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>2.2.11</version>
</dependency>
<!-- https://mvnrepository.com/artifact/junit/junit -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>io.qameta.allure</groupId>
<artifactId>allure-junit4</artifactId>
<version>2.12.1</version>
<scope>test</scope>
</dependency>
<!-- https://mvnrepository.com/artifact/com.apollographql.apollo/apollo-android-support -->
<dependency>
<groupId>com.apollographql.apollo</groupId>
<artifactId>apollo-runtime</artifactId>
<version>1.2.3</version>
<scope>system</scope>
<systemPath>${basedir}/libs/apollo-runtime-1.2.3.jar</systemPath>
</dependency>
<dependency>
<groupId>com.apollographql.apollo</groupId>
<artifactId>api</artifactId>
<version>1.2.3</version>
<scope>system</scope>
<systemPath>${basedir}/libs/apollo-api-1.2.3.jar</systemPath>
</dependency>
<!-- Optional, needed only for ANNOTATED nullable type-->
<dependency>
<groupId>org.jetbrains</groupId>
<artifactId>annotations</artifactId>
<version>13.0</version>
<scope>system</scope>
<systemPath>${basedir}/libs/annotations-13.0.jar</systemPath>
</dependency>
<dependency>
<groupId>io.qameta.allure</groupId>
<artifactId>allure-java-commons</artifactId>
<version>2.12.1</version>
<scope>compile</scope>
</dependency>
</dependencies>
<properties>
<aspectj.version>1.8.10</aspectj.version>
</properties>
<build>
<plugins>
<plugin>
<groupId>com.github.sparow199</groupId>
<artifactId>apollo-client-maven-plugin</artifactId>
<version>2.2.3</version>
<executions>
<execution>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<!-- <rootPackageName>com.example.graphql.client</rootPackageName>-->
<!-- <skip>false</skip>-->
<!-- <addSourceRoot>true</addSourceRoot>-->
<introspectionFile>
src/main/java/com/automation/api/apiresources/config/schema.json
</introspectionFile>
<!-- <generateTransformedQueries>false</generateTransformedQueries>-->
<!-- transformedQueriesOutputDir>${project.build.directory}/generated-sources/graphql-client/transformedQueries</transformedQueriesOutputDir>-->
<generateIntrospectionFile>true</generateIntrospectionFile>
<schemaUrl>https://qa-kong.command-api.kw.com/graphql/gql</schemaUrl>
<sourceDirName>${project.basedir}/src/main/java/com/automation/api/apiresources/config
</sourceDirName>
<!-- <outputDirectory>${project.build.directory}/generated-sources/graphql-client</outputDirectory>-->
<!-- <generateModelBuilder>true</generateModelBuilder>-->
<!-- <useJavaBeansSemanticNaming>true</useJavaBeansSemanticNaming>-->
<!-- <useSemanticNaming>true</useSemanticNaming>-->
<!-- <nullableValueType>JAVA_OPTIONAL</nullableValueType>-->
<!-- <suppressRawTypesWarning>false</suppressRawTypesWarning>-->
<!-- <generateKotlinModels>false</generateKotlinModels>-->
<!-- <generateAsInternal>false</generateAsInternal>-->
<!-- <generateVisitorForPolymorphicDatatypes>false</generateVisitorForPolymorphicDatatypes>-->
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.22.1</version>
<configuration>
<testFailureIgnore>false</testFailureIgnore>
<argLine>
-javaagent:"${settings.localRepository}/org/aspectj/aspectjweaver/${aspectj.version}/aspectjweaver-${aspectj.version}.jar"
</argLine>
<properties>
<property>
<name>listener</name>
<value>io.qameta.allure.junit4.AllureJunit4</value>
</property>
</properties>
<systemProperties>
<property>
<name>allure.results.directory</name>
<value>${project.build.directory}/allure-results</value>
</property>
</systemProperties>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
<dependencies>
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjweaver</artifactId>
<version>${aspectj.version}</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>io.qameta.allure</groupId>
<artifactId>allure-maven</artifactId>
<version>2.10.0</version>
<configuration>
<reportVersion>2.4.1</reportVersion>
</configuration>
</plugin>
</plugins>
</build>
As per JFrog, as of Jan 2020, JCenter is available only over https. Your repo snapshot has http instead of https.
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
<repository>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>central</id>
<name>bintray</name>
<url>https://jcenter.bintray.com</url>
</repository>
</repositories>
I am building up a baseline JHipster project with no bells and whistles involved (no clustering, etc.).
I am following the exact tutorial steps using my standard Node-enabled (of course) command line, and am then importing the project into Eclipse as a Maven Project. Everything looks like it should be working fine based on reviewing the project, except when I try to run it on the server or build it using the mvn command line...
Error Message
INFO: Starting Servlet Engine: Apache Tomcat/7.0.12
Exception in thread "main"
Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "main"
POM/Maven
From what I can tell, this may be a POM dependency error, but if so then I am having a heck of a time figuring out which. My project is directly configured to use JRE 1.7. My POM is below. Another thought is that it is directly related to the original NPM install from Hipster (after POM):
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.0.0.RC4</version>
</parent>
<profiles>
<profile>
<id>dev</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<!-- Spring profile to use -->
<spring.profiles.active>dev</spring.profiles.active>
<!-- log configuration -->
<logback.loglevel>DEBUG</logback.loglevel>
</properties>
</profile>
<profile>
<id>prod</id>
<properties>
<!-- Spring profile to use -->
<spring.profiles.active>prod</spring.profiles.active>
<!-- log configuration -->
<logback.loglevel>INFO</logback.loglevel>
<logback.appender>CONSOLE</logback.appender>
</properties>
<build>
<plugins>
<plugin>
<groupId>com.github.trecloux</groupId>
<artifactId>yeoman-maven-plugin</artifactId>
<version>0.1</version>
<configuration>
<yeomanProjectDirectory>${project.basedir}</yeomanProjectDirectory>
</configuration>
<executions>
<execution>
<id>run-grunt</id>
<phase>generate-resources</phase>
<goals>
<goal>build</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<version>2.5</version>
<configuration>
<filesets>
<fileset>
<directory>dist</directory>
</fileset>
<fileset>
<directory>.tmp</directory>
</fileset>
<fileset>
<directory>node_modules</directory>
</fileset>
</filesets>
</configuration>
</plugin>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<arguments>
<argument>--spring.profiles.active=prod</argument>
</arguments>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
<properties>
<!-- Maven build properties -->
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.7</java.version>
<metrics-spring.version>3.0.0-RC4</metrics-spring.version>
<HikariCP.version>1.3.3</HikariCP.version>
<commons-lang.version>2.6</commons-lang.version>
<commons-io.version>2.4</commons-io.version>
<javax.inject.version>1</javax.inject.version>
<joda-time-hibernate.version>1.3</joda-time-hibernate.version>
<geronimo-javamail_1.4_mail.version>1.8.3</geronimo-javamail_1.4_mail.version>
<usertype.core.version>3.1.0.CR10</usertype.core.version>
<springloaded.version>1.2.0.BUILD-20140214.165636-1</springloaded.version>
<awaitility.version>1.4.0</awaitility.version>
<json-path.version>0.9.1</json-path.version>
<assertj-core.version>1.5.0</assertj-core.version>
<maven-enforcer-plugin.version>1.3.1</maven-enforcer-plugin.version>
<sonar-maven-plugin.version>2.2</sonar-maven-plugin.version>
<postgresql.version>9.3-1100-jdbc41</postgresql.version>
</properties>
<repositories>
<repository>
<id>spring-milestones</id>
<name>Spring Milestones</name>
<url>http://repo.spring.io/milestone</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<repository>
<id>spring-snapshots</id>
<name>Spring Snapshots</name>
<url>http://repo.spring.io/snapshot</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
<repository>
<id>org.jboss.repository.releases</id>
<name>JBoss Maven Release Repository</name>
<url>https://repository.jboss.org/nexus/content/repositories/releases</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>spring-snapshots</id>
<url>http://repo.spring.io/libs-snapshot</url>
<snapshots><enabled>true</enabled></snapshots>
</pluginRepository>
<pluginRepository>
<id>spring-milestones</id>
<url>http://repo.spring.io/milestone</url>
<snapshots><enabled>true</enabled></snapshots>
</pluginRepository>
</pluginRepositories>
<prerequisites>
<maven>3.0.0</maven>
</prerequisites>
<dependencies>
<dependency>
<groupId>com.codahale.metrics</groupId>
<artifactId>metrics-core</artifactId>
</dependency>
<dependency>
<groupId>com.codahale.metrics</groupId>
<artifactId>metrics-ehcache</artifactId>
<version>${codahale-metrics.version}</version>
</dependency>
<dependency>
<groupId>com.codahale.metrics</groupId>
<artifactId>metrics-graphite</artifactId>
</dependency>
<dependency>
<groupId>com.codahale.metrics</groupId>
<artifactId>metrics-jvm</artifactId>
<version>${codahale-metrics.version}</version>
</dependency>
<dependency>
<groupId>com.codahale.metrics</groupId>
<artifactId>metrics-servlet</artifactId>
<version>${codahale-metrics.version}</version>
</dependency>
<dependency>
<groupId>com.codahale.metrics</groupId>
<artifactId>metrics-servlets</artifactId>
<exclusions>
<exclusion>
<groupId>com.codahale.metrics</groupId>
<artifactId>metrics-healthchecks</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.datatype</groupId>
<artifactId>jackson-datatype-json-org</artifactId>
<version>${jackson.version}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.datatype</groupId>
<artifactId>jackson-datatype-hppc</artifactId>
<version>${jackson.version}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.datatype</groupId>
<artifactId>jackson-datatype-joda</artifactId>
</dependency>
<dependency>
<groupId>com.ryantenney.metrics</groupId>
<artifactId>metrics-spring</artifactId>
<version>${metrics-spring.version}</version>
</dependency>
<dependency>
<groupId>com.zaxxer</groupId>
<artifactId>HikariCP</artifactId>
<version>${HikariCP.version}</version>
<exclusions>
<exclusion>
<groupId>com.sun</groupId>
<artifactId>tools</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- The HikariCP Java Agent is disabled by default, as it is experimental
<dependency>
<groupId>com.zaxxer</groupId>
<artifactId>HikariCP-agent</artifactId>
<version>1.3.0</version>
</dependency>
-->
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
<version>${commons-lang.version}</version>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>${commons-io.version}</version>
</dependency>
<dependency>
<groupId>javax.inject</groupId>
<artifactId>javax.inject</artifactId>
<version>${javax.inject.version}</version>
</dependency>
<dependency>
<groupId>joda-time</groupId>
<artifactId>joda-time</artifactId>
</dependency>
<dependency>
<groupId>joda-time</groupId>
<artifactId>joda-time-hibernate</artifactId>
<version>${joda-time-hibernate.version}</version>
</dependency>
<dependency>
<groupId>org.apache.geronimo.javamail</groupId>
<artifactId>geronimo-javamail_1.4_mail</artifactId>
<version>${geronimo-javamail_1.4_mail.version}</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
<version>${hibernate-entitymanager.version}</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-entitymanager</artifactId>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-ehcache</artifactId>
<version>${hibernate-entitymanager.version}</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-validator</artifactId>
</dependency>
<dependency>
<groupId>org.jadira.usertype</groupId>
<artifactId>usertype.core</artifactId>
<version>${usertype.core.version}</version>
</dependency>
<dependency>
<groupId>org.liquibase</groupId>
<artifactId>liquibase-core</artifactId>
</dependency>
<dependency>
<groupId>org.liquibase.ext</groupId>
<artifactId>liquibase-hibernate4</artifactId>
<version>3.3</version>
<exclusions>
<exclusion>
<groupId>org.hibernate.javax.persistence</groupId>
<artifactId>hibernate-jpa-2.0-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-actuator</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-autoconfigure</artifactId>
<version>${spring-boot.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-loader-tools</artifactId>
<version>${spring-boot.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-logging</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-aop</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context-support</artifactId>
</dependency>
<dependency>
<groupId>org.springsource.loaded</groupId>
<artifactId>springloaded</artifactId>
<version>${springloaded.version}</version>
<scope>provided</scope>
</dependency>
<!-- Database dependencies-->
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>9.3-1100-jdbc41</version>
</dependency>
<!-- Test dependencies -->
<dependency>
<groupId>com.jayway.awaitility</groupId>
<artifactId>awaitility</artifactId>
<version>${awaitility.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.jayway.jsonpath</groupId>
<artifactId>json-path</artifactId>
<version>${json-path.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
<version>${assertj-core.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
<includes>
<include>**/*</include>
</includes>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>${maven-enforcer-plugin.version}</version>
<executions>
<execution>
<id>enforce-versions</id>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<requireMavenVersion>
<message>You are running an older version of Maven. JHipster requires at least Maven 3.0</message>
<version>[3.0.0,)</version>
</requireMavenVersion>
<requireJavaVersion>
<message>You are running an older version of Java. JHipster requires at least JDK 1.7</message>
<version>[1.7.0,)</version>
</requireJavaVersion>
</rules>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<argLine>-XX:MaxPermSize=128m -Xmx256m</argLine>
<forkCount>1</forkCount>
<reuseForks>false</reuseForks>
<!-- Force alphabetical order to have a reproducible build -->
<runOrder>alphabetical</runOrder>
<classpathDependencyExcludes>
<classpathDependencyExclude>org.springsource.loaded:springloaded</classpathDependencyExclude>
</classpathDependencyExcludes>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<packagingExcludes>WEB-INF/lib/tomcat-*.jar</packagingExcludes>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-eclipse-plugin</artifactId>
<configuration>
<downloadSources>true</downloadSources>
<downloadJavadocs>true</downloadJavadocs>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>sonar-maven-plugin</artifactId>
<version>${sonar-maven-plugin.version}</version>
</plugin>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<arguments>
<argument>--spring.profiles.active=dev</argument>
</arguments>
</configuration>
</plugin>
</plugins>
</build>
NPM
Looking at what is being responded by NPM at initial JHipster generation, I am actually seeing errors in those logs as well, noted below. Does anyone have any background on this?
2400 verbose etag pad-stdio from cache
2401 error Error: No compatible version found: findup-sync#'^0.1.2'
2401 error Valid install targets:
2401 error ["0.1.0","0.1.1","0.1.2","0.1.3"]
2401 error at installTargetsError (C:\ProgramFiles\nodejs\node_modules\npm\lib\cache.js:719:10)
2401 error at C:\Program Files\nodejs\node_modules\npm\lib\cache.js:638:10
2401 error at saved (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-registry-client\lib\get.js:142:7)
Even with this error, I was able to manually include findup-sync with a direct npm install findup-sync#0.1.2, but this did not resolve my error with the Tomcat instance.
Back to Maven/POM
It must be something else specifically to do with com.sun:tools.jar... Looking through my POM, but if anyone has experienced this before with JHipster, please give me a shout.
Thank you for the help!
There were 3 issues here:
My Eclipse configuration was pointing to a JRE rather than a JDK (which contained the right com.sun:tools jar). In order to make the correct updates, however, it wasn't as simple as updating my JAVA_HOME variable and moving on... See steps 1-5 below.
The StackOverflow article describing this is noted here: Maven 3 Artifact problem
My application-dev.yml properties file was not pointing to a generated database. Eclipse was simply having trouble generating the connection pool, and rather than throwing a descriptive error, would bomb out instead. See step 8 below.
My project was a spring-boot project and therefore wasn't able to be executed on the general Tomcat Server in Eclipse. See step 9 below.
Summary of Resolution
Change %JAVA_HOME% to JDK
Update eclipse.ini with the following lines:
-vm
C:\Program Files\Java\jdk1.7.0_25\bin\
Update Eclipse preferences : 'Window > Preferences > Java > Installed JREs' > delete and add new JDK
Update project properties : 'Project > Properties > Java Build Path' > delete old JRE and add new JDK
Close all open command prompts and active servers (that might be caching what %JAVA_HOME% was... I spent an hour before I realized this)
mvn clean package
Tell SureFire to be skipped during build in POM
Make sure to update your application-dev.yml file to point to a real database (executing in Eclipse just shows that there was an exception of memory loss, but running mvn spring-boot:run will give you better error reporting).
If it is a spring-boot application, run it as a spring-boot application, not directly on the Tomcat Server in Eclipse. I haven't yet researched why this is such a pain, but I'll come back to that later. Please add detail in the comments if you know.
< skip>true< /skip> ...minus the extra spaces
The problem with running things in Eclipse first rather than Maven - the error logging is terribly misleading!
I have problem importing a maven project which was created by Netbeans into the IDEA 12. The dependency artifacts writen in the pom doesn't work. It told me that "cannot resolve symbol 'springframework'" on "import org.springframework.xxx;". When I runs it, it says that org.springframework.xxx doesn't exist.
Here is the pom file
<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>cn.edu.seu.cose.jellyjolly</groupId>
<artifactId>jellyjolly-openshift-dist</artifactId>
<packaging>war</packaging>
<version>1.0</version>
<name>Jelly Jolly Openshift Distribution</name>
<organization>
<name>College of Software Engineering, Southeast University</name>
<url>http://cose.seu.edu.cn/</url>
</organization>
<repositories>
<repository>
<id>eap</id>
<url>http://maven.repository.redhat.com/techpreview/all</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
<repository>
<id>maven-restlet</id>
<name>Public online Restlet repository</name>
<url>http://maven.restlet.org</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>eap</id>
<url>http://maven.repository.redhat.com/techpreview/all</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.6</maven.compiler.source>
<maven.compiler.target>1.6</maven.compiler.target>
<netbeans.hint.license>gpl30</netbeans.hint.license>
</properties>
<dependencies>
<dependency>
<groupId>org.jboss.spec</groupId>
<artifactId>jboss-javaee-6.0</artifactId>
<version>3.0.0.Final-redhat-1</version>
<type>pom</type>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>jstl</artifactId>
<version>1.2</version>
</dependency>
<dependency>
<groupId>taglibs</groupId>
<artifactId>standard</artifactId>
<version>1.1.2</version>
</dependency>
<dependency>
<groupId>commons-dbcp</groupId>
<artifactId>commons-dbcp</artifactId>
<version>1.4</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>3.1.3.RELEASE</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>org.restlet.jee</groupId>
<artifactId>org.restlet</artifactId>
<version>2.0.0</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>org.restlet.jee</groupId>
<artifactId>org.restlet.ext.xml</artifactId>
<version>2.0.0</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>net.java.dev.rome</groupId>
<artifactId>rome</artifactId>
<version>1.0.0</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.21</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.10</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
<version>2.6</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
<version>3.1.3.RELEASE</version>
</dependency>
</dependencies>
<profiles>
<profile>
<!-- When built in OpenShift the 'openshift' profile will be used when
invoking mvn. -->
<!-- Use this profile for any OpenShift specific customization your app
will need. -->
<!-- By default that is to put the resulting archive into the 'webapps'
folder. -->
<!-- http://maven.apache.org/guides/mini/guide-building-for-different-environments.html -->
<id>openshift</id>
<build>
<finalName>jellyjolly</finalName>
<plugins>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<version>2.1.1</version>
<configuration>
<outputDirectory>webapps</outputDirectory>
<warName>ROOT</warName>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
When the pom.xml file is available in your project, you can generate the files needed by IntelliJ idea project by running this command:
mvn idea:idea
Check out more options and details here:
http://maven.apache.org/plugins/maven-idea-plugin/usage.html
If the project runs on the command line (mvn clean install) the chance is like 100% it will work in IntelliJ 12 too :-)
After File -> Project Import -> From external Maven Model you should see the modules.
What I would check in the IntelliJ settings is the location of the maven home directory (File -> Settings -> Maven) and the settings.xml files it reads (or does not read).
The mvn install within the IDE should not differ from what happens on the command line. If it does it would compare mvn help:effective-settings output from the command line and from IntelliJ (maybe also from Netbeans).
If you just dont see all modules right click on the parent-pom.xml and choose maven -> reimport. To resolve the dependencies you have to execute an install once. It does not automatically resolve dependencies in all cases.
Had the same problem,
you can simply Right+Click on the code and go Maven->Reimport and it should do the trick
I used mvn -U idea:idea to generate the IntelliJ specific files with dependencies downloaded.
I tried to run Tapestry on GAE. After some time, I was able to resolve the last errors to display at least a simple page. But, to be honest, some sort of data-storage would be nice.
I tried to use tapestry-jdo, but there is my Problem: Im unable to use any part of JDO, and I have tried for days.
I will post my pom.xml, on which I have worked. I tried a lot of combinations for the version numbers, but mostly the actionlink to test JDO fails, because org.datanucleus.store.appengine.jdo.DatastoreJDOPersistenceManagerFactory is not found.
The rest of the time, I got an uncaught exception from tapestry, caused by another missing JDO class, but this time not while the construction of the JDOEntityManagerSource, instead somewhere deeper.
I havent learned programming, I teached it to myself, so my maven knowledge is limited.
This pom.xml may contain needles entries.
If i build it with maven, i get Could not transfer metadata asm:asm/maven-metadata.xml from/to local.repository (file:../../local.repository/trunk): No connector available to access repository local.repository under some circumstandes.
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0">
<modelVersion>4.0.0</modelVersion>
<groupId>com.example</groupId>
<artifactId>Example</artifactId>
<version>0.1</version>
<packaging>war</packaging>
<name>Example</name>
<dependencies>
<dependency>
<groupId>org.apache.tapestry</groupId>
<artifactId>tapestry-core</artifactId>
<version>${tapestry-release-version}</version>
</dependency>
<dependency>
<groupId>com.google.appengine</groupId>
<artifactId>appengine-api-labs</artifactId>
<version>${gae.version}</version>
</dependency>
<dependency>
<groupId>com.google.appengine</groupId>
<artifactId>appengine-api-1.0-sdk</artifactId>
<version>${gae.version}</version>
</dependency>
<dependency>
<groupId>com.google.appengine</groupId>
<artifactId>appengine-java-sdk</artifactId>
<version>${gae.version}</version>
<type>pom</type>
</dependency>
<dependency>
<groupId>javax.jdo</groupId>
<artifactId>jdo2-api</artifactId>
<version>2.3-eb</version>
</dependency>
<dependency>
<groupId>com.google.appengine.orm</groupId>
<artifactId>datanucleus-appengine</artifactId>
<version>2.0.0-RC3</version>
</dependency>
<dependency>
<groupId>org.datanucleus</groupId>
<artifactId>datanucleus-rdbms</artifactId>
<version>${datanucleus.version}</version>
</dependency>
<dependency>
<groupId>org.datanucleus</groupId>
<artifactId>datanucleus-core</artifactId>
<version>${datanucleus.version}</version>
</dependency>
<dependency>
<groupId>org.tynamo</groupId>
<artifactId>tapestry-jdo</artifactId>
<version>0.0.1</version>
</dependency>
<!-- Provided by the servlet container, but sometimes referenced in the application code. -->
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.5</version>
<scope>provided</scope>
</dependency>
</dependencies>
<build>
<finalName>Example</finalName>
<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>
<optimize>true</optimize>
</configuration>
</plugin>
<plugin>
<groupId>net.kindleit</groupId>
<artifactId>maven-gae-plugin</artifactId>
<version>0.6.0</version>
<configuration>
<serverId>appengine.google.com</serverId>
</configuration>
</plugin>
<!--
This plug-in "enhances" your domain model objects (i.e.
makes them persistent for datanucleus)
-->
<plugin>
<groupId>org.datanucleus</groupId>
<artifactId>maven-datanucleus-plugin</artifactId>
<version>1.1.4</version>
<configuration>
<mappingIncludes>**/entities/*.class</mappingIncludes><!--*/ just to stop formatig the rest of the code as comment-->
<verbose>true</verbose>
<enhancerName>ASM</enhancerName>
<api>JDO</api>
</configuration>
<executions>
<execution>
<phase>compile</phase>
<goals>
<goal>enhance</goal>
</goals>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>org.datanucleus</groupId>
<artifactId>datanucleus-core</artifactId>
<version>${datanucleus.version}</version>
<exclusions>
<exclusion>
<groupId>javax.transaction</groupId>
<artifactId>transaction-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.datanucleus</groupId>
<artifactId>datanucleus-rdbms</artifactId>
<version>${datanucleus.version}</version>
</dependency>
<dependency>
<groupId>org.datanucleus</groupId>
<artifactId>datanucleus-enhancer</artifactId>
<version>1.1.4</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
<repositories>
<repository>
<id>tapestry-snapshots</id>
<url>http://repository.apache.org/snapshots/</url>
</repository>
<repository>
<id>codehaus.snapshots</id>
<url>http://snapshots.repository.codehaus.org</url>
</repository>
<repository>
<id>maven-gae-plugin-repo</id>
<name>Maven Google App Engine Repository</name>
<url>http://maven-gae-plugin.googlecode.com/svn/repository/</url>
</repository>
<repository>
<id>data-nucleus</id>
<url>http://www.datanucleus.org/downloads/maven2/</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>tapestry-snapshots</id>
<url>http://repository.apache.org/snapshots/</url>
</pluginRepository>
<pluginRepository>
<id>maven-gae-plugin-repo</id>
<name>maven-gae-plugin repository</name>
<url>http://maven-gae-plugin.googlecode.com/svn/repository</url>
</pluginRepository>
</pluginRepositories>
<properties>
<tapestry-release-version>5.3.2</tapestry-release-version>
<gae.version>1.6.3</gae.version>
<datanucleus.version>1.1.5</datanucleus.version>
</properties>
</project>
The datanucleus-appengine plugin v2 ought to be used with DataNucleus jars v3.0.* and with javax.jdo jdo-api v3.0.1 ... as per the docs for GAE at
http://code.google.com/p/datanucleus-appengine/wiki/UpgradingToVersionTwo
I am using jboss6, message driven bean, hibernate and maven2 in my application when i try to compile my mdb using maven2 and deploy on jboss6 i get the following error:
Failed to create Resource MessageBean.jar - cause: java.lang.Exception:Failed to start deployment [vfs:///opt/jboss6/server/default/deploy/MessageBean.jar] during deployment of 'MessageBean.jar' - cause: java.lang.RuntimeException:org.jboss.deployers.client.spi.IncompleteDeploymentException: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS): DEPLOYMENTS MISSING DEPENDENCIES: Deployment "jboss.j2ee:jar=MessageBean.jar,name=MessageBean,service=EJB3" is missing the following dependencies: Dependency "interface org.jboss.ejb3.timerservice.spi.TimerServiceFactory" (should be in state "Installed", but is actually in state "Instantiated") DEPLOYMENTS IN ERROR: Deployment "interface org.jboss.ejb3.timerservice.spi.TimerServiceFactory" is in error due to the following reason(s): Instantiated -> org.jboss.deployers.client.spi.IncompleteDeploymentException:Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS): DEPLOYMENTS MISSING DEPENDENCIES: Deployment "jboss.j2ee:jar=MessageBean.jar,name=MessageBean,service=EJB3" is missing the following dependencies: Dependency "interface org.jboss.ejb3.timerservice.spi.TimerServiceFactory" (should be in state "Installed", but is actually in state "Instantiated") DEPLOYMENTS IN ERROR: Deployment "interface org.jboss.ejb3.timerservice.spi.TimerServiceFactory" is in error due to the following reason(s): Instantiated
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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.mycompany</groupId>
<artifactId>MessageBean</artifactId>
<packaging>ejb</packaging>
<version>1.0-SNAPSHOT</version>
<name>MessageBean Java EE 6 EJB</name>
<url>http://maven.apache.org</url>
<dependencies>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.12</version>
</dependency>
<dependency>
<groupId>org.jboss.ejb3</groupId>
<artifactId>jboss-ejb3-timerservice-spi</artifactId>
<version>1.0.4</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate</artifactId>
<version>3.0</version>
<type>jar</type>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.jboss.ejb3</groupId>
<artifactId>jboss-ejb3-ext-api</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>jcl-over-slf4j</artifactId>
<version>1.5.6</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.5.6</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>javax</groupId>
<!--
<artifactId>javaee-web-api</artifactId>
-->
<artifactId>javaee-api</artifactId>
<version>6.0</version>
<!-- Added below -->
<type>jar</type>
<!-- modified by varsha -->
<scope>provided</scope>
<!-- end -->
</dependency>
<!-- <dependency>
<groupId>org.jboss.ejb3</groupId>
<artifactId>jboss-ejb3-ext-api-impl</artifactId>
<version>1.1.1</version>
</dependency>-->
<dependency>
<groupId>javax</groupId>
<artifactId>javaee-api</artifactId>
<version>6.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.2</version>
<scope>test</scope>
</dependency>
</dependencies>
<repositories>
<repository>
<id>java.net2</id>
<name>Java.Net Maven2 Repository, hosts the javaee-api dependency</name>
<url>http://download.java.net/maven/2</url>
</repository>
<repository>
<id>jboss-public-repository-group</id>
<name>JBoss Public Maven Repository Group</name>
<url>https://repository.jboss.org/nexus/content/groups/public-jboss/</url>
<layout>default</layout>
<releases>
<enabled>true</enabled>
<updatePolicy>never</updatePolicy>
</releases>
<snapshots>
<enabled>true</enabled>
<updatePolicy>never</updatePolicy>
</snapshots>
</repository>
<repository>
<id>jboss</id>
<url>http://repository.jboss.com/maven2</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<repository>
<id>jboss-snapshot</id>
<url>http://snapshots.jboss.org/maven2</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.0.2</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-ejb-plugin</artifactId>
<version>2.1</version>
<configuration>
<ejbVersion>3.1</ejbVersion>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.5</source>
<target>1.5</target>
</configuration>
</plugin>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<version>2.0</version>
</plugin>
<!-- <plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>jboss-maven-plugin</artifactId>
<version>1.5.0</version>
<configuration>
<jbossHome>/opt/jboss6/server/default/deploy</jbossHome>
<jbossHome>/home/varsha/Downloads/jboss-6.0.0.Final/</jbossHome>
<serverName>default</serverName>
<fileName>target/MessageBean.jar</fileName>
<path>/UltimateSMS</path>
</configuration>
</plugin>-->
</plugins>
<finalName>MessageBean</finalName>
</build>
<profiles>
<profile>
<id>endorsed</id>
<activation>
<property>
<name>sun.boot.class.path</name>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.0.2</version>
<dependencies>
<dependency>
<groupId>javax</groupId>
<artifactId>javaee-endorsed-api</artifactId>
<version>6.0</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
I am not using ejb3 timer in my application as of now
What seems to be the problem ?
please help :(
the dendency "jboss-ejb3-timerservice-spi" is most likely your problem. not sure why you need to depend on that, but you certainly shouldn't be including it in your deployment. if you do need it as a dependency for some reason, it should be marked as scope "provided". all of those jboss dependencies and any other of those jars which are in the jboss lib directory should be marked as scope "provided". generally, your app should not contain any jars which are part of the jboss server.
Looks like at the time of your .jar deployment something has already instantiated the TimerServiceFactory.
Check your dependencies, I once had a similar problem where one of the jars I had as a maven dependency actually had a jboss.xml in its META-INF folder and was binding a bean I was using to a JNDI name I was already using.
Its a pain to search your dependencies, but this looks like its conflicting with something.
Its possible that one of your dependencies depends on an older version of interface org.jboss.ejb3.timerservice.spi.TimerServiceFactory and it gets instantiated before yours.
Check your .m2 folder and see if you have 2 versions of jboss-ejb3-timerservice-spi downloaded.