diff --git a/dummy-module/pom.xml b/dummy-module/pom.xml
index 08fbf30..e91adb7 100644
--- a/dummy-module/pom.xml
+++ b/dummy-module/pom.xml
@@ -99,7 +99,7 @@
test-docs-generator
- ./dummy-module/src/test/java/io/skodjob/
+ ${project.basedir}/src/test/java/io/skodjob/
./docs/actual/option1/
true
true
@@ -112,7 +112,7 @@
test-docs-generator
- ./dummy-module/src/test/java/io/skodjob/
+ ${project.basedir}/src/test/java/io/skodjob/
./docs/actual/option2/
true
false
@@ -125,7 +125,7 @@
test-docs-generator
- ./dummy-module/src/test/java/io/skodjob/
+ ${project.basedir}/src/test/java/io/skodjob/
./docs/actual/option3/
false
false
@@ -138,7 +138,7 @@
test-docs-generator
- ./dummy-module/src/test/java/io/skodjob/
+ ${project.basedir}/src/test/java/io/skodjob/
./docs/actual/option4/
false
true
diff --git a/test-docs-generator-maven-plugin/src/main/java/io/skodjob/DocGeneratorMojo.java b/test-docs-generator-maven-plugin/src/main/java/io/skodjob/DocGeneratorMojo.java
index 761f39d..4723c22 100644
--- a/test-docs-generator-maven-plugin/src/main/java/io/skodjob/DocGeneratorMojo.java
+++ b/test-docs-generator-maven-plugin/src/main/java/io/skodjob/DocGeneratorMojo.java
@@ -108,6 +108,11 @@ public void execute() {
getLog().debug(url.getFile());
}
+ // Ensure that docsPath ends with /
+ if (!docsPath.endsWith("/")) {
+ docsPath += "/";
+ }
+
Map classes = Utils.getTestClassesWithTheirPath(testsPath, generateDirs);
for (Map.Entry entry : classes.entrySet()) {
try {
diff --git a/test-docs-generator-maven-plugin/src/main/java/io/skodjob/MdGenerator.java b/test-docs-generator-maven-plugin/src/main/java/io/skodjob/MdGenerator.java
index f52e5d4..cef4467 100644
--- a/test-docs-generator-maven-plugin/src/main/java/io/skodjob/MdGenerator.java
+++ b/test-docs-generator-maven-plugin/src/main/java/io/skodjob/MdGenerator.java
@@ -310,7 +310,7 @@ private static void updateLabelFile(String labelFilePath, String updatedData) {
* @param docsPath path where all test docs are stored
*/
public static void updateLinksInLabels(String docsPath) {
- String labelsPath = docsPath + "/" + LABELS;
+ String labelsPath = docsPath + LABELS;
int numberOfDirs = docsPath.length() - docsPath.replace("/", "").length();
String mdFilesPath = "../".repeat(numberOfDirs);