JFrog Artifactory Newbee... not able to deploy Jar

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

JFrog Artifactory Newbee... not able to deploy Jar

knows_not_much
I have installed the jFrog community server successfully. I have also created a test user and granted permissions as follows



Now I create a simple java project and my pom.xml looks like

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>com.abhi</groupId>
    <artifactId>HelloWorld</artifactId>
    <version>1.0-SNAPSHOT</version>
    <distributionManagement>
        <snapshotRepository>
            <id>MyJFrog</id>
            <name>MyJFrogArtifactory</name>
            <url>http://build.local:8081/libs-snapshots-local</url>
        </snapshotRepository>
    </distributionManagement>
</project>

I also edited my ~/.m2/settings.xml to add a new server

  <server>
    <username>testuser</username>
    <password>testpassword</password>
    <id>MyJFrog</id>
  </server>

when I build my maven

ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy (default-deploy) on project HelloWorld: Failed to retrieve remote metadata com.abhi:HelloWorld:1.0-SNAPSHOT/maven-metadata.xml: Could not transfer metadata com.abhi:HelloWorld:1.0-SNAPSHOT/maven-metadata.xml from/to MyJFrog (http://build.local:8081/libs-snapshots-local): Connect to build.local:8081 [build.local/192.168.170.142] failed: Connection refused -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy (default-deploy) on project HelloWorld: Failed to retrieve remote metadata com.abhi:HelloWorld:1.0-SNAPSHOT/maven-metadata.xml: Could not transfer metadata com.abhi:HelloWorld:1.0-SNAPSHOT/maven-metadata.xml from/to MyJFrog (http://build.local:8081/libs-snapshots-local): Connect to build.local:8081 [build.local/192.168.170.142] failed: Connection refused
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:216)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
        at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilde
Reply | Threaded
Open this post in threaded view
|

Re: JFrog Artifactory Newbee... not able to deploy Jar

knows_not_much
Sorry to answer my own post... but I was able to resolve the issue.

I have documented my findings here

http://stackoverflow.com/questions/33106946/deploy-from-maven-to-jfrog