# How can I use uploadArchives without the Java plugin?

**URL:** https://discuss.gradle.org/t/how-can-i-use-uploadarchives-without-the-java-plugin/3187
**Category:** Old Forum Archive
**Created:** [October 31, 2011, 2:09am UTC](https://discuss.gradle.org/t/how-can-i-use-uploadarchives-without-the-java-plugin/3187 "2011-10-31T02:09:00Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![blaine\_simpson](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/blaine_simpson/32/9110_2.png) [@blaine\_simpson](https://discuss.gradle.org/u/blaine_simpson)
#### Post date: [October 31, 2011, 2:09am UTC](https://discuss.gradle.org/t/how-can-i-use-uploadarchives-without-the-java-plugin/3187/1 "2011-10-31T02:09:00Z")

</div>

I have ported HyperSQL to Gradle, using ant.importBuild, and a TON of customization because the nested Ant build files are so complex. I’d very much like to use the maven plugin, but I have searched and searched and I haven’t found a clue about how or if I can specify the jar files to be published unless I use the Java plugin… which I can’t use.

(Actually, the user guide page for the Maven plugin says something like, with configuration work one can do it without the Java plugin, but no hint about how to do that).

I believe that uploadArchives uploads whatever’s in the archives configuration, but when I try to reverse-engineer with a working project of mine that does uploadArchives with the Java plugin, even after a successful uploadArchives, configurations.archives.allDependencies.size() is still 0. ? … and I don’t even know if it’s possible to manually add literal , local files (build through Ant targets) somehow to a Configuration.

---

<div class="post-metadata">

### Author: ![Szczepan\_Faber](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/szczepan_faber/32/213_2.png) [@Szczepan\_Faber](https://discuss.gradle.org/u/Szczepan_Faber)
#### Post date: [January 2, 2012, 3:18pm UTC](https://discuss.gradle.org/t/how-can-i-use-uploadarchives-without-the-java-plugin/3187/2 "2012-01-02T15:18:00Z")

</div>

I’m assuming that you would like to use the _Upload task_ without the java plugin?

That would be something like:

```gradle
configurations {
  someConf
}
  someJar(type: Jar) {
  //more stuff
}
  artifacts {
  someConf someJar
}
  task myUpload(type: Upload) {
  configuration = someConf
  uploadDescriptor = true
      repositories {
    //where to upload, etc.
  }
}

```

Hope that helps!
