-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #51 from rwth-acis/develop
New release v0.7.0
- Loading branch information
Showing
40 changed files
with
1,690 additions
and
575 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,11 @@ | ||
<project name="RequirementsBazaar" default="all" basedir="." xmlns:ivy="antlib:org.apache.ivy.ant"> | ||
<project name="RequirementsBazaar" default="all" basedir="." xmlns:ivy="antlib:org.apache.ivy.ant" | ||
xmlns:flyway="antlib:org.flywaydb.ant"> | ||
|
||
<property file="etc/ant_configuration/user.properties"/> | ||
<property file="etc/ant_configuration/service.properties"/> | ||
|
||
<property file="etc/de.rwth.dbis.acis.bazaar.service.BazaarService.properties"/> | ||
|
||
<property name="startup" location="etc/startup"/> | ||
|
||
<property name="user_agent1.path" value="${startup}/agent-user-${las2peer_user.name}.xml"/> | ||
|
@@ -16,6 +19,7 @@ | |
<property name="service" location="service"/> | ||
|
||
<property name="tmp.classes" location="${tmp}/classes"/> | ||
<property name="tmp.bundle" location="${tmp}/bundle"/> | ||
<property name="tmp.junit" location="${tmp}/test"/> | ||
|
||
<property name="export" location="export"/> | ||
|
@@ -68,6 +72,7 @@ | |
</ivy:settings> | ||
<ivy:retrieve type="jar, bundle" conf="platform" pattern="${lib}/[artifact]-[revision].[ext]"/> | ||
<ivy:retrieve type="jar, bundle" conf="bundle" pattern="${service}/[artifact]-[revision].[ext]"/> | ||
<ivy:retrieve type="jar, bundle" conf="bundle" pattern="${tmp.bundle}/[artifact]-[revision].[ext]"/> | ||
</target> | ||
|
||
|
||
|
@@ -80,6 +85,7 @@ | |
<target name="init_general"> | ||
<tstamp/> | ||
<mkdir dir="${tmp}"/> | ||
<mkdir dir="${tmp}.bundle"/> | ||
<mkdir dir="${export}"/> | ||
<mkdir dir="${startup}"/> | ||
<mkdir dir="${log}"/> | ||
|
@@ -142,7 +148,7 @@ | |
# it starts a LAS2peer node providing the service '${service.name}.${service.class}' of this project | ||
# pls execute it from the root folder of your deployment, e. g. ./bin/start_network.sh | ||
|
||
java -cp "lib/*" i5.las2peer.tools.L2pNodeLauncher -p 9011 uploadStartupDirectory startService\(\'${service.name}.${service.class}@${service.version}\',\'${service.passphrase}\'\) startWebConnector interactive | ||
java -cp "lib/*" i5.las2peer.tools.L2pNodeLauncher -p 9011 uploadStartupDirectory startService\(\'${service.name}.${service.class}@${service.version}\',\'${service.passphrase}\'\) startWebConnector interactive | ||
</echo> | ||
<echo file="${basedir}/bin/start_network.bat" append="false">:: this script is autogenerated by 'ant | ||
startscripts' | ||
|
@@ -155,7 +161,7 @@ | |
set BASE=%CD% | ||
set CLASSPATH="%BASE%/lib/*;" | ||
|
||
java -cp %CLASSPATH% i5.las2peer.tools.L2pNodeLauncher -p 9011 uploadStartupDirectory startService('${service.name}.${service.class}@${service.version}','${service.passphrase}') startWebConnector interactive | ||
java -cp %CLASSPATH% i5.las2peer.tools.L2pNodeLauncher -p 9011 uploadStartupDirectory startService('${service.name}.${service.class}@${service.version}','${service.passphrase}') startWebConnector interactive | ||
|
||
pause | ||
</echo> | ||
|
@@ -177,6 +183,18 @@ | |
</copy> | ||
</target> | ||
|
||
<!-- Generate Jars ncluding all deps --> | ||
<target name="jar-big" depends="compile_main" description="--> build service jar including all deps"> | ||
<jar jarfile="${service}/${service.name}-${service.version}.jar"> | ||
<fileset dir="${tmp.classes}"/> | ||
<zipgroupfileset dir="${tmp.bundle}"/> | ||
<manifest> | ||
<attribute name="las2peer-service-name" value="${service.name}"/> | ||
<attribute name="las2peer-service-version" value="${service.version}"/> | ||
</manifest> | ||
</jar> | ||
</target> | ||
|
||
|
||
<!-- Generate Documentation --> | ||
<target name="javadoc" depends="init_doc"> | ||
|
@@ -258,6 +276,24 @@ | |
|
||
<target name="all" depends="clean, get_deps, compile_main, jar, generate_agents, startscripts"/> | ||
|
||
<!-- Flyway database migration --> | ||
<target name="migrate-db"> | ||
<taskdef uri="antlib:org.flywaydb.ant" resource="org/flywaydb/ant/antlib.xml"> | ||
<classpath> | ||
<pathelement location="${service}/flyway-core-4.2.0.jar"/> | ||
<pathelement location="${service}/flyway-ant-4.2.0.jar"/> | ||
<pathelement location="${service}/mysql-connector-java-6.0.5.jar"/> | ||
</classpath> | ||
</taskdef> | ||
|
||
<path id="flyway.classpath"> | ||
<fileset dir="${service}" includes="h2.jar"/> | ||
</path> | ||
<property name="flyway.locations" value="filesystem:./etc/migrations"/> | ||
|
||
<flyway:migrate url="${dbUrl}?useSSL=false&serverTimezone=UTC" user="${dbUserName}" password="${dbPassword}"/> | ||
</target> | ||
|
||
<!-- Run --> | ||
<target name="debug" depends="compile_main, jar"> | ||
<java classname="i5.las2peer.tools.L2pNodeLauncher" | ||
|
@@ -270,7 +306,7 @@ | |
<arg value='-p'/> | ||
<arg value='9011'/> | ||
<arg value='uploadStartupDirectory'/> | ||
<arg value='startService(\"de.rwth.dbis.acis.bazaar.service.[email protected]\",\"SampleServicePass\")'/> | ||
<arg value="startService('${service.name}.${service.class}@${service.version}','${service.passphrase}')"/> | ||
<arg value='startWebConnector'/> | ||
<arg value='interactive'/> | ||
</java> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
service.version=0.6 | ||
service.version=0.7 | ||
service.name=de.rwth.dbis.acis.bazaar.service | ||
service.path=de/rwth/dbis/acis/bazaar/service | ||
service.class=BazaarService | ||
service.passphrase=Passphrase | ||
service.dependencies=commons-codec;version="1.9",commons-dbcp2;version="2.0",commons-io;version="2.4",commons-logging;version="1.2",commons-pool2;version="2.2",emoji-java;version="3.1.3",gson;version="2.3",httpclient;version="4.5.1",httpcore;version="4.4.3",jodd-bean;version="3.6.1",jodd-core;version="3.6.1",jodd-vtor;version="3.6.1",jooq;version="3.9.1",jooq-codegen;version="3.9.1",jooq-meta;version="3.9.1",json;version="20140107",mysql-connector-java;version="5.1.6" | ||
service.dependencies=commons-codec;version="1.9",commons-dbcp2;version="2.0",commons-io;version="2.4",commons-logging;version="1.2",commons-pool2;version="2.2",emoji-java;version="3.1.3",gson;version="2.3",httpclient;version="4.5.1",httpcore;version="4.4.3",jodd-bean;version="3.6.1",jodd-core;version="3.6.1",jodd-vtor;version="3.6.1",jooq;version="3.9.1",jooq-codegen;version="3.9.1",jooq-meta;version="3.9.1",json;version="20140107",mysql-connector-java;version="6.0.5" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,5 @@ | ||
SET FOREIGN_KEY_CHECKS = 0; | ||
|
||
CREATE DATABASE IF NOT EXISTS reqbaz; | ||
|
||
DROP TABLE IF EXISTS reqbaz.attachment, reqbaz.comment, reqbaz.category, | ||
reqbaz.requirement_developer_map, reqbaz.requirement_follower_map, reqbaz.category_follower_map, | ||
reqbaz.project_follower_map, reqbaz.privilege, reqbaz.project, reqbaz.requirement, | ||
reqbaz.requirement_category_map, reqbaz.role_privilege_map, reqbaz.role_role_map, | ||
reqbaz.role, reqbaz.user_role_map, reqbaz.vote; | ||
|
||
-- tables | ||
-- Table attachment | ||
CREATE TABLE IF NOT EXISTS reqbaz.attachment ( | ||
|
@@ -232,4 +224,95 @@ CREATE TABLE IF NOT EXISTS reqbaz.vote ( | |
CONSTRAINT vote_user FOREIGN KEY vote_user (user_id) REFERENCES user (id) | ||
); | ||
|
||
-- Fill roles and privileges | ||
REPLACE INTO reqbaz.role | ||
(id, name) | ||
VALUES | ||
(1, 'Anonymous'), | ||
(2, 'LoggedInUser'), | ||
(3, 'ProjectAdmin'), | ||
(4, 'SystemAdmin'); | ||
|
||
REPLACE INTO reqbaz.privilege | ||
(id, name) | ||
VALUES | ||
(1, 'Create_PROJECT'), | ||
(2, 'Read_PROJECT'), | ||
(3, 'Read_PUBLIC_PROJECT'), | ||
(4, 'Modify_PROJECT'), | ||
(5, 'Create_CATEGORY'), | ||
(6, 'Read_CATEGORY'), | ||
(7, 'Read_PUBLIC_CATEGORY'), | ||
(8, 'Modify_CATEGORY'), | ||
(9, 'Create_REQUIREMENT'), | ||
(10, 'Read_REQUIREMENT'), | ||
(11, 'Read_PUBLIC_REQUIREMENT'), | ||
(12, 'Modify_REQUIREMENT'), | ||
(13, 'Create_COMMENT'), | ||
(14, 'Read_COMMENT'), | ||
(15, 'Read_PUBLIC_COMMENT'), | ||
(16, 'Modify_COMMENT'), | ||
(17, 'Create_ATTACHMENT'), | ||
(18, 'Read_ATTACHMENT'), | ||
(19, 'Read_PUBLIC_ATTACHMENT'), | ||
(20, 'Modify_ATTACHMENT'), | ||
(21, 'Create_VOTE'), | ||
(22, 'Delete_VOTE'), | ||
(23, 'Create_FOLLOW'), | ||
(24, 'Delete_FOLLOW'), | ||
(25, 'Create_DEVELOP'), | ||
(26, 'Delete_DEVELOP'); | ||
|
||
REPLACE INTO reqbaz.role_privilege_map | ||
(id, role_id, privilege_id) | ||
VALUES | ||
(1, 1, 3), | ||
(2, 1, 7), | ||
(3, 1, 11), | ||
(4, 1, 15), | ||
(5, 1, 19), | ||
(6, 4, 1), | ||
(7, 4, 2), | ||
(8, 4, 8), | ||
(9, 4, 7), | ||
(10, 4, 6), | ||
(11, 4, 5), | ||
(12, 4, 3), | ||
(13, 4, 4), | ||
(14, 4, 9), | ||
(15, 4, 10), | ||
(16, 4, 11), | ||
(17, 4, 12), | ||
(18, 4, 13), | ||
(19, 4, 14), | ||
(20, 4, 16), | ||
(21, 4, 17), | ||
(22, 4, 18), | ||
(23, 4, 19), | ||
(24, 4, 20), | ||
(25, 4, 21), | ||
(26, 4, 22), | ||
(27, 4, 23), | ||
(28, 4, 24), | ||
(29, 4, 25), | ||
(30, 4, 26); | ||
|
||
REPLACE INTO reqbaz.role_role_map | ||
(id, child_id, parent_id) | ||
VALUES | ||
(1, 2, 1), | ||
(2, 3, 2), | ||
(3, 4, 3); | ||
|
||
REPLACE INTO reqbaz.user_role_map | ||
(id, role_id, user_id) | ||
VALUES | ||
(1, 1, 1); | ||
|
||
REPLACE INTO reqbaz.user | ||
(id, first_name, last_name, email, admin, las2peer_id, user_name, profile_image, email_lead_subscription, email_follow_subscription) | ||
VALUES | ||
(1, NULL, NULL, '[email protected]', 0, '-1722613621014065292', 'anonymous', | ||
'https://api.learning-layers.eu/profile.png', 0, 0); | ||
|
||
SET FOREIGN_KEY_CHECKS = 1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.