# DistTar but not to upload

**URL:** <https://discuss.gradle.org/t/disttar-but-not-to-upload/28278>\
**Category:** Help/Discuss\
**Created:** [August 22, 2018, 2:10am UTC](https://discuss.gradle.org/t/disttar-but-not-to-upload/28278 "2018-08-22T02:10:03Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sharuru](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/sharuru/32/5764_2.png) [@Sharuru](https://discuss.gradle.org/u/Sharuru)\
**Post date:** [August 22, 2018, 2:10am UTC](https://discuss.gradle.org/t/disttar-but-not-to-upload/28278/1 "2018-08-22T02:10:03Z")

</div>

Hi there, my project is using Gradle 3.3 for management.

Recently, according to the policy, I can’t upload distributed ZIP or TAR files to the nexus.

Is there any solution I can just distribute the ZIP or TAR files through tasks like ‘assemble’, but not to upload them through ‘uploadArchives’?

Have tried something like:

```
configurations.archives.with {
    artifacts.remove artifacts.find { it.archiveTask.is distZip }
}

```

But this will prevent Gradle to distribute ZIP or TAR either.

Please help me, thank you.

---

<div class="post-metadata">

**Author:** ![Sharuru](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/sharuru/32/5764_2.png) [@Sharuru](https://discuss.gradle.org/u/Sharuru)\
**Post date:** [September 16, 2018, 2:24pm UTC](https://discuss.gradle.org/t/disttar-but-not-to-upload/28278/2 "2018-09-16T14:24:56Z")

</div>

UPD:

After refactor the build.gradle, the problem is solved.

the method above should be the right answer, I think 🙂
