Problems with maven replacer plugin - maven

I am trying to use the com.google.code.maven-replacer-plugin but is seems to have no effect at all.
<build>
<plugins>
<plugin>
<groupId>com.google.code.maven-replacer-plugin</groupId>
<artifactId>maven-replacer-plugin</artifactId>
<version>1.3.5</version>
<executions>
<execution>
<id>replaceTokens</id>
<phase>prepare-package</phase>
<goals>
<goal>replace</goal>
</goals>
</execution>
</executions>
<configuration>
<file>src/main/resources/executionConfig/execution-configuration.properties</file>
<replacements>
<replacement>
<token>ImportResultToXray</token>
<value>false</value>
</replacement>
</replacements>
</configuration>
</plugin>
</plugins>
</build>
In properties file I have ImportResultToXray set to true and assumed that the plugin would change it to false. But this does not happen. Am I getting something wrong here?

Related

Spring Boot application - build process with Angular does not update Angular part

My Spring Boot application contains a Java part and an Angular part. The Angular part (with an index.html,etc) is generated into the folder src/main/resources/static. Works fine. I noticed that when building the final JAR often (?) the static part is lost.
How come? What can I do to get the static / HTML part into the final Spring Boot JAR?
My <build> part of the pom.xml is shown below. All not-interesting parts (like unit testing, etc) is removed.
<build>
...
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.6.0</version>
<executions>
<execution>
<id>npm install</id>
<goals>
<goal>exec</goal>
</goals>
<phase>initialize</phase>
<configuration>
<executable>npm</executable>
<arguments>
<argument>install</argument>
</arguments>
</configuration>
</execution>
<execution>
<id>build Angular production code</id>
<goals>
<goal>exec</goal>
</goals>
<phase>compile</phase>
<configuration>
<executable>npm</executable>
<arguments>
<argument>run</argument>
<argument>build</argument>
<argument>--prod</argument>
</arguments>
</configuration>
</execution>
</executions>
</plugin>
...
</build>
Thank you #Carlos Cavero! You pointed me in the right direction. Thank you so much!
The problem was that the npm build was done in the 'compile' phase. On some machines the 'compile' phase of the Java code was done before that 'compile' with the Angular 'npm build'.
The solution was to put the Angular (typescript) npm phase BEFORE the compile phase. That is: in the generate-resource phase. It could not be the 'validate' phase, because that one is done before the 'install' with the 'npm install'.
This is now the correct Angular / npm build phase.
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.6.0</version>
<executions>
<execution>
<id>npm install</id>
<goals>
<goal>exec</goal>
</goals>
<phase>initialize</phase>
<configuration>
<executable>npm</executable>
<arguments>
<argument>install</argument>
</arguments>
</configuration>
</execution>
<execution>
<id>build Angular production code</id>
<goals>
<goal>exec</goal>
</goals>
<phase>generate-resources</phase>
<configuration>
<executable>npm</executable>
<arguments>
<argument>run</argument>
<argument>build</argument>
<argument>--prod</argument>
</arguments>
</configuration>
</execution>
</executions>
</plugin>
I am using validate phase to copy the static angular resources to spring:
mvn clean install
Using a parent pom to split angular from Spring project:
<modules>
<module>phs-frontend</module>
<module>phs-frontend-web</module>
</modules>
Where phs-frontend project is an angular project with a pom file and maven clean plugin:
<build>
<plugins>
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<version>2.5</version>
<configuration>
<filesets>
<fileset>
<directory>dist</directory>
<includes>
<include>*</include>
</includes>
</fileset>
</filesets>
</configuration>
</plugin>
<plugin>
<groupId>com.github.eirslett</groupId>
<artifactId>frontend-maven-plugin</artifactId>
<version>1.6</version>
<executions>
<execution>
<id>install node and npm</id>
<goals>
<goal>install-node-and-npm</goal>
</goals>
<configuration>
<nodeVersion>v6.10.3</nodeVersion>
<npmVersion>5.6.0</npmVersion>
</configuration>
</execution>
<execution>
<id>npm install</id>
<goals>
<goal>npm</goal>
</goals>
<configuration>
<arguments>install</arguments>
</configuration>
</execution>
<execution>
<id>npm run build</id>
<goals>
<goal>npm</goal>
</goals>
<configuration>
<arguments>run build</arguments>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
And the phs-frontend-web is the Spring project:
<build>
<plugins>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>2.6</version>
<executions>
<execution>
<id>copy-resources</id>
<phase>validate</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${project.build.outputDirectory}/static/</outputDirectory>
<encoding>UTF-8</encoding>
<nonFilteredFileExtensions>
<nonFilteredFileExtension>ttf</nonFilteredFileExtension>
<nonFilteredFileExtension>woff</nonFilteredFileExtension>
<nonFilteredFileExtension>woff2</nonFilteredFileExtension>
</nonFilteredFileExtensions>
<resources>
<resource>
<directory>${project.basedir}/phs-frontend/dist</directory>
<filtering>true</filtering>
<includes>
<include>**/*</include>
</includes>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<executable>true</executable>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<failOnMissingWebXml>false</failOnMissingWebXml>
</configuration>
</plugin>
</plugins>
</build>

Configuring Findbugs in Jenkins

My goal is to fail jenkins build for my project in case bugs are reported by FindBugs plugin. For that I have integrated FindBugs config in the project's pom.xml & the execution part of the config is below
<executions>
<execution>
<id>analyze-compile</id>
<phase>compile</phase>
<goals><goal>check</goal></goals>
<configuration>
<threshold>High</threshold>
</configuration>
</execution>
</executions>
I found the above config from online sources & with this config, the project is not failing incase of bugs reported by FindBugs. Also I have tried other configs like below
<xmlOutput>true</xmlOutput>
<configuration>
<failOnError>${findbugs.failOnError}</failOnError>
<threshold>High</threshold>
</configuration>
<executions>
<execution>
<id>noFailOnError</id>
<phase>verify</phase>
<goals>
<goal>check</goal>
</goals>
<configuration>
<failOnError>false</failOnError>
</configuration>
</execution>
<execution>
<id>failOnError</id>
<phase>install</phase>
<goals>
<goal>check</goal>
</goals>
<configuration>
<failOnError>true</failOnError>
</configuration>
</execution>
</executions>
Can someone please let me know what is the correct execution which needs to be used for failing build in case of bugs in FindBugs ?
Below is the correct configuration for find-bugs in pom.xml. It does the following - Perform FindBugs check, Generate xml report during verify phase , Transform it to html & Fail build in case bugs are present during check
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<version>2.4.0</version>
<executions>
<execution>
<id>findbug</id>
<phase>verify</phase>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
<configuration>
<effort>Max</effort>
<threshold>Low</threshold>
<findbugsXmlOutputDirectory>
${project.build.directory}/findbugs
</findbugsXmlOutputDirectory>
<failOnError>false</failOnError>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>xml-maven-plugin</artifactId>
<version>1.0</version>
<executions>
<execution>
<phase>verify</phase>
<goals>
<goal>transform</goal>
</goals>
</execution>
</executions>
<configuration>
<transformationSets>
<transformationSet>
<dir>${project.build.directory}/findbugs</dir>
<outputDir>${project.build.directory}/findbugs</outputDir>
<stylesheet>fancy-hist.xsl</stylesheet>
<!--<stylesheet>default.xsl</stylesheet> -->
<!--<stylesheet>plain.xsl</stylesheet> -->
<!--<stylesheet>fancy.xsl</stylesheet> -->
<!--<stylesheet>summary.xsl</stylesheet> -->
<fileMappers>
<fileMapper
implementation="org.codehaus.plexus.components.io.filemappers.FileExtensionMapper">
<targetExtension>.html</targetExtension>
</fileMapper>
</fileMappers>
</transformationSet>
</transformationSets>
</configuration>
<dependencies>
<dependency>
<groupId>com.google.code.findbugs</groupId>
<artifactId>findbugs</artifactId>
<version>2.0.0</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<version>3.0.3</version>
<executions>
<execution>
<id>failing-on-high</id>
<phase>install</phase>
<goals>
<goal>findbugs</goal>
<goal>check</goal>
</goals>
<configuration>
<effort>Max</effort>
<threshold>Low</threshold>
<failOnError>true</failOnError>
</configuration>
</execution>
</executions>
</plugin>

Using Maven to build c++ in eclipse

My Project consists of multiple Java-Projects, one Java-JNI-C++ Project as a Bridge and one pure C++ Project keeping an algorithm library. I managed to write Maven build configurations for all 3 project kinds. So when I'm calling them on the commandline (Windows 7, 64bit) everything works great.
I do not use any make files or something like this. I use exec-maven-plugin to call my mingw 64bit installation without cygwin (and I also didn't at least knowingly install msys). So 2 pure commandline g++ commands each for the JNA and Library Project.
What I need now for a smooth development workflow is to be able to build and debug the this projects from within Eclipse but using the maven build scripts, since I don't want to put work into my poms and additionally configure the eclipse builder. This should be consistent! Furthermore should the error parsing in Eclipse be konsistent with the output of the maven build.
For my Java projects this works greatly out of the box. Eclipse picks up the maven config and CLEAN and BUILD produces exactly what it should. (Though I see that the Java Builder is still active in the project's properties. Why??). But I cannot get it to work with the CDT.
When I disable the C++ Builder Eclipse just builds with maven (what I want), but the clean commands do not work correctly. Also I get errors marked which are not errors by the compiler. Of course this should be consistent.
Are there tutorials for this use case?
I did not find information on that subject. I'm not sure if I'm generally going into a wrong direction missing best practices or something?!
Since this is my first s.o. question, please feel free to give me also feedback on my question. What I can provide I will ;-)
Some Information:
System Windows 7, 64bit
Eclipse Juno, m2e
Library POM:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>test</groupId>
<artifactId>mylib</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>MyLib</name>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.eclipse.m2e</groupId>
<artifactId>lifecycle-mapping</artifactId>
<version>1.0.0</version>
<configuration>
<lifecycleMappingMetadata>
<pluginExecutions>
<pluginExecution>
<pluginExecutionFilter>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<versionRange>[1.1.1,)</versionRange>
<goals>
<goal>exec</goal>
</goals>
</pluginExecutionFilter>
<action>
<execute>
<runOnIncremental>true</runOnIncremental>
</execute>
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
</configuration>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.1.1</version>
<executions>
<execution>
<id>compile-Windows_x64</id>
<phase>compile</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>g++</executable>
<workingDirectory>target/cpp/Windows_x64</workingDirectory>
<arguments>
<argument>-Wall</argument>
<argument>-m64</argument>
<argument>-c</argument>
<argument>-DAPI_EXPORT</argument>
<argument>-g3</argument>
<argument>-std=c++0x</argument>
<argument>../../../src/main/cpp/*.cpp</argument>
</arguments>
</configuration>
</execution>
<execution>
<id>link-Windows_x64</id>
<phase>compile</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>g++</executable>
<workingDirectory>target</workingDirectory>
<arguments>
<argument>-shared</argument>
<argument>-s</argument>
<argument>-m64</argument>
<argument>-oMyLib_Windows_x64.dll</argument>
<argument>cpp/Windows_x64/*.o</argument>
</arguments>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.4</version>
<configuration>
<descriptors>
<descriptor>src/main/assembly/assembly.xml</descriptor>
</descriptors>
</configuration>
<executions>
<execution>
<id>make-assembly</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<executions>
<execution>
<id>default-testCompile</id>
<phase>none</phase>
</execution>
<execution>
<id>default-compile</id>
<phase>none</phase>
</execution>
</executions>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<version>2.3.2</version>
<executions>
<execution>
<id>default-jar</id>
<phase>none</phase>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.10</version>
<executions>
<execution>
<id>default-test</id>
<phase>none</phase>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>2.5</version>
<executions>
<execution>
<id>default-resources</id>
<phase>none</phase>
</execution>
<execution>
<id>default-testResources</id>
<phase>none</phase>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-install-plugin</artifactId>
<version>2.3.1</version>
<executions>
<execution>
<id>default-install</id>
<phase>none</phase>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.7</version>
<executions>
<execution>
<id>default-deploy</id>
<phase>none</phase>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-site-plugin</artifactId>
<version>3.0</version>
<executions>
<execution>
<id>default-site</id>
<phase>none</phase>
</execution>
<execution>
<id>default-deploy</id>
<phase>none</phase>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
JNI POM:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>test</groupId>
<artifactId>myprog</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>MyProg</name>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.eclipse.m2e</groupId>
<artifactId>lifecycle-mapping</artifactId>
<version>1.0.0</version>
<configuration>
<lifecycleMappingMetadata>
<pluginExecutions>
<pluginExecution>
<pluginExecutionFilter>
<groupId>org.codehaus.mojo</groupId>
<artifactId>truezip-maven-plugin</artifactId>
<versionRange>[1.1,)</versionRange>
<goals>
<goal>copy</goal>
</goals>
</pluginExecutionFilter>
<action>
<execute>
<runOnIncremental>true</runOnIncremental>
</execute>
</action>
</pluginExecution>
<pluginExecution>
<pluginExecutionFilter>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<versionRange>[1.1.1,)</versionRange>
<goals>
<goal>exec</goal>
</goals>
</pluginExecutionFilter>
<action>
<execute>
<runOnIncremental>true</runOnIncremental>
</execute>
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
</configuration>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>truezip-maven-plugin</artifactId>
<version>1.1</version>
<executions>
<execution>
<id>get-library-headers</id>
<goals>
<goal>copy</goal>
</goals>
<phase>generate-sources</phase>
<configuration>
<fileset>
<directory>../MyLib/target/mylib-0.0.1-SNAPSHOT-dll.zip</directory>
<includes>
<include>headers/*</include>
</includes>
<outputDirectory>${project.build.directory}/myLib</outputDirectory>
</fileset>
</configuration>
</execution>
<execution>
<id>get-library</id>
<goals>
<goal>copy</goal>
</goals>
<phase>generate-resources</phase>
<configuration>
<fileset>
<directory>../MyLib/target/mylib-0.0.1-SNAPSHOT-dll.zip</directory>
<includes>
<include>*.dll</include>
</includes>
<outputDirectory>${project.build.directory}</outputDirectory>
</fileset>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.1.1</version>
<executions>
<execution>
<id>compile-Windows_x64</id>
<phase>compile</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>g++</executable>
<workingDirectory>target/cpp/Windows_x64</workingDirectory>
<arguments>
<argument>-Wall</argument>
<argument>-m64</argument>
<argument>-c</argument>
<argument>-g3</argument>
<argument>-std=c++0x</argument>
<argument>-I../../myLib/headers</argument>
<argument>../../../src/main/cpp/*.cpp</argument>
</arguments>
</configuration>
</execution>
<execution>
<id>link-Windows_x64</id>
<phase>compile</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>g++</executable>
<workingDirectory>target</workingDirectory>
<arguments>
<argument>-m64</argument>
<argument>-s</argument>
<argument>-oMyProg_Windows_x64.exe</argument>
<argument>cpp/Windows_x64/*.o</argument>
<argument>MyLib_Windows_x64.dll</argument>
</arguments>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<executions>
<execution>
<id>default-testCompile</id>
<phase>none</phase>
</execution>
<execution>
<id>default-compile</id>
<phase>none</phase>
</execution>
</executions>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<version>2.3.2</version>
<executions>
<execution>
<id>default-jar</id>
<phase>none</phase>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.10</version>
<executions>
<execution>
<id>default-test</id>
<phase>none</phase>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>2.5</version>
<executions>
<execution>
<id>default-resources</id>
<phase>none</phase>
</execution>
<execution>
<id>default-testResources</id>
<phase>none</phase>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
Thankx
Eclipse does not use the Maven build. Instead it configures the JDT according to your POM. This is done through an M2E (Maven to Eclipse) connector. If you want the same to work for CDT, then you would need an M2E connector for that. I'm not aware of an existing one, so you would have to write an Eclipse plugin for that. See http://wiki.eclipse.org/M2E/Extension_Development for details on how to do that.
Of course, you could also use "execute" instead of "ignore" in your lifecycleMapping in the pom. But that would probably make for a pretty slow build, because the whole build would be triggered on each change. And still this wouldn't "magically" make the errors from Maven appear in your files.

Property autocapitalization in maven

I have a maven project that requires a property to be set at the command line(-Dmy.property=val).
What I need to do is to convert that string into all caps since that property is
used for string replacement in a number of files through the maven-resources-plugin.
What's the simplest way to do this?
The groovy plugin could be used. The following configures it to run at the beginning of the Maven build process:
<plugin>
<groupId>org.codehaus.groovy.maven</groupId>
<artifactId>gmaven-plugin</artifactId>
<version>1.0</version>
<executions>
<execution>
<phase>initialize</phase>
<goals>
<goal>execute</goal>
</goals>
<configuration>
<source>
import org.apache.commons.lang.StringUtils
project.properties["my.property"] = StringUtils.upperCase(project.properties["my.property"])
</source>
</configuration>
</execution>
</executions>
</plugin>
With following code, MY_PROPERTIES equals to uppercased value of my.properties:
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>1.12</version>
<executions>
<execution>
<id>properties-to-uppercase</id>
<goals>
<goal>regex-property</goal>
</goals>
<configuration>
<name>MY_PROPERTY</name>
<regex>.*</regex>
<value>${my.property}</value>
<replacement>$0</replacement>
<failIfNoMatch>false</failIfNoMatch>
<toUpperCase>true</toUpperCase>
</configuration>
</execution>
</executions>
</plugin>

"exec-maven-plugin" does not execute

I have the following profile which I am executing successfully ("mvn exec:exec -DrunMule"):
<profile>
<id>runMule</id>
<activation>
<property>
<name>runMule</name>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.2.1</version>
<configuration>
<executable>java</executable>
<arguments>
<argument>-classpath</argument>
<!-- automatically creates the classpath using all project dependencies, also adding the project build directory -->
<classpath/>
<argument>org.mule.MuleServer</argument>
<argument>-config</argument>
<argument>mule-config.xml</argument>
</arguments>
</configuration>
</plugin>
</plugins>
</build>
</profile>
I am trying to convert it to run at a specific stage when performing a maven build within the same pom.xml:
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.2.1</version>
<executions>
<execution>
<phase>validate</phase>
<goals>
<goal>java</goal>
</goals>
</execution>
</executions>
<configuration>
<mainClass>org.mule.MuleServer</mainClass>
<arguments>
<argument>-classpath</argument>
<classpath/>
<argument>-config</argument>
<argument>mule-config.xml</argument>
</arguments>
</configuration>
This new plugin does not execute when I perform a "mvn clean install". It is unclear to me why it would not.
-------------- update --------------
Once suggestion was to put the configuration inside the execution. This is what I tried and it still did not execute.
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<executions>
<execution>
<phase>validate</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>java</executable>
<arguments>
<argument>-classpath</argument>
<classpath/>
<argument>org.mule.MuleServer</argument>
<argument>-config</argument>
<argument>mule-config.xml</argument>
</arguments>
</configuration>
</execution>
</executions>
</plugin>
'configuration' should be under 'execution':
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<executions>
<execution>
<phase>validate</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>echo</executable>
<arguments>
<argument>"test"</argument>
</arguments>
</configuration>
</execution>
</executions>
</plugin>
The plugin was defined under another, much larger profile. I thought I was adding it to the general build when I really was not. I moved it out of the profile and it worked. Lesson learned. Thank-you for the responses.

Resources