我正在使用apigee maven构建工具 https://github.com/apigee/apigee-deploy-maven-plugin
我一直在遇到这样的问题:当我运行插件并运行示例项目时,它在读取config.json文件时给出了IO错误,当我删除文件时一切正常。有没有人遇到过这个错误。
[ERROR] Failed to execute goal io.apigee.build-tools.enterprise4g:apigee-edge-maven-plugin:1.0.0:configure (configure-bundle) on project forecas
ploy-maven-plugin-master%20(3)\apigee-deploy-maven-plugin-master\samples\forecastweatherapi-simple\target\apiproxy\targets\default.xml (The syst
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal io.apigee.build-tools.enterprise4g:apigee-edge-maven-plugin:1.0.0
api: java.io.FileNotFoundException: C:\apigee-deploy-maven-plugin-master%20(3)\apigee-deploy-maven-plugin-master\samples\forecastweatherapi-simp
t find the path specified)
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:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:318)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:153)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:555)
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:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:414)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:357)
Caused by: org.apache.maven.plugin.MojoExecutionException: java.io.FileNotFoundException: C:\apigee-deploy-maven-plugin-master%20(3)\apigee-depl
\target\apiproxy\targets\default.xml (The system cannot find the path specified)
at io.apigee.buildTools.enterprise4g.mavenplugin.ConfigureMojo.configurePackage(ConfigureMojo.java:74)
at io.apigee.buildTools.enterprise4g.mavenplugin.ConfigureMojo.execute(ConfigureMojo.java:50)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:106)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
... 19 more
答案 0 :(得分:1)
我的第一个建议是在窗户中为maven使用理智的路径。我将离开(%20目录)" C:\ apigee-deploy-maven-plugin-master%20(3)\"
如果问题仍然存在,请回复。
答案 1 :(得分:0)
Maven对路径中的特殊字符进行扼流 - 通常这包括rfc1738中指定的所有保留字符。对于路径,这通常归结为路径名中的一个空格,该空间被编码,但会阻塞后续调用以加载该路径上的文件。