If you enabled the Maven library, you can deploy assets
from Maven to IBM® Rational® Asset Manager.
Before you begin
Before you can use Maven assets, a repository administrator
must enable the Maven model library. For more information, see Enabling the Maven library.
The mvn client can integrate
with Rational Asset Manager,
using Rational Asset Manager as
a Maven repository.
Before you deploy from Maven to Rational Asset Manager,
you must add a repository entry to the pom.xml file
on the computer where you plan to run the mvn client.
See Creating and using Maven assets for more information.
Procedure
- Configure Maven for deployment. Specific instructions
for configuring Maven for deployment are beyond the scope of this
documentation. To learn more about Maven, see Maven Deploy Plugin in the Maven documentation.
- On the computer running the Maven client, edit the settings.xml file
to add information about the Rational Asset Manager server. To learn more about editing the settings.xml file,
see Creating and using Maven assets.
- Deploy the Maven project. The project is deployed
based on the information in the distribution management section of
the pom.xml file. The following example shows
the typical format of the distribution management elements in a pom.xml file,
for assets of type Maven Artifact to create in
the Sample Open Source community:
<distributionManagement>
<repository>
<id>rational.repo</id>
<name>Rational Asset Manager repository</name>
<url>http://server.example.com/ram.ws/maven2/Sample%20Open%20Source/Maven%20Artifact/</url>
</repository>
</distributionManagement>
Specify the url element
by using the following format: http://hostname:portnumber/web_services_context-root/maven2/community_name/asset_type.
Make sure to change the community_name and asset_type to
match the community name and asset type that you use on your server.
The previous example shows a typical URL for a Rational Asset Manager server
running at server.example.com, for assets of type Maven
Artifact in the Sample Open Source community.
For general information on editing the distribution management section
of the pom.xml file in Maven, see the POM Reference in the Maven documentation.
Results
When you deploy from Maven (the
mvn client),
the project asset is uploaded to
Rational Asset Manager.
If the asset exists, the asset is updated with the files deployed
by Maven. If the asset does not exist, it is created.