Sometimes you need to create your own artifacts to be imported in other projects, like when you have some common code that you don't want to duplicate.
Here's how to do:
1) Create a Maven project with your common code and configure it as appropriate in the pom.xml:
<groupId>uk.co.davisfiore</groupId> <artifactId>finance-commons</artifactId> <version>1.0</version>
2) Install into the local repository the artifact, making it available to be imported:
mvn install
If you are using Eclipse, right click the project and select Run_as->Maven_install.
3) Update the pom.xml of the application in which you want to import the artifact, by adding the following dependency:
<dependency> <groupId>uk.co.davisfiore</groupId> <artifactId>finance-commons</artifactId> <version>1.0</version> </dependency>
Now the application is ready to use the artifact that has been imported.
Copyright © 2013 Welcome to the website of Davis Fiore. All Rights Reserved.