diff options
author | Bjørn Christian Seime <bjorncs@verizonmedia.com> | 2020-06-24 13:48:11 +0200 |
---|---|---|
committer | Bjørn Christian Seime <bjorncs@verizonmedia.com> | 2020-06-24 13:48:17 +0200 |
commit | 2635e09140e047b9b7b078d844082f3444d76f78 (patch) | |
tree | dd56baace511fe409fd7a3335f3a7db884a15a7f /bundle-plugin | |
parent | d401fff24ac80a940ef01f80fabc05711a12fe94 (diff) |
Add helper class for test bundles
Diffstat (limited to 'bundle-plugin')
-rw-r--r-- | bundle-plugin/src/main/java/com/yahoo/container/plugin/mojo/TestBundleUtils.java | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/bundle-plugin/src/main/java/com/yahoo/container/plugin/mojo/TestBundleUtils.java b/bundle-plugin/src/main/java/com/yahoo/container/plugin/mojo/TestBundleUtils.java new file mode 100644 index 00000000000..9a3fc89bbd5 --- /dev/null +++ b/bundle-plugin/src/main/java/com/yahoo/container/plugin/mojo/TestBundleUtils.java @@ -0,0 +1,25 @@ +// Copyright Verizon Media. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +package com.yahoo.container.plugin.mojo; + +import org.apache.maven.project.MavenProject; + +import java.nio.file.Path; +import java.nio.file.Paths; +import java.util.jar.JarFile; + +/** + * @author bjorncs + */ +class TestBundleUtils { + private TestBundleUtils() {} + + static Path outputDirectory(MavenProject project) { return targetDirectory(project).resolve("test-bundle/"); } + + static Path manifestFile(MavenProject project) { return outputDirectory(project).resolve(JarFile.MANIFEST_NAME); } + + static Path archiveFile(MavenProject project) { + return targetDirectory(project).resolve(project.getBuild().getFinalName() + "-tests.jar"); + } + + private static Path targetDirectory(MavenProject project) { return Paths.get(project.getBuild().getDirectory()); } +} |