From 20a786460cf708174c1d0daee5b77747d39a83de Mon Sep 17 00:00:00 2001 From: Paulo Gustavo Veiga Date: Sat, 25 Jan 2014 15:27:03 -0300 Subject: [PATCH 1/7] Fix Jetty hangs during install. --- pom.xml | 6 +++--- setup.sh | 3 +++ wise-webapp/pom.xml | 6 +++--- 3 files changed, 9 insertions(+), 6 deletions(-) create mode 100644 setup.sh diff --git a/pom.xml b/pom.xml index e5cdbc9f..bce1d823 100644 --- a/pom.xml +++ b/pom.xml @@ -5,6 +5,7 @@ 3.1-SNAPSHOT + ${project.basedir}/wise-webapps 4.0.0 @@ -101,12 +102,11 @@ org.apache.maven.plugins - true maven-compiler-plugin 3.1 - 1.6 - 1.6 + 1.7 + 1.7 UTF-8 diff --git a/setup.sh b/setup.sh new file mode 100644 index 00000000..fbd65887 --- /dev/null +++ b/setup.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +export MAVEN_OPTS="-XX:MaxPermSize=128M" diff --git a/wise-webapp/pom.xml b/wise-webapp/pom.xml index 183272ce..feaf0fea 100644 --- a/wise-webapp/pom.xml +++ b/wise-webapp/pom.xml @@ -461,6 +461,7 @@ org.apache.tomcat.maven tomcat7-maven-plugin + 2.0 /wisemapping ${project.build.directory}/wisemapping.war @@ -473,9 +474,9 @@ - org.mortbay.jetty + org.eclipse.jetty jetty-maven-plugin - 8.1.14.v20131031 + 9.1.0.v20131115 foo 9999 @@ -498,7 +499,6 @@ ${project.build.directory} - From 7e5b3c51a89dae1beb3698af848e4415cf013efa Mon Sep 17 00:00:00 2001 From: Paulo Gustavo Veiga Date: Sat, 25 Jan 2014 15:39:50 -0300 Subject: [PATCH 2/7] Improve readme documentation. --- Home.textile | 20 -------- README.md | 83 ++++------------------------------ wise-editor/doc/Integration.md | 71 +++++++++++++++++++++++++++++ 3 files changed, 80 insertions(+), 94 deletions(-) delete mode 100644 Home.textile create mode 100644 wise-editor/doc/Integration.md diff --git a/Home.textile b/Home.textile deleted file mode 100644 index 416bff08..00000000 --- a/Home.textile +++ /dev/null @@ -1,20 +0,0 @@ -h1. What is WiseMapping Open Source? - -WiseMapping is a free web based mindmapping application. The goal of this project is to provide a high quality product that can be deployed by educational and academic institutions, private and public companies and anyone who needs to have a mindmapping application. WiseMapping is based on the same code source supporting WiseMapping.com. - - -h1. Why Open Source ? - -In the last years, we have received hundred of mails from different persons asking for: -Integrating wisemapping.com with their sites -Deploying a private instance of wisemapping.com -Participating in the development of the site -All this make us wonder "Why if we share our product to all this people and invite them to participate with us in this journey ?" . - -h1. Who are we ? - -We’re a couple of friends working on an idea: “Create the best on-line collaborative mind mapping tool ever created”. This has been our idea since the first day we started. - -h1. [[Documentation]] - -h1. [[Compiling and Running]] diff --git a/README.md b/README.md index 24e4574a..3e9ce963 100644 --- a/README.md +++ b/README.md @@ -37,84 +37,19 @@ This will start the application on the URL: [http://localhost:8080/wise-webapp/] User: test@wisemapping.org Password: test +## Members +Founders -## Running the JS only version + * Pablo Luna + * Paulo Veiga -Start by creating the .zip file: +Individual Controbutors + * Ezequiel Bergamaschi -`mvn assembly:assembly -Dmaven.test.skip=true` - -To test the javascript frontend you then do: - - ruby -rwebrick -e 'WEBrick::HTTPServer.new(:Port=>8000,:DocumentRoot=>".").start' - -Now open a browser using the URL http://localhost:8000/wise-editor/src/main/webapp/ - -### Attaching drag and drop events. - -1) Support for dragging TextNodes: - -The following code is an example of how to add attach to the div dragImageNode the support for node dragging. - - $("dragTextNode").addEvent('mousedown', function(event) { - event.preventDefault(); - - // Create a image node ... - var mindmap = designer.getMindmap(); - var node = mindmap.createNode(); - node.setText("Node Text !!!!"); - node.setMetadata("{'media':'test'}"); - node.setShapeType(mindplot.model.TopicShape.RECTANGLE); - - // Add link ... - var link = node.createFeature(mindplot.TopicFeature.Link.id, {url:"http://www.wisemapping.com"}); - node.addFeature(link); - - // Add Note ... - var note = node.createFeature(mindplot.TopicFeature.Note.id, {text:"This is a note"}); - node.addFeature(note); - - designer.addDraggedNode(event, node); - }); - -In the example, a new node is created with text "Node Text !!!!" and a note and a link associated to it when the user drop the node. Something to pay attention is the node.setMetadata("{}"), this delegated will be persisted during the serialization. Here you can store all the data you need. - -2) Support for dragging Images: Similar to the point 1,drag support is registered to the div dragImageNode. - - $("dragImageNode").addEvent('mousedown', function(event) { - event.preventDefault(); - - // Create a image node ... - var mindmap = designer.getMindmap(); - var node = mindmap.createNode(); - node.setImageSize(80, 43); - node.setMetadata("{'media':'video,'url':'http://www.youtube.com/watch?v=P3FrXftyuzw&feature=g-vrec&context=G2b4ab69RVAAAAAAAAAA'}"); - node.setImageUrl("images/logo-small.png"); - node.setShapeType(mindplot.model.TopicShape.IMAGE); - - designer.addDraggedNode(event, node); - }); - -The node.setShapeType(mindplot.model.TopicShape.IMAGE) defines a image node. This makes mandatory the set of setImageUrl and setImageSize properties in the node. - -3) An event registration mechanism for Image nodes edit events: The next snipped show how to register a custom edition handler. - - designer.addEvent("editnode", function(event) { - var node = event.model; - - alert("Node Id:" + node.getId()); - alert("Node Metadata:" + node.getMetadata()); - alert("Is Read Only:" + event.readOnly); - } }); - - -## Authors - - * Pablo Luna - * Paulo Veiga - -Past Collaborators: Ignacio Manzano, Nicolas Damonte +Past Individual Contributors + * Ignacio Manzano + * Nicolas Damonte ## License diff --git a/wise-editor/doc/Integration.md b/wise-editor/doc/Integration.md new file mode 100644 index 00000000..dcca093b --- /dev/null +++ b/wise-editor/doc/Integration.md @@ -0,0 +1,71 @@ +JS Editor Integration +--------------------- + +## Running the JS only version + +Start by creating the .zip file: + +`mvn assembly:assembly -Dmaven.test.skip=true` + +To test the javascript frontend you then do: + + ruby -rwebrick -e 'WEBrick::HTTPServer.new(:Port=>8000,:DocumentRoot=>".").start' + +Now open a browser using the URL http://localhost:8000/wise-editor/src/main/webapp/ + +### Attaching drag and drop events. + +1) Support for dragging TextNodes: + +The following code is an example of how to add attach to the div dragImageNode the support for node dragging. + + $("dragTextNode").addEvent('mousedown', function(event) { + event.preventDefault(); + + // Create a image node ... + var mindmap = designer.getMindmap(); + var node = mindmap.createNode(); + node.setText("Node Text !!!!"); + node.setMetadata("{'media':'test'}"); + node.setShapeType(mindplot.model.TopicShape.RECTANGLE); + + // Add link ... + var link = node.createFeature(mindplot.TopicFeature.Link.id, {url:"http://www.wisemapping.com"}); + node.addFeature(link); + + // Add Note ... + var note = node.createFeature(mindplot.TopicFeature.Note.id, {text:"This is a note"}); + node.addFeature(note); + + designer.addDraggedNode(event, node); + }); + +In the example, a new node is created with text "Node Text !!!!" and a note and a link associated to it when the user drop the node. Something to pay attention is the node.setMetadata("{}"), this delegated will be persisted during the serialization. Here you can store all the data you need. + +2) Support for dragging Images: Similar to the point 1,drag support is registered to the div dragImageNode. + + $("dragImageNode").addEvent('mousedown', function(event) { + event.preventDefault(); + + // Create a image node ... + var mindmap = designer.getMindmap(); + var node = mindmap.createNode(); + node.setImageSize(80, 43); + node.setMetadata("{'media':'video,'url':'http://www.youtube.com/watch?v=P3FrXftyuzw&feature=g-vrec&context=G2b4ab69RVAAAAAAAAAA'}"); + node.setImageUrl("images/logo-small.png"); + node.setShapeType(mindplot.model.TopicShape.IMAGE); + + designer.addDraggedNode(event, node); + }); + +The node.setShapeType(mindplot.model.TopicShape.IMAGE) defines a image node. This makes mandatory the set of setImageUrl and setImageSize properties in the node. + +3) An event registration mechanism for Image nodes edit events: The next snipped show how to register a custom edition handler. + + designer.addEvent("editnode", function(event) { + var node = event.model; + + alert("Node Id:" + node.getId()); + alert("Node Metadata:" + node.getMetadata()); + alert("Is Read Only:" + event.readOnly); + } }); \ No newline at end of file From 2cb7ec9afb0cc5a24b66118811a5bbb40a84e07d Mon Sep 17 00:00:00 2001 From: Paulo Gustavo Veiga Date: Sat, 25 Jan 2014 15:43:46 -0300 Subject: [PATCH 3/7] Minor fix on documentation. --- README.md | 30 ++++++++++++++++++++++-------- 1 file changed, 22 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 3e9ce963..0b6eff4f 100644 --- a/README.md +++ b/README.md @@ -1,17 +1,17 @@ -## Project Information +# Project Information The goal of this project is to provide a high quality product that can be deployed by educational and academic institutions, private and public companies and anyone who needs to have a mindmapping application. WiseMapping is based on the same code source supporting WiseMapping.com. More info: www.wisemapping.org -# Compiling and Running +## Compiling and Running -## Prerequisites +### Prerequisites The following products must be installed: * Java Development Kit 7 or higher ([http://www.oracle.com/technetwork/java/javase/downloads/index.html]) * Maven 3.x or higher ([http://maven.apache.org/]) -## Compiling +### Compiling WiseMapping uses Maven as packaging and project management. It's composed of 5 maven sub-modules: @@ -27,7 +27,7 @@ The full compilation of the project can be performed executing within /wise-webapp/target/wisemapping*.war will be generated. -## Testing +### Testing The previously generated war can be deployed locally executing within the directory /wise-webapp the following command: `cd wise-webapp;mvn jetty:run-war` @@ -37,17 +37,31 @@ This will start the application on the URL: [http://localhost:8080/wise-webapp/] User: test@wisemapping.org Password: test +## Running the JS only version + +Start by creating the .zip file: + +`mvn assembly:assembly -Dmaven.test.skip=true` + +To test the javascript frontend you then do: + + ruby -rwebrick -e 'WEBrick::HTTPServer.new(:Port=>8000,:DocumentRoot=>".").start' + +Now open a browser using the URL http://localhost:8000/wise-editor/src/main/webapp/ + ## Members -Founders +### Founders * Pablo Luna * Paulo Veiga -Individual Controbutors +### Individual Controbutors + * Ezequiel Bergamaschi -Past Individual Contributors +### Past Individual Contributors + * Ignacio Manzano * Nicolas Damonte From 14d688b9bf5a64bea39fb82d9e5ec7a3761164dc Mon Sep 17 00:00:00 2001 From: Paulo Gustavo Veiga Date: Sat, 25 Jan 2014 15:47:44 -0300 Subject: [PATCH 4/7] Remove unsed files. --- Compiling-and-running.md | 36 ------------------------------------ README.md | 6 +++--- license.txt | 2 +- 3 files changed, 4 insertions(+), 40 deletions(-) delete mode 100644 Compiling-and-running.md diff --git a/Compiling-and-running.md b/Compiling-and-running.md deleted file mode 100644 index 53d0ab77..00000000 --- a/Compiling-and-running.md +++ /dev/null @@ -1,36 +0,0 @@ -# Compiling and Running - -## Prerequisites - -The following products must be installed: - - * Java Development Kit 7 or higher ([http://www.oracle.com/technetwork/java/javase/downloads/index.html]) - * Maven 3.x or higher ([http://maven.apache.org/]) - -## Compiling - -WiseMapping uses Maven as packaging and project management. It's composed of 5 maven sub-modules: - - * core-js: Utilities JavaScript classes - * web2d: JavaScript 2D SVG abstraction library used by the mind map editor - * mindplot: JavaScript mindmap designer core - * wise-editor: Mindmap Editor standalone distribution - * wise-webapp: J2EE web application - -The full compilation of the project can be performed executing within : - -`mvn package` - -Once this command is execute, the file /wise-webapp/target/wisemapping*.war will be generated. - -## Testing -The previously generated war can be deployed locally executing within the directory /wise-webapp the following command: - -`cd wise-webapp;mvn jetty:run-war` - -This will start the application on the URL: [http://localhost:8080/wise-webapp/]. Additionally, a file based database is automatically populated with a test user. - -User: test@wisemapping.org -Password: test - -Enjoy :) \ No newline at end of file diff --git a/README.md b/README.md index 0b6eff4f..350f0fc4 100644 --- a/README.md +++ b/README.md @@ -58,12 +58,12 @@ Now open a browser using the URL http://localhost:8000/wise-editor/src/main/weba ### Individual Controbutors - * Ezequiel Bergamaschi + * Ezequiel Bergamaschi ### Past Individual Contributors - * Ignacio Manzano - * Nicolas Damonte + * Ignacio Manzano + * Nicolas Damonte ## License diff --git a/license.txt b/license.txt index 3f5065af..fa41cbdd 100644 --- a/license.txt +++ b/license.txt @@ -1,4 +1,4 @@ - Copyright [2012] [wisemapping] + Copyright [2014] [wisemapping] Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the From 40907bc479baf3fb675dd36c4bd6e62366f1893c Mon Sep 17 00:00:00 2001 From: Paulo Gustavo Veiga Date: Sat, 25 Jan 2014 15:49:10 -0300 Subject: [PATCH 5/7] Remove unsed file. --- java.iml | 14 -------------- 1 file changed, 14 deletions(-) delete mode 100644 java.iml diff --git a/java.iml b/java.iml deleted file mode 100644 index 8015fa76..00000000 --- a/java.iml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - - - - From f39e82b0162d716f171e82dc096d8ef1fa5316c5 Mon Sep 17 00:00:00 2001 From: Ezequiel Bergamaschi Date: Sat, 25 Jan 2014 18:16:21 -0300 Subject: [PATCH 6/7] adding missing db profiles due to a wrong merge --- wise-webapp/pom.xml | 147 ++++++++++++++++++++++++++++++-------------- 1 file changed, 101 insertions(+), 46 deletions(-) diff --git a/wise-webapp/pom.xml b/wise-webapp/pom.xml index feaf0fea..b215d43c 100644 --- a/wise-webapp/pom.xml +++ b/wise-webapp/pom.xml @@ -324,54 +324,109 @@ 0.6.6 + + + hsqldb + + true + + + + + org.codehaus.mojo + sql-maven-plugin + 1.5 + + + org.hsqldb.jdbc.JDBCDriver + jdbc:hsqldb:file:${project.build.directory}/db/wisemapping + sa + + + + + mysql + mysql-connector-java + 5.1.5 + + + org.hsqldb + hsqldb + 2.2.8 + + + + + + drop-schemas + prepare-package + + execute + + + continue + descending + + ${project.basedir} + + config/database/hsql/drop-schemas.sql + config/database/hsql/create-schemas.sql + config/database/hsql/apopulate-schemas.sql + + + + + + + + + + + mysqldb + + false + + + + + org.codehaus.mojo + sql-maven-plugin + 1.5 + + + mysql + mysql-connector-java + 5.1.5 + + + + + init-schema + + execute + + prepare-package + + + + com.mysql.jdbc.Driver + root + + jdbc:mysql://127.0.0.1:3306/?useUnicode=true&characterEncoding=UTF-8 + false + + config/database/mysql/create-database.sql + config/database/mysql/create-schemas.sql + config/database/mysql/test-data.sql + + + + + + + - - org.codehaus.mojo - sql-maven-plugin - 1.5 - - - org.hsqldb.jdbc.JDBCDriver - jdbc:hsqldb:file:${project.build.directory}/db/wisemapping - sa - - - - - mysql - mysql-connector-java - 5.1.5 - - - org.hsqldb - hsqldb - 2.2.8 - - - - - - drop-schemas - prepare-package - - execute - - - continue - descending - - ${project.basedir} - - config/database/hsql/drop-schemas.sql - config/database/hsql/create-schemas.sql - config/database/hsql/apopulate-schemas.sql - - - - - - org.codehaus.mojo native2ascii-maven-plugin From 99be712a5f23c48c31cd95702fcae4650158643a Mon Sep 17 00:00:00 2001 From: Paulo Gustavo Veiga Date: Sat, 25 Jan 2014 18:24:53 -0300 Subject: [PATCH 7/7] Add JCoco Coverage report. --- config/database/mysql/apopulate-schemas.sql | 4 +++ config/database/mysql/create-database.sql | 3 +++ config/database/mysql/create-schemas.sql | 4 +++ wise-webapp/pom.xml | 30 +++++++++++++++++++-- 4 files changed, 39 insertions(+), 2 deletions(-) diff --git a/config/database/mysql/apopulate-schemas.sql b/config/database/mysql/apopulate-schemas.sql index cd449f1a..ea90f79a 100644 --- a/config/database/mysql/apopulate-schemas.sql +++ b/config/database/mysql/apopulate-schemas.sql @@ -1,3 +1,7 @@ +# +# Command: mysql -u root -p < apopulate_schemas.sql +# + INSERT INTO COLLABORATOR (id, email, creation_date) VALUES (1, 'test@wisemapping.org', CURRENT_DATE()); INSERT INTO USER (colaborator_id, firstname, lastname, password, activation_code, activation_date, allow_send_email,authentication_type) VALUES (1, 'Test', 'User', 'ENC:a94a8fe5ccb19ba61c4c0873d391e987982fbbd3', 1237, CURRENT_DATE(), 1,'D'); diff --git a/config/database/mysql/create-database.sql b/config/database/mysql/create-database.sql index 52a7cd2f..6d2cd226 100644 --- a/config/database/mysql/create-database.sql +++ b/config/database/mysql/create-database.sql @@ -1,3 +1,6 @@ +# +# Command: mysql -u root -p < create_database.sql +# DROP DATABASE IF EXISTS wisemapping; CREATE DATABASE IF NOT EXISTS wisemapping diff --git a/config/database/mysql/create-schemas.sql b/config/database/mysql/create-schemas.sql index 4e26a3fc..c9164ad0 100644 --- a/config/database/mysql/create-schemas.sql +++ b/config/database/mysql/create-schemas.sql @@ -1,3 +1,7 @@ +# +# Command: mysql -u root -p < create_schemas.sql +# + USE wisemapping; CREATE TABLE COLLABORATOR ( diff --git a/wise-webapp/pom.xml b/wise-webapp/pom.xml index b215d43c..a788a2a6 100644 --- a/wise-webapp/pom.xml +++ b/wise-webapp/pom.xml @@ -507,12 +507,38 @@ - org.apache.maven.plugins maven-surefire-plugin - + + org.jacoco + jacoco-maven-plugin + 0.6.4.201312101107 + + + + pre-unit-test + + prepare-agent + + + + + post-unit-test + test + + report + + + + org.apache.tomcat.maven tomcat7-maven-plugin