scons maven plugin

The SCons maven plugin is used to glue the SCons and the maven buildsystem together.

Goals Overview

The main goals

Build process overview

  • Let maven resolve dependencies and download zip archives
  • Generate generic SCons configuration from resources bundled with the plugin
  • Expand the zip archives
  • Generate project SCons configuration from the pom
  • Run SCons to compile the sources
  • Run SCons to compile tests
  • Run tests
  • Package the SCons output into a zip archive

Usage

Include plugin in the project configuration and add a build architecture.

<project>
        <build>
                <plugins>
                        <plugin>
                                <groupId>de.gsi.cs.co.maven.plugins</groupId>
                                <artifactId>scons-maven-plugin</artifactId>
                                <version>...</version>
                                <extensions>true</extensions>
                        </plugin>
                </plugins>
        </build>
</project>

TODO the build architecture should be moved to a scons plugin.

Create a SConscript file in your projects source directory ($project/src/SConscript)

Import('env')  # get the preconfigured environment
# compile helloworld from helloWorld.cc
hello = env.Program('helloworld', ['helloWorld.cc'])
# install the program into the default bin folder
env.InstallBin(hello)

The plugin will provide the SCons environment. For all dependencies declared in the pom, header include paths, library search paths and library linker flags are automaticly added.

Notes

Minimum Version to support jdk7 is 1.0.9. Previous version would not support packaging due to a bug in org.codehaus.plexus:plexus-io. The maven-scons-plugin now enforces plexus-io:2.0.1. See also http://jira.codehaus.org/browse/PLXCOMP-185