4

Grails plugin's page is accessible but when I try to install plugins from command prompt, it is blocked by our corporate firewall.

I see that you can download plugins(the one I am trying to install is spring-security-core) and then install it. But the download provided in the spring-security page does not download everything. Is there a link/place I can download the whole plugin and then install them manually?

Update
Example of an error I am getting, when I install.

            Server access Error: Connection refused: 
connect url=http://grails.org/plugins/grails-spring-security-core/tags/RELEASE_3_0_7_RELEASE/spring-security-core-3.0.7.RELEASE.pom
Abe
  • 8,623
  • 10
  • 50
  • 74

3 Answers3

3

Abe,

Here is a link to the Grails.org page for Spring Security Core: Grails Spring Security Core.

There is a download button which will allow you to down a ZIP file of the latest released Spring Security Core (1.2.7.3) from codehaus.org.

There are also links on this page to extension plugins for Spring Security (Spring Security OpenID, Spring Security ACL, etc).

Hope this helps.

UPDATE

In Grails Spring Security Core plugin 1.2.7.3, plugin.xml lists the following dependencies:

<dependencies>
    <compile>
      <dependency group='org.springframework.security' name='spring-security-core' version='3.0.7.RELEASE' />
      <dependency group='org.springframework.security' name='spring-security-web' version='3.0.7.RELEASE' />
    </compile>
</dependencies>

The error message you are getting is an attempt by the Grails plugin to resolve the dependency on Spring Security Core 3.0.7.

I believe that you can just go and download the 2 dependencies:

Spring Security Core 3.0.7.RELEASE and Spring Security Web 3.0.7.RELEASE and install them to your local Ivy Repository.

Here is a Stackoverflow post (see the Accepted Answer) on installing to your Local Ivy Repository: Unable to add jar file to .ivy cache manually

Here is an additional Stackoverflow link: good ivy tutorial for local repository?

Additional Update based on more research

Grails Spring Security Core Plugin 1.2.7.3 dependencies.groovy

If you end up putting the dependencies in your local Ivy Repository, you will need to edit dependencies.groovy and add mavenLocal() to your repositories.

repositories {
    grailsPlugins()
    grailsHome()
    grailsCentral()

    mavenCentral()
    // Add mavenLocal if you have installed the dependencies to the local Ivy Repository
    mavenLocal()
}

Ideal scenario would be if you can find a public Repository that you can reach through your firewall that has the dependencies, then you would not need to go through the steps of trying to install to your local Ivy Repository.

Community
  • 1
  • 1
Philip Tenn
  • 6,003
  • 8
  • 48
  • 85
  • 1
    I am already aware of the download option, but this does not download the whole distro, just the pom's or something. – Abe Aug 21 '12 at 18:51
  • 1
    Ok, I get it now. You already have the Spring Security Core Plugin (which contains the usual plugin.xml, dependencies.groovy, etc). You downloaded the ZIP file from the Grails Spring Security Core page. However, you are not able to pull down the dependencies. Modern versions of Grails use Ivy under the covers: [Grails Ivy Integration](http://grails.org/Ivy+Integration). I am going to do some exploring and will get back to you. – Philip Tenn Aug 21 '12 at 19:13
  • Let me check this out. b.t.w do you know if I can just "download" everything for a plugin at one place (which hopefully is not blocked!) – Abe Aug 21 '12 at 19:27
  • Unfortunately I do not know of a place where you can just download a plugin and its dependencies as a whole bundle. Although it would be convenient, I believe it would go against the spirit/intent of the plug-in design, where dependencies are specified in the `plugin.xml` and `dependencies.groovy`, and the `grails.project.dependency.resolution` closure is used to specify repositories to hit and dependencies to pull. I do have another idea that I am going to add to my answer. – Philip Tenn Aug 21 '12 at 20:36
  • I was afraid so...:(. Your final edit will do the trick for me. We use Maven and whatever jars are required can be added to our internal repo on a per request basis. Thanks! – Abe Aug 21 '12 at 20:51
  • 2
    Just FYI, "modern" versions of Grails are quickly moving away from using Ivy at all and are moving to Maven (and Gradle). – cdeszaq Aug 22 '12 at 13:53
  • @cdeszaq Thank you for that information, very useful. I've used Gradle and am a big fan of it. – Philip Tenn Aug 22 '12 at 14:24
2

Install an intranet dependency repository such as Artifactory, Nexus or Archiva, and host your jar dependencies and plugins inside your firewall.

Raphael
  • 1,760
  • 1
  • 12
  • 21
1

The http proxy is also not possible to use?

http://grails.org/doc/2.1.0/ref/Command%20Line/set-proxy.html

Tom Metz
  • 919
  • 6
  • 7
  • Proxy is already there. But the certain links are still blocked. Unfortunately spring security plugin falls under that. – Abe Aug 21 '12 at 18:50