Eclipse Project from Source Code
ZhongPing Guo edited this page Jul 2, 2013
·
5 revisions
Pages 202
- Home
- 2009 Esri Federal UC
- 2009 Esri International UC
- 2010 Esri Federal UC
- 2010 Esri International UC
- 2011 Esri Federal UC
- 2012 Esri Federal UC
- 2013 Esri Federal GIS Conference
- 2013 Esri International User Conference
- 2015 SDI Special Interest Group
- Add a Custom Profile
- Add an OpenSearch endpoint for Federated Search
- Add Another Tab to the Geoportal Interface
- Add Custom Link to a Search Result
- Add Custom Search Criteria
- Add the Geoportal Search to a List of Search Providers
- Add v1.1.1 FGDC editor to a previous Geoportal release
- AGP TO AGP Harvesting with the Geoportal
- AGS TO AGP Harvesting with the Geoportal
- All gpt.xml file settings
- An Introduction to vi
- Apache Tomcat geoportal logging
- Being a Good Robot
- Best Practice for Edits to JSP files
- Biological or Remote Sensing FGDC xsds
- Browse Tree
- Cart Processor
- Catalog Service
- Clear the Tomcat Work Folder
- Collections
- Common problems and solutions
- Communities and live examples
- Components
- Configure a Directory Server for the Geoportal
- Configure geoportal User and Schema in the PostgreSQL Database
- Configure Previewable Filetypes
- Configure Searching of YouTube
- Configure the gpt.xml File
- Configure Widgets
- Connecting to a User Directory
- Create a user account
- Create Relationships between Resources
- Customizations
- Customize DCAT output
- Customize Metadata Validation
- Database problems
- Database Tables
- DataDownload Tab
- Deploy and Configure the Geoportal Web Application in Tomcat
- Deploy and Configure the Servlet Web Application
- Deploy the Geoportal Web Application
- Details of Lucene Indexing in the Geoportal
- Development topics
- Discovering Resources
- Eclipse Project from Compiled WAR
- Eclipse Project from Source Code
- Enable Search Using an Ontology Service
- Error Messages in the Geoportal Web Application
- Esri Geoportal Server LiveDVD
- Extending the Web Harvester
- Federated Search in Portal for ArcGIS
- Feedback
- FGDC Biological Profile and Remote Sensing Extension
- FGDC Service Checker Integration
- Geoportal Clients for ArcGIS
- Geoportal CSW Clients
- Geoportal Facets using Apache Solr
- Geoportal genie
- Geoportal Project from Compiled WAR
- Geoportal Publish Client
- Geoportal Server 1.2.5 What's New
- Geoportal Server 1.2.6 What's New
- Geoportal Server 1.2.7 What's New
- Geoportal server as a broker
- Geoportal Server Downloads
- Geoportal Server v 1.0 What's New
- Geoportal Server v 1.1 What's New
- Geoportal Server v 1.1.1 What's New
- Geoportal Server v 1.2 What's New
- Geoportal Server v 1.2.2 What's New
- Geoportal Server v 1.2.4 What's New
- Geoportal SPARQL Sample
- Geoportal User Interface Components
- Geoportal Web Application File Organization
- Geoportal XML Editor
- Get Assistance with an Implementation
- GXE Concepts
- GXE Crash Course
- GXE Structure
- GXE Workflow
- High Availability and Large Number of Records
- How to Browse for Resources
- How to Create and Manage My Profile
- How to find all documents of a particular metadata standard
- How to Leave a Resource Review
- How to Login and Manage my Password
- How to Manage and Edit Resources
- How to Publish Resources
- How to Restrict Access to Resources
- How to Search for Resources
- How to Search with an Ontology Service
- How to Set Up an Esri Geoportal Server on Linux
- How to Use Search Page Results
- How to Use the Data Download Feature
- How to View Resource Relationships
- IDE Topics
- Identity Components LDAP and Single Sign On
- Index All Metadata Content
- Indexing and Searching the Time Period of the Content
- Install Apache Tomcat 6
- Install Desktop Tools
- Install Esri Geoportal Server
- Install PostgreSQL 9.1.2
- Install the JDBC .jar Files
- Installation
- Installation Version 1.0
- Installation Version 1.1
- Installation Version 1.2
- Installation Version 1.2.2
- Installation Version 1.2.4
- Installation Version 1.2.5
- Installation Version 1.2.6
- Installation Version 1.2.7
- Installation Version 1.2.8
- Integrate with a Content Management System
- Integrate with the con terra Security Solution
- Localization
- Log In to the Geoportal
- Logging
- Look and Feel of the User Interface
- Main Page
- Map LDAP Attributes on the Registration Page
- Map Viewer
- Online form editing for all publication methods
- Open source acknowledgements
- Oracle WebLogic geoportal logging
- Orientation to the Create Metadata Page
- Perform Preinstallation Computer Setup
- Portal for ArcGIS Integration
- Post Deployment Actions
- Preinstallation
- Preinstallation 0.9
- Preinstallation 1.0 and 1.1.x
- Preinstallation 1.2
- Preinstallation 1.2.2
- Preinstallation 1.2.4
- Preinstallation 1.2.5
- Preinstallation 1.2.6
- Preinstallation 1.2.7
- Preinstallation 1.2.8
- Preview Function
- Publication Components
- Ratings and Comments for Search Results
- Register ArcGIS for Server with the Geoportal
- Release notes
- REST API Syntax
- Sample FGDC metadata.xml
- Scheduled tasks
- Search Components
- Search Map
- Search Widget for Flex
- Search Widget for HTML
- Search Widget for Silverlight
- Security Concepts
- Set Up Systemwide Environment Variables
- Set up the Geoportal Database
- Share Link
- Single Sign On
- Smoketest the Geoportal
- Standards Support
- Supported CSW Profiles for Synchronization
- Theme Library
- Troubleshooting
- Troubleshooting Tips
- Two geoportals on the same server
- Upgrade 1.x to 1.2 database
- Upgrading file system approach
- Upgrading Read This Overview
- Upgrading SVN approach
- Url filter customization
- Use an XSLT to Render the Details Page
- Use Ant to build Geoportal
- User Functions and Roles
- User Management Interface
- Using a geoportal
- Using Lucene Search Text Queries
- Version 0.9
- Version 1.0
- Version 1.1
- Version 1.1.1
- Version 1.2
- Version 1.2.2
- Version 1.2.4
- Version 1.2.5
- Version 1.2.6
- Version 1.2.7
- Version 1.2.8
- What is a geoportal and the geoportal server
- What is the esri geoportal server
- What's New
- wiki template
- WMC Client
- Show 187 more pages…
Clone this wiki locally
1.0 Introduction
This document contains guidelines for setting up a Geoportal Server project within the Eclipse IDE using source code.
2.0 Software Requirements
Make sure the following software has been installed and working properly prior to setting up the geoportal project.
- JDK 1.6
- Eclipse IDE for Java EE Developers 3.5 and above
- Tomcat 6.x or 7.x
- http://tomcat.apache.org/download-60.cgi (.zip recommended for development)
- The geoportal database
- per the geoportal installation guide. If you have not created the geoportal database by running the database scripts, you should do that before proceeding. Recommendation is to create a new clean geoportal database for your dev environment so there are no conflicts with the GPT_USERS table and this simple user authentication example.
- JDBC driver for development database
- Example: Postgres jdbc driver: http://jdbc.postgresql.org/download.html
- (The jdbc driver .jar file will be used later while configuring the geoportal application)
3.0 Create the Geoportal Project within Eclipse IDE
- Launch Eclipse and create new dynamic web project (File > New < Dynamic Web Project).
- Provide project name as "geoportal", set dynamic web module version to 2.5 and set configuration as "custom". Set the project location.
- Add a new runtime if you don't have one already (click on "New Runtime" button), select "Apache Tomcat v6.0" in the dialog, click "Next".
- Browse to the Tomcat home directory, set the JRE to be used by Tomcat server, click "Finish".
- After finish setting the target runtime, click "Next" on the "New Dynamic Web Project" dialog.
- Change the default output folder to "www\WEB-INF\classes", the complied classes and files will be stored there. Click "Next".
- Change the Content directory to name it as "www", uncheck "Generate web.xml deployment descriptor". Click "Finish" to create the project.
- Verify the empty geoportal project is created with Eclipse project explorer.
4.0 Load Geoportal Sourcecode into the Eclipse Geoportal Project
There are many ways to load the geoportal source into your Eclipse project. The method described here shows manual steps.
- Copy all the files from the \\geoportal\www\WEB-INF directory in your downloaded source code to your www\WEB-INF directory in the Eclipse project.
- Copy the src files from the \\geoportal\src location in the source code you downloaded, and paste them into your src folder in your Eclipse project.
- Copy the lib files from the \\geoportal\lib location in the source code you downloaded into the WEB-INF\lib location in your Eclipse project.
- You will also need to copy the jdbc driver for the database you’ll use for your geoportal into this WEB-INF\lib location in Eclipse. Note, the jdbc driver is not part of the geoportal source code distribution. Refer to the geoportal installation guide for information on jdbc driver compatibility.
- Now copy the catalog, csw, gpt, misc, webhelp, and widgets directories from the \\geoportal\www location in your downloaded source code, and paste those directories into the www directory in your Eclipse project.
- Refresh the geoportal project in Eclipse (right-click the top level project name, select “Refresh”).
- Go to the /geoportal/src/gpt/config node in your project and open the gpt.xml file for editing. For a basic dev configuration, configure the following – note, there are many additional configuration options for the gpt.xml file, but here we are only doing the ones necessary to run the geoportal from source:
- add your database connection information into this file. In test or production, you won’t want the database connection here in the file because you’ll want to take advantage of connection pooling and also keep your database password more secure. But here, we can save time and configuration by defining our database connection in the gpt.xml file. Locate the gptConfig node, at the top of the file. Just beneath it, comment out the existing databaseReference node. Just below the commented out portion, add the following – note, you’ll need to update the driver, url, username, and password information according to your database configuration per the geoportal installation guide:
- Find the lucene indexLocation="" attribute in the gpt.xml file. Update with the folder location for your lucene index.
- Find the identity element in the gpt.xml file. You’ll note that the simpleAdapter section is commented out. Uncomment this whole simpleAdapter section, and note that the account parameter defines the username and password you will use to login to your geoportal. Note here, if you’re using a geoportal database that references users defined from an LDAP connection in the GPT_USERS table, you may have to create a new geoportal database for this project so there are not user conflicts when logging in.
- Remove or comment out the whole ldapAdapter section in the gpt.xml file, as we'll be using the simple authentication method to login to the geoportal instead of connecting to an LDAP server. Note, there are comments within this section that will need to be uncommented so the whole ldapAdapter section is deactivated.
- Save the gpt.xml file.
- Now you should be able to run your geoportal eclipse project in Tomcat. Start the Tomcat server in run or debug mode, it starts publishing the web resource to the Tomcat server.
- Check the console output for messages/errors. If there are errors revisit the gpt.xml file and check the configurations. Make sure all required jar files are available.
5.0 Test the Geoportal
- Once the Geoportal application is deployed without errors you can proceed to launch your Geoportal application in a browser (e.g. http://localhost:8080/geoportal), it is available at the port where Tomcat is configured to run (e.g. 8080), and the context path is /geoportal (as configured during creation of project).
6.0 Export and deploy the Geoportal WAR file
- With initial testing done, you now export the project to a WAR file that can be deployed to a production server running Tomcat (or other web container).
- Right-click on the project title in the Project Explorer pane. Go to Export then select WAR file.
- Click Browse to select the destination for the war file.
- Deploy the war file to your web container.
Back to IDE Topics