在DevSever目标运行期间Appengine模块Maven错误 [英] Appengine Modules Maven Error during DevSever Goal Run

查看:176
本文介绍了在DevSever目标运行期间Appengine模块Maven错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在尝试使用模块支持来运行一个新项目,但随时都会出现跟随错误,无法调试它,

com。 google.apphosting.utils.config.EarHelper reportConfigException
[INFO]信息:应用程序目录'path-to-project / DemoEar-1.0.0-SNAPSHOT / DemoWarApp'必须存在并且是目录。



我的模块结构在

主application.xml中包含

 < module> 
< web>
< web-uri> DemoWarApp< / web-uri>
< context-root> DemoWarApp< / context-root>
< / web>
< / module>

显然没有指向正确的war文件夹路径。没有人知道如何解决它?



谢谢

创建的bundle文件夹必须与application.xml中的 web-uri 匹配。因此,您可以在 maven-ear-plugin

$ b中用 bundleFileName 更改包文件夹名称
$ b

 < modules> 
< webModule>
< groupId> groupId-of-DemoWarApp< / groupId>
< artifactId> artifactId-of-DemoWarApp< / artifactId>
< bundleFileName> DemoWarApp< / bundleFileName>
< / webModule>
< / modules>

或者您将 web-uri 更改为{module-name} - {version}每次匹配创建的包文件夹名称。



我会推荐一个独立于版本的bundle bundleFileName (与 web-uri 相同),所以当版本发生变化时,不必担心它。



完整的ear插件片段:

 < plugin> 
< groupId> org.apache.maven.plugins< / groupId>
< artifactId> maven-ear-plugin< / artifactId>
< version> 2.9< / version>
<配置>
<模块>
< webModule>
< groupId> groupId-of-DemoWarApp< / groupId>
< artifactId> artifactId-of-DemoWarApp< / artifactId>
< bundleFileName> DemoWarApp< / bundleFileName>
< / webModule>
< / modules>
< version> 5< / version>
< defaultLibBundleDir> lib< / defaultLibBundleDir>
< unpackTypes> war< / unpackTypes>
< / configuration>
< / plugin>


i have been trying to run a new project with modules support, but am getting following error all the time, unable to debug it,

com.google.apphosting.utils.config.EarHelper reportConfigException [INFO] INFO: Application directory 'path-to-project/DemoEar-1.0.0-SNAPSHOT/DemoWarApp' must exist and be a directory.

my module structure is below

main application.xml contains

 <module>
 <web>
 <web-uri>DemoWarApp</web-uri>
 <context-root>DemoWarApp</context-root>
</web>
</module>

its clearly not pointing to the proper war folder path. does anyone know how to fix it?

Thanks

解决方案

The bundle folder that is created must match the web-uri in your application.xml. So, you either change the bundle folder name with bundleFileName in the maven-ear-plugin

<modules>
        <webModule>
            <groupId>groupId-of-DemoWarApp</groupId>
            <artifactId>artifactId-of-DemoWarApp</artifactId>
            <bundleFileName>DemoWarApp</bundleFileName>
        </webModule>
</modules>

or you change the web-uri to {module-name}-{version} every time to match the created bundle folder name.

I would recommend a version independent bundle bundleFileName (that is the same as your web-uri) so you don't have to bother with it when the version changes.

Complete ear plugin snippet:

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-ear-plugin</artifactId>
    <version>2.9</version>
    <configuration>
      <modules>
        <webModule>
            <groupId>groupId-of-DemoWarApp</groupId>
            <artifactId>artifactId-of-DemoWarApp</artifactId>
            <bundleFileName>DemoWarApp</bundleFileName>
        </webModule>
      </modules>
      <version>5</version>
      <defaultLibBundleDir>lib</defaultLibBundleDir>
      <unpackTypes>war</unpackTypes>
    </configuration>
</plugin>

这篇关于在DevSever目标运行期间Appengine模块Maven错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