Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Artifact function doesn't support folder #6

Closed
fowlie opened this issue Jun 26, 2015 · 5 comments
Closed

Artifact function doesn't support folder #6

fowlie opened this issue Jun 26, 2015 · 5 comments

Comments

@fowlie
Copy link

fowlie commented Jun 26, 2015

I need to include all jar files inside a folder.

${artifact(project.file("$project.buildDir/jars"))}

The artifact function returned the correct path (e.g. artifacts/[module]/build/jars), but it copied the files wrong. All the jar files were copied into "artifacts/[module]/build", and they were all named "jars" (though they were not the same file, file sizes were correct despite the wrong file name).

I think the bug is in DarTask.groovy:194. There, when calling f.getName(), f is not a file but a directory.

@byaminov
Copy link
Contributor

I don't think uploading file.Folder artifacts by referencing a folder inside the DAR package is going to work. We should in fact create a ZIP file containing all files from the given folder, and put that into DAR package. I'm have a look when I have time.

@fowlie
Copy link
Author

fowlie commented Jun 29, 2015

Thanks for tip! I got around the issue by creating a fat jar of the dependencies.

@cooolmagic
Copy link

Does File.Folder works apart from artifacts? Right now we use File.Folder to add different folders in the DAR. Will that work with this plugin?

@fowlie
Copy link
Author

fowlie commented Aug 20, 2015

@cooolmagic, it will not include the contents of the folder - that's the issue we had. If you for some reason need empty folders, then it would work I guess.

At least we ended up using Groovy's MarkupBuilder to create our own manifest file in xml, and then it was really simple to create the rest of the dar package with Gradle.

@jdewinne
Copy link
Contributor

Closing inactive issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants