Grails installing a plugin from behind corporate f

2020-04-07 20:29发布

问题:

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

回答1:

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.



回答2:

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



回答3:

The http proxy is also not possible to use?

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