I am currently using twitter bootstrap 2.3.0 in my grails project. I want to switch to the newly released version 3.0. I have added this line to the dependencies in buildconfig file.
compile ":twitter-bootstrap:3.0.0"
But when I synchronize the project then the following error occurs.
I have also tried installing from command line but failed. the error log is as following.
: problems summary ::
:::: ERRORS
grailsCentral: bad organisation found in http://grails.org/plugins/grails-twitter-bootstrap/tags/RELEASE_3_0_0/twitter-bootstrap-3.0.0.pom: expected='' found='org.grails.plugins'
what should I do now ? Thanks in advance.
I've solved the issue by adding "org.grails.plugins" as the groupId for the dependency and the plugin:
Dependency:
compile "org.grails.plugins:twitter-bootstrap:3.0.3"
Plugin:
runtime "org.grails.plugins:twitter-bootstrap:3.0.3"
Hope it will help
Dependencies are funny sometime. Often I have to delete my ~/.grails folder (or at least the project folder from within there)
Related
I am trying to incorporate ObjectBox in my hybrid Cordova/Android project. By dint of some trial and error I have managed to figure out two of the steps involved.
The app level build.gradle file has to be modified to include the ObjectBox Gradle plugin classpath "io.objectbox:objectbox-gradle-plugin:2.5.0"
Define a build-extras.gradle file to "apply" the ObjectBox plugin ext.postBuildExtras = {apply plugin: 'io.objectbox'}
The next step according to the ObjectBox docs is to define at least one Entity class
However, the issue here is that I need to import the javax.persistence.* classes into the project. It is not clear to me how I do this. I have run into suggestions along the lines of including
compile group: 'javax.persistence', name: 'javax.persistence-api', version: '2.2'
in the dependencies section of the app level build.gradle file. However, this causes gradle to complain that it does not know the compile() function. I'd be much obliged to anyone who might be able to tell me how this should be done.
For the benefit of anyone running into this thread - you can download the JAR file for javax.persistence here. Place this line in the folder src/android/libsof your custom plugin and then modify plugin.xmlwith the line
<lib-file src='src/android/libs/name-of-javax-persistence.jar'/>
I am trying to add a SWRL rule to my Ontology using SWRLAPI and OWLAPI. I am trying to use OWLAPI's version which is compatible with SWRLAPI. However, I still get errors when creating a rule. It seems to be a problem with the dependency management. I am using gradle as a dependency manager so this should have solved the issue.
The Exception is:
Error creating rule engine Drools. Exception: java.lang.NoClassDefFoundError. Message: org/drools/runtime/rule/AgendaFilter"
My build.gradle dependency file:
dependencies {
compile group: 'net.sourceforge.owlapi', name: 'owlapi-distribution', version: '4.1.3'
compile group: 'net.sourceforge.owlapi', name: 'org.semanticweb.hermit', version: '1.4.1.513'
compile 'edu.stanford.swrl:swrlapi:2.0.5'
compile 'edu.stanford.swrl:swrlapi-drools-engine:2.0.5'
}
The exception happens when executing createSWRLRuleEngine method:
public void addNewSWRLRule(SWRLRuleModel rule) throws SWRLBuiltInException, SWRLParseException {
SWRLRuleEngine swrlRuleEngine = SWRLAPIFactory.createSWRLRuleEngine(ontology);
swrlRuleEngine.infer();
swrlRuleEngine.createSWRLRule(rule.getName(), rule.getRule(), rule.getComment(), true);
}
Is there a dependency that must be added manually to solve this issue?
You're using HermiT 1.4.1.513. That's compatible with owlapi 5, not 4 (the patch number matches the owlapi version). Use HermiT 1.3.8.413.
The problem was that there were 2 maven dependencies from Drools Engine (edu.stanford.swrl:swrlapi-drools-engine:2.0.5) not resolved by gradle.
The missing dependencies were:
org.drools:knowledge-api:6.5.0.Final
org.drools:drools-osgi-integration:6.5.0.Final
I am not sure what is causing these not to be solved by gradle, but I managed to fix the issue in IntelliJ by converting the two missing dependencies to a Repository Library and searching for these in maven following these steps:
File > Project Structure > Libraries
Right button click on the missing library
Convert to Repository Library
Type the dependency name and search in maven repository
Replace
I am building a web application and I am using Dropwizard 1.3.0, which has a dependency on jetty-io 9.4.8. This dependency has conflicts with another package (dropwizard-websocket-jee7-bundle 2.0.0), because it seem to fetch the wrong version number.
I looked into tha package, and found the method that has been renamed in 9.4.x - AbstractWebSocketConnection.java from 9.3.x - AbstractWebSocketConnection.java. The issue is that even though in Gradle the dependency tree shows I fetched 9.4.8 (the new one which I need), I still get the older, 9.3.x java file which causes the conflicts. I tried to Invalidate Caches / Restart and rebuild the whole project, but I seem to get the outdated file all the time.
What are the possible solutions for this?
If your bad class are imported by a transitive dependency, try to exclude explicit the transitive dependency.
For example if your required library is 'my.group:requiredLibrary:2.0.0' and there are another version in 'my.group:someDependency:0.1.5' you can do like this:
dependencies{
compile 'my.group:requiredLibrary:2.0.0'
compile ('my.group:someDependency:0.1.5'){
exclude group: 'my.group' module:'requiredLibrary'
}
}
Try forcing a particular version in your build.gradle
Example here: https://docs.gradle.org/current/dsl/org.gradle.api.artifacts.ResolutionStrategy.html
I am creating an Android Studio Project that uses tensorflow for image recognition, but suddenly the gradle console prompt an error in the following line:
compile 'org.tensorflow:tensorflow-android:+'
The error is this one:
Error:A problem occurred configuring root project 'android'.
> Could not resolve all dependencies for configuration ':_debugApkCopy'.
> Could not find any matches for org.tensorflow:tensorflow-android:+ as no versions of org.tensorflow:tensorflow-android are available.
Is this a problem from the Tensorflow servers? or how can I fix it?
(Duplicate of Tensorflow: not resolving in gradle)
Please also see https://github.com/tensorflow/tensorflow/issues/13653#issuecomment-336145329
I have a custom library uploaded to bintray maven with version 1.0.0
To download it for any project i have used the following code
repositories {
maven {
url "http://dl.bintray.com/<org or user name>/<repo-name>"
}
}
And inside my app level build.gradle i have added the dependency
dependencies {
.....
compile 'my-group-id:artifactId:versionId'
.....
}
Recently i upgraded the versionId to 1.0.2 and it doesn't compile. For version 1.0.0 it compiles fine.
Heres the error i get
Error: Could not find sdk.jar (com.appunfold:sdk:1.0.2).
Searched in the following locations:
http://dl.bintray.com/appunfold/android/com/appunfold/sdk/1.0.2/sdk-1.0.2.jar
I checked the files inside 1.0.2. It contains sdk-1.0.2.aar (not sdk-1.0.2.jar)and compared it with the files inside 1.0.0. It contains the same with the version 1.0.0 i,e sdk-1.0.0.aar.
I couldn't find the reason why it is not able to download for a different version. Anybody faced the same issue?
Found the solution after a deep few hours of research.
I think Android Studio by default searches for jar files. But since in my case only aar files are available i had to specify one more parameter (#aar) while compiling the dependency.
It looks like this
dependencies {
.....
compile 'my-group-id:artifactId:versionId:#aar'
.....
}