Maven tomcat插件与额外的战争文件

时间:2014-07-03 15:28:39

标签: java eclipse maven tomcat7

我有一个正在运行的war项目,它正在maven tomcat插件下运行。 现在我想在这个嵌入式tomcat实例中运行一个额外的战争。我搜索了这样做的方法并找到了:

<plugin>
    <groupId>org.apache.tomcat.maven</groupId>
    <artifactId>tomcat7-maven-plugin</artifactId>
    <configuration>
        <webapps>
            <webapp>
                <contextPath>/test</contextPath>
                <groupId>com.foo.bar</groupId>
                <artifactId>foobar</artifactId>
                <version>${project.version}</version>
                <type>war</type>
                <asWebapp>true</asWebapp>
            </webapp>
        </webapps>
    </configuration>
</plugin>

我试图执行它并获得:

[INFO] Deploying dependency wars
[INFO] Deploy warfile: [workspace_war_project_loc]\target\classes to contextPath: /test
[ERROR] org.codehaus.plexus.archiver.ArchiverException: The source must not be a directory.

任何帮助? :(

更新:这是在eclipse中运行时使用&#34;解析工作区工件&#34;选项有效。如果我关闭它,构建成功完成,但是当我尝试从额外的战争中访问servlet时,它们不可用.. :(因为我没有在嵌入式中使用管理器tomcat实例我无法检查那里有什么..

任何帮助?

0 个答案:

没有答案