How to Create a New Project: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
No edit summary
 
(40 intermediate revisions by the same user not shown)
Line 6: Line 6:


* Create the GitHub project.
* Create the GitHub project.
* Clone locally:
* Clone locally:
<pre>
<pre>
cd ~/projects
git clone git@github.com:NovaOrdis/<project-name>.git
git clone git@github.com:NovaOrdis/<project-name>.git
</pre>
</pre>
* Start with [[project pom.xml|pom.xml]]
 
* Install [[project .gitignore|.gitignore]]
* Decide whether the project is a simple library project, and thus requires a simple structure, or it has an installable binary and it requires at least a "main" and a "release" module.
 
* If it is a simple, single-POM project, start with [[project pom.xml|pom.xml]]. For hints on specific elements, go to:
** [[Maven_pom.xml#.3Cname.3E|<name>]]
** [[Maven_pom.xml#.3CartifactId.3E|<artifactId>]]
 
* <span id="multi-module"></span>If it is a multi-module project, follow the guidelines laid out here: [[Building a Maven Complex Release Artifact]]. These are pom.xml files to start from:
** [[project multi-module parent pom.xml|parent pom.xml]]
** [[project multi-module main pom.xml|main pom.xml]]
** [[project multi-module release pom.xml|release pom.xml]]
** The rest of the auxiliary files can be created following the templates available here:
 
{{Internal|Building_a_Maven_Complex_Release_Artifact#release_Module_Structure|Release Module Structure}}
 
* Install nort configuration in .nort/project.yaml. A sample configuration file is provided here: [[Nort_Concepts#Per-Project_Configuration]]
 
* Install [https://kb.novaordis.com/index.php/.gitignore#Reference_.gitignore reference .gitignore]
 
* Make src/test/resources in the library modules, or in the project home if the project is single-module:
 
mkdir -p src/test/resources
 
* Install [[project log4j.xml|log4j.xml]] in <tt>src/test/resources</tt>
* Install [[project log4j.xml|log4j.xml]] in <tt>src/test/resources</tt>
* Create directories: <tt>src/main/java</tt>.
 
* Check out locally the latest version of "novaordis-release-tools" and install the release tools and run wrappers:
* Make src/test/java test root in the library modules, or in the project home if the project is single-module:
 
mkdir -p src/test/java
 
* Make src/main/java  in the library modules, or in the project home if the project is single-module:
<pre>
<pre>
.../novaordis-release-tools/src/main/bash/operations install-release-tools <project-home-dir>
mkdir -p src/main/java
</pre>
</pre>


The <project-home-dir> can be specified as a relative or absolute directory.
* Create the IntelliJ project (.idea based): File -> New -> Project from Existing Sources -> select the project directory -> Import project from external model -> Maven.
** Use "User-Friendly Name (projects-dir-name)" naming pattern.


For more details see [[novaordis-release-tools]].
* Create the IntelliJ project (.idea based): File -> New -> Project from Existing Sources -> select the project directory -> Import project from external model -> Maven.
* Install the copyright (see [[IntelliJ Copyright Configuration]])
* Install the copyright (see [[IntelliJ Copyright Configuration]])
* Create the first class and the corresponding test.
* Create the first class and the corresponding test.
* Start a new empty <tt>./doc/release-notes.txt</tt>. This file is used to collect release notes that will be published with the release announcement.
 
* <font color=darkgray>Start a new empty <tt>./doc/release-notes.md</tt>. This file is used to collect release notes that will be published with the release announcement.</font>


* Verify tools
* Verify tools
Line 34: Line 63:
</pre>
</pre>


* Create corresponding NOKB page:
* Create corresponding [[Projects|NOKB projects]] page:
** Overview
** Overview
** User Manual
** User Manual. Each project has user manual accessible from its wiki page as "<project-name> User Manual". The user manual should be ready for publishing at any time.
** Development
** Development.  Each project has a development area accessible from its wiki page as "<project-name> Development".
*** GitHub (must contain the link to the GitHub project).
*** GitHub (must contain the link to the GitHub project).
*** Maven coordinates


* Link the NOKB project from README.md:
* Link the NOKB project from README.md:
Line 53: Line 83:
</pre>
</pre>


* Review [[Projects#Patterns|projects patterns]] and initialize the structures that apply.


* Review [[Projects#Patterns|projects patterns]] and initialize the structures that apply.
=TODO=
 
* Word Document in ./doc


=Conventions=
=Conventions=
* Each project has user manual accessible from its wiki page as "<project-name> User Manual". The user manual should be ready for publishing at any time.
* Each project has a development area accessible from its wiki page as "<project-name> Development".
* The TODO list is maintained in the TODO section of the development manual.

Latest revision as of 05:53, 1 June 2018

Internal

Procedure

  • Create the GitHub project.
  • Clone locally:
cd ~/projects
git clone git@github.com:NovaOrdis/<project-name>.git
  • Decide whether the project is a simple library project, and thus requires a simple structure, or it has an installable binary and it requires at least a "main" and a "release" module.
Release Module Structure
  • Make src/test/resources in the library modules, or in the project home if the project is single-module:
mkdir -p src/test/resources
  • Make src/test/java test root in the library modules, or in the project home if the project is single-module:
mkdir -p src/test/java
  • Make src/main/java in the library modules, or in the project home if the project is single-module:
mkdir -p src/main/java
  • Create the IntelliJ project (.idea based): File -> New -> Project from Existing Sources -> select the project directory -> Import project from external model -> Maven.
    • Use "User-Friendly Name (projects-dir-name)" naming pattern.
  • Create the first class and the corresponding test.
  • Start a new empty ./doc/release-notes.md. This file is used to collect release notes that will be published with the release announcement.
  • Verify tools
mvn clean install
release info
  • Create corresponding NOKB projects page:
    • Overview
    • User Manual. Each project has user manual accessible from its wiki page as "<project-name> User Manual". The user manual should be ready for publishing at any time.
    • Development. Each project has a development area accessible from its wiki page as "<project-name> Development".
      • GitHub (must contain the link to the GitHub project).
      • Maven coordinates
  • Link the NOKB project from README.md:

...

# Documentation

https://kb.novaordis.com/index.php/<project-name>

...

TODO

  • Word Document in ./doc

Conventions