Create a simple maven repository in web server

Create a simple maven repository in web server

1) Create the /repo dir in web server root

2) Create the group-id dirs: org.hibernate = /org/hibernate

3) create the actifact-id dir: hibernate-spatial/

4) Create the maven-metadata.xml file (optional)
(optional generate both or one of maven-metadata.xml.md5 & maven-metadata.xml.sha1 files):

<?xml version="1.0" encoding="UTF-8"?>
<metadata>
  <groupId>org.hibernate</groupId>
  <artifactId>hibernate-spatial</artifactId>
  <version>4.0-M1</version>
  <versioning>
    <versions>
      <version>4.0-M1</version>
      <version>4.0-SNAPSHOT</version>
      <version>4.0</version>
      <version>4.3-SNAPSHOT</version>
    </versions>
    <lastUpdated>20140131225111</lastUpdated>
  </versioning>
</metadata>
md5sum maven-metadata.xml >  maven-metadata.xml.md5
sha1sum maven-metadata.xml >  maven-metadata.xml.sha1

5) create version folder: 4.0/ , copy and generate the files:
hibernate-spatial-4.0.jar 13-Dec-2013 17:28 204K
[ ] hibernate-spatial-4.0.jar.md5 13-Dec-2013 17:28 32
[ ] hibernate-spatial-4.0.jar.sha1 13-Dec-2013 17:28 40
[ ] hibernate-spatial-4.0.pom 13-Dec-2013 17:28 8.4K
[ ] hibernate-spatial-4.0.pom.md5 13-Dec-2013 17:28 32
[ ] hibernate-spatial-4.0.pom.sha1

where pom.xml example is:


<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <modelVersion>4.0.0</modelVersion>
  <groupId>org.hibernate</groupId>
  <artifactId>hibernate-spatial</artifactId>
  <version>4.0</version>
  <dependencies>
    <dependency>
      <groupId>commons-io</groupId>
      <artifactId>commons-io</artifactId>
      <version>1.4</version>
      <scope>compile</scope>

    </dependency>
  </dependencies>
</project>

in project pom simply:

	<repositories>
        <repository>
			<id>fm repo</id>
			<url>http://162.243.35.149/maven/</url>
        </repository>
    </repositories>

    <dependencies>
        <dependency>
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate-spatial</artifactId>
            <version>4.0</version>
        </dependency>
    </dependencies>

Advertisements