Installing and Configuring the CxSAST Maven Plugin

The CxSAST plugin for Maven is simple to install and configure.

First, you will need to download and install Maven.

Create new Maven project and compile it.  

After installing Maven, you will need to download and install CxSAST.

In the following steps you will customize your project pom.xml file for the CxSAST Maven plugin. Below is an example of a pom.xml file.

Installing the CxSAST Maven Plugin

If the following dependency code already exists in your pom.xml , you should already have this plugin. If not, add the following <dependencies> code inside the <plugin>section:

<build>
		<plugins>
        	<plugin>
            	<groupId>com.checkmarx.maven</groupId>
                <artifactId>checkmarx-maven-plugin</artifactId>
                <version>x.xx.x</version>
				<dependencies>
					<dependency>
						<groupId>commons-io</groupId>
						<artifactId>commons-io</artifactId>
						<version>2.5</version>
					</dependency>
				</dependencies>
				<configuration>			
				</configuration>           
            </plugin>
        </plugins>
</build>

This will let Maven know where to look for the CxSAST Maven plugin.

Save the changes to the pom.xml and run.

For any error related issues during installation, please refer to the Frequently Asked Questions page.


If the CxSAST Maven plugin is not found in the repository, install the plugin manually. Click the link to download the plugin and run:

mvn install:install-file -Dfile="/path/to/file" -DgroupId="com.checkmarx.maven" -DartifactId="checkmarx-maven-plugin" -Dversion="8.41.0" -Dpackaging="jar" -DgeneratePom=true