赞
踩
[DEBUG] Excluded: org.apache.maven:maven-artifact:jar:2.2.1 [DEBUG] Excluded: org.apache.maven:maven-settings:jar:2.2.1 [DEBUG] Excluded: org.apache.maven:maven-model:jar:2.2.1 [DEBUG] Excluded: org.apache.maven:maven-monitor:jar:2.2.1 [DEBUG] Configuring mojo org.apache.maven.plugins:maven-resources-plugin:2.7:resources from plugin realm ClassRealm[pluging.apache.maven.plugins:maven-resources-plugin:2.7, parent: sun.misc.Launcher$AppClassLoader@5c647e05] [DEBUG] Configuring mojo 'org.apache.maven.plugins:maven-resources-plugin:2.7:resources' with basic configurator --> [DEBUG] (f) buildFilters = [D:\workspace\git_workspace\news-admin\profiles\newsadmin-test.properties] [DEBUG] (f) encoding = UTF-8 [DEBUG] (f) escapeWindowsPaths = true [DEBUG] (s) includeEmptyDirs = false [DEBUG] (s) outputDirectory = D:\workspace\git_workspace\newsadmin\target\classes [DEBUG] (s) overwrite = false [DEBUG] (f) project = MavenProject: cn.creditease.news:news-admin-web:1.3.5-RELEASE @ D:\workspace\git_workspace\newsadmpom.xml [DEBUG] (s) resources = [Resource {targetPath: null, filtering: true, FileSet {directory: D:\workspace\git_workspace\newmin\src\main\resources, PatternSet [includes: {**/*.properties, logback.xml}, excludes: {}]}}, Resource {targetPath: null,ltering: false, FileSet {directory: D:\workspace\git_workspace\newsadmin\src\main\resources, PatternSet [includes: {**/*.x, excludes: {}]}}, Resource {targetPath: null, filtering: false, FileSet {directory: D:\workspace\git_workspace\newsadmin\\main\java, PatternSet [includes: {**/*.xml}, excludes: {}]}}] [DEBUG] (f) session = org.apache.maven.execution.MavenSession@7fd4acee [DEBUG] (f) supportMultiLineFiltering = false [DEBUG] (f) useBuildFilters = true [DEBUG] (s) useDefaultDelimiters = true [DEBUG] -- end configuration -- [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 5.711 s [INFO] Finished at: 2019-03-04T20:47:38+08:00 [INFO] Final Memory: 9M/240M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:2.7:resources (default-resources) on projecews-admin-web: Error loading property file 'D:\workspace\git_workspace\news-admin\profiles\newsadmin-test.properties' -> [p 1] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-resources-pln:2.7:resources (default-resources) on project news-admin-web: Error loading property file 'D:\workspace\git_workspace\newdmin\profiles\newsadmin-test.properties' at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:216) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80) at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.ja51) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:120) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:347) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:154) at org.apache.maven.cli.MavenCli.execute(MavenCli.java:582) at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:214) at org.apache.maven.cli.MavenCli.main(MavenCli.java:158) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289) at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415) at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356) Caused by: org.apache.maven.plugin.MojoExecutionException: Error loading property file 'D:\workspace\git_workspace\news-ad\profiles\newsadmin-test.properties' at org.apache.maven.plugin.resources.ResourcesMojo.execute(ResourcesMojo.java:306) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:132) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208) ... 19 more Caused by: org.apache.maven.shared.filtering.MavenFilteringException: Error loading property file 'D:\workspace\git_worksp\news-admin\profiles\newsadmin-test.properties' at org.apache.maven.shared.filtering.DefaultMavenFileFilter.loadProperties(DefaultMavenFileFilter.java:297) at org.apache.maven.shared.filtering.DefaultMavenFileFilter.getDefaultFilterWrappers(DefaultMavenFileFilter.java:2 at org.apache.maven.shared.filtering.DefaultMavenResourcesFiltering.filterResources(DefaultMavenResourcesFilteringva:166) at org.apache.maven.plugin.resources.ResourcesMojo.execute(ResourcesMojo.java:300) ... 21 more Caused by: java.io.FileNotFoundException: D:\workspace\git_workspace\news-admin\profiles\newsadmin-test.properties at org.apache.maven.shared.filtering.PropertyUtils.loadPropertyFile(PropertyUtils.java:65) at org.apache.maven.shared.filtering.DefaultMavenFileFilter.loadProperties(DefaultMavenFileFilter.java:291) ... 24 more [ERROR] [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
D:\workspace\git_workspace\newsadmin\profiles\newsadmin-test.properties
D:\workspace\git_workspace\news-admin\profiles\newsadmin-test.properties
maven项目打包遇到这个错误,原因是 pom文件中的 filter配置与 我目录不一致 请康上面两个路径 第一个路径是我目前文件中的真实路径 第二个路径是 pom文件中的 路径 更改pom文件后 打包成功
pom文件中的filter配置如下
<profile>
<id>test</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<build>
<filters>
<filter>../newsadmin/profiles/newsadmin-test.properties</filter>
</filters>
</build>
</profile>
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。