...
Rätt version av Maven behövs för att kunna köra scriptet.
You need to install Maven service archetype of correct version in order to run the script
- cd /skltpservices/tools/generators/archetypes/tags/archetype-1.2/ServiceArchetype
- mvn install
Scriptet baseras på RIV TA Konfigurationsstyrning 1.0
...
Ladda ner önskad RIV-TA zip med tjänstekontrakt till ett [temporärt bibliotek] från RIV TA sidan.
Packa upp zip-filen
Checka ut filer som behövs för att generera virtualiseringar till varfritt bibliotek (i nedanstående exempel används katalog 'temp'):
Kodblock svn checkout http://skltpservices.googlecode.com/svn/tools/generators/ temp
Bygg den senaste version av artefakten. I exemplet nedan används version 1.2
Kodblock 1. cd /temp/archetypes/tags/archetype-1.2/ServiceArchetype 2. mvn clean install
Gå till tools-katalogen där Virtualiseringsscriptet finns
Kodblock cd temp/scripts/trunk/se/skltpservices/tools
I potemplate.xml uppdatera artifactId och version beroende på vilken domän/subdomän som tjänstekontrakten tillhör samt vilken version av RIVTA zip-filen som används, se exempel nedan
Kodblock <groupId>se.skl.skltpservices</groupId> <artifactId>itintegration-engagementindex</artifactId> <version>1.0-RC4</version>
Uppdatera version i VirtualiseringGenerator.groovy så att det matchar versionen på RIVTA zip-filen.
Kodblock def version = '1.0-RC4'
Det är senare när man bygger de körbara jarfilerna som dessa döps till en kombination av tjänstedomän och version, ex itintegration-engagementindex-FindContent-virtualisering-1.0-RC4.jarI samma fil (VirtualiseringGenerator.groovy ) se till att rätt version av arketypen används. Sätt -DarchetypeVersion till den version som har byggts i ovan steg 4.
Kodblock def mvnCommand = """mvn archetype:generate -DinteractiveMode=false -DarchetypeArtifactId=service-archetype -DarchetypeGroupId=se.skl.tp.archetype -DarchetypeVersion=1.2 -Duser.dir=${targetDir} -DgroupId=se.skl.skltpservices.${maindomain}.${subdomainGroupId} -DartifactId=${artifactId} -Dversion=${version} -DvirtualiseringArtifactId=${maindomain}-${subdomainFlow}-${artifactId}-virtualisering -DhttpsEndpointAdress=https://\${TP_HOST}:\${TP_PORT}/\${TP_BASE_URI}/$maindomain/$subdomainAdress/$serviceRelativePath -DhttpEndpointAdress=http://\${TP_HOST}:\${TP_PORT_HTTP}/\${TP_BASE_URI}/$maindomain/$subdomainAdress/$serviceRelativePath -DflowName=${maindomain}-${subdomainFlow}-${artifactId}Interaction-virtualisering-flow -DfeatureKeepalive=\${feature.keepalive.${featureKeepAliveServiceContractNameSpace}:\${feature.keepalive}} -DserviceMethod=${artifactId} -DserviceWsdlFileDir=classpath:/schemas$schemaDir/${artifactId}Interaction/${wsdlFileName} -DserviceNamespace=${serviceInteractionNameSpace} """
Kör script med schemas som input
Kodblock ./VirtualiseringGenerator.groovy <genväg till den uppackade RIV TA filen>/schemas
Mappar för varje interaktion har nu skapats. Varje mapp innehåller en definition av en virtuell tjänst
Kodblock FindContent pom.xml Virtualisering pom.xml src main resources schemas core_components interactions tp2-service-mule-descriptor.xml GetUpdates ProcessNotification Update pom.xml
Kör maven install för att skapa körbara jar-filer
Kodblock mvn clean package
...