Repository: syncope Updated Branches: refs/heads/master 5d45494f0 -> 04415543c
http://git-wip-us.apache.org/repos/asf/syncope/blob/04415543/fit/console-reference/src/main/resources/url-config.js ---------------------------------------------------------------------- diff --git a/fit/console-reference/src/main/resources/url-config.js b/fit/console-reference/src/main/resources/url-config.js new file mode 100644 index 0000000..89a91d7 --- /dev/null +++ b/fit/console-reference/src/main/resources/url-config.js @@ -0,0 +1,34 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +var KISBPM = KISBPM || {}; + +KISBPM.URL = { + getModel: function (modelId) { + return window.location.toString().substr(0, window.location.toString().indexOf('/activiti-modeler')) + + "/workflowDefGET"; + }, + getStencilSet: function () { + return window.location.toString().substr(0, window.location.toString().indexOf('/activiti-modeler')) + + "/activiti-modeler/stencilset.json"; + }, + putModel: function (modelId) { + return window.location.toString().substr(0, window.location.toString().indexOf('/activiti-modeler')) + + "/workflowDefPUT"; + } +}; http://git-wip-us.apache.org/repos/asf/syncope/blob/04415543/installer/src/main/java/org/apache/syncope/installer/files/ModelerPom.java ---------------------------------------------------------------------- diff --git a/installer/src/main/java/org/apache/syncope/installer/files/ModelerPom.java b/installer/src/main/java/org/apache/syncope/installer/files/ModelerPom.java deleted file mode 100644 index 143d849..0000000 --- a/installer/src/main/java/org/apache/syncope/installer/files/ModelerPom.java +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.syncope.installer.files; - -public class ModelerPom { - - public static final String PATH = "/pom.xml"; - - public static final String FILE = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" - + "<project xmlns=\"http://maven.apache.org/POM/4.0.0\"\n" - + " xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n" - + " xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0\n" - + " http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n" - + " <modelVersion>4.0.0</modelVersion>\n" + " \n" + " <groupId>org.apache.syncope</groupId>\n" - + " <artifactId>activitiModelerSetup</artifactId>\n" + " <version>1.0-SNAPSHOT</version>\n" - + " <packaging>jar</packaging>\n" + " \n" + " <properties>\n" - + " <activiti.version>5.16.2</activiti.version>\n" - + " <activiti-modeler.directory>%s</activiti-modeler.directory>\n" - + " <tokenValueMap>%s/oryx.debug.js-tokenValueMap.properties</tokenValueMap>\n" + " \n" - + " <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>\n" + " </properties>\n" + " \n" - + " <dependencies>\n" + " <dependency>\n" + " <groupId>org.activiti</groupId>\n" - + " <artifactId>activiti-webapp-explorer2</artifactId> \n" - + " <version>${activiti.version}</version>\n" + " <type>war</type>\n" - + " <scope>test</scope>\n" + " </dependency> \n" + " </dependencies>\n" + " \n" - + " <build> \n" + " <plugins>\n" + " <plugin>\n" - + " <groupId>org.apache.maven.plugins</groupId>\n" - + " <artifactId>maven-antrun-plugin</artifactId>\n" + " <version>1.7</version>\n" - + " <executions>\n" + " <execution>\n" + " <id>setupActivitiModeler</id>\n" - + " <phase>process-resources</phase>\n" + " <configuration>\n" - + " <target>\n" - + " <unzip src=\"${settings.localRepository}/org/activiti/activiti-webapp-explorer2/${activiti.version}/activiti-webapp-explorer2-${activiti.version}.war\"\n" - + " dest=\"${project.build.directory}/activiti-webapp-explorer2\" />\n" - + " \n" + " <mkdir dir=\"${activiti-modeler.directory}\" />\n" - + " \n" + " <mkdir dir=\"${activiti-modeler.directory}/editor\" />\n" - + " <copy todir=\"${activiti-modeler.directory}/editor\">\n" - + " <fileset dir=\"${project.build.directory}/activiti-webapp-explorer2/editor\">\n" - + " <exclude name=\"oryx.js\" />\n" + " </fileset>\n" - + " </copy>\n" - + " <copy file=\"${project.build.directory}/activiti-webapp-explorer2/WEB-INF/classes/plugins.xml\"\n" - + " todir=\"${activiti-modeler.directory}/editor\" />\n" - + " <copy file=\"${project.build.directory}/activiti-webapp-explorer2/WEB-INF/classes/stencilset.json\"\n" - + " todir=\"${activiti-modeler.directory}/editor\" />\n" + " \n" - + " <mkdir dir=\"${activiti-modeler.directory}/explorer\" />\n" - + " <copy todir=\"${activiti-modeler.directory}/explorer\">\n" - + " <fileset dir=\"${project.build.directory}/activiti-webapp-explorer2/explorer\" />\n" - + " </copy>\n" + " \n" - + " <mkdir dir=\"${activiti-modeler.directory}/libs\" />\n" - + " <copy todir=\"${activiti-modeler.directory}/libs\">\n" - + " <fileset dir=\"${project.build.directory}/activiti-webapp-explorer2/libs\" />\n" - + " </copy>\n" + " </target>\n" + " </configuration>\n" - + " <goals>\n" + " <goal>run</goal>\n" + " </goals>\n" - + " </execution>\n" + " </executions>\n" + " </plugin>\n" + " <plugin>\n" - + " <groupId>com.google.code.maven-replacer-plugin</groupId>\n" - + " <artifactId>replacer</artifactId>\n" + " <version>1.5.3</version>\n" - + " <executions>\n" + " <execution>\n" + " <phase>process-resources</phase>\n" - + " <goals>\n" + " <goal>replace</goal>\n" - + " </goals> \n" + " </execution>\n" + " </executions>\n" - + " <configuration>\n" - + " <file>${activiti-modeler.directory}/editor/oryx.debug.js</file>\n" - + " <tokenValueMap>${tokenValueMap}</tokenValueMap>\n" + " <unescape>true</unescape>\n" - + " <regex>false</regex>\n" + " </configuration>\n" + " </plugin>\n" - + " </plugins>\n" + " </build>\n" + "</project>"; - -} http://git-wip-us.apache.org/repos/asf/syncope/blob/04415543/installer/src/main/java/org/apache/syncope/installer/files/ModelerTokenValueMap.java ---------------------------------------------------------------------- diff --git a/installer/src/main/java/org/apache/syncope/installer/files/ModelerTokenValueMap.java b/installer/src/main/java/org/apache/syncope/installer/files/ModelerTokenValueMap.java deleted file mode 100644 index e99bd0d..0000000 --- a/installer/src/main/java/org/apache/syncope/installer/files/ModelerTokenValueMap.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.syncope.installer.files; - -public class ModelerTokenValueMap { - - public static final String PATH = "/oryx.debug.js-tokenValueMap.properties"; - - public static final String FILE = "# Licensed to the Apache Software Foundation (ASF) under one\n" - + "# or more contributor license agreements. See the NOTICE file\n" - + "# distributed with this work for additional information\n" - + "# regarding copyright ownership. The ASF licenses this file\n" - + "# to you under the Apache License, Version 2.0 (the\n" - + "# \"License\"); you may not use this file except in compliance\n" - + "# with the License. You may obtain a copy of the License at\n" + "#\n" - + "# http://www.apache.org/licenses/LICENSE-2.0\n" + "#\n" - + "# Unless required by applicable law or agreed to in writing,\n" - + "# software distributed under the License is distributed on an\n" - + "# \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n" - + "# KIND, either express or implied. See the License for the\n" - + "# specific language governing permissions and limitations\n" + "# under the License.\n" - + "ORYX.CONFIG.ROOT_PATH \\= \"../editor/\"; //TODO: Remove last slash!!=BASE_PATH = window.location.toString().substr(0, window.location.toString().indexOf('/wicket'));\\nORYX.CONFIG.ROOT_PATH = BASE_PATH + \"/activiti-modeler/editor/\";\n" - + "ORYX.CONFIG.EXPLORER_PATH \\= \"../explorer\";=ORYX.CONFIG.EXPLORER_PATH = BASE_PATH + \"/activiti-modeler/explorer\";\n" - + "ORYX.CONFIG.LIBS_PATH \\= \"../libs\";=ORYX.CONFIG.LIBS_PATH = BASE_PATH + \"/activiti-modeler/libs\";\n" - + "ORYX.CONFIG.SYNTAXCHECKER_URL \\==ORYX.CONFIG.PLUGINS_CONFIG = ORYX.CONFIG.ROOT_PATH + \"plugins.xml\";\\nORYX.CONFIG.SYNTAXCHECKER_URL =\n" - + "this._baseUrl \\= \"../editor/stencilsets/bpmn2.0/\";=this._baseUrl = ORYX.CONFIG.ROOT_PATH + \"stencilsets/bpmn2.0/\";\n" - + "this._source \\= \"../stencilsets/bpmn2.0/bpmn2.0.json\";=this._source = ORYX.CONFIG.ROOT_PATH + \"stencilsets/bpmn2.0/bpmn2.0.json\";\n" - + "\"../service/editor/stencilset\"=ORYX.CONFIG.ROOT_PATH + \"stencilset.json\"\n" - + "ORYX.Editor.createByUrl=modelUrl = BASE_PATH + \"/workflowDefGET\";\\nORYX.Editor.createByUrl\n" - + "../explorer/src/img/signavio/smoky/logo2.png=\"+ORYX.CONFIG.EXPLORER_PATH+\"/src/img/signavio/smoky/logo2.png\n" - + "<a href\\=\\\\\"\"+ORYX.CONFIG.WEB_URL+\"\\\\\" target\\=\\\\\"_self\\\\\" title\\=\\\\\"close modeler\\\\\">=<a href=\\\\\"#\\\\\" title=\\\\\"close modeler\\\\\" onclick=\\\\\"window.close();\\\\\">\n" - + "../editor/images/close_button.png=\"+ORYX.CONFIG.ROOT_PATH+\"images/close_button.png\n" - + "height:16px;width:16px;margin-bottom:-4px;background: transparent url(../libs/ext-2.0.2/resources/images/default/tree/loading.gif) no-repeat center;=height:16px;width:16px;margin-bottom:-4px;background: transparent url(\"+ORYX.CONFIG.LIBS_PATH+\"/ext-2.0.2/resources/images/default/tree/loading.gif) no-repeat center;\n" - + "icon: '../editor/images/add.png',=icon: ORYX.CONFIG.ROOT_PATH + 'images/add.png',\n" - + "icon: '../editor/images/delete.png',=icon: ORYX.CONFIG.ROOT_PATH + 'images/delete.png',\n" - + "id\\=\"edit_model_title\"=id=\"edit_model_title\" readonly=\"readonly\"\n" - + "id\\=\"edit_model_summary\"=id=\"edit_model_summary\" readonly=\"readonly\"\n" - + "\"../service/model/\" + modelMeta.modelId + \"/json\"=BASE_PATH + \"/workflowDefGET\"\n" - + "// Send the request to the server.=saveUri = BASE_PATH + \"/workflowDefPUT\";\\n// Send the request to the server.\n" - + "'Accept':\"application/json\", 'Content-Type':'charset\\=UTF-8'='Accept':\"application/json\", 'Content-Type':'application/json'"; - -} http://git-wip-us.apache.org/repos/asf/syncope/blob/04415543/installer/src/main/java/org/apache/syncope/installer/processes/ArchetypeProcess.java ---------------------------------------------------------------------- diff --git a/installer/src/main/java/org/apache/syncope/installer/processes/ArchetypeProcess.java b/installer/src/main/java/org/apache/syncope/installer/processes/ArchetypeProcess.java index 0c7bdea..f772c8b 100644 --- a/installer/src/main/java/org/apache/syncope/installer/processes/ArchetypeProcess.java +++ b/installer/src/main/java/org/apache/syncope/installer/processes/ArchetypeProcess.java @@ -51,7 +51,7 @@ public class ArchetypeProcess extends BaseProcess { final String proxyUser = args[15]; final String proxyPwd = args[16]; final boolean mavenProxyAutoconf = Boolean.valueOf(args[17]); - + setSyncopeInstallDir(installPath, artifactId); final FileSystemUtils fileSystemUtils = new FileSystemUtils(handler); @@ -110,15 +110,20 @@ public class ArchetypeProcess extends BaseProcess { fileSystemUtils.createDirectory(logsDirectory); fileSystemUtils.createDirectory(bundlesDirectory); fileSystemUtils.createDirectory(modelerDirectory); - + fileSystemUtils.copyFileFromResources("/" + properties.getProperty("modelerPomFile"), modelerDirectory + "/" + properties.getProperty("pomFile"), handler); fileSystemUtils.copyFile( syncopeInstallDir + properties.getProperty("consoleResDirectory") - + "/" + properties.getProperty("tokenValueMapFile"), - modelerDirectory + "/" + properties.getProperty("tokenValueMapFile")); + + "/" + properties.getProperty("urlConfig"), + modelerDirectory + "/" + properties.getProperty("urlConfig")); + fileSystemUtils.copyFile( + syncopeInstallDir + + properties.getProperty("consoleResDirectory") + + "/" + properties.getProperty("saveModel"), + modelerDirectory + "/" + properties.getProperty("saveModel")); final Properties modelerProperties = new Properties(); modelerProperties.setProperty("modeler.directory", modelerDirectory); http://git-wip-us.apache.org/repos/asf/syncope/blob/04415543/installer/src/main/resources/installer.properties ---------------------------------------------------------------------- diff --git a/installer/src/main/resources/installer.properties b/installer/src/main/resources/installer.properties index e18bfea..6e33c6a 100644 --- a/installer/src/main/resources/installer.properties +++ b/installer/src/main/resources/installer.properties @@ -16,7 +16,8 @@ # under the License. jBossDeploymentStructureXmlFile=core/src/main/webapp/WEB-INF/jboss-deployment-structure.xml glassfishCoreWebXmlFile=core/src/main/webapp/WEB-INF/glassfish-web.xml -tokenValueMapFile=oryx.debug.js-tokenValueMap.properties +urlConfig=url-config.js +saveModel=save-model.html consoleResDirectory=console/src/main/resources pomFile=pom.xml persistenceContextEMFactoryFile=core/src/main/resources/persistenceContextEMFactory.xml http://git-wip-us.apache.org/repos/asf/syncope/blob/04415543/installer/src/main/resources/modelerPom.xml ---------------------------------------------------------------------- diff --git a/installer/src/main/resources/modelerPom.xml b/installer/src/main/resources/modelerPom.xml index f0f01f6..56841bb 100644 --- a/installer/src/main/resources/modelerPom.xml +++ b/installer/src/main/resources/modelerPom.xml @@ -27,9 +27,8 @@ under the License. <packaging>jar</packaging> <properties> - <activiti.version>5.16.4</activiti.version> + <activiti.version>5.17</activiti.version> <activiti-modeler.directory>${modeler.directory}</activiti-modeler.directory> - <tokenValueMap>${modeler.directory}/oryx.debug.js-tokenValueMap.properties</tokenValueMap> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> </properties> @@ -49,38 +48,55 @@ under the License. <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-antrun-plugin</artifactId> - <version>1.7</version> + <version>1.8</version> <executions> <execution> <id>setupActivitiModeler</id> <phase>process-resources</phase> <configuration> <target> - <unzip src="${settings.localRepository}/org/activiti/activiti-webapp-explorer2/${activiti.version}/activiti-webapp-explorer2-${activiti.version}.war" + <unzip src="${settings.localRepository}/org/activiti/activiti-webapp-explorer2/${activiti.version}/activiti-webapp-explorer2-${activiti.version}.war" dest="${project.build.directory}/activiti-webapp-explorer2" /> - + <mkdir dir="${activiti-modeler.directory}" /> - - <mkdir dir="${activiti-modeler.directory}/editor" /> - <copy todir="${activiti-modeler.directory}/editor"> - <fileset dir="${project.build.directory}/activiti-webapp-explorer2/editor"> - <exclude name="oryx.js" /> - </fileset> - </copy> - <copy file="${project.build.directory}/activiti-webapp-explorer2/WEB-INF/classes/plugins.xml" - todir="${activiti-modeler.directory}/editor" /> - <copy file="${project.build.directory}/activiti-webapp-explorer2/WEB-INF/classes/stencilset.json" - todir="${activiti-modeler.directory}/editor" /> - - <mkdir dir="${activiti-modeler.directory}/explorer" /> - <copy todir="${activiti-modeler.directory}/explorer"> - <fileset dir="${project.build.directory}/activiti-webapp-explorer2/explorer" /> - </copy> - - <mkdir dir="${activiti-modeler.directory}/libs" /> - <copy todir="${activiti-modeler.directory}/libs"> - <fileset dir="${project.build.directory}/activiti-webapp-explorer2/libs" /> + <copy file="${project.build.directory}/activiti-webapp-explorer2/modeler.html" + todir="${activiti-modeler.directory}" /> + <replace file="${activiti-modeler.directory}/modeler.html" + token="</head>" + value="<script type="text/javascript">window.onunload = refreshParent; function refreshParent() { window.opener.location.reload(); }</script></head>"/> + <copy file="${project.build.directory}/activiti-webapp-explorer2/WEB-INF/classes/stencilset.json" + todir="${activiti-modeler.directory}" /> + + <mkdir dir="${activiti-modeler.directory}/editor-app" /> + <copy todir="${activiti-modeler.directory}/editor-app"> + <fileset dir="${project.build.directory}/activiti-webapp-explorer2/editor-app" /> </copy> + <replaceregexp file="${activiti-modeler.directory}/editor-app/editor/oryx.debug.js" + match="ORYX.CONFIG.ROOT_PATH =.*"editor/"; //TODO: Remove last slash!!" + replace="BASE_PATH = window.location.toString().substr(0, window.location.toString().indexOf('/wicket')); +ORYX.CONFIG.ROOT_PATH = BASE_PATH + "/activiti-modeler/editor-app/editor/";" + byline="true"/> + <replace file="${activiti-modeler.directory}/editor-app/editor/oryx.debug.js" + token="new Ajax.Request(ACTIVITI.CONFIG.contextRoot + '/editor/stencilset?version=' + Date.now(), {" + value="new Ajax.Request(window.location.toString().substr(0, window.location.toString().indexOf('/activiti-modeler')) + "/activiti-modeler/stencilset.json", {"/> + <replace file="${activiti-modeler.directory}/editor-app/editor/oryx.debug.js" + token="ORYX.Editor.createByUrl(modelUrl);" + value="modelUrl = BASE_PATH + "/workflowDefGET"; +ORYX.Editor.createByUrl(modelUrl);"/> + <replace file="${activiti-modeler.directory}/editor-app/editor/oryx.debug.js" + token="ORYX.Editor.createByUrl = function(modelUrl){" + value="modelUrl = BASE_PATH + "/workflowDefGET"; +ORYX.Editor.createByUrl = function(modelUrl){"/> + <replace file="${activiti-modeler.directory}/editor-app/configuration/toolbar-default-actions.js" + token="window.location.href = "./";" + value="window.close();"/> + + <copy file="${basedir}/src/main/resources/url-config.js" + todir="${activiti-modeler.directory}/editor-app/configuration" + overwrite="true" /> + <copy file="${basedir}/src/main/resources/save-model.html" + todir="${activiti-modeler.directory}/editor-app/popups" + overwrite="true" /> </target> </configuration> <goals> @@ -89,25 +105,6 @@ under the License. </execution> </executions> </plugin> - <plugin> - <groupId>com.google.code.maven-replacer-plugin</groupId> - <artifactId>replacer</artifactId> - <version>1.5.3</version> - <executions> - <execution> - <phase>process-resources</phase> - <goals> - <goal>replace</goal> - </goals> - </execution> - </executions> - <configuration> - <file>${activiti-modeler.directory}/editor/oryx.debug.js</file> - <tokenValueMap>${tokenValueMap}</tokenValueMap> - <unescape>true</unescape> - <regex>false</regex> - </configuration> - </plugin> </plugins> </build> </project> http://git-wip-us.apache.org/repos/asf/syncope/blob/04415543/pom.xml ---------------------------------------------------------------------- diff --git a/pom.xml b/pom.xml index 7fdb405..08bbfa9 100644 --- a/pom.xml +++ b/pom.xml @@ -347,7 +347,7 @@ under the License. <groovy.version>2.4.3</groovy.version> - <activiti.version>5.16.4</activiti.version> + <activiti.version>5.17.0</activiti.version> <slf4j.version>1.7.12</slf4j.version> <log4j.version>2.2</log4j.version> @@ -782,17 +782,6 @@ under the License. <artifactId>avalon-framework-impl</artifactId> <version>4.3.1</version> </dependency> - - <dependency> - <groupId>xalan</groupId> - <artifactId>xalan</artifactId> - <version>2.7.1</version> - </dependency> - <dependency> - <groupId>xerces</groupId> - <artifactId>xercesImpl</artifactId> - <version>2.11.0</version> - </dependency> <!-- Activiti --> <dependency> @@ -1154,12 +1143,6 @@ under the License. </plugin> <plugin> - <groupId>com.google.code.maven-replacer-plugin</groupId> - <artifactId>replacer</artifactId> - <version>1.5.3</version> - </plugin> - - <plugin> <groupId>org.zeroturnaround</groupId> <artifactId>jrebel-maven-plugin</artifactId> <version>1.1.5</version> @@ -1543,9 +1526,9 @@ under the License. <link>http://connid.tirasa.net/apidocs/1.4/</link> <link>http://camel.apache.org/maven/current/camel-core/apidocs/</link> <link>http://camel.apache.org/maven/current/camel-spring/apidocs/</link> - <link>http://ci.apache.org/projects/wicket/apidocs/6.x/</link> + <link>http://ci.apache.org/projects/wicket/apidocs/7.x/</link> <link>http://docs.spring.io/spring/docs/4.1.x/javadoc-api/</link> - <link>http://docs.spring.io/spring-security/site/docs/3.2.x/apidocs/</link> + <link>http://docs.spring.io/spring-security/site/docs/4.0.x/apidocs/</link> <link>http://activiti.org/javadocs/</link> </links> </configuration>
