Skip to content

Commit

Permalink
maven: Fix bnd-run-maven-plugin bndrun file selection
Browse files Browse the repository at this point in the history
The bndrun configuration parameter is of type File which means
maven when resolve relative paths against ${project.basedir}.
So we don’t need to worry about trying to do this.

Signed-off-by: BJ Hargrave <bj@hargrave.dev>
  • Loading branch information
bjhargrave committed Nov 16, 2022
1 parent 0c76117 commit b9da98e
Showing 1 changed file with 2 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -101,13 +101,8 @@ public void execute() throws MojoExecutionException, MojoFailureException {

Operation operation = getOperation();

Bndruns bndruns = new Bndruns();
bndruns.addFile(bndrun);
List<File> bndrunFiles = bndruns.getFiles(project.getBasedir(), "*.bndrun");

File runFile = bndrunFiles.get(0);
logger.info("Running {}:", runFile);
errors += container.execute(runFile, "run", targetDir, operation);
logger.info("Running {}:", bndrun);
errors += container.execute(bndrun, "run", targetDir, operation);
} catch (Exception e) {
throw new MojoExecutionException(e.getMessage(), e);
}
Expand Down

0 comments on commit b9da98e

Please sign in to comment.