-
Notifications
You must be signed in to change notification settings - Fork 149
Geoportal Project from Compiled WAR
Purpose: Create a Geoportal Server project in Eclipse from the geoportal.war distribution so that you can create an environment to edit and manage CUSTOM CONFIGURATION of your Geoportal Server implementation.
Intended Audience: Users who want a managed environment for making custom localization and configuration of their geoportal server.
- Benefits:
- no Java programming expertise
- only uses compiled distribution releases
- framework for testing configuration changes
- Prerequisites:
- You have downloaded and unzipped the Geoportal distribution files (available at https://github.com/Esri/geoportal-server/wiki/Geoportal-Server-Downloads)
- This example assumes you are using the Elipse Java EE IDE for Web Developers
- Step 1. Create Workspace
- Eclipse uses a folder called a workspace to store project files. We are going to create one for storing your Geoportal Server project. Think about where you want to store your Geoportal Server project. Create a folder that you want to use for the workspace (e.g. ..\Documents\eclipse\workspaceGeoportalServer).
- Step 2. Tell Eclipse to use your workspace
- Start Eclipse.
- Go to the File menu
- Choose 'Switch Workspace' and then 'Other ...'
- In the dialog that opens, you need to select a workspace to use.
- Click the Browse button and navigate to and select the folder from Step 1 that you want to use
- Click OK
- Step 3. Import Geoportal WAR
- Go to the File menu
- Select 'Import...'
- (Import Select dialog opens)
- Choose 'Web', 'WAR file' in the Import Select dialog, and click 'Next'
- Next to 'WAR file:', click the Browse button and navigate/select geoportal.war from your unzipped distribution folder (under ../Web Applications/Geoportal)
- 'Web project:' should automatically get populated to 'geoportal'
- Select the 'Target runtime', or create a new target runtime (see link). Click Next
- On the WAR Import: Web libraries, make sure none of the web library jars are selected (Deselect All)
- Click Finish
When you are ready to build a new geoportal.war containing any custom configurations or custom JSP pages, you can simply:
- Right-click on 'geoportal' in the Project Explorer
- Select 'Export' and 'WAR file' from the context sensitive menu
- The WAR Export dialog will open and should display 'geoportal' as the Web project
- Click 'Browse' button and select a desination folder for your new geoportal.war
- Click the 'Save' button to complete the geoportal.war build and export
Once you have successfully imported the geoportal.war and created a geoportal project in Eclipse, you may be wondering where your configuration files have gone. The folder structure of the geoportal project will look different than the deployment folder structure.
The quick answer is the configuration files that are normally in the WEB-INF directory are now located in the Java Resources > src folder of the project. Expand 'Java Resources' in the Project Explorer window, then expand the 'src' folder. You will then find all the files that will end up getting deployed to WEB-INF/classes
for your geoportal web app.
In Java Resources > src, the files are arranged in folders corresponding to the deployment path within WEB-INF/classes
. For example, gpt.xml
gets deployed to WEB-INF/classes/gpt/config
will be found in the gpt.config
folder of the src directory.
- Locations for other commonly accessed configuration files:
-
gpt.resources
is in Java Resources > src > gpt.resources -
schemas.xml
is in Java Resources > src > gpt.metadata -
browse-catalog.xml
is in Java Resources > src > gpt.search.browse
-
Back to IDE Topics