Playground: Difference between revisions
Line 4: | Line 4: | ||
=New Project= | =New Project= | ||
==New Maven Project== | |||
Use the playground project template: | Use the playground project template: | ||
Line 11: | Line 13: | ||
This template contains a basic structure and artifacts to be used when starting new playground project. In order to create a new project: | 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== | ===1. Recursively copy the template under a new name, and customize it=== | ||
<pre> | <pre> | ||
Line 19: | Line 21: | ||
</pre> | </pre> | ||
==2. Edit <tt>pom.xml</tt>== | ===2. Edit <tt>pom.xml</tt>=== | ||
===<tt>name</tt>=== | ====<tt>name</tt>==== | ||
===<tt>groupId</tt>=== | ====<tt>groupId</tt>==== | ||
The Maven group should follow the playground directory structure: | The Maven group should follow the playground directory structure: | ||
<groupId>io.novaordis.playground.wildfly.hornetq</groupId> | <groupId>io.novaordis.playground.wildfly.hornetq</groupId> | ||
===<tt>artifactId</tt>=== | ====<tt>artifactId</tt>==== | ||
Example: | Example: | ||
<artifactId>simple-hornetq-client</artifactId> | <artifactId>simple-hornetq-client</artifactId> | ||
This will become the IntelliJ project name. | This will become the IntelliJ project name. | ||
===<tt>finalName</tt>=== | ====<tt>finalName</tt>==== | ||
===Multi-Module Project=== | ====Multi-Module Project==== | ||
For a multi-module project, add the following module section to the root pom: | For a multi-module project, add the following module section to the root pom: | ||
... | ... | ||
<artifactId>root</artifactId> | <artifactId>root</artifactId> | ||
Line 55: | Line 52: | ||
<module>...</module> | <module>...</module> | ||
</modules> | </modules> | ||
... and the corresponding sub-module pom.xmls: | ... and the corresponding sub-module pom.xmls: | ||
Line 75: | Line 71: | ||
</pre> | </pre> | ||
==3. Create the IntelliJ project== | ===3. Create the IntelliJ project=== | ||
Import Project from Maven. | Import Project from Maven. | ||
Line 81: | Line 77: | ||
Keep project files in <tt>.../.idea</tt>. | Keep project files in <tt>.../.idea</tt>. | ||
==4. Edit <tt>README.md</tt>== | ===4. Edit <tt>README.md</tt>=== | ||
By default, README contains generic content. | By default, README contains generic content. |
Revision as of 18:26, 28 June 2018
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:
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