Creating the Maven project
Wiki Markup |
---|
{scrollbar} |
On this page, we are going to
Excerpt |
---|
create a Maven project which will contain our SU and SA projects |
Creating the Maven project
We start by creating an empty directory to hold the project. Next, create a pom.xml file in it that contains the common definitions for the entire project. For now, just create a pom.xml that looks like this.
...
Now we need to decide where our project will be located. There will be one project folder containing subfolders
for each service-unit / service assembly etc.
So move now to a folder of your choice and run the following command:
No Format |
---|
mvn archetype:create -DarchetypeGroupId=org.apache.servicemix.tooling
-DarchetypeArtifactId=servicemix-project-root
-DgroupId=org.apache.servicemix.tutorial
-DartifactId=tutorial-wsdl-cxf-service
|
This command will generate a project root folder which already contains the root pom.xml
for the project.
Inside this file the project configuration is done. Just open it inside an editor and look at it.
Checking the pom.xml
The easiest way to check the pom.xml , is by running Maven from the project directory. So move into the freshly
created project folder and run the following command:
No Format |
---|
mvn install |
If Maven will install the pom.xml is valid, Maven will copy it to file your local Maven repository and report a succesfull successful build .
...
like this:
No Format |
---|
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Building ServiceMix :: tutorial-wsdl-cxf-service
[INFO] task-segment: [install]
[INFO] ------------------------------------------------------------------------
[INFO] artifact org.apache.maven.plugins:maven-archetype-plugin: checking for updates from apache
[INFO] [site:attach-descriptor]
[INFO] [install:install]
[INFO] Installing C:\home\Diplomka\_mySA\tutorial-wsdl-cxf-service\pom.xml to C:\Documents and Settings\vkrejcirik
\.m2\repository\org\apache\servicemix\tutorial\tutorial-wsdl-cxf-service\1.0-SNAPSHOT\tutorial-wsdl-cxf-service-1.0-SNAPSHOT.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4 seconds
[INFO] Finished at: Mon Aug 04 14:15:31 CEST 2008
[INFO] Final Memory: 7M/14M
[INFO] ------------------------------------------------------------------------
|
Next, we are going to create our first SU in this project.cxf-bc service unit.
Proceed to the next step
Wiki Markup |
---|
{scrollbar} |