diff --git a/licensescout-core/src/main/java/org/aposin/licensescout/execution/ExecutionParameters.java b/licensescout-core/src/main/java/org/aposin/licensescout/execution/ExecutionParameters.java
index b1046863..c609f507 100644
--- a/licensescout-core/src/main/java/org/aposin/licensescout/execution/ExecutionParameters.java
+++ b/licensescout-core/src/main/java/org/aposin/licensescout/execution/ExecutionParameters.java
@@ -35,7 +35,7 @@ public class ExecutionParameters {
private ArchiveType archiveType;
/**
- * Directory to scan for archives.
+ * Location to scan for archives.
*/
private ScanLocation scanLocation;
diff --git a/licensescout-core/src/main/java/org/aposin/licensescout/execution/Executor.java b/licensescout-core/src/main/java/org/aposin/licensescout/execution/Executor.java
index bcd59b38..89df3d0d 100644
--- a/licensescout-core/src/main/java/org/aposin/licensescout/execution/Executor.java
+++ b/licensescout-core/src/main/java/org/aposin/licensescout/execution/Executor.java
@@ -156,7 +156,7 @@ public void execute() throws LicenseScoutExecutionException, LicenseScoutFailOnE
final AbstractFinder finder = FinderFactory.getInstance().createFinder(executionParameters, licenseStoreData,
finderParameters);
getLog().info("Starting scan on "
- + getExecutionParameters().getScanLocation().getScanDirectory().getAbsolutePath() + "...");
+ + getExecutionParameters().getScanLocation().toLogString() + "...");
OutputResult outputResult;
try {
@@ -441,15 +441,26 @@ private OutputResult createOutputResult(final FinderResult finderResult) {
}
private void checkParameters(final ILSLog log) throws LicenseScoutExecutionException {
- final File scanDirectory = getExecutionParameters().getScanLocation().getScanDirectory();
- if (scanDirectory != null) {
- if (!scanDirectory.exists()) {
- throw new LicenseScoutExecutionException(
- "This scan directory does not exist: " + scanDirectory.getAbsolutePath());
+ final ScanLocation scanLocation = getExecutionParameters().getScanLocation();
+ if (scanLocation != null) {
+ List scanFiles = scanLocation.getScanFiles();
+ if (scanFiles != null && !scanFiles.isEmpty()) {
+ // OK
+ log.info("using scan files: " + scanFiles);
+ } else {
+ final File scanDirectory = scanLocation.getScanDirectory();
+ if (scanDirectory != null) {
+ if (!scanDirectory.exists()) {
+ throw new LicenseScoutExecutionException(
+ "This scan directory does not exist: " + scanDirectory.getAbsolutePath());
+ }
+ log.info("using scan directory: " + scanDirectory.getAbsolutePath());
+ } else {
+ throw new LicenseScoutExecutionException("neither scanFiles nor scanDirectory configured");
+ }
}
- log.info("using scan directory: " + scanDirectory.getAbsolutePath());
} else {
- throw new LicenseScoutExecutionException("scanDirectory not configured");
+ throw new LicenseScoutExecutionException("scan location not configured");
}
}
diff --git a/licensescout-core/src/main/java/org/aposin/licensescout/exporter/AbstractVelocityExporter.java b/licensescout-core/src/main/java/org/aposin/licensescout/exporter/AbstractVelocityExporter.java
index 37cdd46b..4f90951c 100644
--- a/licensescout-core/src/main/java/org/aposin/licensescout/exporter/AbstractVelocityExporter.java
+++ b/licensescout-core/src/main/java/org/aposin/licensescout/exporter/AbstractVelocityExporter.java
@@ -88,7 +88,8 @@ private VelocityContext createVelocityContext(final OutputResult outputResult,
final List archiveFiles = getSortedArchives(outputResult);
context.put("archiveFiles", archiveFiles);
- context.put("sourcePath", outputResult.getFinderResult().getScanDirectory().getAbsolutePath());
+ final File scanDirectory = outputResult.getFinderResult().getScanDirectory();
+ context.put("sourcePath", scanDirectory != null ? scanDirectory.getAbsolutePath() : "");
context.put("detectionStatusStatistics", outputResult.getDetectionStatusStatistics());
context.put("legalStatusStatistics", outputResult.getLegalStatusStatistics());
context.put("generalStatistics", outputResult.getGeneralStatistics());
diff --git a/licensescout-core/src/main/java/org/aposin/licensescout/finder/AbstractFinder.java b/licensescout-core/src/main/java/org/aposin/licensescout/finder/AbstractFinder.java
index c01559a3..dedf4e2d 100644
--- a/licensescout-core/src/main/java/org/aposin/licensescout/finder/AbstractFinder.java
+++ b/licensescout-core/src/main/java/org/aposin/licensescout/finder/AbstractFinder.java
@@ -86,9 +86,9 @@ protected final ILSLog getLog() {
}
/**
- * Sets the directory to scan.
+ * Sets the scan location.
*
- * @param scanLocation the directory to scan
+ * @param scanLocation the location to scan
*/
public final void setScanLocation(final ScanLocation scanLocation) {
this.scanLocation = scanLocation;
@@ -97,6 +97,9 @@ public final void setScanLocation(final ScanLocation scanLocation) {
/**
* Obtains the scan location.
*
+ * Is intended to be used for logging. For processing, {@link #getScanDirectory()}
+ * and {@link #getScanFiles()} should be used.
+ *
* @return the scan location
*/
protected final ScanLocation getScanLocation() {
@@ -114,6 +117,17 @@ protected final File getScanDirectory() {
return getScanLocation().getScanDirectory();
}
+ /**
+ * Obtains the files to scan.
+ *
+ * @return the scanDirectory
+ *
+ * @see #getScanDirectory()
+ */
+ protected final List getScanFiles() {
+ return scanLocation.getScanFiles();
+ }
+
/**
* Adds an archive to the list of found archives.
* @param foundArchive an archive
@@ -133,7 +147,7 @@ public FinderResult findLicenses() throws Exception {
if (debug) {
printArchiveList(archiveFiles);
}
- getLog().info("Finished scanning for licenses in " + getScanDirectory().getAbsolutePath());
+ getLog().info("Finished scanning for licenses in " + getScanLocation().toLogString());
return new FinderResult(getScanLocation(), archiveFiles);
}
diff --git a/licensescout-core/src/main/java/org/aposin/licensescout/finder/JavaJarFinder.java b/licensescout-core/src/main/java/org/aposin/licensescout/finder/JavaJarFinder.java
index 2f452056..be2e6750 100644
--- a/licensescout-core/src/main/java/org/aposin/licensescout/finder/JavaJarFinder.java
+++ b/licensescout-core/src/main/java/org/aposin/licensescout/finder/JavaJarFinder.java
@@ -23,6 +23,7 @@
import java.util.List;
import org.aposin.licensescout.archive.Archive;
+import org.aposin.licensescout.execution.ScanLocation;
import org.aposin.licensescout.license.IArtifactServerUtil;
import org.aposin.licensescout.license.LicenseStoreData;
import org.aposin.licensescout.util.ArchiveMetaInformation;
@@ -36,20 +37,8 @@
* a starting point.
*
*/
-// TODO: rename to JavaDirectoryFinder
public class JavaJarFinder extends AbstractJavaFinder {
- protected enum ScanMode {
- /**
- * In a directory in the file system that is not an archive.
- */
- DIRECTORY(),
- /**
- * In a directory in the file system that is an archive (i.e. in an unpacked archive).
- */
- UNPACKED_ARCHIVE();
- }
-
private final List specialArchiveNames = new ArrayList<>();
private final FinderHandler fileSystemFinderHandler;
@@ -77,9 +66,17 @@ private void initSpecialArchiveNames() {
*/
@Override
protected void findLicensesImpl() throws Exception {
- final File root = getScanDirectory();
- final String filePath = "";
- parseFile(root, filePath);
+ final File rootDirectory = getScanDirectory();
+ if (rootDirectory != null) {
+ final String filePath = "";
+ parseFile(rootDirectory, filePath);
+ } else {
+ final List rootFiles = getScanFiles();
+ for (final File rootFile : rootFiles) {
+ final String filePath = "";
+ parseFile(rootFile, filePath);
+ }
+ }
}
/**
@@ -200,9 +197,6 @@ private Archive createAndAddArchive(final String fileName, final ArchiveMetaInfo
* @return true, if is archive
*/
private static boolean isArchiveDirectory(final File dir) {
- if (!dir.isDirectory()) {
- return false;
- }
final File metaInfEntry = findEntry(dir, "META-INF");
if (metaInfEntry == null || !metaInfEntry.isDirectory()) {
return false;
diff --git a/licensescout-core/src/test/java/org/aposin/licensescout/execution/SimpleExecutionTest.java b/licensescout-core/src/test/java/org/aposin/licensescout/execution/SimpleExecutionTest.java
index 8ab14889..ff2c9365 100644
--- a/licensescout-core/src/test/java/org/aposin/licensescout/execution/SimpleExecutionTest.java
+++ b/licensescout-core/src/test/java/org/aposin/licensescout/execution/SimpleExecutionTest.java
@@ -56,7 +56,7 @@ public void testExecutionJavaNoOutputs() throws Exception {
* @throws Exception
*/
@Test
- public void testExecutionJavaWithOutputs() throws Exception {
+ public void testExecutionJavaWithOutputsScanDirectory() throws Exception {
final File scanDirectory = new File("src/test/resources/scans/empty");
final ArrayList outputs = createTripleOutput();
final ExecutionParameters executionParameters = createExecutionParameters(ArchiveType.JAVA, scanDirectory,
@@ -64,6 +64,21 @@ public void testExecutionJavaWithOutputs() throws Exception {
assertExecution(executionParameters);
}
+ /**
+ * Test case for the method {@link Executor#execute()}.
+ *
+ * @throws Exception
+ */
+ @Test
+ public void testExecutionJavaWithOutputsScanFiles() throws Exception {
+ final File scanDirectory = new File("src/test/resources/scans/empty");
+ final ScanLocation scanLocation = new ScanLocation(Arrays.asList(scanDirectory));
+ final ArrayList outputs = createTripleOutput();
+ final ExecutionParameters executionParameters = createExecutionParameters(ArchiveType.JAVA, scanLocation,
+ outputs, true);
+ assertExecution(executionParameters);
+ }
+
/**
* Test case for the method {@link Executor#execute()}.
*
@@ -211,8 +226,9 @@ public void testExecutionJavaWriteToDatabaseNoDatabaseConfiguredSnapshotVersionW
@Test(expected = LicenseScoutExecutionException.class)
public void testExecutionJavaNoReportExporterFactory() throws Exception {
final File scanDirectory = new File("src/test/resources/scans/java-unpacked-license-manifest");
+ final ScanLocation scanLocation = new ScanLocation(scanDirectory);
final ArrayList outputs = createTripleOutput();
- final ExecutionParameters executionParameters = createExecutionParameters(ArchiveType.JAVA, scanDirectory,
+ final ExecutionParameters executionParameters = createExecutionParameters(ArchiveType.JAVA, scanLocation,
outputs, false);
assertExecution(executionParameters);
}
@@ -243,6 +259,18 @@ public void testExecutionJavaNotExistingScanDirectory() throws Exception {
assertExecution(executionParameters);
}
+ /**
+ * Test case for the method {@link Executor#execute()}.
+ *
+ * @throws Exception
+ */
+ @Test(expected = LicenseScoutExecutionException.class)
+ public void testExecutionJavaNoScanLocation() throws Exception {
+ final ExecutionParameters executionParameters = createExecutionParametersNoOutputs(ArchiveType.JAVA,
+ (ScanLocation) null);
+ assertExecution(executionParameters);
+ }
+
/**
* Test case for the method {@link Executor#execute()}.
*
@@ -311,25 +339,33 @@ private ExecutionParameters createExecutionParametersNoOutputs(final ArchiveType
return createExecutionParameters(archiveType, scanDirectory, outputs);
}
+ private ExecutionParameters createExecutionParametersNoOutputs(final ArchiveType archiveType,
+ final ScanLocation scanLocation) {
+ final ArrayList outputs = new ArrayList<>();
+ return createExecutionParameters(archiveType, scanLocation, outputs, true);
+ }
+
private ExecutionParameters createExecutionParameters(final ArchiveType archiveType, final File scanDirectory,
final ArrayList outputs) {
- return createExecutionParameters(archiveType, scanDirectory, outputs, true);
+ final ScanLocation scanLocation = new ScanLocation(scanDirectory);
+ return createExecutionParameters(archiveType, scanLocation, outputs, true);
}
/**
* @param archiveType
- * @param scanDirectory
+ * @param scanLocation the scan location
* @param outputs
* @param withStandardReportExporterFactory
- * @return an execution parameters instance
+ * @return
*/
- private ExecutionParameters createExecutionParameters(final ArchiveType archiveType, final File scanDirectory,
+ private ExecutionParameters createExecutionParameters(final ArchiveType archiveType,
+ final ScanLocation scanLocation,
final ArrayList outputs,
final boolean withStandardReportExporterFactory) {
final ExecutionParameters executionParameters = new ExecutionParameters();
executionParameters.setArchiveType(archiveType);
executionParameters.setFilteredVendorNames(new ArrayList<>());
- executionParameters.setScanLocation(new ScanLocation(scanDirectory));
+ executionParameters.setScanLocation(scanLocation);
executionParameters.setOutputDirectory(new File("target"));
executionParameters.setOutputs(outputs);
executionParameters.setCleanOutputActive(false);
diff --git a/licensescout-documentation/src/site/asciidoc/usermanual/configuration.adoc b/licensescout-documentation/src/site/asciidoc/usermanual/configuration.adoc
index de673a8b..a179560f 100644
--- a/licensescout-documentation/src/site/asciidoc/usermanual/configuration.adoc
+++ b/licensescout-documentation/src/site/asciidoc/usermanual/configuration.adoc
@@ -84,7 +84,12 @@ In one execution, LicenseScout can either scan for Java artifacts or for Javascr
=== Scan Location
-The base directory where archives are searched for (recursively and also inside JARs) is configured by the parameter `scanDirectory`.
+The location to be scanned can either be:
+
+* a base directory where archives are searched for (recursively and also inside JARs). This is configured by the parameter `scanDirectory`.
+* a list of Maven artifacts. The configured artifacts and their (transitive) dependencies are scanned. This is configured by the parameter `scanArtifacts`.
+The parameter `scanArtifactScope` optionally allows to specify the
+scope for dependency resolution.
[[output-types-and-files]]
=== Output types and files
diff --git a/licensescout-maven-plugin/src/it/java-csv-artifact-configuration-scan-artifact/pom.xml b/licensescout-maven-plugin/src/it/java-csv-artifact-configuration-scan-artifact/pom.xml
new file mode 100644
index 00000000..5fa11c00
--- /dev/null
+++ b/licensescout-maven-plugin/src/it/java-csv-artifact-configuration-scan-artifact/pom.xml
@@ -0,0 +1,59 @@
+
+
+ 4.0.0
+
+ org.aposin.licensescout.test
+ org.aposin.licensescout.test.licensescout
+ 1.0.0-SNAPSHOT
+ pom
+
+ Simple Test for License Scout Maven Plugin
+
+ https://aposin.org/
+
+
+ UTF-8
+
+
+
+
+
+ @project.groupId@
+ @project.artifactId@
+ @project.version@
+
+
+
+ @project.groupId@
+ @project.artifactId@
+ @project.version@
+
+
+
+
+
+
+ @project.groupId@
+ org.aposin.licensescout.configuration.sample
+ @project.version@
+ configuration
+ zip
+
+
+
+
+ test
+
+ scanJava
+
+
+
+
+
+
+
+
diff --git a/licensescout-maven-plugin/src/it/java-csv-artifact-configuration/verify.groovy b/licensescout-maven-plugin/src/it/java-csv-artifact-configuration-scan-artifact/verify.groovy
similarity index 100%
rename from licensescout-maven-plugin/src/it/java-csv-artifact-configuration/verify.groovy
rename to licensescout-maven-plugin/src/it/java-csv-artifact-configuration-scan-artifact/verify.groovy
diff --git a/licensescout-maven-plugin/src/it/java-csv-artifact-configuration/pom.xml b/licensescout-maven-plugin/src/it/java-csv-artifact-configuration-scan-directory/pom.xml
similarity index 100%
rename from licensescout-maven-plugin/src/it/java-csv-artifact-configuration/pom.xml
rename to licensescout-maven-plugin/src/it/java-csv-artifact-configuration-scan-directory/pom.xml
diff --git a/licensescout-maven-plugin/src/it/java-csv-artifact-configuration-scan-directory/verify.groovy b/licensescout-maven-plugin/src/it/java-csv-artifact-configuration-scan-directory/verify.groovy
new file mode 100644
index 00000000..953e96fe
--- /dev/null
+++ b/licensescout-maven-plugin/src/it/java-csv-artifact-configuration-scan-directory/verify.groovy
@@ -0,0 +1,17 @@
+/**
+ * Copyright 2019 Association for the promotion of open-source insurance software and for the establishment of open interface standards in the insurance industry (Verein zur Förderung quelloffener Versicherungssoftware und Etablierung offener Schnittstellenstandards in der Versicherungsbranche)
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+File reportFile = new File( basedir, "target/licensescout/licensereport.csv" );
+assert reportFile.isFile();
diff --git a/licensescout-maven-plugin/src/it/java-html-artifact-configuration-scan-artifact/pom.xml b/licensescout-maven-plugin/src/it/java-html-artifact-configuration-scan-artifact/pom.xml
new file mode 100644
index 00000000..97f23282
--- /dev/null
+++ b/licensescout-maven-plugin/src/it/java-html-artifact-configuration-scan-artifact/pom.xml
@@ -0,0 +1,60 @@
+
+
+ 4.0.0
+
+ org.aposin.licensescout.test
+ org.aposin.licensescout.test.licensescout
+ 1.0.0-SNAPSHOT
+ pom
+
+ Simple Test for License Scout Maven Plugin
+
+ https://aposin.org/
+
+
+ UTF-8
+
+
+
+
+
+
+ @project.groupId@
+ @project.artifactId@
+ @project.version@
+
+
+
+ @project.groupId@
+ @project.artifactId@
+ @project.version@
+
+
+
+
+
+
+ @project.groupId@
+ org.aposin.licensescout.configuration.sample
+ @project.version@
+ configuration
+ zip
+
+
+
+
+ test
+
+ scanJava
+
+
+
+
+
+
+
+
diff --git a/licensescout-maven-plugin/src/it/java-html-artifact-configuration/verify.groovy b/licensescout-maven-plugin/src/it/java-html-artifact-configuration-scan-artifact/verify.groovy
similarity index 100%
rename from licensescout-maven-plugin/src/it/java-html-artifact-configuration/verify.groovy
rename to licensescout-maven-plugin/src/it/java-html-artifact-configuration-scan-artifact/verify.groovy
diff --git a/licensescout-maven-plugin/src/it/java-html-artifact-configuration/pom.xml b/licensescout-maven-plugin/src/it/java-html-artifact-configuration-scan-directory/pom.xml
similarity index 100%
rename from licensescout-maven-plugin/src/it/java-html-artifact-configuration/pom.xml
rename to licensescout-maven-plugin/src/it/java-html-artifact-configuration-scan-directory/pom.xml
diff --git a/licensescout-maven-plugin/src/it/java-html-artifact-configuration-scan-directory/verify.groovy b/licensescout-maven-plugin/src/it/java-html-artifact-configuration-scan-directory/verify.groovy
new file mode 100644
index 00000000..4d39757e
--- /dev/null
+++ b/licensescout-maven-plugin/src/it/java-html-artifact-configuration-scan-directory/verify.groovy
@@ -0,0 +1,17 @@
+/**
+ * Copyright 2019 Association for the promotion of open-source insurance software and for the establishment of open interface standards in the insurance industry (Verein zur Förderung quelloffener Versicherungssoftware und Etablierung offener Schnittstellenstandards in der Versicherungsbranche)
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+File reportFile = new File( basedir, "target/licensescout/licensereport.html" );
+assert reportFile.isFile();
diff --git a/licensescout-maven-plugin/src/it/java-txt-artifact-configuration-scan-artifacts/pom.xml b/licensescout-maven-plugin/src/it/java-txt-artifact-configuration-scan-artifacts/pom.xml
new file mode 100644
index 00000000..5eb3f31b
--- /dev/null
+++ b/licensescout-maven-plugin/src/it/java-txt-artifact-configuration-scan-artifacts/pom.xml
@@ -0,0 +1,61 @@
+
+
+ 4.0.0
+
+ org.aposin.licensescout.test
+ org.aposin.licensescout.test.licensescout
+ 1.0.0-SNAPSHOT
+ pom
+
+ Simple Test for License Scout Maven Plugin
+
+ https://aposin.org/
+
+
+ UTF-8
+
+
+
+
+
+
+ @project.groupId@
+ @project.artifactId@
+ @project.version@
+
+
+
+ @project.groupId@
+ @project.artifactId@
+ @project.version@
+
+
+ ${licensescout.outputDirectory}
+
+
+
+
+ @project.groupId@
+ org.aposin.licensescout.configuration.sample
+ @project.version@
+ configuration
+ zip
+
+
+
+
+ test
+
+ scanJava
+
+
+
+
+
+
+
+
diff --git a/licensescout-maven-plugin/src/it/java-txt-artifact-configuration-scan-artifacts/verify.groovy b/licensescout-maven-plugin/src/it/java-txt-artifact-configuration-scan-artifacts/verify.groovy
new file mode 100644
index 00000000..c45c969b
--- /dev/null
+++ b/licensescout-maven-plugin/src/it/java-txt-artifact-configuration-scan-artifacts/verify.groovy
@@ -0,0 +1,17 @@
+/**
+ * Copyright 2019 Association for the promotion of open-source insurance software and for the establishment of open interface standards in the insurance industry (Verein zur Förderung quelloffener Versicherungssoftware und Etablierung offener Schnittstellenstandards in der Versicherungsbranche)
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+File reportFile = new File( basedir, "target/licensescout/licensereport.txt" );
+assert reportFile.isFile();
diff --git a/licensescout-maven-plugin/src/it/java-txt-artifact-configuration/pom.xml b/licensescout-maven-plugin/src/it/java-txt-artifact-configuration-scan-directory/pom.xml
similarity index 100%
rename from licensescout-maven-plugin/src/it/java-txt-artifact-configuration/pom.xml
rename to licensescout-maven-plugin/src/it/java-txt-artifact-configuration-scan-directory/pom.xml
diff --git a/licensescout-maven-plugin/src/it/java-txt-artifact-configuration/verify.groovy b/licensescout-maven-plugin/src/it/java-txt-artifact-configuration-scan-directory/verify.groovy
similarity index 100%
rename from licensescout-maven-plugin/src/it/java-txt-artifact-configuration/verify.groovy
rename to licensescout-maven-plugin/src/it/java-txt-artifact-configuration-scan-directory/verify.groovy
diff --git a/licensescout-report-maven-plugin/src/it/java-report/invoker.properties b/licensescout-report-maven-plugin/src/it/java-report-scan-artifacts/invoker.properties
similarity index 100%
rename from licensescout-report-maven-plugin/src/it/java-report/invoker.properties
rename to licensescout-report-maven-plugin/src/it/java-report-scan-artifacts/invoker.properties
diff --git a/licensescout-report-maven-plugin/src/it/java-report-scan-artifacts/pom.xml b/licensescout-report-maven-plugin/src/it/java-report-scan-artifacts/pom.xml
new file mode 100644
index 00000000..9f0885c4
--- /dev/null
+++ b/licensescout-report-maven-plugin/src/it/java-report-scan-artifacts/pom.xml
@@ -0,0 +1,67 @@
+
+
+ 4.0.0
+
+ org.aposin.licensescout.test
+ org.aposin.licensescout.test.licensescout
+ 1.0.0-SNAPSHOT
+ pom
+
+ Simple Test for License Scout Report Maven Plugin
+
+ https://aposin.org/
+
+
+ UTF-8
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-project-info-reports-plugin
+ 3.0.0
+
+
+
+ org.apache.maven.plugins
+ maven-site-plugin
+ 3.8.2
+
+
+
+
+
+
+
+
+
+
+ @project.groupId@
+ @project.artifactId@
+ @project.version@
+
+
+
+ @project.groupId@
+ @project.artifactId@
+ @project.version@
+
+
+
+ @project.groupId@
+ org.aposin.licensescout.configuration.sample
+ @project.version@
+ configuration
+ zip
+
+
+
+
+
+
+
+
diff --git a/licensescout-report-maven-plugin/src/it/java-report/verify.groovy b/licensescout-report-maven-plugin/src/it/java-report-scan-artifacts/verify.groovy
similarity index 100%
rename from licensescout-report-maven-plugin/src/it/java-report/verify.groovy
rename to licensescout-report-maven-plugin/src/it/java-report-scan-artifacts/verify.groovy
diff --git a/licensescout-report-maven-plugin/src/it/java-report-scan-directory/invoker.properties b/licensescout-report-maven-plugin/src/it/java-report-scan-directory/invoker.properties
new file mode 100644
index 00000000..8fb5154d
--- /dev/null
+++ b/licensescout-report-maven-plugin/src/it/java-report-scan-directory/invoker.properties
@@ -0,0 +1,19 @@
+#
+# Copyright 2019 Association for the promotion of open-source insurance software and for the establishment of open interface standards in the insurance industry (Verein zur Förderung quelloffener Versicherungssoftware und Etablierung offener Schnittstellenstandards in der Versicherungsbranche)
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+invoker.goals = clean site
+invoker.java.version=11+
+invoker.profiles =
diff --git a/licensescout-report-maven-plugin/src/it/java-report/pom.xml b/licensescout-report-maven-plugin/src/it/java-report-scan-directory/pom.xml
similarity index 100%
rename from licensescout-report-maven-plugin/src/it/java-report/pom.xml
rename to licensescout-report-maven-plugin/src/it/java-report-scan-directory/pom.xml
diff --git a/licensescout-report-maven-plugin/src/it/java-report-scan-directory/verify.groovy b/licensescout-report-maven-plugin/src/it/java-report-scan-directory/verify.groovy
new file mode 100644
index 00000000..a489465f
--- /dev/null
+++ b/licensescout-report-maven-plugin/src/it/java-report-scan-directory/verify.groovy
@@ -0,0 +1,17 @@
+/**
+ * Copyright 2019 Association for the promotion of open-source insurance software and for the establishment of open interface standards in the insurance industry (Verein zur Förderung quelloffener Versicherungssoftware und Etablierung offener Schnittstellenstandards in der Versicherungsbranche)
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+File reportFile = new File( basedir, "target/site/licensereport.html" );
+assert reportFile.isFile();
diff --git a/licensescout-report-maven-plugin/src/main/java/org/aposin/licensescout/report/mojo/AbstractReportMojo.java b/licensescout-report-maven-plugin/src/main/java/org/aposin/licensescout/report/mojo/AbstractReportMojo.java
index f9b7e8d2..3097d42b 100644
--- a/licensescout-report-maven-plugin/src/main/java/org/aposin/licensescout/report/mojo/AbstractReportMojo.java
+++ b/licensescout-report-maven-plugin/src/main/java/org/aposin/licensescout/report/mojo/AbstractReportMojo.java
@@ -70,7 +70,7 @@ public abstract class AbstractReportMojo extends AbstractMavenReport implements
*
* @since 1.1
*/
- @Parameter(property = "scanDirectory", required = true)
+ @Parameter(property = "scanDirectory", required = false)
private File scanDirectory;
/**