<commit_before>sputnik-maven-plugin
====================

Sputnik maven plugin
<commit_msg>First info how to use it<commit_after>sputnik-maven-plugin
====================

[![Build Status](https://travis-ci.org/ingwarsw/sputnik-maven-plugin.png)](https://travis-ci.org/ingwarsw/sputnik-maven-plugin)
[![Coverage Status](https://coveralls.io/repos/ingwarsw/sputnik-maven-plugin/badge.png?branch=master)](https://coveralls.io/r/ingwarsw/sputnik-maven-plugin?branch=master)


Maven plugin for sputnik revieve engine:
https://github.com/TouK/sputnik


# Basic usage

    <plugin>
        <groupId>org.eu.ingwar.maven</groupId>
        <artifactId>sputnik-maven-plugin</artifactId>
        <version>0.0.1-SNAPSHOT</version>
        <executions>
            <execution>
                <id>sputnik-default</id>
                <goals>
                    <goal>stash</goal>
                </goals>
            </execution>
        </executions>
        <configuration>
            <checkstyleEnabled>true</checkstyleEnabled>
            <checkstyleConfigurationFile>checkstyle_file.xml</checkstyleConfigurationFile>
                            
            <stashHost>stash.server.addr</stashHost>
            <stashUsername>user</stashUsername>
            <stashPassword><PASSWORD></stashPassword>
            <stashProjectKey>project</stashProjectKey>
            <stashRepositorySlug>slug</stashRepositorySlug>
        </configuration>
    </plugin>



# Extended usage

## Stash + Jenkins

        <profile>
            <id>sputnik</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>build-helper-maven-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>regex-property-sputnik</id>
                                <phase>initialize</phase>
                                <goals>
                                    <goal>regex-property</goal>
                                </goals>
                                <configuration>
                                    <name>sputnik.pullRequestId</name>
                                    <value>${env.GIT_BRANCH2}</value>
                                    <regex>^origin/pr/([0-9]+)$</regex>
                                    <replacement>$1</replacement>
                                    <failIfNoMatch>true</failIfNoMatch>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.eu.ingwar.maven</groupId>
                        <artifactId>sputnik-maven-plugin</artifactId>
                        <version>0.0.1-SNAPSHOT</version>
                        <executions>
                            <execution>
                                <id>sputnik-default</id>
                                <goals>
                                    <goal>stash</goal>
                                </goals>
                            </execution>
                        </executions>
                        <configuration>
                            <checkstyleEnabled>true</checkstyleEnabled>
                            <checkstyleConfigurationFile>checkstyle_file.xml</checkstyleConfigurationFile>
                            
                            <stashHost>stash.server.addr</stashHost>
                            <stashUsername>user</stashUsername>
                            <stashPassword><PASSWORD></stashPassword>
                            <stashProjectKey>project</stashProjectKey>
                            <stashRepositorySlug>slug</stashRepositorySlug>
                        </configuration>
                    </plugin>
                </plugins>
                
            </build>
        </profile>

{'fraction_non_alphanumeric': 0.11080332409972299, 'fraction_numerical': 0.0025182573659027953, 'mean_word_length': 1.1563517915309447, 'pattern_counts': {'":': 0, '<': 111, '<?xml version=': 0, '>': 111, 'https://': 5, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 7, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3643091', 'n_tokens_mistral': 1049, 'n_tokens_neox': 961, 'n_words': 98}