<commit_before>calypso-maven-plugin - Calypso development with Maven
==================================================================================

This is a general purpose Maven plugin to help with the development of any Calypso (http://www.calypso.com) related project.

##Installation##

After checking out the project you will need to resolve a couple of dependency issues. `dnl.utils::j-text-utils` and `com.brsanthu::data-exporter` are not registered with Maven Central and must be installed locally (or within your repository) to continue. The commands to grab and install the files are located within the pom file itself.  You must also install MaCHe (https://github.com/pram/CalypsoDevelopment/tree/master/MaCHe) into your local/remote repository in order to use the release module.

Once this step is complete you can run

    mvn install

to install the plugin into your local .m2 repository. To make the release available to other developers consult the remote deployment documentation associated with your repository.

##Archetype Creation##
To create a new Calypso project run the following command

    mvn archetype:generate -DarchetypeGroupId=com.naughtyzombie.calypso.maven -DarchetypeArtifactId=calypso-maven-plugin -DarchetypeVersion=1.0-SNAPSHOT -DgroupId=com.newinstall.calypso -DartifactId=calypsoexample -Dversion=1.0-SNAPSHOT

Replace the values for the parameters `groupID`, `artifactId` and `version` with your desired values. You will also be asked to enter the Calypso version that you will be working with. You can either add the following

    -DcalypsoVersion=XXxxxx[SPy]

to the archetype generation command above, or you will be asked to enter the version number interactively eg

    Define value for property 'calypsoVersion': : 120000SP6

This will create the project with the following structure.


    calypsoexample
    |   pom.xml
    |
    +---config
    |   |   pom.xml
    |   |
    |   \---src
    |       \---main
    |           \---config
    |           \---resources
    |
    +---custom
    |   |   pom.xml
    |   |
    |   \---src
    |       \---main
    |           \---java
    +---hotfixes
    |   |   pom.xml
    |   |
    |   \---src
    |       \---main
    |           +---java
    |           \---resources
    +---releases
    |   |   pom.xml
    |   |
    |   \---src
    |       \---main
    |           \---resources
    \---scripts
        |   pom.xml
        |
        \---src
            \---main
                \---resources

Copy the Calypso release jar that corresponds to the version number entered above into the `releases/src/main/resources` directory.  

Navigate to the newly created project

    cd calypsoexample

and check that the installation has worked as expected by compiling the project (The project is empty at this stage but should still compile)

    mvn compile

You should see something like the snippet below when this process finishes

    [INFO] ------------------------------------------------------------------------
    [INFO] Reactor Summary:
    [INFO]
    [INFO] calypsoexample .................................... SUCCESS [0.000s]
    [INFO] calypsoexample::config ............................ SUCCESS [0.750s]
    [INFO] calypsoexample::custom ............................ SUCCESS [0.047s]
    [INFO] calypsoexample::releases .......................... SUCCESS [0.047s]
    [INFO] calypsoexample::scripts ........................... SUCCESS [0.031s]
    [INFO] calypsoexample::hotfixes .......................... SUCCESS [0.047s]
    [INFO] ------------------------------------------------------------------------
    [INFO] BUILD SUCCESS
    [INFO] ------------------------------------------------------------------------
    [INFO] Total time: 1.078s
    [INFO] Finished at: Tue Dec 18 12:00:11 EET 2012
    [INFO] Final Memory: 5M/15M
    [INFO] ------------------------------------------------------------------------

##Installing Calypso Resources##

Download the release jar from the Calypso web site(http://www.calypso.com) using your client login details. Place the downloaded jar in the folder $ARTIFACT_ID\releases\src\main\resources. You specified the artifact id when the you used the archetype generate command above (which was calypsoexample)

Now run the following command

    mvn compile -P initial

This will process the Calypso release and generate the commands required for installing Calypso into your local repository, remote repository, as well as the pom fragment that needs to be added to the dependencies section of the parent pom. These will be located in $ARTIFACT_ID\releases\target\mache\$VERSION\. The script files can be directly executed on *nix. On windows, open the script file, ctrl-a and paste into a command window. This will take a while to complete.

Once this is done, you can copy the pom fragment into the dependencies section of the parent pom file in $ARTIFACT_ID/pom.xml

You are now ready to develop and deploy Calypso releases.

##Running Calypso Processes##

To see the currently active Calypso processes run

    mvn calypso:status

You should see output of the following form

    +==========+======================================================================+==============================+==============================+<commit_msg>Documentation update<commit_after>calypso-maven-plugin - Calypso development with Maven
==================================================================================

This is a general purpose Maven plugin to help with the development of any Calypso (http://www.calypso.com) related project.

##Installation##

After checking out the project you will need to resolve a couple of dependency issues. `dnl.utils::j-text-utils` and `com.brsanthu::data-exporter` are not registered with Maven Central and must be installed locally (or within your repository) to continue. The commands to grab and install the files are located within the pom file itself.  You must also install MaCHe (https://github.com/pram/CalypsoDevelopment/tree/master/MaCHe) into your local/remote repository in order to use the release module.

Once this step is complete you can run

    mvn install

to install the plugin into your local .m2 repository. To make the release available to other developers consult the remote deployment documentation associated with your repository.

##Archetype Creation##
To create a new Calypso project run the following command

    mvn archetype:generate -DarchetypeGroupId=com.naughtyzombie.calypso.maven -DarchetypeArtifactId=calypso-maven-plugin -DarchetypeVersion=1.0-SNAPSHOT -DgroupId=com.newinstall.calypso -DartifactId=calypsoexample -Dversion=1.0-SNAPSHOT

Replace the values for the parameters `groupID`, `artifactId` and `version` with your desired values. You will also be asked to enter the Calypso version that you will be working with. You can either add the following

    -DcalypsoVersion=XXxxxx[SPy]

to the archetype generation command above, or you will be asked to enter the version number interactively eg

    Define value for property 'calypsoVersion': : 120000SP6

This will create the project with the following structure.


    calypsoexample
    |   pom.xml
    |
    +---config
    |   |   pom.xml
    |   |
    |   \---src
    |       \---main
    |           \---config
    |           \---resources
    |
    +---custom
    |   |   pom.xml
    |   |
    |   \---src
    |       \---main
    |           \---java
    +---hotfixes
    |   |   pom.xml
    |   |
    |   \---src
    |       \---main
    |           +---java
    |           \---resources
    +---releases
    |   |   pom.xml
    |   |
    |   \---src
    |       \---main
    |           \---resources
    \---scripts
        |   pom.xml
        |
        \---src
            \---main
                \---resources

Copy the Calypso release jar that corresponds to the version number entered above into the `releases/src/main/resources` directory.  

Navigate to the newly created project

    cd calypsoexample

and check that the installation has worked as expected by compiling the project (The project is empty at this stage but should still compile)

    mvn compile

You should see something like the snippet below when this process finishes

    [INFO] ------------------------------------------------------------------------
    [INFO] Reactor Summary:
    [INFO]
    [INFO] calypsoexample .................................... SUCCESS [0.000s]
    [INFO] calypsoexample::config ............................ SUCCESS [0.750s]
    [INFO] calypsoexample::custom ............................ SUCCESS [0.047s]
    [INFO] calypsoexample::releases .......................... SUCCESS [0.047s]
    [INFO] calypsoexample::scripts ........................... SUCCESS [0.031s]
    [INFO] calypsoexample::hotfixes .......................... SUCCESS [0.047s]
    [INFO] ------------------------------------------------------------------------
    [INFO] BUILD SUCCESS
    [INFO] ------------------------------------------------------------------------
    [INFO] Total time: 1.078s
    [INFO] Finished at: Tue Dec 18 12:00:11 EET 2012
    [INFO] Final Memory: 5M/15M
    [INFO] ------------------------------------------------------------------------

##Installing Calypso Resources##

Download the release jar from the Calypso web site(http://www.calypso.com) using your client login details. Place the downloaded jar in the folder $ARTIFACT_ID\releases\src\main\resources. You specified the artifact id when the you used the archetype generate command above (which was calypsoexample)

Now run the following command

    mvn compile -P initial

This will process the Calypso release and generate the commands required for installing Calypso into your local repository, remote repository, as well as the pom fragment that needs to be added to the dependencies section of the parent pom. These will be located in $ARTIFACT_ID\releases\target\mache\$VERSION\. The deploy script has the repository URL as 'dummy'. You should replace this with the correct url for your repository. The script files can be directly executed on *nix. On windows, open the script file, ctrl-a and paste into a command window. This will take a while to complete.

Once this is done, you can copy the pom fragment into the dependencies section of the parent pom file in $ARTIFACT_ID/pom.xml

You are now ready to develop and deploy Calypso releases.

##Running Calypso Processes##

To see the currently active Calypso processes run

    mvn calypso:status

You should see output of the following form

    +==========+======================================================================+==============================+==============================+
{'fraction_non_alphanumeric': 0.19414397612831033, 'fraction_numerical': 0.010257366654233494, 'mean_word_length': 2.2187875150060026, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 4, 'xml': 14}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7295095', 'n_tokens_mistral': 2846, 'n_tokens_neox': 2649, 'n_words': 1097}