RM2PT Tutorial
RM2PT NLP Project
Create RM2PT NLP Project in RM2PT
In RM2PT, File -> New Project

Type project name e.g., NL2OCL

Click “Next >”

Click “Finish “
All the startup projects will be generated in project explorer as follows:

Configuration Maven Library Step 1: add all required maven dependency

Configuration Maven Library Step 2: download all required jars into folder lib by using maven goal initialize

Refresh the project all the required jars are located in lib folder

Configuration Maven Library Step 3: configure project dependency in RM2PT: Right Click Project -> Build Path -> Configure Build Path -> Add JARS under Classpath or add NLP jars as User Library


Configuration Maven Library Step 4: configure project dependency in NL2OCL Plugin: Project / META-INF / MANIFEST.MF

Then click Runtime Tab, Click Add

Add All required jars

The runtime loading code template is located in src-> package (ArtifactID) -> CoreNLP.xtend
Note that code template is coded by Xtend language.

The translation code template is located in src-> package (ArtifactID) -> TranslateNL2OCL.xtend

Test your generator project

Double Click Eclipse Application

Click Run to open a new Eclipse IDE and then import the requirements model, and right click .remodel and choose RM2PT-Dev / Loading StandNLP Runtime

Then choose RM2PT-Dev / Translate Nature Language to OCL

Package Code Generator Project through Maven

set maven goal as: clean package
The Console will show the result as follows:

The finally code generator p2 updatesite is located in xxx.updatesite/target
you can distribute .zip to others to install your code generator
Upload your source code to github with CI/CD support
Create a project on Github

The default code generator project includes CI/CD script under .github/workflow/CICD.yml, you should add your PUSH_Token to secerts to make CI/CD work.
To your github ‘setting / Developer settings / Personal access tokens’, click generate new token. Note that you should select scope of repo and workflow

Then go back to your project, click settings / Secrets, and then paste the tokens with name PUSH_TOKEN

Push your source code to Github Repo


Click Create Repository


Click Commit and Push
Note that you should configure your ssh key propertly if your use ssh way.


Check CI/CD result


Push to RM2PT Plugins Repo
send your application email to yilongyang@buaa.edu.cn, then RM2PT will create a repo for your, then you can push your source code to RM2PT repo.