{"action":"created","comment":{"url":"https://api.github.com/repos/GoogleContainerTools/jib/pulls/comments/216390888","pull_request_review_id":153854979,"id":216390888,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxNjM5MDg4OA==","diff_hunk":"@@ -0,0 +1,102 @@\n+/*\n+ * Copyright 2018 Google LLC.\n+ *\n+ * Licensed under the Apache License, Version 2.0 (the \"License\"); you may not\n+ * use this file except in compliance with the License. You may obtain a copy of\n+ * the License at\n+ *\n+ *      http://www.apache.org/licenses/LICENSE-2.0\n+ *\n+ * Unless required by applicable law or agreed to in writing, software\n+ * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\n+ * License for the specific language governing permissions and limitations under\n+ * the License.\n+ */\n+\n+package com.google.cloud.tools.jib.maven.skaffold;\n+\n+import com.google.cloud.tools.jib.maven.MavenProjectProperties;\n+import com.google.common.annotations.VisibleForTesting;\n+import com.google.common.base.Preconditions;\n+import com.google.common.collect.ImmutableSet;\n+import java.io.File;\n+import java.nio.file.Path;\n+import java.util.Objects;\n+import javax.annotation.Nullable;\n+import org.apache.maven.artifact.Artifact;\n+import org.apache.maven.model.FileSet;\n+import org.apache.maven.plugin.AbstractMojo;\n+import org.apache.maven.plugin.MojoExecutionException;\n+import org.apache.maven.plugin.MojoFailureException;\n+import org.apache.maven.plugins.annotations.Mojo;\n+import org.apache.maven.plugins.annotations.Parameter;\n+import org.apache.maven.plugins.annotations.ResolutionScope;\n+import org.apache.maven.project.MavenProject;\n+\n+/**\n+ * Print out changing source dependencies on a module. In multimodule applications it should be run\n+ * by activating a single module and it's dependent modules. Dependency collection will ignore\n+ * project level snapshots (sub-modules) unless the user has explicitly installed them (by only\n+ * requiring dependencyCollection). For use only within skaffold.\n+ *\n+ * <p>Expected use: \"./mvnw jib:_skaffold-files -q\" or \"./mvnw jib:_skaffold-files -pl module -am\n+ * -q\"\n+ */\n+@Mojo(\n+    name = FilesMojo.GOAL_NAME,\n+    requiresDependencyCollection = ResolutionScope.COMPILE_PLUS_RUNTIME)\n+public class FilesMojo extends AbstractMojo {\n+\n+  @VisibleForTesting static final String GOAL_NAME = \"_skaffold-files\";\n+\n+  @Nullable\n+  @Parameter(defaultValue = \"${project}\", readonly = true)\n+  private MavenProject project;\n+\n+  // This parameter is cloned from JibPluginConfiguration\n+  @Nullable\n+  @Parameter(defaultValue = \"${project.basedir}/src/main/jib\", required = true)\n+  private File extraDirectory;\n+\n+  @Override\n+  public void execute() throws MojoExecutionException, MojoFailureException {\n+    Preconditions.checkNotNull(project);\n+    Preconditions.checkNotNull(extraDirectory);\n+\n+    // print out pom configuration files\n+    System.out.println(project.getFile());\n+    if (\"pom\".equals(project.getPackaging())) {\n+      // done if <packaging>pom</packaging>\n+      return;\n+    }\n+\n+    // print out sources directory\n+    System.out.println(project.getBuild().getSourceDirectory());\n+\n+    // print out resources directory\n+    ImmutableSet.copyOf(project.getBuild().getResources())\n+        .stream()\n+        .map(FileSet::getDirectory)\n+        .forEach(System.out::println);\n+\n+    // this seems weird, but we will only print out the \"jib\" directory on projects where\n+    // the plugin is explicitly configured (even though _skaffold-files is a jib-maven-plugin goal).\n+    if (project.getPlugin(MavenProjectProperties.PLUGIN_KEY) != null) {\n+      // print out extra directory\n+      System.out.println(extraDirectory.getAbsoluteFile().toPath());","path":"jib-maven-plugin/src/main/java/com/google/cloud/tools/jib/maven/skaffold/FilesMojo.java","position":87,"original_position":87,"commit_id":"0e993fa94b62cb0446b270f76a91d3721650120f","original_commit_id":"0e993fa94b62cb0446b270f76a91d3721650120f","user":{"login":"coollog","id":4852522,"node_id":"MDQ6VXNlcjQ4NTI1MjI=","avatar_url":"https://avatars3.githubusercontent.com/u/4852522?v=4","gravatar_id":"","url":"https://api.github.com/users/coollog","html_url":"https://github.com/coollog","followers_url":"https://api.github.com/users/coollog/followers","following_url":"https://api.github.com/users/coollog/following{/other_user}","gists_url":"https://api.github.com/users/coollog/gists{/gist_id}","starred_url":"https://api.github.com/users/coollog/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coollog/subscriptions","organizations_url":"https://api.github.com/users/coollog/orgs","repos_url":"https://api.github.com/users/coollog/repos","events_url":"https://api.github.com/users/coollog/events{/privacy}","received_events_url":"https://api.github.com/users/coollog/received_events","type":"User","site_admin":false},"body":"Should this only print if the directory actually exists?","created_at":"2018-09-10T16:38:16Z","updated_at":"2018-09-10T16:49:41Z","html_url":"https://github.com/GoogleContainerTools/jib/pull/959#discussion_r216390888","pull_request_url":"https://api.github.com/repos/GoogleContainerTools/jib/pulls/959","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/GoogleContainerTools/jib/pulls/comments/216390888"},"html":{"href":"https://github.com/GoogleContainerTools/jib/pull/959#discussion_r216390888"},"pull_request":{"href":"https://api.github.com/repos/GoogleContainerTools/jib/pulls/959"}}},"pull_request":{"url":"https://api.github.com/repos/GoogleContainerTools/jib/pulls/959","id":214037278,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE0MDM3Mjc4","html_url":"https://github.com/GoogleContainerTools/jib/pull/959","diff_url":"https://github.com/GoogleContainerTools/jib/pull/959.diff","patch_url":"https://github.com/GoogleContainerTools/jib/pull/959.patch","issue_url":"https://api.github.com/repos/GoogleContainerTools/jib/issues/959","number":959,"state":"open","locked":false,"title":"Add in _skaffold-files _skaffold-package-goals","user":{"login":"loosebazooka","id":1304826,"node_id":"MDQ6VXNlcjEzMDQ4MjY=","avatar_url":"https://avatars2.githubusercontent.com/u/1304826?v=4","gravatar_id":"","url":"https://api.github.com/users/loosebazooka","html_url":"https://github.com/loosebazooka","followers_url":"https://api.github.com/users/loosebazooka/followers","following_url":"https://api.github.com/users/loosebazooka/following{/other_user}","gists_url":"https://api.github.com/users/loosebazooka/gists{/gist_id}","starred_url":"https://api.github.com/users/loosebazooka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/loosebazooka/subscriptions","organizations_url":"https://api.github.com/users/loosebazooka/orgs","repos_url":"https://api.github.com/users/loosebazooka/repos","events_url":"https://api.github.com/users/loosebazooka/events{/privacy}","received_events_url":"https://api.github.com/users/loosebazooka/received_events","type":"User","site_admin":false},"body":"Built in skaffold support goals:\r\n1. _skaffold-files: a list of files to watch\r\n2. _skaffold-package-goals: a list of jib goals bound to the\r\n   package phase.\r\n\r\nfixes #958 \r\nfixes #962 ","created_at":"2018-09-07T20:54:40Z","updated_at":"2018-09-10T16:49:41Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0bce3f1d8a73b7d8ab732dd62e5869c9adfc8884","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":1016518109,"node_id":"MDU6TGFiZWwxMDE2NTE4MTA5","url":"https://api.github.com/repos/GoogleContainerTools/jib/labels/cla:%20yes","name":"cla: yes","color":"ededed","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/GoogleContainerTools/jib/pulls/959/commits","review_comments_url":"https://api.github.com/repos/GoogleContainerTools/jib/pulls/959/comments","review_comment_url":"https://api.github.com/repos/GoogleContainerTools/jib/pulls/comments{/number}","comments_url":"https://api.github.com/repos/GoogleContainerTools/jib/issues/959/comments","statuses_url":"https://api.github.com/repos/GoogleContainerTools/jib/statuses/0e993fa94b62cb0446b270f76a91d3721650120f","head":{"label":"GoogleContainerTools:skaffold-helpers","ref":"skaffold-helpers","sha":"0e993fa94b62cb0446b270f76a91d3721650120f","user":{"login":"GoogleContainerTools","id":38444003,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM4NDQ0MDAz","avatar_url":"https://avatars1.githubusercontent.com/u/38444003?v=4","gravatar_id":"","url":"https://api.github.com/users/GoogleContainerTools","html_url":"https://github.com/GoogleContainerTools","followers_url":"https://api.github.com/users/GoogleContainerTools/followers","following_url":"https://api.github.com/users/GoogleContainerTools/following{/other_user}","gists_url":"https://api.github.com/users/GoogleContainerTools/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleContainerTools/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleContainerTools/subscriptions","organizations_url":"https://api.github.com/users/GoogleContainerTools/orgs","repos_url":"https://api.github.com/users/GoogleContainerTools/repos","events_url":"https://api.github.com/users/GoogleContainerTools/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleContainerTools/received_events","type":"Organization","site_admin":false},"repo":{"id":118497841,"node_id":"MDEwOlJlcG9zaXRvcnkxMTg0OTc4NDE=","name":"jib","full_name":"GoogleContainerTools/jib","owner":{"login":"GoogleContainerTools","id":38444003,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM4NDQ0MDAz","avatar_url":"https://avatars1.githubusercontent.com/u/38444003?v=4","gravatar_id":"","url":"https://api.github.com/users/GoogleContainerTools","html_url":"https://github.com/GoogleContainerTools","followers_url":"https://api.github.com/users/GoogleContainerTools/followers","following_url":"https://api.github.com/users/GoogleContainerTools/following{/other_user}","gists_url":"https://api.github.com/users/GoogleContainerTools/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleContainerTools/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleContainerTools/subscriptions","organizations_url":"https://api.github.com/users/GoogleContainerTools/orgs","repos_url":"https://api.github.com/users/GoogleContainerTools/repos","events_url":"https://api.github.com/users/GoogleContainerTools/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleContainerTools/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/GoogleContainerTools/jib","description":":sailboat: Build container images for your Java applications.","fork":false,"url":"https://api.github.com/repos/GoogleContainerTools/jib","forks_url":"https://api.github.com/repos/GoogleContainerTools/jib/forks","keys_url":"https://api.github.com/repos/GoogleContainerTools/jib/keys{/key_id}","collaborators_url":"https://api.github.com/repos/GoogleContainerTools/jib/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/GoogleContainerTools/jib/teams","hooks_url":"https://api.github.com/repos/GoogleContainerTools/jib/hooks","issue_events_url":"https://api.github.com/repos/GoogleContainerTools/jib/issues/events{/number}","events_url":"https://api.github.com/repos/GoogleContainerTools/jib/events","assignees_url":"https://api.github.com/repos/GoogleContainerTools/jib/assignees{/user}","branches_url":"https://api.github.com/repos/GoogleContainerTools/jib/branches{/branch}","tags_url":"https://api.github.com/repos/GoogleContainerTools/jib/tags","blobs_url":"https://api.github.com/repos/GoogleContainerTools/jib/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/GoogleContainerTools/jib/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/GoogleContainerTools/jib/git/refs{/sha}","trees_url":"https://api.github.com/repos/GoogleContainerTools/jib/git/trees{/sha}","statuses_url":"https://api.github.com/repos/GoogleContainerTools/jib/statuses/{sha}","languages_url":"https://api.github.com/repos/GoogleContainerTools/jib/languages","stargazers_url":"https://api.github.com/repos/GoogleContainerTools/jib/stargazers","contributors_url":"https://api.github.com/repos/GoogleContainerTools/jib/contributors","subscribers_url":"https://api.github.com/repos/GoogleContainerTools/jib/subscribers","subscription_url":"https://api.github.com/repos/GoogleContainerTools/jib/subscription","commits_url":"https://api.github.com/repos/GoogleContainerTools/jib/commits{/sha}","git_commits_url":"https://api.github.com/repos/GoogleContainerTools/jib/git/commits{/sha}","comments_url":"https://api.github.com/repos/GoogleContainerTools/jib/comments{/number}","issue_comment_url":"https://api.github.com/repos/GoogleContainerTools/jib/issues/comments{/number}","contents_url":"https://api.github.com/repos/GoogleContainerTools/jib/contents/{+path}","compare_url":"https://api.github.com/repos/GoogleContainerTools/jib/compare/{base}...{head}","merges_url":"https://api.github.com/repos/GoogleContainerTools/jib/merges","archive_url":"https://api.github.com/repos/GoogleContainerTools/jib/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/GoogleContainerTools/jib/downloads","issues_url":"https://api.github.com/repos/GoogleContainerTools/jib/issues{/number}","pulls_url":"https://api.github.com/repos/GoogleContainerTools/jib/pulls{/number}","milestones_url":"https://api.github.com/repos/GoogleContainerTools/jib/milestones{/number}","notifications_url":"https://api.github.com/repos/GoogleContainerTools/jib/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/GoogleContainerTools/jib/labels{/name}","releases_url":"https://api.github.com/repos/GoogleContainerTools/jib/releases{/id}","deployments_url":"https://api.github.com/repos/GoogleContainerTools/jib/deployments","created_at":"2018-01-22T18:30:43Z","updated_at":"2018-09-10T15:45:49Z","pushed_at":"2018-09-10T16:42:19Z","git_url":"git://github.com/GoogleContainerTools/jib.git","ssh_url":"git@github.com:GoogleContainerTools/jib.git","clone_url":"https://github.com/GoogleContainerTools/jib.git","svn_url":"https://github.com/GoogleContainerTools/jib","homepage":"","size":5125,"stargazers_count":4443,"watchers_count":4443,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":false,"has_wiki":true,"has_pages":true,"forks_count":311,"mirror_url":null,"archived":false,"open_issues_count":93,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":311,"open_issues":93,"watchers":4443,"default_branch":"master"}},"base":{"label":"GoogleContainerTools:master","ref":"master","sha":"56d818ac5a61d40da7e3c06ab5bb787923ab067e","user":{"login":"GoogleContainerTools","id":38444003,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM4NDQ0MDAz","avatar_url":"https://avatars1.githubusercontent.com/u/38444003?v=4","gravatar_id":"","url":"https://api.github.com/users/GoogleContainerTools","html_url":"https://github.com/GoogleContainerTools","followers_url":"https://api.github.com/users/GoogleContainerTools/followers","following_url":"https://api.github.com/users/GoogleContainerTools/following{/other_user}","gists_url":"https://api.github.com/users/GoogleContainerTools/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleContainerTools/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleContainerTools/subscriptions","organizations_url":"https://api.github.com/users/GoogleContainerTools/orgs","repos_url":"https://api.github.com/users/GoogleContainerTools/repos","events_url":"https://api.github.com/users/GoogleContainerTools/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleContainerTools/received_events","type":"Organization","site_admin":false},"repo":{"id":118497841,"node_id":"MDEwOlJlcG9zaXRvcnkxMTg0OTc4NDE=","name":"jib","full_name":"GoogleContainerTools/jib","owner":{"login":"GoogleContainerTools","id":38444003,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM4NDQ0MDAz","avatar_url":"https://avatars1.githubusercontent.com/u/38444003?v=4","gravatar_id":"","url":"https://api.github.com/users/GoogleContainerTools","html_url":"https://github.com/GoogleContainerTools","followers_url":"https://api.github.com/users/GoogleContainerTools/followers","following_url":"https://api.github.com/users/GoogleContainerTools/following{/other_user}","gists_url":"https://api.github.com/users/GoogleContainerTools/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleContainerTools/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleContainerTools/subscriptions","organizations_url":"https://api.github.com/users/GoogleContainerTools/orgs","repos_url":"https://api.github.com/users/GoogleContainerTools/repos","events_url":"https://api.github.com/users/GoogleContainerTools/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleContainerTools/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/GoogleContainerTools/jib","description":":sailboat: Build container images for your Java applications.","fork":false,"url":"https://api.github.com/repos/GoogleContainerTools/jib","forks_url":"https://api.github.com/repos/GoogleContainerTools/jib/forks","keys_url":"https://api.github.com/repos/GoogleContainerTools/jib/keys{/key_id}","collaborators_url":"https://api.github.com/repos/GoogleContainerTools/jib/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/GoogleContainerTools/jib/teams","hooks_url":"https://api.github.com/repos/GoogleContainerTools/jib/hooks","issue_events_url":"https://api.github.com/repos/GoogleContainerTools/jib/issues/events{/number}","events_url":"https://api.github.com/repos/GoogleContainerTools/jib/events","assignees_url":"https://api.github.com/repos/GoogleContainerTools/jib/assignees{/user}","branches_url":"https://api.github.com/repos/GoogleContainerTools/jib/branches{/branch}","tags_url":"https://api.github.com/repos/GoogleContainerTools/jib/tags","blobs_url":"https://api.github.com/repos/GoogleContainerTools/jib/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/GoogleContainerTools/jib/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/GoogleContainerTools/jib/git/refs{/sha}","trees_url":"https://api.github.com/repos/GoogleContainerTools/jib/git/trees{/sha}","statuses_url":"https://api.github.com/repos/GoogleContainerTools/jib/statuses/{sha}","languages_url":"https://api.github.com/repos/GoogleContainerTools/jib/languages","stargazers_url":"https://api.github.com/repos/GoogleContainerTools/jib/stargazers","contributors_url":"https://api.github.com/repos/GoogleContainerTools/jib/contributors","subscribers_url":"https://api.github.com/repos/GoogleContainerTools/jib/subscribers","subscription_url":"https://api.github.com/repos/GoogleContainerTools/jib/subscription","commits_url":"https://api.github.com/repos/GoogleContainerTools/jib/commits{/sha}","git_commits_url":"https://api.github.com/repos/GoogleContainerTools/jib/git/commits{/sha}","comments_url":"https://api.github.com/repos/GoogleContainerTools/jib/comments{/number}","issue_comment_url":"https://api.github.com/repos/GoogleContainerTools/jib/issues/comments{/number}","contents_url":"https://api.github.com/repos/GoogleContainerTools/jib/contents/{+path}","compare_url":"https://api.github.com/repos/GoogleContainerTools/jib/compare/{base}...{head}","merges_url":"https://api.github.com/repos/GoogleContainerTools/jib/merges","archive_url":"https://api.github.com/repos/GoogleContainerTools/jib/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/GoogleContainerTools/jib/downloads","issues_url":"https://api.github.com/repos/GoogleContainerTools/jib/issues{/number}","pulls_url":"https://api.github.com/repos/GoogleContainerTools/jib/pulls{/number}","milestones_url":"https://api.github.com/repos/GoogleContainerTools/jib/milestones{/number}","notifications_url":"https://api.github.com/repos/GoogleContainerTools/jib/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/GoogleContainerTools/jib/labels{/name}","releases_url":"https://api.github.com/repos/GoogleContainerTools/jib/releases{/id}","deployments_url":"https://api.github.com/repos/GoogleContainerTools/jib/deployments","created_at":"2018-01-22T18:30:43Z","updated_at":"2018-09-10T15:45:49Z","pushed_at":"2018-09-10T16:42:19Z","git_url":"git://github.com/GoogleContainerTools/jib.git","ssh_url":"git@github.com:GoogleContainerTools/jib.git","clone_url":"https://github.com/GoogleContainerTools/jib.git","svn_url":"https://github.com/GoogleContainerTools/jib","homepage":"","size":5125,"stargazers_count":4443,"watchers_count":4443,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":false,"has_wiki":true,"has_pages":true,"forks_count":311,"mirror_url":null,"archived":false,"open_issues_count":93,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":311,"open_issues":93,"watchers":4443,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/GoogleContainerTools/jib/pulls/959"},"html":{"href":"https://github.com/GoogleContainerTools/jib/pull/959"},"issue":{"href":"https://api.github.com/repos/GoogleContainerTools/jib/issues/959"},"comments":{"href":"https://api.github.com/repos/GoogleContainerTools/jib/issues/959/comments"},"review_comments":{"href":"https://api.github.com/repos/GoogleContainerTools/jib/pulls/959/comments"},"review_comment":{"href":"https://api.github.com/repos/GoogleContainerTools/jib/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/GoogleContainerTools/jib/pulls/959/commits"},"statuses":{"href":"https://api.github.com/repos/GoogleContainerTools/jib/statuses/0e993fa94b62cb0446b270f76a91d3721650120f"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"coollog"}}