Mavenize Python, Jython, Delphi, Ruby and so on....

A new lifecycle: script

A new lifecycle with two new goals handles the build process for scripts.
In the compile phase the goal scriptcopy simple copies the file from the source folder to target/classes and unjars all dependent jars.
In the test phase the goal runs through each file under the test folder and executes an commandline command on that test file.

Sample pom for Python


<?xml version="1.0" encoding="UTF-8"?>
<project>
...
	<build>
		<plugins>
			<plugin>
				<groupId>org.phpmaven</groupId>
				<artifactId>maven-php-plugin</artifactId>
				<version>1.1-SNAPSHOT</version>
				<configuration>
				<!-- the command which is executed on each file-->
					<command>python *{file}</command>
				<!-- the command which is executed on startup of the test process -->
					<startupCommand>
					export PYTHONPATH=*{sourceDirectory}*{file.pathSeparator}*{includeDirectory}*{file.pathSeparator}*{testDirectory}
					</startupCommand>
				</configuration>
				<extensions>true</extensions>
				<!-- the test goal parses the output of the script and searches for errors  -->
				<errorIdentifiers>
					<errorIdentifier>Error:</errorIdentifier>
				</errorIdentifiers>
			</plugin>
		</plugins>
	</build>
...
	<dependencies>
		<dependency>
			<groupId>org.sample.scirpt</groupId>
			<artifactId>samplescript
			</artifactId>
			<version>1.1-ALPHA</version>
		</dependency>
	</dependencies>
</project>

Configuration