summaryrefslogtreecommitdiff
path: root/spec/integration/java/maven_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/integration/java/maven_spec.rb')
-rw-r--r--spec/integration/java/maven_spec.rb71
1 files changed, 71 insertions, 0 deletions
diff --git a/spec/integration/java/maven_spec.rb b/spec/integration/java/maven_spec.rb
index 72fec6d..7d4896b 100644
--- a/spec/integration/java/maven_spec.rb
+++ b/spec/integration/java/maven_spec.rb
@@ -142,4 +142,75 @@ RSpec.describe "maven" do
end
end
end
+
+ context "when scanning maven project in a sub directory" do
+ let(:env) do
+ {
+ 'LICENSE_FINDER_CLI_OPTS' => '--project-path=service/maven-backend'
+ }
+ end
+
+ before do
+ runner.mount(dir: fixture_file('java/maven/nested'))
+ end
+
+ specify { expect(subject).to match_schema }
+
+ specify do
+ expect(subject.dependency_names).to match_array([
+ "accessors-smart",
+ "android-json",
+ "annotations",
+ "apiguardian-api",
+ "asm",
+ "assertj-core",
+ "byte-buddy",
+ "byte-buddy-agent",
+ "hamcrest",
+ "jakarta.activation-api",
+ "jakarta.annotation-api",
+ "jakarta.xml.bind-api",
+ "json-path",
+ "json-smart",
+ "jsonassert",
+ "jul-to-slf4j",
+ "junit-jupiter",
+ "junit-jupiter-api",
+ "junit-jupiter-engine",
+ "junit-jupiter-params",
+ "junit-platform-commons",
+ "junit-platform-engine",
+ "kotlin-reflect",
+ "kotlin-stdlib",
+ "kotlin-stdlib-common",
+ "kotlin-stdlib-jdk7",
+ "kotlin-stdlib-jdk8",
+ "log4j-api",
+ "log4j-to-slf4j",
+ "logback-classic",
+ "logback-core",
+ "mockito-core",
+ "mockito-junit-jupiter",
+ "objenesis",
+ "opentest4j",
+ "slf4j-api",
+ "snakeyaml",
+ "spring-aop",
+ "spring-beans",
+ "spring-boot",
+ "spring-boot-autoconfigure",
+ "spring-boot-starter",
+ "spring-boot-starter-logging",
+ "spring-boot-starter-test",
+ "spring-boot-test",
+ "spring-boot-test-autoconfigure",
+ "spring-context",
+ "spring-core",
+ "spring-expression",
+ "spring-jcl",
+ "spring-test",
+ "xmlunit-core"
+ ])
+ end
+ end
end