Java VCS Deployment with Maven

Java VCS Deployment with Maven

Maven is a build automation and project-management tool commonly used for Java applications. The platform can connect a public or private Git or SVN repository to a Maven build node, build the project, and deploy the resulting application to a Java application server.

Before You Begin

Add the public or private Git or SVN repository to Deployment Manager before configuring the Maven project. Supported repository link types include HTTP, HTTPS, SVN, Git, and FTP, depending on the selected version-control system.

Demo project

A public “Hello World” GitHub project can be used to test the workflow without repository authentication.

Add a Project to Maven

1

Open the project form

Click Add project beside the Maven layer, Maven node, or the Projects line below it.

Add a project to Maven
Open the Maven project configuration form.
2

Configure the project

Complete the required project fields and choose whether the Maven node should only build the project or build and deploy it immediately.

Configure a Maven VCS project
Define the repository, branch, working directory, deployment target, hooks, and update behaviour.

Project Configuration Options

NameDefines the project name. Spaces and special symbols are not allowed.
RepositorySelects the Git or SVN project already added to Deployment Manager, or opens the repository-addition form.
BranchDefines the repository branch. The documented default is master.
Working DirectoryOptional relative path to the repository subdirectory containing the application source code.
DeployWhen disabled, Maven only builds the project. When enabled, Maven builds and deploys it to the selected environment.
EnvironmentSelects the target environment containing the Java application server.
ContextDefines the custom application context. The documented default is ROOT.
HooksRuns the specified scripts before or after the build or deployment operation.
Check and auto-deploy updatesChecks the repository periodically and starts automatic deployment when code changes are found.
Auto-resolve conflictsReplaces conflicting local files with repository versions, discarding local modifications.

When starting deployment from a Java application server, two additional options may be available:

  • Build: Select an existing Maven build node or add one to the target environment.
  • Deploy Strategy: For a horizontally scaled application server, choose simultaneous deployment or sequential deployment with a configurable delay.
Deploy a Maven project to a Java application server
Select the Maven build node and the deployment strategy for a scaled application-server layer.
i

Deployment strategy

Simultaneous deployment is faster but causes brief downtime. Sequential deployment updates application servers one by one with a configured delay to preserve application availability.

Use Add to save the project configuration without starting an action. Use Add + Build or Add + Deploy to save the project and immediately execute the selected operation.

Manage Maven Projects

After the project is added, it appears in the Maven node’s Projects list. Hover over the project to access the available actions.

BuildDownloads repository changes to the Maven node and prepares the application for deployment.
Upload builds to Deployment ManagerStores the generated application build as an archive in Deployment Manager.
Build and DeployChecks for changes, builds the project, and deploys it to the selected environment.
Edit projectOpens the project configuration form for modification.
ConfigOpens the project build folder in Configuration File Manager.
LogOpens build and deployment logs for analysis and troubleshooting.
DeleteRemoves the project configuration from the Maven node.
Upload Maven builds to Deployment Manager
Enable build upload to store the generated archive in Deployment Manager.
Manage Maven projects
Build, deploy, edit, configure, review logs, or delete the Maven project.

Expected Result

The Java project is linked to the Maven build node, built from the selected Git or SVN repository, and optionally deployed to the target Java application server using the configured context and deployment strategy.

Important Notes

  • Add the repository to Deployment Manager before creating the Maven project.
  • Project names cannot contain spaces or special symbols.
  • Use the Working Directory field when the application source is stored in a repository subdirectory.
  • Auto-resolve conflicts discards local changes that conflict with repository files.
  • Use sequential deployment to reduce downtime on scaled application-server layers.
  • Review Maven logs when build or deployment operations fail.

Common Issues and Solutions

Repository is not listedAdd the Git or SVN project to Deployment Manager and reopen the Maven project form.
Build cannot find the projectCheck the branch and Working Directory path.
Private repository authentication failsVerify the stored repository credentials or configured SSH access.
Deployment causes downtimeUse Sequential deployment with delay for a scaled application-server layer.
Local changes disappearDisable Auto-resolve conflicts when local modifications must be preserved.
Build succeeds but deployment failsReview the target environment, context, application-server compatibility, deployment hooks, and logs.