[ https://issues.apache.org/jira/browse/MRESOURCES-260?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17158512#comment-17158512 ]
Alan Czajkowski edited comment on MRESOURCES-260 at 7/15/20, 4:38 PM: ---------------------------------------------------------------------- [~hboutemy] you are correct, i did hit the MWAR-433 bug, and upgrading the WAR plugin to 3.3.1 did resolve the issue was (Author: alan-czajkowski): [~hboutemy] you are correct, i did hit the [MWAR-433|https://issues.apache.org/jira/browse/MWAR-433] bug, and upgrading the WAR plugin to 3.3.1 did resolve the issue > copy-resources goal copies directories, but not files > ----------------------------------------------------- > > Key: MRESOURCES-260 > URL: https://issues.apache.org/jira/browse/MRESOURCES-260 > Project: Maven Resources Plugin > Issue Type: Bug > Components: copy > Affects Versions: 3.1.0 > Environment: Apache Maven 3.6.3 > (cecedd343002696d0abb50b32b541b8a6ba2883f) > Maven home: /usr/local/Cellar/maven/3.6.3_1/libexec > Java version: 11.0.7, vendor: Amazon.com Inc., runtime: > /Library/Java/JavaVirtualMachines/amazon-corretto-11.jdk/Contents/Home > Default locale: en_CA, platform encoding: UTF-8 > OS name: "mac os x", version: "10.14.6", arch: "x86_64", family: "mac" > Reporter: Alan Czajkowski > Assignee: Herve Boutemy > Priority: Major > > h2. Background > the sample application source code can be found here: > https://gitlab.com/openease/java-microservice-example > this is a peculiar bug that is confusing me because the functionality works > sometimes, but not always > my machine: > {code:bash} > $ mvn -v > Apache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f) > Maven home: /usr/local/Cellar/maven/3.6.3_1/libexec > Java version: 11.0.7, vendor: Amazon.com Inc., runtime: > /Library/Java/JavaVirtualMachines/amazon-corretto-11.jdk/Contents/Home > Default locale: en_CA, platform encoding: UTF-8 > OS name: "mac os x", version: "10.14.6", arch: "x86_64", family: "mac" > {code} > The project, mentioned above, is a multi-module project that does a lot of > things. One of the modules builds a Spring Boot WAR bundled _together_ with a > NPM application: > > [https://gitlab.com/openease/java-microservice-example/-/blob/master/service/www/pom.xml] > the contents of the NPM build output is copied into the WAR package with the > following execution: > {code:xml} > <execution> > <id>copy-javascript-build-output-to-webapp</id> > <phase>prepare-package</phase> > <goals> > <goal>copy-resources</goal> > </goals> > <configuration> > <resources> > <resource> > <directory>${project.build.directory}/javascript/build</directory> > <filtering>false</filtering> > <includes> > <include>**/*.css*</include> > <include>**/*.htm*</include> > <include>**/*.js*</include> > <include>**/*.png*</include> > <include>**/*.svg*</include> > <include>**/*.txt*</include> > </includes> > </resource> > </resources> > > <outputDirectory>${project.build.directory}/${project.build.finalName}/WEB-INF/classes/public</outputDirectory> > </configuration> > </execution> > {code} > h2. Problem > This execution works fine when you run: > {code:bash} > $ cd service/www/ > $ mvn clean prepare-package > {code} > it copies over all of the NPM build output contents (directories and files) > but this execution fails when you run: > {code:bash} > $ cd service/www/ > $ mvn clean install > {code} > it copies over only the directory structure, but no files: > {code} > target/ > java-microservice-example-service-www-1.0.0-SNAPSHOT/ > WEB-INF/ > classes/ > public/ (no files) > static/ > css/ (no files) > js/ (no files) > media/ (no files) > {code} > I believe the other executions defined in the {{pom.xml}} don't seem to have > a problem, just this one ... -- This message was sent by Atlassian Jira (v8.3.4#803005)