'Unresolved Dependencies' after reinstalling Grails - plugins

New clone from git repo, fresh install of groovy and grails. Seems to work for everyone else on my team? New to groovy and grails. Any help or general troubleshooting is appreciated.
::::::::::::::::::::::::::::::::::::::::::::::
:: UNRESOLVED DEPENDENCIES ::
::::::::::::::::::::::::::::::::::::::::::::::
:: org.grails.plugins#dynamic-jasper;0.6: not found
:: org.grails.plugins#testing;0.5: not found
:: org.grails.plugins#code-coverage;1.1.8: not found
:: org.grails.plugins#liquibase;1.9.3.3: not found
::::::::::::::::::::::::::::::::::::::::::::::

You may just need to do a grails clean - have you tried that?
Grails stores its plugins in ~/.grails; if all else fails, it might not hurt to go in and clean out that directory after doing a fresh install.

Related

Configuring Intellij IDEA 15.0.4 and SBT 0.13.7 with local Artifactory server

I installed Intellij IDEA 15.0.4 + Scala plugin (2.2.0) on a computer with an internet connection, created a new SBT project and all the external dependencies were added to the project:
i.stack.imgur.com/v560H.png
However, when I try to do the same thing in our issolated network (no internet) against our Artifactory server, I got the following message:
Error:Error while importing SBT project:...
http://zzz:8081/artifactory/scala_local/org/fusesource/jansi/jansi/1.11/jansi-1.11.jar
::::::::::::::::::::::::::::::::::::::::::::::
:: UNRESOLVED DEPENDENCIES ::
::::::::::::::::::::::::::::::::::::::::::::::
:: org.fusesource.jansi#jansi;1.11: not found
::::::::::::::::::::::::::::::::::::::::::::::
:: USE VERBOSE OR DEBUG MESSAGE LEVEL FOR MORE DETAILS unresolved
dependency: org.fusesource.jansi#jansi;1.11: not found Error during
sbt execution: Error retrieving required libraries (see
C:\Users....sbt\boot\update.log for complete log) Error: Could not
retrieve jansi 1.11See complete log in C:\Users....IdeaIC15\system\log\sbt.last.log
So I figured I need to get jansi 1.11 up to Artifactory (to /org/fusesource/jansi/jansi/1.11/).
After uploading jansi to Artifactory, I refreshed SBT and started getting the following message:
Error:Error while importing SBT project:Error during sbt execution: No
Scala version specified or detected
So I'm guessing it has something to do with the fact that Scala is not available in Artifactory? If that's the reason, it seems unreasonable to upload all the jars to their respective paths manually, and I couldn't "guess" the path in my many tries... So I'm pretty sure I'm doing something wrong here...
This is my build.sbt:
name := "untitled"
version := "1.0"
scalaVersion := "2.10.4"
This is my .sbt\repositories:
[repositories] local my-ivy-proxy-releases: http://zzz:8081/artifactory/scala_local/, [organization]/[module]/(scala_[scalaVersion]/)(sbt_[sbtVersion]/)[revision]/[type]s/[artifact](-[classifier]).[ext] my-maven-proxy-releases: http://zzz:8081/artifactory/scala_local/
(sorry for the layout, won't let me post more than 2 links...)
I checked some similar issues here, nothing seemed to help...
I'd appreciate your help on what I should check / read on...
Is there a way to automatically deploy all the dependencies to the correct path in Artifactory?
***EDIT:
Ok, so I removed .sbt\repositories file, invalidated the IntelliJ cache and restarted, created a new SBT project...
This didn't seem to help, also
now it seems that it doesn't recognize the build.sbt syntax anymore...
Even when I add the resolver, it completely ignores it...
I manually deleted the directories in /.sbt/boot/other/ (had jansi and scala-sbt there), and now it can't resolve jansi again, only this time it tries to connect to repo1.maven.org... :
Error:Error while importing SBT project:<br/>...<br/><pre> https://repo1.maven.org/maven2/org/fusesource/jansi/jansi/1.11/jansi-1.11.jar
::::::::::::::::::::::::::::::::::::::::::::::
:: UNRESOLVED DEPENDENCIES ::
::::::::::::::::::::::::::::::::::::::::::::::
:: org.fusesource.jansi#jansi;1.11: not found
::::::::::::::::::::::::::::::::::::::::::::::
:: USE VERBOSE OR DEBUG MESSAGE LEVEL FOR MORE DETAILS
unresolved dependency: org.fusesource.jansi#jansi;1.11: not found
Error during sbt execution: Error retrieving required libraries
(see C:\Users\...\.sbt\boot\update.log for complete log)
Error: Could not retrieve jansi 1.11
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=384M; support was removed in 8.0</pre><br/>See complete log in C:\Users\...\.IdeaIC15\system\log\sbt.last.log
Thanks,
PA
We encounter a similar issue.
What finally solved the problem was removing .sbt\repository file.
Then all dependency could be resolved with the default repositories.
It is the problem of IDE you are using specially the scala plugin in it. You can get ride of this just go to the folder where the build.sbt is created. Delete the "project" folder and open cmd, run "sbt" command on the folder, a new project folder will be created. Now you can open that in IDE.
It may be that you may find some problem very first in ide, if you build the project once , all the problems will go away.

SBT can't resolve dependencies through proxy

When I run sbt update i get this error
:: problems summary ::
:::: WARNINGS
::::::::::::::::::::::::::::::::::::::::::::::
:: UNRESOLVED DEPENDENCIES ::
::::::::::::::::::::::::::::::::::::::::::::::
:: org.scala-sbt#sbt;0.13.8: several problems occurred while resolving dependency: org.scala-sbt#sbt;0.13.8 {default=[default(compile)]}:
java.util.NoSuchElementException
java.util.NoSuchElementException
::::::::::::::::::::::::::::::::::::::::::::::
:: USE VERBOSE OR DEBUG MESSAGE LEVEL FOR MORE DETAILS
unresolved dependency: org.scala-sbt#sbt;0.13.8: several problems occurred while resolving dependency: org.scala-sbt#sbt;0.13.8 {default=[default(compile)]}:
java.util.NoSuchElementException
java.util.NoSuchElementException
Error during sbt execution: Error retrieving required libraries
(see /Users/$USER/.sbt/boot/update.log for complete log)
Error: Could not retrieve sbt 0.13.8
I've already set up the system to work with curl and homebrew using a proxy, but for some reason sbt won't work with the same settings. When I turn the proxy off, It just hangs for a few minutes before timing out and I don't get the aforementioned error.
I've also tried this, but without any luck
# export JAVA_FLAGS= -Dhttp.proxyHost=$domain -Dhttp.proxyPort=$portnum -Dhttp.proxyUser=$USER -Dhttp.proxyPassword=$password -Dhttps.proxyHost=$domain -Dhttps.proxyPort=$portnum -Dhttps.proxyUser=$USER -Dhttps.proxyPassword=$password -Dftp.proxyHost=$domain -Dftp.proxyPort=$portnum -Dftp.proxyUser=$USER -Dftp.proxyPassword=$password -Dhttp.nonProxyHosts=$noproxy -Dhttps.nonProxyHosts=$noproxy -Dftp.nonProxyHosts=$noproxy
# java ${JAVA_FLAGS}
The method I used to make hombrew and curl work is
export http_proxy=$http_proxy
export https_proxy=$http_proxy
export ftp_proxy=$http_proxy
export rsync_proxy=$http_proxy
export HTTP_PROXY=$http_proxy
export HTTPS_PROXY=$http_proxy
export FTP_PROXY=$http_proxy
export RSYNC_PROXY=$http_proxy
Any suggestions?
Thanks
I am not sure whether your JAVA_FLAGS included/exported to classpath or not, if not add it to classpath before trying this solution.
My Resoultion:
I don't know which IDE you are using, I faced same issue (I use IntelliJ 14). Try to relate to your IDE if you use different one, basically set it through VM arguments.
I have resolved this issue by adding vm arguments ...
Steps to add in IntelliJ:
File -> Default Settings -> under Build,Execution, Deployment
Build Tools -> SBT ->
JVM Options -> set in the "VM parameters" like this
-Dhttp.proxyHost=http://proxy.xxxx.com -Dhttp.proxyPort=8080 -Dhttps.proxyHost=http://proxy.xxx.com -Dhttps.proxyPort=8080 -XX:MaxPermSize=384M -Duser.home=/Users/yourusername/ -Dsbt.ivy.home=/Users/yourusername/.ivy2
Good Luck

How to force IntelliJ IDEA to reload dependencies from build.sbt after they changed?

I'm using IntelliJ IDEA 13 (Community Edition) with the Scala plugin.
My initial import of an existing Scala project with a build.sbt worked fine. The library dependencies were picked up by IDEA. Additional dependencies added after the initial import were not picked up, although I had checked the auto-import option.
How can I force IDEA to reload the dependencies from build.sbt?
You can force SBT to reload changes:
Open SBT toolwindow (on the right side of IDE) and press refresh button.
If you use auto-import feature you need to save your file to force auto-refresh.
IF plugin gets 'stuck' it helps to invalidate cache (under file menu) and restart intellij.
As of 7 Dec, 2013, the issue is solved. You need to update the Scala plugin in IntelliJ IDEA (this applies to both community and ultimate editions).
This is the link to the issue opened on JetBrains developer community web site:
http://devnet.jetbrains.com/thread/451395
This may be due to a broken publication of org.jetbrains:sbt-structure:latest.integration that occurred tonight, about 4 or 5 hours ago. Given that your post is 4 hours old ...
You can see the ivy activity in idea.log (~/Library/Logs/IntelliJIdea13 or ~/Library/Logs/IdeaIC13 on OSX).
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: UNRESOLVED DEPENDENCIES ::
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: org.jetbrains#sbt-structure;latest.integration: not found
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn]
[warn] Note: Some unresolved dependencies have extra attributes. Check that these dependencies exist with the requested attributes.
[warn] org.jetbrains:sbt-structure:latest.integration (sbtVersion=0.13, scalaVersion=2.10)
I have opened a ticket at JetBrains.
Ticket for broken plublication of sbt.jetbrains is resolved. Updating scala plugin will fix this issue
Ticket : http://devnet.jetbrains.com/thread/451395
Perhaps this working only for some kind of projects, but in my case,
on the Library side, I do in sbt: publishLocal
on the Client side where the Library goes into, I click the menu item Build -> Build (Ctrl-F9), and sometimes, when open Files or Intellisens are not yet current, I do Ctrl-Alt-Y (Menu item File -> Synchronize) to get the file reflecting the refreshed code base.
Not having to refresh all sbt projects is faster for me.

