我正在使用 maven 插件minify-maven-plugin
来缩小我的前端项目。当我将 dos 框转到前端项目并执行时,这工作正常,mvn clean install
但是当我mvn clean install
在反应器项目的主 pom 中执行时,我得到以下异常:
无法在项目 my.project-frontend 上执行目标 com.samaxes.maven:minify-maven-plugin:1.7.4:minify (default-minify):执行目标 com.samaxes.maven:minify-maven-的默认-minify插件:1.7.4:缩小失败:basedir ./src/main/resources/public/app/。不存在
有谁知道该怎么做才能完成这项工作?
在相关插件配置下方:
<!-- minify plugin -->
<plugin>
<groupId>com.samaxes.maven</groupId>
<artifactId>minify-maven-plugin</artifactId>
<version>1.7.4</version>
<executions>
<execution>
<id>default-minify</id>
<phase>prepare-package</phase><!-- When omitted defaults to 'process-resources' -->
<configuration>
<charset>UTF-8</charset>
<skipMerge>true</skipMerge>
<nosuffix>true</nosuffix>
<closureCompilationLevel>WHITESPACE_ONLY</closureCompilationLevel>
<webappSourceDir>src/main/resources/public/app</webappSourceDir>
<webappTargetDir>${project.build.outputDirectory}/public/app</webappTargetDir>
<cssSourceDir>./</cssSourceDir>
<cssSourceIncludes>
<cssSourceInclude>**/*.css</cssSourceInclude>
</cssSourceIncludes>
<jsSourceDir>./</jsSourceDir>
<jsSourceIncludes>
<jsSourceInclude>**/*.js</jsSourceInclude>
</jsSourceIncludes>
<jsEngine>CLOSURE</jsEngine>
</configuration>
<goals>
<goal>minify</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- minify plugin end -->