Salome TMF v3

Mar 25, 2009 - Build tool Apache ant 1.7. Note: be ... http://ant.apache.org/bindownload.cgi ... Download the zip package: salome_3_1b_src_19_05_08.tgz .... At this point you should have a valid connection to the database server. 7.1.
97KB taille 52 téléchargements 294 vues
SalomeTMF v3 – build guide

25/03/2009

Salome TMF v3 Install and build guide Issue 2

revision 1 2

FD

date 24/03/2009 25/03/2009

author Frederic Defever Frederic Defever

comments Initial version Added more info

Salome TMF v3.doc – rev 2

Page 1 of 7

SalomeTMF v3 – build guide

25/03/2009

Index 1

Requirements ....................................................................................3

2

Useful documentation .......................................................................3

3

Useful links ........................................................................................3

4

Building SalomeTMF and plugins from scratch ..................................4 4.1 4.2 4.3

5

Fetch the source ........................................................................................ 4 Folder architecture .................................................................................... 4 Source files need fix up!............................................................................. 4

Setting up SalomeTMF project within Eclipse ....................................4 5.1 5.1.1 5.1.2 5.1.3 5.1.4

5.2 5.3

6

Getting started with Eclipse ....................................................................... 4 Eclipse workspace................................................................................................ 4 Setup a new java project ..................................................................................... 4 Setup the libs (jar files) ........................................................................................ 5 Addup the plugin source files .............................................................................. 5

Manual Plugins config file .......................................................................... 5 Add plugins automatically.......................................................................... 6

Setting up the database connection with SalomeTMF.......................6 6.1 6.2

7

On the MySQL DB side ............................................................................... 6 Using salome tool ...................................................................................... 6

Debugging the applet ........................................................................7 7.1

FD

Setting up the debug options ..................................................................... 7

Salome TMF v3.doc – rev 2

Page 2 of 7

SalomeTMF v3 – build guide

1

25/03/2009

Requirements OS Database Libs IDE Build tool

XP or Linux MySQL 5+ JDK 5+ Eclipse IDE 3.2+ (java edition) Apache ant 1.7

Note: be careful on which folder separator you must use: ‘\’ for Windows ‘/’ for Linux.

2

Useful documentation

Salome TMF user guide Salome general doc webpage

3

Useful links

Java JDK Apache ant 1.7 SalomeTMF user guide Salome general doc Salome website Salome source zip

FD

http://java.sun.com/javase/downloads/index.jsp http://ant.apache.org/bindownload.cgi http://forge.ow2.org/docman/view.php/194/111/salome_tmf_en. pdf http://forge.ow2.org/docman/index.php?group_id=194 http://forge.ow2.org/project/showfiles.php?group_id=194 http://forge.ow2.org/project/download.php?group_id=194&file_id =10715

Salome TMF v3.doc – rev 2

Page 3 of 7

SalomeTMF v3 – build guide

4

25/03/2009

Building SalomeTMF and plugins from scratch 4.1

Fetch the source

Get the source code from the official website Download the zip package: salome_3_1b_src_19_05_08.tgz That zip file contains the plugins source and ant build files. You also may have to get the doc folder, as it might not be included in the source zip file, but still is required for building the whole program.

4.2

Folder architecture

Unzip source files into your working folder \salome_3_1b_src This will then be referenced as the

4.3

Source files need fix up!

For some obscure reasons, some source files don’t have their full file extension properly set(!). So we need to fix these first, before attempting any build, it will only result in errors, loads of errors, otherwise. Make sure to change their extension from .jav to .java \src\org\objectweb\salome_tmf\tools\qc_migration_t ool\converterIHM\ConverterMain.java \src\org\objectweb\salome_tmf\ihm\main\htmleditor\ component\ExtendedHTMLDocument.java \src\org\objectweb\salome_tmf\ihm\main\htmleditor\ component\ JToggleButtonNoFocus.java

5

Setting up SalomeTMF project within Eclipse 5.1

Getting started with Eclipse 5.1.1 Eclipse workspace

Point to

5.1.2 Setup a new java project 1. 2. 3. 4.

FD

File/New/Project… In the Java project option, select Java project from existing ant buildfile Point the ant buildfile to \build.xml You can change the project name while you’re there

Salome TMF v3.doc – rev 2

Page 4 of 7

SalomeTMF v3 – build guide

25/03/2009

5. Tick “Link to the buildfile in the file system” 6. Finish

5.1.3 Setup the libs (jar files) 1. Select project, then ALT+ENTER or properties 2. In java build path/librairies 3. Remove any missing lib (marked with red cross) 4. Add external jars 5. And add the jars files from these folders: \libs \libsDocbook2PDF \libsQCMigrationTool \libsServer \libsSOAP 6. Then make sure the following jars from the JDK are also included (these are for the cryptography functions) \jdk1.6.0_07\jre\lib\ext\sunjce_provider.jar \jdk1.6.0_07\jre\lib\jce.jar

5.1.4 Addup the plugin source files 1. From the project properties 2. In java build path/source 3. Link source… 4. And then select the plugin source folder, for example \plugins\beanshell\src_beanshell 5. And so on for each plugin. Note: some plugin are required in order for some other plugins to work, like docXML. At this stage the auto-build should compile the project without any errors (not the same for warnings).

5.2

Manual Plugins config file

If you’re manually adding some more plugins to SalomeTMF, you will most likely need to modify slightly the CfgPlugins.properties file to make sure you enable the plugins you have added. \classes\plugins\CfgPlugins.properties # Liste des repertoires ou se trouvent les plugins, separes par des virgules "," pluginsFolders = plugins # Liste des plugins presents separes par des virgules "," (les noms des plugins doivent etre # identiques a ceux des noms des repetoires les contenant) pluginsList = core, simpleJunit, docXML, helpgui, cronExec, requirements, pluginxlsxml, beanshell #, , mantis, helpgui, simpleJunit, bugzilla, beanshell, gen_doc_xml, cronExec, weighting, codex_tracker, lookAndfeel

FD

Salome TMF v3.doc – rev 2

Page 5 of 7

SalomeTMF v3 – build guide

5.3

25/03/2009

Add plugins automatically

From the CLI, \plugins\java –jar pluginInstall.jar .zip This way it should update automatically the \plugins\CfgPlugins.properties file with the enabled plugins.

6 Setting up the database connection with SalomeTMF 6.1

On the MySQL DB side

Make sure the salome user is setup to connect to the database, from localhost, from the network (using % wildcard) and external connection (%)

Having the database wrongly setup may result in a greyed out applet on the index.html page from SalomeTMF.

6.2

Using salome tool

To set up the database connection, you must run from the CLI \: java –jar salome_tmf_tools.jar

Also make sure to leave the other settings to their default value: • Debug mode • IDE_Dev • Allow plugins • Net tracking FD

Salome TMF v3.doc – rev 2

Page 6 of 7

SalomeTMF v3 – build guide

25/03/2009

Otherwise, some conflict may result and the applet won’t be able to connect to the database server. #Thu Mar 12 16:23:52 CET 2009 DriverJDBC=com.mysql.jdbc.Driver IDE_Dev=false LockOnTestExec=false SQLEngineSOAP=false #SQLEngineSOAP=org.objectweb.salome_tmf.soap.SQLObjectFactory AllowPlugins=true WithICAL=false SQLEngine=org.objectweb.salome_tmf.databaseSQL.SQLObjectFactor y Password=db27ddc9e0576766 URL=jdbc\:mysql\:///salomeTMF_bdd DBLOCK=0 User='salomeTMF_user' NetChangeTrack=false LockExecutedTest=true Debug=false Example of DB_Connexion.properties file

7

Debugging the applet

At this point you should have a valid connection to the database server.

7.1

Setting up the debug options

1. In debug, 2. Create a java applet configuration 3. In Main, select the main function to launch the applet, here SalomeTMF – org.objectweb.salome_tmf.ihm.main

The source and classpath should be all set by now and nothing else should be done.

FD

Salome TMF v3.doc – rev 2

Page 7 of 7