Просмотр исходного кода

Removed client-side code from the server-side pom, and updated the client-side pom so the angular stuff builds fine.

James Albright 8 лет назад
Родитель
Сommit
0c6dd70476
2 измененных файлов с 82 добавлено и 103 удалено
  1. 82 0
      client/pom.xml
  2. 0 103
      server/pom.xml

+ 82 - 0
client/pom.xml

@@ -18,4 +18,86 @@
 
     <name>PWM Password Self Service: Client</name>
 
+    <build>
+        <plugins>
+            <plugin>
+                <artifactId>maven-resources-plugin</artifactId>
+                <version>3.0.2</version>
+                <executions>
+                    <execution>
+                        <id>copy-client-files</id>
+                        <phase>process-resources</phase>
+                        <goals>
+                            <goal>copy-resources</goal>
+                        </goals>
+                        <configuration>
+                            <outputDirectory>${project.build.outputDirectory}/META-INF/resources/webjars/pwm-client</outputDirectory>
+                            <resources>
+                                <resource>
+                                    <directory>dist</directory>
+                                </resource>
+                            </resources>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
+                <artifactId>maven-clean-plugin</artifactId>
+                <version>3.0.0</version>
+                <executions>
+                    <execution>
+                        <id>remove-client-files</id>
+                        <phase>clean</phase>
+                        <goals>
+                            <goal>clean</goal>
+                        </goals>
+                        <configuration>
+                            <filesets>
+                                <fileset>
+                                    <directory>dist</directory>
+                                </fileset>
+                            </filesets>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
+                <groupId>com.github.eirslett</groupId>
+                <artifactId>frontend-maven-plugin</artifactId>
+                <version>1.0</version>
+                <configuration>
+                    <nodeVersion>v6.6.0</nodeVersion>
+                    <npmVersion>3.10.8</npmVersion>
+                    <installDirectory>target</installDirectory>
+                </configuration>
+                <executions>
+                    <execution>
+                        <id>install-node-and-npm</id>
+                        <goals>
+                            <goal>install-node-and-npm</goal>
+                        </goals>
+                    </execution>
+                    <execution>
+                        <id>npm-install</id>
+                        <goals>
+                            <goal>npm</goal>
+                        </goals>
+                        <configuration>
+                            <arguments>install</arguments>
+                        </configuration>
+                    </execution>
+                    <execution>
+                        <id>npm-run-build</id>
+                        <goals>
+                            <goal>npm</goal>
+                        </goals>
+                        <configuration>
+                            <arguments>run build</arguments>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+
 </project>

+ 0 - 103
server/pom.xml

@@ -48,7 +48,6 @@
                 <jspc.skip>true</jspc.skip>
                 <skipTests>true</skipTests>
                 <checkstyle.skip>true</checkstyle.skip>
-                <skip.npm>true</skip.npm>
             </properties>
         </profile>
         <profile>
@@ -69,12 +68,6 @@
                 <checkstyle.skip>true</checkstyle.skip>
             </properties>
         </profile>
-        <profile>
-            <id>skip-frontend</id>
-            <properties>
-                <skip.npm>true</skip.npm>
-            </properties>
-        </profile>
         <profile>
             <id>skip-jspc</id>
             <properties>
@@ -273,36 +266,6 @@
                             </resources>
                         </configuration>
                     </execution>
-                    <execution>
-                        <id>stage-angular</id>
-                        <phase>validate</phase>
-                        <goals>
-                            <goal>copy-resources</goal>
-                        </goals>
-                        <configuration>
-                            <outputDirectory>${project.basedir}/target/angular</outputDirectory>
-                            <resources>
-                                <resource>
-                                    <directory>src/main/angular</directory>
-                                </resource>
-                            </resources>
-                        </configuration>
-                    </execution>
-                    <execution>
-                        <id>copy-angular-resources</id>
-                        <phase>prepare-package</phase>
-                        <goals>
-                            <goal>copy-resources</goal>
-                        </goals>
-                        <configuration>
-                            <outputDirectory>${project.basedir}/target/${project.artifactId}-${project.version}/public/resources/app</outputDirectory>
-                            <resources>
-                                <resource>
-                                    <directory>${project.basedir}/target/angular/dist</directory>
-                                </resource>
-                            </resources>
-                        </configuration>
-                    </execution>
                     <execution>
                         <id>replace-build-properties</id>
                         <phase>process-resources</phase>
@@ -482,72 +445,6 @@
                     </execution>
                 </executions>
             </plugin>
-            <plugin>
-                <groupId>com.github.eirslett</groupId>
-                <artifactId>frontend-maven-plugin</artifactId>
-                <version>1.0</version>
-                <configuration>
-                    <nodeVersion>v6.6.0</nodeVersion>
-                    <npmVersion>3.10.8</npmVersion>
-                    <installDirectory>target</installDirectory>
-                    <workingDirectory>${angular.working.directory}</workingDirectory>
-                </configuration>
-                <executions>
-                    <!-- install node & npm -->
-                    <execution>
-                        <id>install</id>
-                        <goals>
-                            <goal>install-node-and-npm</goal>
-                        </goals>
-                    </execution>
-
-                    <!-- install package dependencies -->
-                    <execution>
-                        <id>install-packages</id>
-                        <goals>
-                            <goal>npm</goal>
-                        </goals>
-                        <configuration>
-                            <arguments>install</arguments>
-                        </configuration>
-                    </execution>
-
-                    <!-- clean dist/ folder before build -->
-                    <execution>
-                        <id>clean-ng</id>
-                        <goals>
-                            <goal>npm</goal>
-                        </goals>
-                        <configuration>
-                            <arguments>run clean</arguments>
-                        </configuration>
-                    </execution>
-
-                    <!-- run TypeScript compiler (You can execute directly using: "mvn frontend:npm@run-tsc") -->
-                    <execution>
-                        <id>run-tsc</id>
-                        <goals>
-                            <goal>npm</goal>
-                        </goals>
-                        <configuration>
-                            <arguments>run build</arguments>
-                        </configuration>
-                    </execution>
-
-                    <!-- run TypeScript compiler (You can execute directly using: "mvn frontend:npm@run-sync") -->
-                    <execution>
-                        <id>run-sync</id>
-                        <phase>none</phase>
-                        <goals>
-                            <goal>npm</goal>
-                        </goals>
-                        <configuration>
-                            <arguments>run sync</arguments>
-                        </configuration>
-                    </execution>
-                </executions>
-            </plugin>
-
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-jar-plugin</artifactId>