maven,gradle,dagger-2,auto-value , Gradle dependency -

Gradle dependency -


Tag: maven,gradle,dagger-2,auto-value

How do I get (transitive dependency) to resolve, in my gradle build?


apply plugin: 'java'

repositories {
  maven {
    url ""
    url ""
    url ""
    url ""

dependencies {
  compile ''
  compile ''
  compile ''
  compile ''

  compile 'com.nativelibs4java:javacl:1.0-SNAPSHOT'
  compile 'org.jogamp.gluegen:gluegen-rt-main:2.0.2'
  compile 'org.jogamp.jogl:jogl-all-main:2.0.2'

  testCompile 'junit:junit:4.12'
  testCompile 'org.mockito:mockito-core:1.9.5'
  testCompile ''


$ gradle build

FAILURE: Build failed with an exception.

* What went wrong:
Could not resolve all dependencies for configuration ':compile'.
> Artifact '[email protected]' not found.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.


Dependency Tree: (truncated)

$ gradle dependencies

compile - Classpath for compiling the main sources.
|    \--- javax.inject:javax.inject:1
|    +--- (*)
|    +---
|    |    +--- (*)
|    |    \---
|    +--- <-------auto-common--------
|    |    \---
|    \---
+--- com.nativelibs4java:javacl:1.0-SNAPSHOT
|    \--- com.nativelibs4java:javacl-core:1.0-SNAPSHOT
|         +--- com.nativelibs4java:opencl4java:1.0-SNAPSHOT
|         |    \--- com.nativelibs4java:bridj:0.7-SNAPSHOT
|         |         \---
|         \--- com.nativelibs4java:nativelibs4java-utils:1.6-SNAPSHOT
+--- org.jogamp.gluegen:gluegen-rt-main:2.0.2
|    \--- org.jogamp.gluegen:gluegen-rt:2.0.2
\--- org.jogamp.jogl:jogl-all-main:2.0.2
     \--- org.jogamp.jogl:jogl-all:2.0.2

I have tried adding an explicit dependency for auto-common, with no luck.

To my surprise, searching things like " repository" turns up very little. It looks like the 1.0-SNAPSHOT simply isn't in Maven Central. Interestingly enough, it looks like the 1.0-SNAPSHOT is in jboss's repository, but my gradle build doesn't seem to find it.

Anyone seen something like this before? Help?


It will work in the following way - every maven url should be specified in a separate maven{} block - run copyToLibs task to verify:

apply plugin: 'java'

repositories {
  ].each { address ->
    maven {
      url address

dependencies {
  compile ''
  compile ''
  compile ''
  compile ''

  compile 'com.nativelibs4java:javacl:1.0-SNAPSHOT'
  compile 'org.jogamp.gluegen:gluegen-rt-main:2.0.2'
  compile 'org.jogamp.jogl:jogl-all-main:2.0.2'

  testCompile 'junit:junit:4.12'
  testCompile 'org.mockito:mockito-core:1.9.5'
  testCompile ''

task copyToLib(type: Copy) {
   from configurations.runtime
   into 'libs'

In the way You specified the urls the last one was winning (covering all previously defined).


Gradle & Jacoco: Get jacoco reports for Test-type task other than “test”

When I run gradlew test jacocoTestReport the task jacocoTestReport runs and I get a a test report. When I run gradlew integTest jacocoTestReport the task jacocoTestReport is skipped. Here's the relevant excerpts from my build.gradle: apply plugin: 'jacoco' jacocoTestReport { group = "Reporting" description = "Generate Jacoco coverage reports after...

Gradle Exec : Why it is not running in configuration phase?

Here is my: build.gradle task makeDirectoryStructure(type:Exec){ description 'Creates directory structure .' commandLine 'mkdir' args '-p' ,'top_dir/sub_dir_1/sub_dir_2' println "This line is printed in configuration phase." } Now, since I haven't used '<<' or< 'doFirst/doLast', I expect mkdir to be executed in configuration phase i.e. whenever the build script is compiled. For...

Maven multi-project depths

I was trying to build Maven pom in something similar to the following hierarchical form: root    +-- A-POM       +-- B-POM       +-- C-POM            +---D-POM I was hoping that this could take care of my changed module problem. That is, if C is changed, then A must be rebuilt, etc. But I...

Adding Android AppWidget just for one Product Flavor

I have two gradle product flavors: for prod and for stage server. productFlavors { stage { // stage specific stuff } production { // production only } } Also I have an AppWidget must be able only for stage now. I think I should hide my AppWidgetProvider in manifest: <receiver...

Grails 3.0 Searchable plugin

I've tried to use the searchable plugin in grails 3.0, but I am not sure wheather it is compatible or not. I've added compile "org.grails.plugins:searchable" to the dependencies. The build completes but yields a NotSearializableException: > Configuring > 1/1 projects > Resolving dependencies ':agent' > Resolving dependencies ': BUILD SUCCESSFUL...

Phonegap: Command failed with exit code 8

I'm setting up an environment for Phonegap developing, and I'm getting some trouble to finally build and run an app for Android. When I try to execute build for Android, I got the following error: Running: C:\Users\Renan\workspace_html5\FIAP\Phonegap\phonegap-test\test\platfor ms\android\gradlew cdvBuildDebug -b C:\Users\Renan\workspace_html5\FIAP\Phonegap \phonegap-test\test\platforms\android\build.gradle -Dorg.gradle.daemon=true Unzipping C:\Users\Renan\.gradle\wrapper\dists\gradle-2.2.1-all\2m8005s69iu8v0oi...

sonar maven analysis only picks .java file

I am trying to run a sonar maven analysis on my multilanguage project which contains many languages like *.java, *.groovy, *.js etc. I have installed all the languages plugin in my sonar and configured my pom sonar.sources parameter as src/main,src/test but still it picks up only java files. In the...

gradle execute task after build

I am using the build in gradle. My build.gradle file like this: project('a'){ apply plugin: 'java' apply plugin: 'eclipse' apply plugin: 'application' buildDir = 'build' [compileJava, compileTestJava]*.options*.encoding = 'UTF-8' repositories { mavenCentral() } dependencies { compile 'org.slf4j:slf4j-api:1.7.7' } } When I input the gradle build in the command, I want...

Use alternative producers of EntityManager / EMF in integration tests

I looking for way how to use CDI and alternative producers in integration tests. When i speak about producers, i mean EMF producer. Reason for different EMF producer is that i want to use testing in-memory database (different persistence unit). Is there easy way how to start CDI for integrations...

How to use Library from GitHub in android App

I downloaded this library to use in my app, however, I can't get Android Studio to do the gradle build now. Anytime I try, I get "error:configuration with name 'default' not found". I've tried several other StackOverflow answers, but I still can't compile. My dependencies (from build.gradle Module: app) dependencies...

Android studio gradle flavor dimensions build varients not working correctly

I have two dimensions of an app, call then green and blue. There will only be these two dimensions but an unlimited number of product flavors. This is the way I'm setting it up in gradle flavorDimensions "green", "blue" productFlavors { one { applicationId "" versionCode 1 versionName ""; flavorDimension...

is it possible to filter artifacts in Maven-release-plugin?

Is it possible to exclude some artifacts during release:prepare or release:perform? We don't need all the artifacts put on nexus, only two main ones.

Android build project error trying to build apps > 65K (65536) methods

I have added these two new dependencies in my build.gradle compile '' compile '' And right now, I can't build my project because I've got an error. I have found information about the error and the solution that I have found says that I have to add ... compile 'com.parse.bolts:bolts-android:1.+'...

Unable to download com.thoughtworks.paranamer#paranamer;2.5.6 with sbt

I'm getting the following error when building my project: [warn] problem while downloading module descriptor: invalid sha1: expected=534448ad3c4af760c8995370c1405b9dbf88609e computed=0d33f7748ec6c8928db74f9652a2cb7567fe4044 (116ms) [warn] module not found: com.thoughtworks.paranamer#paranamer;2.5.6 This is a transitive dependency, which I was able to download previously. I got this error when I wiped my ~/.ivy2/cache dir. Not really...

How to download a library dependence on gradle for external use?

I have a project on PhoneGap and I am trying to build a plugin to use a FilePicker library. So, I build one Android Studio Project and I have it working. So, right now, that I know that I know how to do it, I just need to know how...

Logging with log4j2 in Spring Boot app

I am trying to learn Spring Boot. But I completely mess up with a loggers dependencies. I have a simple pom: <dependencies> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter</artifactId> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-test</artifactId> <scope>test</scope> </dependency> <!-- Logging --> <dependency>...

Paid and Free versions of android app

I am wondering what is the best way to have two different versions of an android app. I would like to have version of my app with ads and one without ads (the paid one). What is the easiest way to achieve this ? I have found something called version...

Maven can not find the 'main' class for my Java app

I am new to Java and this is my first time using Maven. I have tried to build a working pom.xml file by stitching together various things I've read and copy-and-pasting them to pom.xml. This is not working. I put my java files in this folder: src/main/java/com/ollio/nlp/ my main class...

Duplicate entry for class in gradle

I am trying to implement ken burns view in android studio in my app, i have importted the folder which contains its classes, but gradle gives me this error Error:Execution failed for task ':app:packageAllDebugClassesForMultiDex'. > duplicate entry: com/flaviofaria/kenburnsview/MathUtils.class Here is my build.gradle apply plugin: '' android { compileSdkVersion 21...

maven activate by property value and version

is there a way to activate a profile by property but instead of checking a specific value check for a version range. here is what i am trying to do <properties> <frontend-maven-plugin.version>0.0.16</frontend-maven-plugin.version> </properties> ... ... <profile> <id>new_version_of_frontend</id> <activation> <property> <name>maven.version</name> <value>3.1.0</value> </property> <properties>...

Liquibase 3.3.3 refusing to run “due to maven configuration”

Did something change in liquibase between version 2 and version 3? I have the following in my pom file... <plugin> <groupId>org.liquibase</groupId> <artifactId>liquibase-maven-plugin</artifactId> <version>3.3.3</version> <configuration> <changeLogFile>src/main/resources/liquibase/liquibase-changesets.xml</changeLogFile> <driver>${db.liquibase.driver}</driver> <username>${db.liquibase.username}</username>...

Unable to load servlet listener class: com.sun.faces.config.ConfigureListener

I'm using apache-tomee-jaxrs-1.7.1 and I'm trying to deploy with maven 3 getting this error: Unable to load servlet listener class: com.sun.faces.config.ConfigureListener: These are my dependencies in pom.xml: ... <dependencies> <dependency> <groupId>javax</groupId> <artifactId>javaee-api</artifactId> <version>6.0</version> <scope>provided</scope> </dependency> <dependency> <groupId>javax.servlet.jsp.jstl</groupId>...

Using ant.replace in gradle

I want to use ant's replace task to replace token in one of the files like this: version.txt version.number=${versionNumber} build.gradle task writeVersion { ant.replace { file 'version.txt' token 'versionNumber' value '1.0.0' } } but it is giving me following error :- A problem occurred evaluating root project '1.01-Exercise-RunYourFirstTask'. > replace...

Maven: copy zipped resource subdirectories into target folder

I have a project with the following resources: resources - directory1 - directory2 I would like these to end up in the target folder as follows: target - resources - directory1 - I know how to use the maven-resources-plugin to copy the raw resources of directory1 and exclude the...

How to create zip file with maven: Java Client + JRE

I want to package a java client together with a runtime into one Zip-file. How should I do this with maven? Java Client: package com.test.client; public class Client { public static void main(String[] args) { System.out.println("Hello world!"); } } This runs like: java -cp "client.jar" com.test.Client I want to deliver...

exec-maven-plugin error, even on working example

EDIT5 Updated / I'm using Maven 3.3.3. I just create new project and added compile and exec plugin, as examples on web. I tried to execute, but I got error [ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2.1:java (default-cli) on project QNAProject: An exception occured while executing the Java class. com.jadex.qna.QNAProject.App ->...

Eclipse error using Maven filtering in persistence.xml

I have a Maven project with JPA using hibernate. I had to specify a jar file to load external classes in persistence.xml located in src/main/resources/META-INF <persistence unit name="PersistenceUnit" transaction-type="JTA" ... <jar-file>lib/${project.persistencejar}.jar</jar-file> using Maven filtering (the filename can change based on various Maven settings). I instruct then Maven to filter by...

How to deploy public-project Maven artifacts to a different remote repository?

I am on a team making local changes to a public open-source code project with the following general structure: <parent> <groupId>org.sonatype.oss</groupId> <artifactId>oss-parent</artifactId> <version>7</version> </parent> <groupId>edu.cmu.sphinx</groupId> <artifactId>sphinx4-parent</artifactId> <version>1.0-SNAPSHOT</version> <packaging>pom</packaging> <modules> <module>sphinx4-core</module>...

Gradle Assemble Debug is Successful But Does Not Work [duplicate]

This question already has an answer here: Why won't gradle run from within a jenkins job 2 answers After following instructions here: apparently you're supposed to chmod +x gradlew then ./gradlew assembleDebug which leads to the following output: /gradlew assembleDebug :app:preBuild UP-TO-DATE :app:preDebugBuild UP-TO-DATE :app:checkDebugManifest :app:preReleaseBuild UP-TO-DATE :app:prepareComAndroidSupportAppcompatV72200Library...

Eclipse Kepler is unable to set the Java jdk 1.8 when maven project is updated

Installed java version is 1.8, while selecting this version in pom.xml and updating the maven project,it automatically jumps from 1.8 to 1.4, due to which I am unable to have Lambda expression specific code. I am using eclipse kepler. Any idea what is happening here ?...

Missing artifact error while adding a depentency in pom

Am trying to add a dependency sauce-connect-plugin in to pom.xml file <groupId>com.saucelabs.maven.plugin</groupId> <artifactId>sauce-connect-plugin</artifactId> <version>2.1.18</version> </dependency> But building the pom file am getting Missing artifact com.saucelabs:sauce-connect:jar:3.1.32 Also i mentioned the repository <repositories> <repository> <id>saucelabs-repository</id> <url></url>...

Trying to access Oracle's Maven repository

I'm attempting to access Oracle's repository. Oracle doesn't make it easy. However, I'm attempting to follow the documentation that Oracle provided. I've: Approved the licensing agreement on my system (in case there's some sort of cookie that needs to be set). Set both M2_HOME and MAVEN_HOME to /usr/share/apache-maven. Created an...

How to make dependency transitive in Gradle

I have downloaded javax.mail-api-1.5.3.jar file copied into app/libs folder and then right click , add as library. Then following line appears under dependency compile files('libs/javax.mail-api-1.5.3.jar') I want to make this dependency transitive.Because I have mention javax.mail-api library dependencies in pom.xml file like follows. <dependencies> <dependency> <groupId>javax.mail</groupId> <artifactId>javax.mail-api</artifactId> <version>1.5.3</version> <scope>test</scope>...

Gradle multi-project custom build.gradle file name

I have a multi-project Gradle build, which is currently configured through a single build.gradle file. There are over 70 modules in this project, and the single (gigantic) build.gradle file has become cumbersome to use, so I'd like to split it into small per-module buildscript files. Now, I don't want to...

Compilation Error on maven

Working on maven project. I m trying to build using maven but I m getting the following error! I m working on eclipse using JDK 8. Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (default-compile) I also tried the above solution, but still I m getting error! [INFO] Scanning for projects... [INFO] [INFO]...

spring-boot integration testing using rest-assured

I have been struggling with the issue of starting the H2 db in my tests. This is how the tests are annotated - @SpringApplicationConfiguration(classes = ServiceApplication.class) @WebAppConfiguration @IntegrationTest("server.port:8084") @PropertySource("") public class testSerivce{ //test scenario } The in memory db H2 is used and this is how its setup in application...

maven-war-plugin include subdirectories

I'm having an issue where I need to include some folders in my Maven generated WAR using the maven-war-plugin but it is only including the files in the directory and not the sub-directories as well. This is how I have configured the war-plugin within the pom. <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-war-plugin</artifactId> <configuration>...

Flink error - org.apache.hadoop.ipc.RemoteException: Server IPC version 9 cannot communicate with client version 4

I am trying to run a flink job using a file from HDFS. I have created a dataset as following - DataSource<Tuple2<LongWritable, Text>> visits = env.readHadoopFile(new TextInputFormat(), LongWritable.class,Text.class, Config.pathToVisits()); I am using flink's latest version - 0.9.0-milestone-1-hadoop1 (I have also tried with 0.9.0-milestone-1) whereas my Hadoop version is 2.6.0 But,...

deploying ejb-module for ObjectDB fails: PersistenceProvider not found

I have two almost identical projects (both created with maven, both very simple) where one deploys without any problems, the other gives me a PersistenceException: javax.persistence.PersistenceException: JBAS011466: PersistenceProvider 'com.objectdb.jpa.Provider' not found And I just don't see what I am missing here. The working project is web application. I got it...

@RestController throws HTTP Status 406

I am working on a basic Hello World program using Spring and Restful webservices. But when I try to call my service I am getting below error message: HTTP Status 406 - description - The resource identified by this request is only capable of generating responses with characteristics not acceptable...

How to use a local tomcat version with maven

This may have been asked before (if it is please link me), but when I search I'm finding a bunch of how to run maven on tomcat, how to hook up an IDE to do this (nearly all of them are ide / configuration questions), how to use maven plugin...

IntelliJ - use imported modules as dependencies like maven projects in Eclipse

I've been asking myself this question for a couple of years but never really found the solution. I used to work with eclipse (on maven java projects). I could import a project -let's call it 'proj-A'- and if one of proj-A's dependencies was found in the workspace with the same...

spring.xml not packaged in executable jar

I created a simple java application using maven, spring and used log4j for logging. Following are the files. public class TestCrawler { public static final String SPRING_CONFIGURATION_FILE = "spring.xml"; private static final String INITIAL_URL = ""; private static final String SPIDER_BEAN = "spider"; public static void main(String[] args) { System.out.println();...

Dyanamic web module 3.0 required java 1.6 or newer

In my project i got following error in Markers. I also set java 1.6 in project facets ,java compliler and buildpath but not solve this error. ...

how to manage multiple war application in tomcat server?

I use tomcat as web server,I want to deploy many same war file in tomcat server with different config. How to do this in the best way possible manner? So I want to run tomcat server per each war application, my means is tomcat1 handle the .war1 in webapp and...

what is gradle missing to map hibernate?

I have unittest to my java project. My code uses hibernate. When i run the test using junit - everything passes. When I run the test using gradle - I get a mapping error: Caused by: org.hibernate.MappingException: Unknown entity: linqmap.users.interfaces.model.UserRecord and the class: @Entity @Table(name = "users") public class UserRecord...

Android Studio and gradle

I tried importing Xabber ( GitHub ) within Android Studio , I did the git init etc . Now I find that I can start the app for that problem Gradle , I've looked everywhere , but could not find anything that would work .. The problem is: Error:Execution failed...

Gradle Jar structure is different than the real project structure

I'm trying to build my project with gradle but for some reason the resources are put on a different level than their real level. Here's the build: apply plugin: 'java' version = '1.1' archivesBaseName = 'DesktopOmegle' repositories { //mavenCentral() maven { url '' url "" } } dependencies { compile...

Switching branches in Git with external dependencies

Has anyone had to deal with the issues of switching git branches in a project that has Maven (or any other external) dependencies? For example, suppose that in one branch I have a maven dependency, and in another I don't (or have a different version required). Would I have to...

How to access jenkins parent job build id in a MultiJob?

I have a requirement to trigger Automation Suite in multiple phases and summarize test results in a single test summary report. I configured a Jenkins Multi Job to trigger my automation suite, which is divided in to multiple chunks say suite#1, suite#2, suite#3, suite#4 (each suite is a maven job)...