Using Liferay Developer Studio Without an Internet Connection

This article documents a temporary workaround for developers using Liferay Developer Studio 3.0.1/3.1 in a closed environment. At this time Liferay Developer Studio 3.0.1/3.1 requires users to download dependencies from the Internet. However, this can be a problem for developers who do not have full web access in their development environment.

解決

  1. Prepare a local or accessible NEXUS server. This server must have FULL libraries (from https://repository.liferay.com/nexus/content/groups/public). Administrators can also clone one from other repositories. Internet connections are still required at this point. 
  2. Get the p2 folder from the following links and put it somewhere locally.
    1. For Developer Studio 3.0.1: https://releases.liferay.com/tools/blade-cli/1.x/ 
    2. For Developer Studio 3.1: https://releases.liferay.com/tools/blade-cli/2.x/
  3. Navigate to the folder ${your_workspace}\.metadata\.plugins\org.eclipse.core.runtime\.settings and edit the file com.liferay.ide.project.core.prefs to:
    	BLADE_CLI_REPO_UP2DATE_CHECK=1s
    	BLADE_CLI_REPO_URL=file:///C:/p2
    	
    1. Note 1: If this file does not already exist, create this file.
    2. Note 2: Change the path to where the p2 folder is located.
  4. Get the .gradle zip file and unzip it in the user home folder. The Developer Studio team has provided this link for downloading the .gradle files.
  5. Start Liferay Developer Studio.
  6. Open the New Liferay Workspace Project Wizard to create a Liferay Workspace. An error will show up but the required files have been created successfully on the disk.
  7. Go to the Liferay Workspace project folder.
  8. Open the file settings.gradle and change the maven repository URL:
    		
    maven {
        url "https://cdn.lfrs.sl/repository.liferay.com/nexus/content/groups/public"
    }
    
    to:
    maven {
        url "{your_nexus_server}/nexus/content/groups/public"
    }
    

    Note: For the Liferay Module project, please modify the URL in the build.gradle file.

  9. Open the Import Liferay Workspace Project Wizard and re-import the Liferay Workspace project.
この記事は役に立ちましたか?
0人中0人がこの記事が役に立ったと言っています