首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >tomee mvn安装不打包META-INF

tomee mvn安装不打包META-INF
EN

Stack Overflow用户
提问于 2013-07-21 14:39:03
回答 1查看 168关注 0票数 1

当尝试构建war文件时,maven没有使用pom打包任何META-INF:

代码语言:javascript
复制
<modelVersion>4.0.0</modelVersion>
<groupId>demo-test</groupId>
<artifactId>core-parent</artifactId>
<packaging>pom</packaging>
<version>1.0.0</version>
<name>test</name>
<url>http://maven.apache.org</url>

<properties>
    <test.core.version>1.0.0</test.core.version>
</properties>

<modules>
    <module>testDataModule</module>
    <module>testFramework</module>
    <module>testManagerModule</module>
    <module>CoreWar</module>
</modules>

<dependencies>
    <dependency>
        <groupId>javax</groupId>
        <artifactId>javaee-api</artifactId>
        <version>6.0</version>
        <!-- scope provided means the container delivers it -->
        <scope>provided</scope>
    </dependency>
</dependencies>

<build>
    <finalName>test</finalName>
    <plugins>
        <plugin>
            <groupId>org.apache.openejb.maven</groupId>
            <artifactId>tomee-maven-plugin</artifactId>
            <version>1.5.2</version>
            <configuration>
                <finalName>test</finalName>
                <tomeeVersion>1.5.2</tomeeVersion>
                <tomeeClassifier>plus</tomeeClassifier>
                <path>C:\test\code\test.core\CoreWar\target\test.war</path>
                <debug>true</debug>
                <tomeeHost>localhost</tomeeHost>
                <tomeeHttpPort>8080</tomeeHttpPort>
                <libs>
                    <lib>mysql:mysql-connector-java:5.1.20</lib>
                </libs>
            </configuration>
        </plugin>
        <plugin>
            <artifactId>maven-compiler-plugin</artifactId>
            <configuration>
                <source>1.6</source>
                <target>1.6</target>
            </configuration>
        </plugin>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-war-plugin</artifactId>
            <configuration>
                <webXml>..\testFramework\WebFramework\src\webapp\WEB-INF\web.xml</webXml>
                <outputFileNameMapping>@{groupId}@-@{artifactId}@@{dashClassifier?}@.@{extension}@</outputFileNameMapping>
            </configuration>
        </plugin>
    </plugins>
</build>

我试着到处使用META-INF。并且不要替换tomee.xml,我尝试了以下结构:

myApp->src->resources->meta-inf/persistence.xml myApp->src->webapp->meta-inf/persistence.xml

EN

回答 1

Stack Overflow用户

发布于 2013-07-22 01:10:49

您尝试过webapp/WEB-INF/persistence.xml吗?

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/17769770

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档