Home
IDEAS is a Java application environment made up of three projects:
- ideas-studio : https://github.com/isa-group/ideas-studio.git
ideas-studio is a java web project which uses functionalities of ideas-repo, and it is ready to connect with modules containing different languages.
- ideas-base-module : https://github.com/isa-group/ideas-base-module.git
ideas-base-module is a java library which collects functionality to create a language module. Every language module uses this library.
- ideas-repo : https://github.com/isa-group/ideas-repo.git
ideas-repo is a java library which collects all the functionality of file management, user, etc…
IDEAS is designed to be deployed independently of the language modules. Each language module is a standalone web application that provides a REST API that makes use of IDEAS.
- Java JDK 7 or 8. JRE won’t work. You will need JDK for developing with Maven.Developers.
- Eclipse for Java EE or Netbeans IDE
- MySQL. You can use XAMPP. Or you can use H2 as a memory database. If you use H2 you don't need to install anything.
- SourceTree.
Follow this guide to setup IDEAS environment in your system.
- Git and Sourcetree:
The first thing you have to do is to install Sourcetree. It's an easy and intuitive way to work with git repositories. Clone ideas-studio and ideas-repo repositories. In this step, ideas-base-module is not required, because is only used to deploy modules.
Checkout the **master** and **develop** branches. If you have any questions, check the guide [Sourcetree](https://www.sourcetreeapp.com/) available in section guides.
-
Java:
A version of the JDK (JRE is not valid) is required. If you don't have it yet, can download and install it.
To set the usage JDK instead of JRE in Eclipse:
- Go to Eclipse preferences
- In the left panel:
Java> Installed JREs
- Add JDK using the installation directory
- Make sure that you have checked JDK and uncheck JREs.
-
Eclipse:
- Once we have all the necessary products, we proceed to import it into Eclipse. Install Eclipse for Java EE Developers version. It will save a lot of time. At least it would be necessary to have a maven plugin for Eclipse, eg: m2e - Maven Eclipse Integration.
- Import projects:
Import > Maven > Maven Existing Projects
- When you import each project conducted a mvn install:
Right-click on the
Project > Run As > Maven install
-
Netbeans IDE
- Once we have all the necessary products, we proceed to import it into Ecplise. First of all, Install Netbeans. You can download it from: https://netbeans.org/downloads/. You don’t have to download Maven because it is installed by default in Netbeans.
- Open projects: File > Open project…
- When you import each project conducted a mvn install: Right click on the project > Clean and build.
-
Database configuration:
To switch between MySQL and H2 you have to comment/uncomment some lines in the file
src > main > resources > application.properties
. The MySQL lines are 4-9 and the H2 ones 12-20. Comment the block of lines you won't use and uncomment the ones you'll use.If you use MySQL:
-
Create a database with the example name "ideas" or any other you want, and give it a user account privilege, in our example we will use "user" and "password". ideas-studio is configured by default with these example values.
-
Set the following ENV variables. The project will look for them automatically and use for connecting to the database:
DB_URL=localhost DB_PORT=3306 DB_NAME=ideas DB_USER=user DB_PASSWORD=password
-
Create the database user with the password you specified in the DB_PASSWORD variable, and give him privilege to access and modify the database.
-
Create ideas database basic schema by importing ideas_db_dump.sql.
If you want to use H2. You have to access the browser console at http://localhost:8080/h2-console/. Connect to ideas database using
sa
as username and no password. Then you need to create the database basic schema running the ideas_h2_dump.sql -
-
Deploy:
To deploy the application, you need to install all the dependencies and run the file at
src > main > java > es > us > isa > ideas > app > IdeasStudioApplication.java
and Spring Boot will create an embedded tomcat server. Once the application has finished deploying, you could access it at http://localhost:8080.
To configure the application with a module:
-
Open the studio configuration file
ideas-studio > src > main > webapp > WEB-INF > config > studio-configuration.json
.Note: if you are contributing on this project you should never modify the "studio-configuration.json" file. Instead of that, you must create a "develop-configuration.json" on the same path and with the same structure of the studio configuration file. The "studio-configuration.json" should be only modified by a release manager. For more information, please, check the Development Policy section.
-
Add a new line with the key value pair "id: uri" into "languages", indicating the module configuration values. For example, if you want to deploy the iAgree Template Language module, add the lines below:
{ "languages": { "iagree-template-language": "/ideas-iagree-template-language" } }
If you don't know which "id: uri" to add, you can find these values in
"ideas-module-name" > src > main > webapp > WEB-INF > classes > language_manifest.json
. The "uri" value correspond to the name of the generated language module.war
file.
You can find the necessary information to authenticate with Facebook, Twitter and Google in the ideas-studio > src > main > resources > application.properties
file. They are configured to work with IDEAS APIs by default.
If you want to set up a social login for a new application, you will need to create social profiles in that application and add the properties with the name [network].consumerKey
and [network].consumerSecret
.
By default, a database user has access to all servers. This is specified by the symbol "%" in the "Server" column. In some cases it is necessary to indicate that the user explicitly has access to "localhost" server.
Sometimes Maven plugin for Eclipse does not behave well when you execute mvn clean or mvn install on a parent project, and it doesn't perform well the actions on children subprojects.
If that is your case, you solve it by:
- Using the command line instead of the Maven plugin.
- Perform a mvn clean and/or mvn install on subprojects directly.
Sometimes Maven/Eclipse don't add the a jar correctly, for example in iagree-commons.
You can solve it by:
- Right-click on Eclipse embedded server
- Click on
Clean Tomcat Directory
. - Right-click on Eclipse embedded server again and click on
Clean ...
.
If the project isn't recognize as a web project, please, check if the Project Facet
is correctly configured. To do that:
- Right-click on the project,
Properties > Project Facets
We have detected an exception related to Spring converters when you try to deploy IDEAS application (not when you compile it).
Nowadays, we haven't found yet whence the problem comes. But we know that you can solve it by:
- Executing
mvn clean install
- Re-deploy IDEAS.
Eclipse doesn't display correctly the Web application even though everything seems to be well configured
- In the servers tab, right-click on the server:
- Clean.
- Clean deploy.
- In preferences/.../runtime environment > remove the used server.
- Clean Maven project.
- In the project properties, go to deployment assembly > Delete "maven dependences" and other projects (CAUTION: only dependency projects, no one else).
- Close and re-open Eclipse.
- Run Maven update in your project.
- Run Maven install.
- Check again deploy assembly that is in Maven Dependencies. If they are missing, add them.
- Add new server (Servers tab) add the necessary projects.
- If necessary, change the configuration in server.xml to accept SSL on port 8181.
- Home
- Creating a new module
- Development Policy
- Development Policy of Language Module
- User guide
- Video tutorial (previous versions)
Wiki version: IDEAS v0.9.4.1