I'm having trouble figuring out the right way to configure artifactory for
my needs and I was wondering if someone can point me in the right direction.

I'm trying to setup my builds and artfactory in the following way:

   - gradle 2.1 for my build tool and the com.jfrog.artifactory plugin
   - Jenkins for my CI with jobs invoking the gradle task
   "artifactoryPublish"
   - Artifactory 3.3.0 for my artifact repository (Just realized we're a
   few versions behind, but release notes don't seem to indicate any specific
   fixes for this)
      - libs-release-local to handle artifacts that have unique versions
      based on build-number (Ex. lib-util-125.jar )
      - libs-snapshot-local to handle artifacts that have unique snapshot
      versions based on time (Ex. lib-util-20141021.092230-SNAPSHOT.jar )

I can't seem to get artifactory to do what I want. When I generate a
timestamp-based version in gradle and deploy it to an artifactory
repository with "Maven Snapshot Version Behavior" as "Unique", I end up
with strange "double" versions as such(From artifactory logs):

2014-10-21 20:08:45,926 [http-nio-8080-exec-1] [INFO ]
(o.a.e.UploadServiceImpl:473) - Deploy to
'libs-snapshot-local:com/mycompany/lib-util/*0.20141021.200839-SNAPSHOT*
/lib-util-*0.20141021.200839-SNAPSHOT*.jar' Content-Length: 9272
2014-10-21 20:08:46,113 [http-nio-8080-exec-10] [INFO ]
(o.a.e.UploadServiceImpl:473) - Deploy to
'libs-snapshot-local:com/mycompany/lib-util/*0.20141021.200839-SNAPSHOT*
/lib-util-*0.20141021.200839-SNAPSHOT*-sources.jar' Content-Length: 5292
2014-10-21 20:08:46,136 [http-nio-8080-exec-6] [INFO ]
(o.a.e.UploadServiceImpl:473) - Deploy to
'libs-snapshot-local:com/mycompany/lib-util/*0.20141021.200839-SNAPSHOT*
/lib-util-*0.20141021.200839-SNAPSHOT*.pom' Content-Length: 1321
2014-10-21 20:08:46,359 [http-nio-8080-exec-7] [INFO ]
(o.a.r.r.c.BuildResource:277) - Adding build 'lib-util #1413922120251'
2014-10-21 20:08:46,375 [http-nio-8080-exec-7] [INFO ]
(o.a.r.r.c.BuildResource:291) - Added build 'lib-util #1413922120251'
2014-10-21 20:08:55,347 [art-exec-1] [INFO ]
(o.a.s.a.ArchiveIndexerImpl:148) - Indexing archive:
libs-snapshot-local:com/mycompany/lib-util/0.20141021.200839-SNAPSHOT/lib-util-
*0.20141021.200839-20141021.200839-1*-sources.jar
2014-10-21 20:08:55,353 [art-exec-1] [INFO ]
(o.a.s.a.ArchiveIndexerImpl:148) - Indexing archive:
libs-snapshot-local:com/mycompany/lib-util/0.20141021.200839-SNAPSHOT/lib-util-
*0.20141021.200839-20141021.200839-1*.jar


It works if I change "Maven Snapshot Version Behavior" to "Deployer" in
artifactory and manually generate the timestamped versions in my build file:

version = "$System.env.REPO_TARGET" == "RELEASE" ?
"$System.env.BUILD_NUMBER" : "0."+new
Date().format("yyyyMMdd.HHmmss")+"-SNAPSHOT"


... but then local jars are then generated with versioned filenames, which
is relatively inconvenient when doing local testing.

java -jar build/libs/lib-util.jar = sadface


If I try to leave my version as null to get user friendly local jars:

version = "$System.env.REPO_TARGET" == "RELEASE" ?
"$System.env.BUILD_NUMBER" : null


...the gradle plugin complains (Gradle log):

Deploying artifact:
http://XXXXXXXX/artifactory/libs-snapshot-local/com/novilabs/lib-util/*unspecified*/lib-util-*unspecified*.jar
<http://54.187.93.221:8081/artifactory/libs-snapshot-local/com/novilabs/lib-util/unspecified/lib-util-unspecified.jar>

:*artifactoryPublish* FAILED


Any suggestions?
------------------------------------------------------------------------------
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://p.sf.net/sfu/Zoho
_______________________________________________
Artifactory-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/artifactory-users

Reply via email to