syncope-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ilgro...@apache.org
Subject [2/2] syncope git commit: Disable all extensions support in JS code via Maven when the 'all' profile is not selected
Date Thu, 06 Apr 2017 14:32:22 GMT
Disable all extensions support in JS code via Maven when the 'all' profile is not selected


Project: http://git-wip-us.apache.org/repos/asf/syncope/repo
Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/dfa81211
Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/dfa81211
Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/dfa81211

Branch: refs/heads/master
Commit: dfa81211a784bc133176303982ac86ac1a05a7a7
Parents: 57705c1
Author: Francesco Chicchiriccò <ilgrosso@apache.org>
Authored: Thu Apr 6 16:32:00 2017 +0200
Committer: Francesco Chicchiriccò <ilgrosso@apache.org>
Committed: Thu Apr 6 16:32:11 2017 +0200

----------------------------------------------------------------------
 .../archetype-resources/enduser/pom.xml         | 35 +++++++++++++++++---
 .../resources/META-INF/resources/app/js/app.js  |  2 ++
 2 files changed, 32 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/syncope/blob/dfa81211/archetype/src/main/resources/archetype-resources/enduser/pom.xml
----------------------------------------------------------------------
diff --git a/archetype/src/main/resources/archetype-resources/enduser/pom.xml b/archetype/src/main/resources/archetype-resources/enduser/pom.xml
index 2fd2927..240dc2a 100644
--- a/archetype/src/main/resources/archetype-resources/enduser/pom.xml
+++ b/archetype/src/main/resources/archetype-resources/enduser/pom.xml
@@ -95,6 +95,31 @@ under the License.
     <plugins>
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-antrun-plugin</artifactId>
+        <inherited>true</inherited>
+        <executions>
+          <execution>
+            <id>disableExtensions</id>
+            <phase>package</phase>
+            <configuration>
+              <target>
+                <replace file="${project.build.directory}/${project.build.finalName}/app/js/app.js"

+                         token="/* &lt;Extensions&gt; */"
+                         value="/* &lt;Extensions&gt;"/>
+                <replace file="${project.build.directory}/${project.build.finalName}/app/js/app.js"

+                         token="/* &lt;/Extensions&gt; */"
+                         value="&lt;/Extensions&gt;*/"/>
+              </target>
+            </configuration>
+            <goals>
+              <goal>run</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-war-plugin</artifactId>
         <inherited>true</inherited>
         <configuration>
@@ -298,11 +323,11 @@ under the License.
       <id>all</id>
 
       <dependencies>
-	<dependency>
-	  <groupId>org.apache.syncope.ext.saml2sp</groupId>
-	  <artifactId>syncope-ext-saml2sp-client-enduser</artifactId>
-	  <version>${syncope.version}</version>
-	</dependency>
+        <dependency>
+          <groupId>org.apache.syncope.ext.saml2sp</groupId>
+          <artifactId>syncope-ext-saml2sp-client-enduser</artifactId>
+          <version>${syncope.version}</version>
+        </dependency>
       </dependencies>
       
       <build>        

http://git-wip-us.apache.org/repos/asf/syncope/blob/dfa81211/client/enduser/src/main/resources/META-INF/resources/app/js/app.js
----------------------------------------------------------------------
diff --git a/client/enduser/src/main/resources/META-INF/resources/app/js/app.js b/client/enduser/src/main/resources/META-INF/resources/app/js/app.js
index 64d535f..cfe7a09 100644
--- a/client/enduser/src/main/resources/META-INF/resources/app/js/app.js
+++ b/client/enduser/src/main/resources/META-INF/resources/app/js/app.js
@@ -380,6 +380,7 @@ app.controller('ApplicationController', ['$scope', '$rootScope', '$location',
'I
               function (response) {
                 console.error("Something went wrong while accessing info resource", response);
               });
+      /* <Extensions> */
       SAML2IdPService.getAvailableSAML2IdPs().then(
               function (response) {
                 $rootScope.saml2idps.available = response;
@@ -387,6 +388,7 @@ app.controller('ApplicationController', ['$scope', '$rootScope', '$location',
'I
               function (response) {
                 console.debug("No SAML 2.0 SP extension available", response);
               });
+      /* </Extensions> */
       /* 
        * configuration getters
        */


Mime
View raw message