Play framework 2.1.1 eclipse

I'm trying to eclipsify a play project that I use with heroku.
I've downloaded and unzipped the play 2.1.1
According to the documentation I run this command in my project directory:
play eclipse
And I get this errors
::::::::::::::::::::::::::::::::::::::::::::::
:: UNRESOLVED DEPENDENCIES ::
::::::::::::::::::::::::::::::::::::::::::::::
:: org.scala-sbt#sbt;${{sbt.version}}: not found
::::::::::::::::::::::::::::::::::::::::::::::
I've found some answers about setting the build.propeties file but it is already set. I don't know what to do. Please help.
Thanks
Need PROJECT/project/build.properties
sbt.version=0.12.2
file content is only 1 line
refer : http://jackviers.blogspot.kr/2012/01/sbt-scalas-simple-build-tool-series.html
On Github, James Ward and Matt Raible provided a comparison application for Play! framework 2 and Grails.
If you switch betsween branches, you will find their presentation slides too.
https://github.com/jamesward/happytrails

Grails. spring security core. Install problem

I try install Spring security core plugin in Grails.
I run this command:
grails install-plugin spring-security-core
and in result i see this error message:
:: problems summary ::
:::: WARNINGS
module not found: org.grails.plugins#spring-security-core;latest.integration
==== grailsPlugins: tried
-- artifact org.grails.plugins#spring-security-core;latest.integration!spring-security-core.zip:
C:\STS\LoginProject/lib/spring-security-core-[revision].zip
C:\Documents and Settings\fenuk\.grails\1.3.5\projects\LoginProject\plugins\hibernate-1.3.5/lib/spring-security-core-[revision].zip
C:\Documents and Settings\fenuk\.grails\1.3.5\projects\LoginProject\plugins\tomcat-1.3.5/lib/spring-security-core-[revision].zip
==== grailsHome: tried
C:\grails-1.3.5\lib/spring-security-core-[revision].xml
-- artifact org.grails.plugins#spring-security-core;latest.integration!spring-security-core.zip:
C:\grails-1.3.5\lib/spring-security-core-[revision].zip
==== grailsHome: tried
C:\grails-1.3.5\dist/spring-security-core-[revision].xml
-- artifact org.grails.plugins#spring-security-core;latest.integration!spring-security-core.zip:
C:\grails-1.3.5\dist/spring-security-core-[revision].zip
==== grailsHome: tried
-- artifact org.grails.plugins#spring-security-core;latest.integration!spring-security-core.zip:
C:\grails-1.3.5/plugins/grails-spring-security-core-[revision].zip
==== grailsCentral: tried
-- artifact org.grails.plugins#spring-security-core;latest.integration!spring-security-core.zip:
http://svn.codehaus.org/grails-plugins/grails-spring-security-core/tags/LATEST_RELEASE/grails-spring-security-core-[revision].zip
==== grailsCore: tried
-- artifact org.grails.plugins#spring-security-core;latest.integration!spring-security-core.zip:
http://svn.codehaus.org/grails/trunk/grails-plugins/grails-spring-security-core/tags/LATEST_RELEASE/grails-spring-security-core-[revision].zip
::::::::::::::::::::::::::::::::::::::::::::::
:: UNRESOLVED DEPENDENCIES ::
::::::::::::::::::::::::::::::::::::::::::::::
:: org.grails.plugins#spring-security-core;latest.integration: not found
::::::::::::::::::::::::::::::::::::::::::::::
Error resolving plugin [name:spring-security-core, group:org.grails.plugins, version:latest.integration].
Plugin not found for name [spring-security-core] and version [not specified]
what this error mean? maybe, i do something wrong?
Make sure that you have at least the three core repositories in BuildConfig.groovy:
repositories {
grailsPlugins()
grailsHome()
grailsCentral()
}
As a temporary workaround, you can install it directly by downloading the zip file. Go to http://grails.org/plugin/spring-security-core and click the big Download button, then install from the zip by running
grails install-plugin path/to/grails-spring-security-core-1.0.1.zip
You can also install it without downloading using
grails install-plugin http://plugins.grails.org/grails-spring-security-core/tags/RELEASE_1_0_1/grails-spring-security-core-1.0.1.zip
But I suspect you have a network issue, so the plugin install will fail since it uses Ivy to resolve the required Spring Security jars, and that download may also fail.