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

extraOptions doesn't work #16

Open
marcocamacho opened this issue Mar 17, 2017 · 2 comments
Open

extraOptions doesn't work #16

marcocamacho opened this issue Mar 17, 2017 · 2 comments
Assignees

Comments

@marcocamacho
Copy link

marcocamacho commented Mar 17, 2017

I am using com.kenshoo:gradle-fpm:0.5' and then applying plugin apply plugin: 'fpm-packaging' with this code:

rpm {
    packageName = 'ui-api' // Optional, default is project.name
    baseDir = project.buildDir// Optional, base directory to package, default: project.buildDir
    prefix = "/var/cache/puppet/$pubVersion/" // Optional, a path to prefix files when building package, default: root (/)
    extraOptions = ['--version': '1.2.5', '-v': '1.2.5', '--vendor': 'MyCompany']
    filesArgs = [
            "${project(":appserverEar").buildDir}/libs",

    ]
}

This is what I get when I run ./gradlew --info rpm running fpm with: [-t, rpm, -s, dir, -n, UI-API, -v, unspecified, -C, /home/mcamacho/Projects/ui-api/build, .]

@marcocamacho
Copy link
Author

It works if configured like packaging {... instead of rpm {..., then ran as ./gradlew rpm

@tzachz
Copy link
Member

tzachz commented Mar 29, 2017

@marcocamacho Thanks for pointing this out! (and apologies for the delayed response).

This looks like a documentation fault - the README suggests that an rpm {...} clause is the right way to configure the rpm task, which doesn't seem to be the case (judging by the code). What the README should say is something like:

  • Use packaging { ... } to configure any packaging task;
  • Run ./gradlew rpm to create an RPM package, or ./gradlew debian to create a DEB package - both would use the same configuration

I can fix the README right away. Let me know if that makes sense.

Of course - the original documentation suggests that one can configure rpm and debian tasks separately (and therefore, differently), and the suggested change would implicitly eliminate that option. But - judging by the code, it was never really possible, and doesn't sound like a critical feature, so aligning documentation still seems like the sensible solution.

@tzachz tzachz self-assigned this Mar 29, 2017
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

2 participants