Author: Craig Gallen, OpenNMS Copyright© OpenNMS, 2010 Getting Started with JOSIF Author: Craig Gallen, OpenNMS Copyright© OpenNMS, 2010
Timetable Copyright Hewlett-Packard 11-Nov-18
Agenda Overview of JOSIF build components download and Installation starting a project
Realistic Model Driven Engineering Interface model directly derived from the SID Model based interface generation Spec RI CTK Implementation Libraries Interface Operations added in Tigerstripe SID modelled in Rational RSM Interface Implementation Same framework for all interfaces Can be extended to new managed technologies (Modelling: 3G, Ethernet etc) Can be extended to different management technologies (WSDL, JAVA, etc) Can be offered to other standards organisations (ITU-T, 3GPP etc) Can be used internally by SP’s, SI’s, Equipment vendors OSS Interface Specification OSS OSS Interface API (Like OSS/J)
Generic Tigerstripe Build Process Project Website Maven 2 Public Repo Eclipse Tigerstripe Workspace TS Model Project TS Plugin Project Packaging Project jar pom.xml zip doc Generated website Transitory Dependency Jar in local .m2 repository Deployed Plugin Deployed Models Release Naming Release n.n SNAPSHOT – under development Release n.n Final Release Machine Readable Packaging Maven Repo; Pom + Jar or OSGi Bundle Mirrored repo Web site for XSD checking Human Readable packaging Project Web Site Automatically generated documentation Test results Jira – bug /feature tracking Automatic continuous build process Triggered by changes to subversion Checks out changes Uses Maven to build, est and deploy entire project as a SNAPSHOT Reports build failure to developer list Stereotypes Annotations
Interface Program (TIP) Project Organisation Project Infrastructure Technology Tigerstripe Maven build system Project Creator Site Subversion Maven Repository M2 Generated Documentation Wiki Bug Tracker Mail lists Interface Projects Model Specification Documentation RI CTK Implementation Library Project Infrastructure Platform Projects Framework Projects Interface Projects Framework Projects Tigerstripe DOC Generators Tigerstripe SOAP Generators TIP Common Model TIP Internal Model Test Models Platform Projects Java Implementation Generators Implementation Base Classes Technology Maven Spring EJB 3 – open EJB Junit JPA – Hibernate JAXB, JAX-WS - Apache CXF Future JPA2 - criteria OSGi dynamic module system for java SCA Service Component Architecture Project Namespaces org.tmforum.tip Namespace of TM Forum Standard Group name in maven repo of the standard artefacts from TM Forum Interface Program org.openoss.tip Namespace of this specific implementation (one of many) Group name in maven repo of Implementation artefacts
Infrastructure: Project Workspaces Flat maven structure means related projects can co-exist in same Tigerstripe Workspace but still pass dependencies using maven
Agenda Overview of JOSIF build components download and Installation starting a project
Java Download and Installation http://java.sun.com/javase/downloads/widget/jdk_javafx.jsp NOTE; use JDK 6 Update 20 NOT Update 21 or follow instructions at http://wiki.eclipse.org/FAQ_How_do_I_run_Eclipse%3F#Oracle.2FSun_VM_1.6 .0_21_on_Windows Set (windows) class path to point to JDK right click on desktop Computer icon select properties select advanced system settings select environment variables Path C:\Program Files\PHP\;C:\Program Files\CollabNet Subversion;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Program Files\CyberLink\Power2Go\;C:\Program Files\Java\jdk1.6.0_18\bin;C:\Program Files\Apache_Software_Foundation\apache-maven-2.2.1\bin;C:\Program Files\Common Files\Teleca Shared:C:\Program Files\OpenOffice.org 2.0\program;C:\Program Files\CollabNet Subversion;C:\ant\apache-ant-1.7.1\bin;C:\Program Files\PuTTY\;C:\Program Files\Samsung\Samsung PC Studio 3\;C:\cygwin\bin;C:\Program Files\QuickTime\QTSystem\;C:\Program Files\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\DTS\Binn\ to test in command window try java –version javac -version
Eclipse Galileo Installation Note ensure to use Eclipse Galileo NOT Helios http://www.eclipse.org/downloads/packages/release/galileo/r Download Eclipse IDE for Java EE Developers (32 bit windows - eclipse-jee-galileo- win32.zip Unpack zip file to location near C:/ I use C:\eclipsets edit eclipse.ini file: --launcher.library plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.0.200.v20090519 -startup plugins/org.eclipse.equinox.launcher_1.0.201.R35x_v20090715.jar -product org.eclipse.epp.package.jee.product --launcher.XXMaxPermSize 256M -showsplash org.eclipse.platform 256m -vmargs -XX:MaxPermSize=500m -Dfile.encoding=UTF-8 -Dosgi.requiredJavaVersion=1.5 -Xms500m -Xmx768m Start up eclipse – double click on eclipse.exe Eclipse will ask you to select a workspace- Use one Near to C:// I use C://ws-ts1
Other eclipse settings In window / preferences Java set java JRE to point to installed JDK Select search for JRE and look in C:\\program files\java XML set xml editor to 160 character width set xml editor to use spaces (2) instead of tabs Ant set ant editor to 160 character width set ant editor to use spaces (2) instead of tabs set ant editor to no folding
Eclipse Plugin Installation Tigerstripe site see http://www.eclipse.org/tigerstripe/downloads.php In eclipse select help>Install new software enter new update site Use Tigerstripe Interim download site http://download.eclipse.org/technology/tigerstripe/updates-3.5-interim/ Install Subversion client Subclipse - http://subclipse.tigris.org/update_1.6.x Optional May also install TestNG Buest - http://beust.com/eclipse AnyEdit - http://andrei.gmxhome.de/eclipse/ These are installed by dropping jar into C:\eclipsets\plugins http://velocitywebedit.sourceforge.net/ http://apteditor.sourceforge.net/
Maven Download and Installation http://maven.apache.org/ ( read install instructions) download apache-maven-2.2.1 install at C:\Program Files\Apache_Software_Foundation\apache-maven- 2.2.1 set environment variables set class path ( see example for java) set M2_HOME C:\Program Files\Apache_Software_Foundation\apache-maven-2.2.1 set MAVEN_OPTS -XX:MaxPermSize=256m -Xmx1024m Test in command window type mvn -version
Simple Maven Example simple example see http://maven.apache.org/guides/getting-started/index.html mvn archetype:generate choose simple example (15) change to directory of created project type mvn clean install Look in your home directory look for m2 repository C:\Users\cgallen\.m2\repository to see in eclipse – need to map into eclipse class path got to window>Preferences>Java>Build Path>Classpath variables add variable M2_REPO pointing at C:\Users\cgallen\.m2\repository import project into eclipse right click project explorer import> existing projects into workspace browse to project workspace and select generated projects To see whole project select customize view – unclick *.resources
Agenda Overview of JOSIF build components download and Installation starting a project
Using Project Creator if needed download latest project creator from create new workspace create M2_REPO class path variable download latest project creator from http://openoss.myzen.co.uk/TIP/m2repo- snapshots/org/openoss/tip/TIP_Project_Creator/ named something like; TIP_Project_Creator-0.3.0-20100513.142413-1-standard.jar run project creator place project creator in workspace and double click on jar or in command window java –jar TIP_Project_Creator- 0.3.0-20100513.142413-1-standard.jar Will create multiple related projects in workspace
Import new project into eclipse cd to <projectname>_BaseProject this is the main project which calls the build of all other projects type mvn clean install this should start the build – but the build may fail because no plugins or profile are installed Start Eclipse and import projects into workspace follow same steps as with simple maven project – note you may not be able to import all the projects if build does not complete Import plugins and tigerstripe profile These will be downloaded into <projectname>_Model/TigerstripeGenerators double click on tip_profile.wbp – load into tigestripe workspace Eclipse>tigerstripe>plugins – right click and import the plugins downloaded into TigerstripeGenerators exit eclipse and again type mvn clean install in <projectname>_BaseProject this should complete restart eclipse and import all the projects into the workspace
checking out existing project You need to have installed subclipse http://subclipse.tigris.org/ eclipse>window>open perspective>SVN repository exploring right click on SVN repositories pane add new repository location https://openoss.svn.sourceforge.net/svnroot/openoss navigate to the project and check out into workspace tip/interfaces/ServiceProblemManagement/trunk right click on all projects and check out into workspace set tigerstripe.properties file IN <projectname>_Model/ copy tigerstripe.properties-TEMPLATE to tigerstripe.properties change the paths in tigerstripe.properties to point to your tigerstripe installation and to your project worksapace Now follow same steps as when using project creator to build project and import into workspace after build set svn:ignore on target, .properties, *log*, .classpath if not already set for checked out project.
References JOSIF main page http://sourceforge.net/apps/mediawiki/ope noss/index.php?title=TIP_Main_Page JOSIF GuideBook http://sourceforge.net/apps/mediawiki/ope noss/index.php?title=Framework_Guidebook JOSIF Getting Started http://sourceforge.net/apps/mediawiki/ope noss/index.php?title=Getting_Started Copyright Hewlett-Packard 11-Nov-18