简体   繁体   中英

Maven War Plugin Websphere

I am trying to get a Rational Application Developer project to run on a websphere server. I am trying to get the maven-war-plugin to work. However, when trying to start the server, websphere can not find the UI Files. I have my plugin here:

<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>

I feel the issue is with my webappDirectory but I do not know what else to put it to, besides the location of all my UI files.

Anyone have some insight?

I am assuming you are using WebSphere Classic V8 or earlier? What we recommend because when developing a project in RAD/WDT, WAS Classic requires building the project in a "Single Root" structure. Add the following to your pom:

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

This will build your source within the Web content folder. (Make sure you do a Project -> "Maven" -> "Update Project...") then rebuild...

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM