# Artifactory properties

**URL:** <https://discuss.gradle.org/t/artifactory-properties/47320>\
**Category:** Help/Discuss\
**Created:** [December 25, 2023, 5:18pm UTC](https://discuss.gradle.org/t/artifactory-properties/47320 "2023-12-25T17:18:05Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Midou](https://avatars.discourse-cdn.com/v4/letter/m/b5a626/32.png) [@Midou](https://discuss.gradle.org/u/Midou)\
**Post date:** [December 25, 2023, 5:18pm UTC](https://discuss.gradle.org/t/artifactory-properties/47320/1 "2023-12-25T17:18:05Z")

</div>

Hello community,  
I’m implementing a custom plugin which is based on maven-publisher.  
I’ve an issue when I try to pass a map through method (getArtifactoryProperties) to properties map inside artifactory → publish → defaults closures:

```gradle
private Map<String, String> getArtifactoryProperties(Project project) {
     return ['key1', 'value1', 'key2': 'value']
}

```

this is the call of the method inside my custom plugin

```gradle
class myCalss implements Plugin<Project> {
// code ....
      project.artifactory{
         //code ....
         publish {
              defaults {
                   publications('maven')
                   properties = getArtifactoryProperties(project)
              }
         } 
     }
}

```

when I run artifactoryPublish I got successful run but I got also a message like:  
[root project ‘projectname’][0]null  
and the properties (related to the jar and the pom published) are not deployed in artifactory.  
can you please help me to solve that?  
best Regards

---

<div class="post-metadata">

**Author:** ![Vampire](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/vampire/32/9082_2.png) [@Vampire](https://discuss.gradle.org/u/Vampire)\
**Post date:** [December 26, 2023, 2:42am UTC](https://discuss.gradle.org/t/artifactory-properties/47320/2 "2023-12-26T02:42:34Z")

</div>

Where do you get that message?  
What exactly is the message?  
What is around the message?  
Does `--info` help?  
Or `--debug`?  
Can you provide a build `--scan`?

---

<div class="post-metadata">

**Author:** ![Midou](https://avatars.discourse-cdn.com/v4/letter/m/b5a626/32.png) [@Midou](https://discuss.gradle.org/u/Midou)\
**Post date:** [December 26, 2023, 9:50am UTC](https://discuss.gradle.org/t/artifactory-properties/47320/3 "2023-12-26T09:50:12Z")

</div>

Thank you for your help  
Where do you get that message?  
in the consol output after executing gradle artifactoryPublish task  
the build finish with the message :

```gradle
> Configure project :
**[root project 'myproject'][0]null**

> Task :compileJava UP-TO-DATE
> Task :processResources UP-TO-DATE
> Task :classes UP-TO-DATE
> Task :defaultJar
> Task :generatePomFileForMavenJavaPublication
> Task :jar
> Task :artifactoryPublish
Deploying artifact: https://artifactory/myrepo/com/myproject/1.0.0/myproject-1.0.0.jar
Deploying artifact: https://artifactory/myrepo/com/myproject/1.0.0/myproject-1.0.0.pom

> Task :artifactoryDeploy
Deploying build descriptor to: https://artifactory/artifactory/api/build
Build successfully deployed. Browse it in Artifactory under https://artifactory/webapp/builds/myproject/170358263836

```

I’ve tried also to debug with println :  
case 1 :

```gradle
class myCalss implements Plugin<Project> {
// code ....
      project.artifactory{
         //code ....
         publish {
               **println getArtifactoryProperties(project)**
              defaults {
                   publications('maven')
                   //properties = getArtifactoryProperties(project)
              }
         } 
     }
}

```

the properties map is returned and printed correctly: **[‘key1’, ‘value1’, ‘key2’: ‘value’]**

case 2:

```gradle
class myCalss implements Plugin<Project> {
// code ....
      project.artifactory{
         //code ....
         publish {
              defaults {
                   publications('maven')
                   **println getArtifactoryProperties(project)**
                   //properties = getArtifactoryProperties(project)
              }
         } 
     }
}

```

the return printed is: **[root project ‘projectname’][0]null**

I hope that this additional informations could help you to understand my issue, please don’t hesitate to ask for additional information.  
Best regards

---

<div class="post-metadata">

**Author:** ![Vampire](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/vampire/32/9082_2.png) [@Vampire](https://discuss.gradle.org/u/Vampire)\
**Post date:** [December 29, 2023, 2:08am UTC](https://discuss.gradle.org/t/artifactory-properties/47320/4 "2023-12-29T02:08:24Z")

</div>

I have no idea why that `println` should produce that output.  
You probably need to debug your build to find out what is happening.  
You could also try to provide an [MCVE](https://stackoverflow.com/help/mcve). Often creating it already discloses the problem.
