Yes, set the plugin parameter
to prevent
the plugin from throwing an exception if SCM information is not found.
+ The other option is to use
+ Default is git
diff --git a/src/test/java/org/codehaus/mojo/build/it/CreateMetadataMojoTest.java b/src/test/java/org/codehaus/mojo/build/it/CreateMetadataMojoTest.java
index 0764c8d7..eea6ec07 100644
--- a/src/test/java/org/codehaus/mojo/build/it/CreateMetadataMojoTest.java
+++ b/src/test/java/org/codehaus/mojo/build/it/CreateMetadataMojoTest.java
@@ -55,4 +55,19 @@ public void testBasicJsonConfiguration() throws Exception {
Assert.assertTrue(new File(testDir, "target/generated/build-metadata/build.properties").exists());
Assert.assertTrue(new File(testDir, "target/classes/build.properties").exists());
}
+
+ @Test
+ public void testBasicConfigurationNoScm() throws Exception {
+ File projDir = resources.getBasedir("create-metadata-it-no-scm");
+
+ MavenExecution mavenExec = maven.forProject(projDir);
+ MavenExecutionResult result = mavenExec.withCliOption("-e").execute("clean", "test");
+ result.assertErrorFreeLog();
+
+ File testDir = result.getBasedir();
+ Assert.assertTrue(new File(testDir, "target/file1.properties").exists());
+ Assert.assertTrue(new File(testDir, "target/xxx/file1.properties").exists());
+ Assert.assertTrue(new File(testDir, "target/generated/build-metadata/build.properties").exists());
+ Assert.assertTrue(new File(testDir, "target/classes/build.properties").exists());
+ }
}
diff --git a/src/test/projects/create-metadata-it-no-scm/pom.xml b/src/test/projects/create-metadata-it-no-scm/pom.xml
new file mode 100644
index 00000000..88d3e924
--- /dev/null
+++ b/src/test/projects/create-metadata-it-no-scm/pom.xml
@@ -0,0 +1,42 @@
+
+