DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Snippets has posted 5883 posts at DZone. View Full User Profile

Use Maven Ant Plugin To Run Python Test

  • submit to reddit
        Started to use python for some system stuff and wanted to be able to test it with the rest of the code.

The ant plugin is an EZ way to shell out from pom.xml

                            <tasks unless="maven.test.skip">
                                <echo message="this example run some python test"/>
                                <exec executable="python" error="target/">
                                    <env key="PYTHONPATH" path="src/main/python"/>
                                    <arg value="src/test/python/" />
                                    <arg value="${test}"/>