maven Jetty plugin config

竺勇
2023-12-01
<plugin>
                    <groupId>org.eclipse.jetty</groupId>
                    <artifactId>jetty-maven-plugin</artifactId>
                    <version>9.2.11.v20150529</version>
                    <configuration>
                        <httpConnector>
                            <!-- The default port is 8081 -->
                            <port>8081</port>
                        </httpConnector>
                        <stopKey>shutdown</stopKey>
                        <stopPort>9966</stopPort>
                        <!-- The default value is 0. Value greater than 0. 0 indicates close, 
                            unit is second. To configure the values for a cycle, automatic scan file 
                            to check whether there is change the content. If the found file -->
                        <!-- Content has been changed, then automatically redeploy the application. -->
                        <scanIntervalSeconds>2</scanIntervalSeconds>

                        <!-- The default value is automatic, it with greater than 0 scanIntervalSeconds 
                            node function, automatic hot deployment work. Set it to The benefits of the 
                            manual is, when you change the file -->
                        <!-- Content and save, not immediately trigger automatic scanning and 
                            redeploy action, you can still change, until you press Enter key on the Console 
                            or the command line (Enter) to trigger the weight -->
                        <!-- New load action. This can be more convenient debugging. -->
                        <!-- <reload>manual</reload> -->

                        <!-- DumpOnStart the default value is false, if set to true, jetty 
                            when starting the current service process in the memory information output 
                            to the console, but it will not be saved to a file. -->
                        <dumpOnStart>true</dumpOnStart>

                        <!-- ContextPath default value /, ${project. The artifactId} cited 
                            < artifactId > node values. The project name. -->
                        <!-- Project static resource file directory is the default SRC/main/webapp, 
                            if there are multiple static resource directory, or is not in default of 
                            SRC/main/webapp directory -->
                        <webApp>
                            <contextPath>/${project.artifactId}</contextPath>
                            <!-- <resourceBases> <resourceBase>${project.basedir}/src/main/webapp</resourceBase> 
                                <resourceBase>${project.basedir}/commons</resourceBase> </resourceBases> -->
                        </webApp>
                        <!-- org.eclipse.jetty.server.NCSARequestLog are org.eclipse.jetty.server.RequestLog 
                            An implementation of class. -->
                        <!-- org.eclipse.jetty.server.NCSARequestLog Is a kind of false standard 
                            NCSA log format. Here are some node parameter interpretation: -->
                        <!-- filename:The name of the log file -->
                        <!-- filenameDateFormat:Date format of the log file name, it requires 
                            that the log file name must contain yyyy_mm_dd string -->
                        <!-- logDateFormat:Time format of log content -->
                        <!-- logTimeZone:time zone -->
                        <!-- append:Appended to the log -->
                        <!-- logServer:Record access the host name -->
                        <!-- retainDays:Delete the log file to save the number of days, more 
                            than -->
                        <!-- logCookies:record cookies -->
                        <!-- Start the jetty service, in the project target directory _06_23 
                            generates a access - 2015. The log file -->
                        <requestLog implementation="org.eclipse.jetty.server.NCSARequestLog">
                            <filename>target/access-yyyy_mm_dd.log</filename>
                            <filenameDateFormat>yyyy_MM_dd</filenameDateFormat>
                            <logDateFormat>yyyy-MM-dd HH:mm:ss</logDateFormat>
                            <logTimeZone>GMT+8:00</logTimeZone>
                            <append>true</append>
                            <logServer>true</logServer>
                            <retainDays>120</retainDays>
                            <logCookies>true</logCookies>
                        </requestLog>
                    </configuration>
                </plugin>
 类似资料:

相关阅读

相关文章

相关问答