【问题标题】:Maven War Plugin WebsphereMaven 战争插件 Websphere
【发布时间】:2015-07-24 19:26:39
【问题描述】:

我正在尝试让 Rational Application Developer 项目在 websphere 服务器上运行。我正在尝试让maven-war-plugin 工作。但是,当尝试启动服务器时,websphere 找不到 UI 文件。我的插件在这里:

<build>
    <outputDirectory>${project.basedir}\WebContent\WEB-INF\classes</outputDirectory>
    <finalName>${project.name}</finalName>
    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-war-plugin</artifactId>
            <version>2.6</version>
            <configuration>
                <webXml>/WebContent/WEB-INF/web.xml</webXml>
                <webappDirectory>WebContent</webappDirectory>
                <source>/codeCoverageUI2/src/</source>
                <encoding>utf-8</encoding>
            </configuration>
        </plugin>
    </plugins>

</build>

我觉得问题出在我的webappDirectory 上,但除了我所有 UI 文件的位置之外,我不知道还能放什么。

有人有见解吗?

【问题讨论】:

    标签: java maven websphere rad


    【解决方案1】:

    我假设您使用的是 WebSphere Classic V8 或更早版本? 我们推荐什么,因为在 RAD/WDT 中开发项目时,WAS Classic 需要在“单根”结构中构建项目。将以下内容添加到您的 pom 中:

    <build>
       <outputDirectory>${project.basedir}\WebContent\WEB-INF\classes</outputDirectory>
       <finalName>${project.name}</finalName>
    ...
    

    这将在 Web 内容文件夹中构建您的源代码。 (确保你做一个项目->“Maven”->“更新项目...”)然后重建...

    【讨论】:

    • 是的,我们使用的是 websphere 7,我将使用您建议的更改更新我的问题。我这样做了,现在我在我的 Java Resourses 文件夹中看到一个错误,但代码没有错误
    猜你喜欢
    • 2012-03-29
    • 1970-01-01
    • 1970-01-01
    • 2014-08-20
    • 1970-01-01
    • 1970-01-01
    • 2012-03-28
    • 2016-08-05
    • 2014-01-19
    相关资源
    最近更新 更多