Creating new provider with Maven
prubach edited this page May 21, 2013
·
2 revisions
- Java 1.6
- Maven 3.0
- Eclipse with m2e (maven) plugin
- Sorcer distribution
- (before official Sorcer release) Maven settings.xml updated for Sorcer
- Go to directory which will be the parent of your new project
- Call maven to use the archetype
mvn archetype:generate -DarchetypeGroupId=org.sorcersoft.sorcer -DarchetypeArtifactId=sorcer-provider
ormvn archetype:generate -Dfilter=org.sorcersoft.sorcer:
- Answer questions:
- groupId: Usually you organisation's reversed domain name, e.g. com.sorcersoft
- artifactId: Project name and project directory name, e.g. myprovider1
- package: Java package for your provider classes, by default groupId is used
- providerClass: Java class name of your provider
- serviceDescription: Description of your provider. Value will be used in service browser
- serviceName: The name of your service
- Confirm properties configuration
This is the time to accept or modify all values, including the default ones. If everything is OK, press Y.
- Import your maven projects to eclipse
- You may remove the -sui (service UI) project if you're not going to use a graphical user interface in your provider. You may also remove the -proxy project if your provider is going to use a thin client proxy. Don't forget to remove the corresponding <module> entry from pom.xml after you remove the module itself.
- Start Sorcer
- Start provider (from console in project directory):
ant -f [serviceName]-prv/boot.xml
To test your provider start sample requestor (client):
ant -f [serviceName]-req/run.xml