Reading through the API it doesn't look like you can set the license of an 
artifact, even through the rest API, is this correct?

Thanks,

Dan

From: Russell, Daniel [mailto:[email protected]]
Sent: 03 January 2014 12:24
To: [email protected]
Subject: [Artifactory-users] Unable to set license property through groovy user 
plugin

Hi,

Currently we are using Artifactory Pro Power Pack 2.5.2, is there a mechanism 
to set the license property through the Artifactory Public API?

What we are trying to do is to control when licenses are applied to items as 
part of an internal approval process, so we have disabled the automatic license 
search and do it manually through the GUI.

However this means that every snapshot we create of our own software also 
appears in the license check emails.

I thought I would be possible to add a groovy script that could identify when 
it was creating our own snapshots and add our internal license, as the 
documentation says that the license information is stored as regular 
properties<http://www.jfrog.com/confluence/display/RTF/Properties>. However it 
doesn't seem to be accessible through the repositories.setProperty api

afterCreate { item ->
                log.debug "Checking the new item requires tallyman license 
attaching"
                def path = item.repoPath.path
                if (path.indexOf('experian/eda/tallyman') > 0) {
                        log.info "Found Tallyman item " + path

                        //add tallyman licese to artifactory.licenses property
                        //repositories.setProperty item.repoPath. 
'artifactory.licenses',  'Tallyman '
       log.warn "properties are " + repositories.getProperties(item.repoPath)

[WARN ] (add_tallyman_license:58) - properties are 
{build.name=[simple-tallyman-project], vcs.revision=[224597], 
build.timestamp=[1388750310008], build.number=[24]}

Is there a mechanism to set the license property through the Artifactory Public 
API or is there a better way to achieve this?

Thanks,
Dan


Information in this e-mail and any attachments is confidential, and may not be 
copied or used by anyone other than the addressee, nor disclosed to any third 
party without our permission. There is no intention to create any legally 
binding contract or other binding commitment through the use of this electronic 
communication unless it is issued in accordance with the Experian Limited 
standard terms and conditions of purchase or other express written agreement 
between Experian Limited and the recipient. Although Experian has taken 
reasonable steps to ensure that this communication and any attachments are free 
from computer virus, you are advised to take your own steps to ensure that they 
are actually virus free.
Companies Act information: Registered name: Experian Limited. Registered 
office: Landmark House, Experian Way, NG2 Business Park, Nottingham, NG80 1ZZ, 
United Kingdom. Place of registration: England and Wales. Registered number: 
653331

------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today. 
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
_______________________________________________
Artifactory-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/artifactory-users

Reply via email to