Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static WebArchive createDeployment() {
- File file = new File("pom.xml");
- if (!file.exists()) {
- throw new IllegalStateException("The file (" + file + ") does not exist.\n"
- + "This test needs to be run with the working directory optaconf-webapp-test.");
- }
- try {
- file = file.getCanonicalFile();
- } catch (IOException e) {
- throw new IllegalStateException("Could not get cannonical file for file (" + file + ").", e);
- }
- if (!file.getParentFile().getName().equals("optaconf-webapp-test")) {
- throw new IllegalStateException("The file (" + file + ") is not correct.\n"
- + "This test needs to be run with the working directory optaconf-webapp-test.");
- }
- return Maven.resolver()
- .loadPomFromFile(file)
- .resolve("org.optaconf:optaconf-webapp:war:?")
- .withoutTransitivity()
- .asSingle(WebArchive.class);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement