Firewall blocks access to grails repo - grails

refresh dependencies fails due to firewall+proxy combonation.
The corporate IT is not going to make an exception. I have found that I can do a recursive wget on the repo url and generate duplicate their folder structure.
What can I do locally so that all developers can use this "mirror" by default?
If the above is not possible, where does grail usually put these files on a windows based installation?

Try adding local repo to your BuildConfig and of course make it accessible over your LAN, or perhaps tell other devs to make their local cloned repos. The path to this local repo could be ENVARIONMENT_VARIABLE, too (that makes it fully customizable)
repositories {
grailsPlugins()
grailsHome()
mavenCentral()
mavenRepo('/path/to/my-local-maven-repo')
}
http://jdpgrailsdev.github.io/blog/2014/02/10/grails_maven_local_repo.html

You have a couple of options here.
First, if it's just a normal proxy than you can configure grails to utilise it. Take note of the following grails commands:
grails add-proxy
grails set-proxy
These in turn will establish a file in your home directory in .grails called ProxySettings.groovy (i.e. ~/.grails/ProxySettings) that is then used by all grails commands for all projects.
However, if you're behind a Microsoft NTLM proxy (as I am) then I'd suggest still doing the above by making use of Java NTLM Proxy.
(Keep in mind though, that the grails wrapper does not use the above ProxySettings.groovy and then you need to use the standard JAVA_OPTS of -Dhttp.proxyPort, -Dhttp.proxyHost, etc.)
But I appreciate maybe you've done all that and you still want to avoid the proxy. I'd suggest the next solution - and one that should be considered anyway - is setting up a corporate/internal Maven repository server with something like Artifactory or Nexus.
Lastly, there is the instruction from MamyKryzysKryzysKryzys with using mavenRepo( <localPath> ). More info on that is available in the grails doco.
Finally, to address your question of "where does grail usually put these files". Under the hood grails is simply using maven so it's stored in your normal maven local repo which is ~/.m2/repository.
Good luck! Proxies make things hard, but once you figure your solution it's a thing of the past. Personally, we now use a combination of the Java NTLM Proxy and an internal Artifactory server.

Related

Is it possible to run a private Hex (Erlang) dependency manager (and if so how)?

I'm working in an Erlang environment. I'm looking to establish a dependency manager so that our build server can publish binaries for reuse instead of using source code dependencies. The Hexpm GitHub project implies that it is possible to run it outside of the hex.pm website, but I don't see any instructions for doing so. Specifically, I would like my build server to be able to publish packages either directly (via the filesystem) or via rebar3, and for subsequent rebar3 builds to be able to use those published packages
Is it possible to run Hex on my own server?
If so, where would I find some documentation on how to set it up (or provide the instructions directly)?
If you look at https://github.com/hexpm/hex_web there are instructions in the README.md for both installing and running it. It's a phoenix application, so it should all be relatively familiar ground if you've looked at the phoenix framework before.
As for getting rebar3 to work with your installation, there is documentation here as to the config values to use for setting the URLs to use for hex packages: http://www.rebar3.org/docs/hex-package-management.
HTH.

archiva standalone vs web

can some one help me. I want to setup a internal repository for maven. For this i wanted to use Apache Archiva and i'm new to both maven and archiva. My question is what is the exact difference b/w standalone and web archiva installations (i found these 2 ways in archiva documentation).
My intention is to create internal repository to be used by all developers. Every one should get dependencies from there. I have to install archiva in a server with in our organization(LAN). What is the preferable for my situation?
I found steps to install in both ways, but they are little confused as i am new to archiva. Could some one please explain me clearly?
Operating System : Windows
Maven : 3.0.5
Archiva : 1.3.6
Thanks in advance.
The standalone distribution is more easy to install.
The wrapper will restart your instance in case of issues.
The important part is to separate content from installation see http://archiva.apache.org/docs/1.4-M3/adminguide/standalone.html section "Separating the base from the installation"

Grails and Cloudbees

I am following this tutorial on Grails and Cloudbees And it says :
"to use CloudBees databases locally from your application, you first need to add the CloudBees SDK's appserver.jar file to your grails classpath"
Does anyone know what is this appserver.jar? Where can I find it?
Yes, as mentioned in the comment - you can get that jar file from the SDK you download.
However, it is perfectly find (and possibly better) to use the mysql driver directly as mentioned.
When running on cloudbees, you can bind your app to a database - so that at runtime the right database is injected - using the bees db:bind SDK command.

How to make Grails development less dependant from Amazon EC2

Today I was converting a web application that use Grails 1.3 to 2.0 when I notice longer and longer response times trying to compile and run. An hour later, after deleting the local ivy cache and some files related with the IDE, came to the conclusion that the problem was an Amazon EC2 outage affecting several sites including Grails' repositories. Every time I write a simple command as grails compile or even grails help, the framework try to connect to EC2. We have a Nexus repository where we store our projects and dependencies. There is something we can configure in order to avoid this behavior and use the local Nexus instead? Thanks in advance.
Glen Smith wrote a great article about this: http://blogs.bytecode.com.au/glen/2012/06/04/seriously-offline-grails-going-totally-sans-internet-with-nexus.html

Ruby on Rails - Capistrano and SVN on Windows. Setup help

I have Subversion setup and running on my local network with windows and svnserve. I'd like to use Capistrano to deploy to a remote ubuntu server but am a bit on unsure on what I need to do to get the client end to work on windows. My understanding is that the remote server needs to be able to tunnel into my subversion server. I've read over a few tutorials but either they or I get all turned around about when they are talking about my local system, my svn server, or my remote system and of course almost none of them talk about capistrano and windows together.
Do I need to setup Apache to serve my subversion repository? I'd rather not but if I must what are the steps?
I found this tutorial but I have no idea if it will enable ssh access to the repository
You could try having capistrano checkout your code locally, zip and send it to the server. This isn't as efficient has having the server access svn because it has to send the entire codebase every time, but it will save you the trouble of exposing your repository to the outside.
From this page on the capistrano website, under Deployment Strategies:
set :deploy_via, :copy
set :copy_strategy, :export
set :copy_compression, :zip
You will need a command line zip utility available to make this work. The Info-Zip FTP site has one available.
I'm not a Windows person, but my understanding is that in Capistrano's normal state, it executes all of its commands on the server. That is why it needs to be able to pull the code via SVN from your machine.
Looking at that tutorial, it appears as though it is using Apache as the mechanism to allow a client(in this case Capistrano) to pull source code from your Windows machine. This will work for what you want to do.
You don't have to setup Apache in order to accomplish this, you could probably setup an SSH server on your Windows machine, though that is out of my realm of knowledge. :-)

Resources