Hi Maxim, unfortunately that doesn't help. The problem is that if we do a "mvn compile" no archiving (jar/war building) is done at all ... Guess what we would need, would be profiles based on the last maven phase being built. So if: - "last phase < package" --> Copy the content without unpacking (as the File reference returned by dependency resolution references the target/classes directory) - "last phase > package" --> Unpack the content (as the File reference returned by dependency resolution references a Jar/war file)
Chris Am 22.03.19, 15:02 schrieb "Maxim Solodovnik" <solomax...@gmail.com>: Hello Chris, Maybe <archiveClasses>true</archiveClasses> of maven-war-plugin can help? On Fri, 22 Mar 2019 at 20:12, Christofer Dutz <christofer.d...@c-ware.de> wrote: > Hi, > > we are currently having a little problem with our build. > A user complained about not being able to build with a “mvn compile”. > The reason is that we have one module that builds a web-client (bundled as > war) and a server module to which the client is copied. > We are using the maven-dependency-plugin:unpack to unpack the artifact > into the server war. This works fine as long as we built to at least the > “package” phase. > If the user builds to something before that, the build fails as the > pointer to the client pints to a directory instead of an archive. > > Is there a way to do some sort of “unpack-or-copy” that copies if it’s > just a pre-package phase and does the normal unpack if the archives have > been created. > > Would be happy to not tell them “just don’t do a `mvn compile` but at > least a `mvn package`. > > > Chris > -- WBR Maxim aka solomax