Skip to content

sclasen/smarchetype-model

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Installing the archetype locally

  1. git clone git://github.com/sroysf/smarchetype-model.git
  2. cd smarchetype-model
  3. ./install-archetype.sh

Project Structure Overview

This is a single module web application, with functionality broken up simply by package naming. For example:

  • com.vmforce.samples.dao
  • com.vmforce.samples.entity

Creating a new project from an archetype

In Spring STS...

  1. File -> New -> Other -> Maven -> Maven Project

Open Advanced pulldown, and select [groupId].[artifactId] for the Name template

Click Next

  1. Select "All Catalogs", check the box for "Include snapshot archetypes", and filter for com.vmforce

Select the archetype

Click Next.

  1. Enter the desired group Id, artifact ID, and version number for your new project.

Click Finish

You should see a new project in your workspace, with the naming convention matching the naming convention selected in step 1 above.

Initial sanity check

  1. Navigate to the main project directory

  2. Execute : mvn -DskipTests clean package

You should get a successful build with no errors.

Customizing your project

  1. Setup your forceDatabase.properties file, in src/main/resources/

Instructions on setting up this file are included as comments within the file itself.

  1. Build your application for the first time, with your customizations. Application artifact is in target/

mvn -DskipTests clean install

  1. Deploy your application to VMForce for the first time, in order to setup the oAuth authentication credentials.

See instructions here if you need help deploying an application.

  1. Customize the oauth.properties file in src/main/resources

  2. Now rebuild and redeploy your application, with the customized oauth credentials.

Test drive

  1. Setup and deploy the app as you normally would, either on VMForce or locally. Application artifact is in web/target

  2. Example test, locally:

http://localhost:8080/sampleWebApp (replace sampleWebApp with the artifact id you chose for your project)

IMPORTANT NOTES

  • Be careful with the properties files containing security credentials when checking into a version control system.

About

Single module webapp archetype model project

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors