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

Allow multiple resource-root-path declarations in module #101

Open
deepfry0 opened this issue Jan 27, 2016 · 3 comments
Open

Allow multiple resource-root-path declarations in module #101

deepfry0 opened this issue Jan 27, 2016 · 3 comments

Comments

@deepfry0
Copy link
Contributor

In the current state, the module template and the manifest do not allow multiple resource-root-path's to be defined inside module.xml. This is a show stopper for something like db2 where you need the db2 and license jar's represented within the module.xml

@itewk
Copy link
Contributor

itewk commented Jan 27, 2016

@deepfry0 I don't think I'm following. Can you provide more details for your use case. As an example this is what I do for a mysql.jdbc modle.

    jboss_admin::module{ 'mysql.jdbc':
      ensure        => present,
      server        => standalone,
      resource_path => "/tmp/${_mysql_driver_file}",
      dependencies  => ['javax.api',
                        'javax.transaction.api'],
    } 

@deepfry0
Copy link
Contributor Author

@itewk mysql will work because it results in the module.xml file containing a single resource_root

<module xmlns="urn:jboss:module:1.0" name="com.mysql"> <resources> <resource-root path="mysql-connector-java-5.0.8-bin.jar"/> </resources> <dependencies> <module name="javax.api"/> </dependencies> </module>

If you want to configure a db2 module, this is how the end module.xml should look like -
<module xmlns="urn:jboss:module:1.0" name="com.ibm.db2"> <resources> <resource-root path="db2jcc.jar"/> <resource-root path="db2jcc_license_cu.jar"/> </resources> <dependencies> <module name="javax.api"/> </dependencies> </module>

There are multiple resource-root tags that go into the db2 module.xml
This will not work with the current code in module.pp and the erb template.

Making sense?

@itewk
Copy link
Contributor

itewk commented Jan 28, 2016

@deepfry0
yep. got it now.
So I have two options for you

  1. patches welcome :)
  2. you can use the is_directory flag to copy all of the files from a directory and set the path as .

Option 2 is why I never got around to implementing this. But option 1 is there if you want to see it, I will be happy to review and merge.

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

No branches or pull requests

2 participants