diff options
author | 2020-09-04 20:09:36 +0800 | |
---|---|---|
committer | 2020-09-04 20:15:58 +0800 | |
commit | 744e9bdcbf51b80f4595f77ad88c435ec67a7e5e (patch) | |
tree | ed1a6fb8415ce0f6daf5f76b54ed85f993b258df | |
parent | new switch: --skip-tests (diff) | |
download | java-ebuilder-744e9bdcbf51b80f4595f77ad88c435ec67a7e5e.tar.gz java-ebuilder-744e9bdcbf51b80f4595f77ad88c435ec67a7e5e.tar.bz2 java-ebuilder-744e9bdcbf51b80f4595f77ad88c435ec67a7e5e.zip |
only detect frameworks when the project has tests.
Signed-off-by: Zhang Zongyu <zzy2529420793@gmail.com>
-rw-r--r-- | src/main/java/org/gentoo/java/ebuilder/maven/MavenEbuilder.java | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/main/java/org/gentoo/java/ebuilder/maven/MavenEbuilder.java b/src/main/java/org/gentoo/java/ebuilder/maven/MavenEbuilder.java index 19fc43c..4a63494 100644 --- a/src/main/java/org/gentoo/java/ebuilder/maven/MavenEbuilder.java +++ b/src/main/java/org/gentoo/java/ebuilder/maven/MavenEbuilder.java @@ -172,14 +172,16 @@ public class MavenEbuilder { final MavenProject mavenProject, final Config config) { Set<String> frameworks = new HashSet<>(10); - for (final MavenDependency dependency : mavenProject. - getTestDependencies()) { - frameworks.add(determineTestingFrameworkByDependency(dependency)); - } + if (mavenProject.hasTests()) { + for (final MavenDependency dependency : mavenProject. + getTestDependencies()) { + frameworks.add(determineTestingFrameworkByDependency(dependency)); + } - for (final MavenDependency dependency : mavenProject. - getCommonDependencies()) { - frameworks.add(determineTestingFrameworkByDependency(dependency)); + for (final MavenDependency dependency : mavenProject. + getCommonDependencies()) { + frameworks.add(determineTestingFrameworkByDependency(dependency)); + } } if (config.hasBinjarUri()) { |