Playground

From NovaOrdis Knowledge Base
Jump to navigation Jump to search

Reference Assets

Reference operations script: playground/project-template/bin/operations. Works with local and remote servers.

New Project

New Maven Project

Use the playground project template:

https://github.com/NovaOrdis/playground/tree/master/project-template

This template contains a basic structure and artifacts to be used when starting new playground project. In order to create a new project:

1. Recursively copy the template under a new name, and customize it

cp -r .../project-template .../<your-project-name>
cd .../<your-project-name>
rm -r .idea

2. Edit pom.xml

name

groupId

The Maven group should follow the playground directory structure:

   <groupId>io.novaordis.playground.wildfly.hornetq</groupId>

artifactId

Example:

   <artifactId>simple-hornetq-client</artifactId>

This will become the IntelliJ project name.

finalName

Multi-Module Project

For a multi-module project, add the following module section to the root pom:

  ...
  <artifactId>root</artifactId>
  <packaging>pom</packaging>
  ...
  <modules>
     <module>...</module>
  </modules>

... and the corresponding sub-module pom.xmls:

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>io.novaordis.playground.jboss.wildfly.global-jboss-valve</groupId>
        <artifactId>root</artifactId>
        <version>1</version>
    </parent>
    <artifactId>global-valve</artifactId>
    <packaging>jar</packaging>
    <build>
        <finalName>global-valve</finalName>
    </build>
</project>

3. Create the IntelliJ project

Import Project from Maven.

Keep project files in .../.idea.

4. Edit README.md

By default, README contains generic content.

It may be changed to contain a link to NOKB page about the subject.

Operations

Run Locally

Use:

./bin/run

The script will assemble the classpath automatically and will attempt to guess the main class.

Deployment/Undeployment

deploy --help
undeploy --help