Wiki source code of Source Repository, Building and Installing
Show last authors
author | version | line-number | content |
---|---|---|---|
1 | {{box cssClass="floatinginfobox" title="**Contents**"}} | ||
2 | {{toc/}} | ||
3 | {{/box}} | ||
4 | |||
5 | XCLAMS is an open source project and all the sources are stored on [[github>>https://github.com/||rel="__blank" title="github home page"]]. You can find the XCLAMS Git page [[here>>https://github.com/xwiki-contrib/xwiki-clams-core||rel="__blank" title="Git XWiki Clams"]]. | ||
6 | |||
7 | = Checking out XCLAMS sources = | ||
8 | |||
9 | * Currikiorg: https://github.com/xwiki-contrib/currikiorg/ | ||
10 | * NEA-gps: https://github.com/xclams/neaGPS/ | ||
11 | * i2geo: https://github.com/i2geo/i2gCurrikiFork | ||
12 | * XCLAMS-core: A read-only version of the current XCLAMS code is availble at [[git:~~/~~/github.com/xwiki-contrib/xwiki-clams-core.git>>git://github.com/xwiki-contrib/xwiki-clams-core.git]]. | ||
13 | |||
14 | Here the git commands used to clone the repository and switch to the current branch | ||
15 | |||
16 | {{code}} | ||
17 | git://github.com/xwiki-contrib/xwiki-clams-core.git | ||
18 | git checkout origin/master | ||
19 | {{/code}} | ||
20 | |||
21 | = Building the sources = | ||
22 | |||
23 | To build you need a working maven environment allowing building XWiki. Find more information about setting up the build environment on the [[XWiki.org Build pages>>dev:Community.Building]]. | ||
24 | |||
25 | The command to build xwiki-clams-core is: | ||
26 | |||
27 | {{code}} | ||
28 | cd xwiki-clams-core | ||
29 | mvn install -Pmysql | ||
30 | {{/code}} | ||
31 | |||
32 | = Installation = | ||
33 | |||
34 | == Configuration == | ||
35 | |||
36 | {{warning}} | ||
37 | This needs to be verified in the latest build | ||
38 | {{/warning}} | ||
39 | |||
40 | There will be three files hand-manipulated: the web/pom.xml and web/src/main/webapp/WEB-INF/hibernate.cfg.xml and web/src/main/webapp/skins/curriki20/javascripts.vm | ||
41 | |||
42 | * in web/src/main/webapp/skins/curriki20/javascripts.vm uncomment the line with JSTrans (there is a comment explaining this) otherwise Javascript translations won't work in the add path !Is this still valid in XCLAMS 3.x! | ||
43 | * in hibernate.cfg.xml, modify as needed the database connection. The default hibernate.cfg.xml is mysql with the database named xwiki. If you are doing a new install make sure the database is empty. | ||
44 | * if you want to modify xwiki.cfg, this should be done in the web/pom.xml you can add properties in the section xwikiCfgAdditionalProperties | ||
45 | |||
46 | == Building == | ||
47 | |||
48 | === Automatic build === | ||
49 | |||
50 | {{code}} | ||
51 | Run build.sh | ||
52 | {{/code}} | ||
53 | |||
54 | === Manual build === | ||
55 | |||
56 | * before you build delete the file wiki/src/main/resources/package.xml which otherwise makes the build create a wrong curriki-wiki.xar | ||
57 | |||
58 | {{code}} | ||
59 | rm wiki/src/main/resources/package.xml | ||
60 | {{/code}} | ||
61 | |||
62 | * build using maven in your directory (using -Phsqldb or -Ppostgres if you have a different database type) | ||
63 | |||
64 | {{code}} | ||
65 | mvn install -Pmysql | ||
66 | {{/code}} | ||
67 | |||
68 | * in wiki/ build (don't forget to delete the wiki/src/main/resources/package.xml file before your build - this file is needed to deploy curriki but get's in the way of the build since the xar packager does not recreate it) | ||
69 | |||
70 | {{code}} | ||
71 | cd wiki | ||
72 | mvn install | ||
73 | {{/code}} | ||
74 | |||
75 | * delete a duplicate plexus file | ||
76 | |||
77 | {{code}} | ||
78 | rm web/target/curriki-web-1.0-SNAPSHOT/WEB-INF/lib/plexus-container-default-1.0-alpha-30.jar | ||
79 | {{/code}} | ||
80 | |||
81 | == Verify == | ||
82 | |||
83 | We should verify the modifications to hibernate.cfg.xml and xwiki.cfg are present in the build result. The build is in web/target/curriki-web-1.0-SNAPSHOT (is referenced as xwiki below) | ||
84 | |||
85 | * check xwiki/WEB-INF/xwiki.cfg to make sure the property curriki.system.hostname to the name (and port-number) of your server. | ||
86 | * check the hibernate configs aside (both should be correct based on the changes above) | ||
87 | |||
88 | == Setup MySQL == | ||
89 | |||
90 | If you have installed with a mysql database: | ||
91 | |||
92 | * create an empty database with proper rights for access from localhost | ||
93 | |||
94 | {{code}} | ||
95 | create database curriki; | ||
96 | grant all on curriki.* to [email protected] identified by 'xwiki'; | ||
97 | {{/code}} | ||
98 | |||
99 | * change max_allowed_packet as stated on [[the MySQL install instructions>>platform:AdminGuide.InstallationMySQL]] | ||
100 | |||
101 | == Start your container == | ||
102 | |||
103 | {{html clean="false" wiki="true"}} | ||
104 | * tune the memory of the container (I put CATALINA_OPTS="-Xms188m -Xmx512m -server" in catalina.sh for tomcat for example) | ||
105 | * install web app in the container (the default webapp name is xwiki, in tomcat, this means that the content of web/target/curriki-web-1.0-SNAPSHOT is copied to <tomcat-home>/webapps/xwiki. | ||
106 | * start the container | ||
107 | <p/> | ||
108 | {{warning}}if you have a 'DBCP Pool' exception, then you have made some mistake with your Database configuration.{{/warning}} | ||
109 | |||
110 | == Import your default Wiki == | ||
111 | |||
112 | {{info}}At this point you should have an XWiki up and running. The skin might be xwiki default skin or curriki skin depending on the settings in xwiki.cfg{{/info}} | ||
113 | |||
114 | * get the xar file from wiki/target/ or use the xar file attached in the page (warning: it could be outdated) | ||
115 | * visit http://localhost:8080/xwiki/bin/import/XWiki/XWikiPreferences | ||
116 | * import the xar | ||
117 | |||
118 | == Log-in and run post-processing == | ||
119 | |||
120 | * After importing you will get a message saying that "you are not allowed to view this page". This is normal, because new rights have been importer. Use Admin/admin to log-in as Admin (note uppercase username, lowercase password) | ||
121 | * visit Admin/GiveProgRights and confirm (e.g. [[http://localhost:8080/xwiki/bin/view/Admin/GiveProgRights]]). Without this some pages won't have proper rights and will show errors (like the Featured Member panel) | ||
122 | * Change smtp server in the Administration/Global Settings. Without this you cannot send notifications and invitations by email and you will get errors. | ||
123 | <p/> | ||
124 | {{info}}The application should fully work at this point{{/info}} | ||
125 | |||
126 | == Get involved == | ||
127 | |||
128 | To communicate with the XCLAMS developer community, please join the xclams-devs mailing list at [[http://lists.xwiki.org/mailman/listinfo/xclams-devs]] | ||
129 | {{/html}} |