• 多War包合并,jetty测试


    模块间的相互依赖引用配置
    在pom.xml中加入要依赖的模块即可
    <dependency>
        <groupId>com.exayong</groupId>
        <artifactId>common</artifactId>
        <version>0.0.1-SNAPSHOT</version>
    </dependency>

    webapp新建其他目录放 js 图片等公共的
        WEB-INF 下放jsp


    总的War包合并规则
    如果多个war有同路径且同名的文件,总web里有就用总web里面的,会覆盖分支中的;如果总的没有就看合并的顺序,留下第一个
    合并的顺序就是在总pom中配置的依赖先后顺序
    公共的最好放在总web中

    eclipse 安装好jetty插件
    在每个要测试的web的pom里面加入jetty的插件配置 注意jetty的版本 新版的配置已经发生较大变化以下配置不再适用 要根据最新的官方去配置
    内嵌的web服务器进行测试 contextPath 各个模块设成不同的 总web 为<contextPath>/goods</contextPath> 根路径
    <build>
        <finalName>goodsmgrweb</finalName>
        <plugins>
            <plugin>
                <groupId>org.mortbay.jetty</groupId>
                <artifactId>jetty-maven-plugin</artifactId>
                <version>8.1.14.v20131031</version>
                <configuration>
                    <scanIntervalSeconds>10</scanIntervalSeconds>
                    <stopPort>9999</stopPort>
                    <webAppConfig>
                        <contextPath>/goods</contextPath>
                    </webAppConfig>
                    <connectors>
                        <connector implementation="org.eclipse.jetty.server.nio.SelectChannelConnector">
                            <port>9080</port>
                            <maxIdleTime>60000</maxIdleTime>
                        </connector>
                    </connectors>
                </configuration>
            </plugin>
        </plugins>
    </build>


    run as 配置运行文件
    Base directory 选择工程路径
    Goals: jetty:run

  • 相关阅读:
    图形化代码阅读工具——Scitools Understand
    cocos studio UI 1.6.0.0 修改导出项目路径
    cocos2dx 中文路径编译错误记录
    利用特性区分查找方法,并通过反射调用方法
    WPF MVVM学习(二)
    wpf 控件模板、面板模板、数据模板
    blend 自定义控件
    wpf dataGrid样式
    blend 使用模板的几点说明
    WPF MVVM学习
  • 原文地址:https://www.cnblogs.com/exayong/p/6505284.html
Copyright © 2020-2023  润新知