# Branch parameter from artifactPattern not replaced when using ivy publish descriptor

**URL:** <https://discuss.gradle.org/t/branch-parameter-from-artifactpattern-not-replaced-when-using-ivy-publish-descriptor/13522>\
**Category:** Bugs\
**Created:** [January 4, 2016, 4:18pm UTC](https://discuss.gradle.org/t/branch-parameter-from-artifactpattern-not-replaced-when-using-ivy-publish-descriptor/13522 "2016-01-04T16:18:14Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jbq](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/jbq/32/3662_2.png) [@jbq](https://discuss.gradle.org/u/jbq)\
**Post date:** [January 4, 2016, 4:18pm UTC](https://discuss.gradle.org/t/branch-parameter-from-artifactpattern-not-replaced-when-using-ivy-publish-descriptor/13522/1 "2016-01-04T16:18:14Z")

</div>

Hi, I’m setting up a test webapp called `gradle-ivy-publish` with the following `build.gradle` file:

```gradle
ext {
  repositoryDir = System.getProperty("user.home") + "/.ivyrepo"
}

apply plugin: 'war'
apply plugin: 'ivy-publish'

publishing {
  publications {
    portlet(IvyPublication) {
      organisation 'com.mycompany'
      revision "1.0-dev"

      descriptor.branch = "master"

      from components.web
    }
  }

  repositories {
    ivy {
      ivyPattern "${repositoryDir}/[organisation]/[module]/[branch]/ivy-[revision].xml"
      artifactPattern "${repositoryDir}/[organisation]/[module]/[branch]/[artifact]-[revision].[ext]"
    }
  }
}

```

`src/main/webapp/index.html` only has a Hello World in the contents.

When I invoke `gradle publish` (latest version from Github) I notice that the branch parameter from artifactPattern is not replaced:

```gradle
$ find ~/.ivyrepo -type f
/Users/jbq/.ivyrepo/com.mycompany/gradle-ivy-publish/[branch]/gradle-ivy-publish-1.0-dev.war
/Users/jbq/.ivyrepo/com.mycompany/gradle-ivy-publish/[branch]/gradle-ivy-publish-1.0-dev.war.sha1
/Users/jbq/.ivyrepo/com.mycompany/gradle-ivy-publish/[branch]/ivy-1.0-dev.xml
/Users/jbq/.ivyrepo/com.mycompany/gradle-ivy-publish/[branch]/ivy-1.0-dev.xml.sha1

```

I believe this is a bug, right?
