Hi David,
Just a shot in the dark, but does it work to write:
<directory>${baseDir}/src/docker</directory>
instead?
Regards,
Curtis
On Wed, Aug 17, 2016 at 1:04 PM, KARR, DAVID <[email protected]> wrote:
> I'm using the "docker-maven-plugin" to build a simple image based on
> TomEE. This is one subproject in a small multiproject build. Two other
> subprojects build the webapps that are installed into the TomEE instance.
>
> I've been able to get the image to build by building from the "image"
> subproject. However, when I start the build from the parent aggregator, it
> gets confused about path references, and fails.
>
> The following is the relevant excerpt from the POM:
> ---------------------------
> <plugin>
> <groupId>com.spotify</groupId>
> <artifactId>docker-maven-plugin</artifactId>
> <executions>
> <execution>
> <id>build-image</id>
> <phase>package</phase>
> <goals>
> <goal>build</goal>
> </goals>
> </execution>
> </executions>
> <configuration>
> <dockerDirectory>src/docker</dockerDirectory>
> <imageName>ordersimage</imageName>
> <resources>
> <resource>
> <directory>${project.build.dir
> ectory}/dependencies</directory>
> <includes>
> <include>ordersService.war</include>
> <include>ordersGUI.war</include>
> <include>ojdbc6.jar</include>
> </includes>
> </resource>
> <resource>
> <directory>src/docker</directory>
> <include>adjustTomEEXml.sh</include>
> </resource>
> </resources>
> <buildArgs>
> <tzoffset>${tzoffset}</tzoffset>
> </buildArgs>
> </configuration>
> </plugin>
> ------------------
>
> Again, when I build this project from the project directory, it builds the
> image properly. However, when I run the build from the parent aggregator,
> the image subproject fails with the following:
> --------------------
> [ERROR] Failed to execute goal com.spotify:docker-maven-plugin:0.4.11:build
> (build-image) on project ordersImage: Exception caught: basedir src/docker
> does not exist -> [Help 1]
> ---------------
>
> It appears that one or both of the two "src/docker" references in the
> plugin configuration end up being dereferenced relative to the directory
> the main build is run from, instead of the project directory.
>
> Based on those results, any idea what I should do to fix this?
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>