# Java-library-distribution plugin: specifying archive structure

**URL:** <https://discuss.gradle.org/t/java-library-distribution-plugin-specifying-archive-structure/17614>\
**Category:** Plugin Portal\
**Tags:** plugins\
**Created:** [May 16, 2016, 7:15pm UTC](https://discuss.gradle.org/t/java-library-distribution-plugin-specifying-archive-structure/17614 "2016-05-16T19:15:08Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Aver\_Mimas](https://avatars.discourse-cdn.com/v4/letter/a/43a26b/32.png) [@Aver\_Mimas](https://discuss.gradle.org/u/Aver_Mimas)\
**Post date:** [May 16, 2016, 7:15pm UTC](https://discuss.gradle.org/t/java-library-distribution-plugin-specifying-archive-structure/17614/1 "2016-05-16T19:15:08Z")

</div>

Hello,

I’m trying out the java-library-distribution plugin. It’s great that I can get an archive of my jar file by just applying the plugin, but I’m looking for an option to specify the folder structure. Here’s what I’m trying to do.

My source code structure looks like this

src/main/java/… → Contains java source code  
src/main/dist/… → Contains some folders (folder1, folder 2, folder 3, ect.) each of which contains some shell/batch scripts

My build.gradle is very simple. I applied the java and java-library-distribution plugin, which compiles the code and also gives me an archive file with a jar file, plus the folders in src/main/dist. So, the archive structure looks like this:

myArchive

> jar file  
> folder1  
> folder2  
> folder3

I would like the archive to look slightly different. This is what I’m looking for:

myArchive

> java utility
> 
> > jar file

> folder1  
> folder2  
> folder3

I couldn’t find any optoin/configuration for the plugin that can be set to achieve this. Is this not possible with the current plugin? Basically I was looking for a configuration where I could specify where the jar file should end up inside the archive.
