2

I need to use this library dynamodb-geo but i can't find it in maven repository. During developing on local machine I added this library to local maven repository as 3rd party JARs

mvn install:install-file -Dfile=<path-to-file> -DgroupId=<group-id> \
    -DartifactId=<artifact-id> -Dversion=<version> -Dpackaging=<packaging>

and

<dependency>
...
</dependency>

Now I need to deploy it project in remote server. How I can create remote maven repository with this geo library?

P.S. Maybe you know dependency where this library included?

boden
  • 1,621
  • 1
  • 21
  • 42
  • 1
    To upload jar to S3 and using via maven, please check out the following link (https://dzone.com/articles/how-to-set-up-a-private-maven-repository-in-amazon) – anand1st Jan 23 '17 at 22:33
  • @anand1st, in this article i see upload all project as `.jar` to `S3`, but I need to upload `dynamodb-geo.jar` _(not from my project)_, in feature I want to use it in my project – boden Jan 24 '17 at 08:51
  • The maven-s3-wagon plugin enables maven to download/deploy files to S3. If you can manually save dynamodb-geo.jar in S3 (in the appropriate file structure and format), other users can automatically download this jar during their build. Please see documentation description (https://github.com/jcaddel/maven-s3-wagon/blob/master/pom.xml). Disclaimer: I have not tried this before but it seems doable. – anand1st Jan 24 '17 at 10:50

1 Answers1

0

This workaround really helped me

<dependency>
    <groupId>com.mylib</groupId>
    <artifactId>mylib-core</artifactId>
    <version>0.0.1</version>
</dependency>

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-install-plugin</artifactId>
    <version>2.5.2</version>
    <executions>
        <execution>
            <id>install-external</id>
            <phase>clean</phase>
            <configuration>
                <file>${basedir}/lib/mylib-core-0.0.1.jar</file>
                <repositoryLayout>default</repositoryLayout>
                <groupId>com.mylib</groupId>
                <artifactId>mylib-core</artifactId>
                <version>0.0.1</version>
                <packaging>jar</packaging>
                <generatePom>true</generatePom>
            </configuration>
            <goals>
                <goal>install-file</goal>
            </goals>
        </execution>
    </executions>
</plugin>
Community
  • 1
  • 1
boden
  • 1,621
  • 1
  • 21
  • 42