jenkinsci / juseppe

Jenkins Update Site Embedded for Plugin Publishing Easily
https://hub.docker.com/r/lanwen/juseppe/
Apache License 2.0
56 stars 20 forks source link

Recursively and continously watch for file change #35

Closed valdiz777 closed 7 years ago

valdiz777 commented 7 years ago

For anyone looking for this functionality. This will enable people to be able to structure their local repositories however they wish.

lanwen commented 7 years ago

Thanks for changes, really appreciate this functionality! But please fix some style issues

lanwen commented 7 years ago

Also, whould you mind to add ability to disable recursive scan (to allow for example serve different plugins from different folders in one tree with different juseppes - some can already use this scheme)19:10, 6 сентября 2017 г., Valentine Nwachukwu notifications@github.com:@valdiz777 commented on this pull request.

In juseppe-core/src/main/java/ru/lanwen/jenkins/juseppe/gen/source/PathPluginSource.java:

  • return StreamSupport.stream(paths.spliterator(), false).map(path -> {
  • try {
  • LOG.trace("Process file {}", path);
  • return HPI.loadHPI(path.toFile())
  • .withUrl(pluginsDir.relativize(path).toString());
  • } catch (Exception e) {
  • LOG.error("Fail to get the {} info", path.toAbsolutePath(), e);
  • return null;
  • }
  • }).filter(Objects::nonNull).collect(Collectors.toList());
  • } catch (IOException e) {
  • throw new RuntimeException(format("Can't read path %s", pluginsDir.toAbsolutePath()), e);
  • }
  • try (Stream paths = Files.walk(pluginsDir)) {

Yes it will

—You are receiving this because you commented.Reply to this email directly, view it on GitHub, or mute the thread.

valdiz777 commented 7 years ago

Updated