使grails可以在本地运行(内部网) [英] Make grails to run locally (intranet)
问题描述
在阅读这篇文章之后,我不得不说我在完全一样的情况.
我可以使用USB密钥从计算机上的Internet传输文件,但是我的计算机无法访问Internet.
所以我的问题是:如何设置计算机环境以使grails在没有Internet的情况下首次编译并运行?
我必须下载哪些软件包,如何创建我的文件夹,并配置我的build.gradle以使其运行?(当我想访问 maven存储库时,我看到了很多文件夹和子文件夹,如此等等上.是否必须创建相同的树状结构?我需要全部下载吗?它是否存在任何可以自动制作的软件?(草率?)
Anny教程,欢迎您的帮助,当(如果)我最终实现这一目标时,我准备创建一个完整的教程.
提前谢谢!
(此时,我在具有Internet访问权限的计算机上为我的项目创建了war文件,并使其在具有tomcat的Intranet计算机上运行,但是此解决方案无法满足开发要求)
所以我的问题是:如何设置计算机环境以使grails在没有Internet的情况下首次编译并运行?
基本上,我们需要Internet连接才能从远程位置(Maven)下载所需的依赖项/jar.甚至我们的Maven都已经带有本地存储库(〜/.m2/repository)
要使用以下命令将打包的应用程序或插件安装到本地Maven缓存中:
grails maven-install [--binary]
请检查文档这里
在新应用程序中,请修改以下详细信息:
本地解析器
如果您不想使用公共Maven存储库,则可以指定平面文件存储库:
存储库{flatDir名称:"myRepo",目录:"/path/to/repo"}
要将本地Maven缓存(〜/.m2/存储库)指定为存储库:
存储库{mavenLocal()}
请参考此和<有关所有详细信息和文档的href ="https://appmediation.com/how-to-add-local-libraries-to-gradle/" rel ="nofollow noreferrer">此
这与某人在grails存储库中提出的类似问题
After reading this post, I have to say that I am in the exact same situation.
I can use USB keys to transfert files from the internet on my computer, but my computer could not access to the Internet.
So my question is : how set up my computer environment to make grails compile and run the first time without Internet ?
Which packages do I have to download, how to create my folder, and configure my build.gradle to make it running ? (when I want to visit maven repository, I see a looooot of folder and subfolder, and so on. Do I have to create the same arborescence ? Do I have to download it all ? Does it existe any software to make it automatically ? (scrappy ?)
Anny tutorial, help is welcome, and I am ready to create a full tutorial when (if) I finally achieve this.
Thanks in advance !
(At this point, I create the war file for my project on a machine with internet access and make it running on the intranet computer with tomcat, but this solution is not satisfaying for developpement)
So my question is : how set up my computer environment to make grails compile and run the first time without Internet ?
Basically we need internet connection to download required dependencies/jars from remote location(Maven). And even our Maven comes already with a local repository(~/.m2/repository)
To Installs a packaged application or plugin into the local Maven cache use following command:
grails maven-install [--binary]
Please check documentation here
In your new application do modify below details:
Local Resolvers
If you do not wish to use a public Maven repository you can specify a flat file repository:
repositories {
flatDir name:'myRepo', dirs:'/path/to/repo'
}
To specify your local Maven cache (~/.m2/repository) as a repository:
repositories {
mavenLocal()
}
Please refer this and this for all details and documentation
This is similar issue someone raised in grails repo
这篇关于使grails可以在本地运行(内部网)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!