瀏覽代碼

add maven profile -skip-jsp-compile

Jason Rivard 4 年之前
父節點
當前提交
1ecb5ced65
共有 2 個文件被更改,包括 17 次插入1 次删除
  1. 3 0
      pom.xml
  2. 14 1
      webapp/pom.xml

+ 3 - 0
pom.xml

@@ -36,6 +36,9 @@
         <maven.compiler.target>1.8</maven.compiler.target>
         <maven.javadoc.skip>true</maven.javadoc.skip>
 
+        <!-- profile managed values -->
+        <spotbugs.skip>false</spotbugs.skip>
+        <checkstyle.skip>false</checkstyle.skip>
         <skipTests>false</skipTests>
 
         <!-- git.commit.time is populated via git-commit-id-plugin and results in a (hopefully) reproducible maven build -->

+ 14 - 1
webapp/pom.xml

@@ -14,6 +14,11 @@
 
     <name>PWM Password Self Service: Server WAR</name>
 
+    <properties>
+        <!-- by default use the web.xml generated by jsp compile plugin -->
+        <webXmlForJspPreCompiledInjection>${project.build.directory}/web.xml</webXmlForJspPreCompiledInjection>
+    </properties>
+
     <profiles>
         <profile>
             <id>enable-javadoc</id>
@@ -21,6 +26,13 @@
                 <maven.javadoc.skip>false</maven.javadoc.skip>
             </properties>
         </profile>
+        <profile>
+            <!-- doesn't actually skip jsp compile, but will prevent pre-compiled jsps from being included in web.xml -->
+            <id>skip-jsp-compile</id>
+            <properties>
+                <webXmlForJspPreCompiledInjection>${basedir}/src/main/webapp/WEB-INF/web.xml</webXmlForJspPreCompiledInjection>
+            </properties>
+        </profile>
         <profile>
             <!-- Builds a zip file containing the built war file, along with the supplemental directory -->
             <id>release</id>
@@ -96,7 +108,8 @@
                     <archiveClasses>false</archiveClasses>
                     <packagingExcludes>**/*.jsp</packagingExcludes>
                     <!-- remove/comment the next line to prevent pre-compiled JSPs from being used in the output WAR -->
-                    <webXml>${project.build.directory}/web.xml</webXml>
+
+                    <webXml>${webXmlForJspPreCompiledInjection}</webXml>
                     <archive>
                         <manifestEntries>
                             <Implementation-Archive-Name>${warArtifactID}</Implementation-Archive-Name>