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

Support for resources in repo.xml (replaces PR #727) #836

Merged
merged 3 commits into from
Nov 18, 2015
Merged

Support for resources in repo.xml (replaces PR #727) #836

merged 3 commits into from
Nov 18, 2015

Conversation

zwobit
Copy link
Contributor

@zwobit zwobit commented Nov 18, 2015

support for resources directories in repo.xml, if storing html fails try as binary in deployment.

Cherry picked version of #727 with current develop:

repo.xml sample:

<?xml version="1.0" encoding="UTF-8"?>
<meta xmlns="http://exist-db.org/xquery/repo">
    <description>eXistdb some app</description>
    <author>eXist Solutions</author>
    <website/>
    <status>alpha</status>
    <license>BSD-2-Clause</license>
    <copyright>true</copyright>
    <type>application</type>
    <target>someapp</target>
    <resources path="bower_components" type="binary"/>
    <resources path="app/elements" type="binary"/>
</meta>

wolfgangmm added a commit that referenced this pull request Nov 18, 2015
Support for resources in repo.xml (replaces PR #727)
@wolfgangmm wolfgangmm merged commit 93dc1e5 into eXist-db:develop Nov 18, 2015
@zwobit zwobit deleted the feature/html-as-binary-redo branch November 18, 2015 17:59
private void storeBinaryResources(Path directory, Collection targetCollection) throws IOException, EXistException,
PermissionDeniedException, LockException, TriggerException {
final TransactionManager mgr = broker.getBrokerPool().getTransactionManager();
Files.newDirectoryStream(directory).forEach(file -> {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this will leak file handles as you have not closed the stream!

adamretter added a commit that referenced this pull request Nov 19, 2015
fix for #836: close stream and use right varible in resource directory test
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

Successfully merging this pull request may close these issues.

3 participants