{"action":"created","issue":{"url":"https://api.github.com/repos/melix/jmh-gradle-plugin/issues/79","repository_url":"https://api.github.com/repos/melix/jmh-gradle-plugin","labels_url":"https://api.github.com/repos/melix/jmh-gradle-plugin/issues/79/labels{/name}","comments_url":"https://api.github.com/repos/melix/jmh-gradle-plugin/issues/79/comments","events_url":"https://api.github.com/repos/melix/jmh-gradle-plugin/issues/79/events","html_url":"https://github.com/melix/jmh-gradle-plugin/issues/79","id":158936096,"number":79,"title":"Exception in jmhJar when using test sourceSet","user":{"login":"mipmapman","id":8471146,"avatar_url":"https://avatars.githubusercontent.com/u/8471146?v=3","gravatar_id":"","url":"https://api.github.com/users/mipmapman","html_url":"https://github.com/mipmapman","followers_url":"https://api.github.com/users/mipmapman/followers","following_url":"https://api.github.com/users/mipmapman/following{/other_user}","gists_url":"https://api.github.com/users/mipmapman/gists{/gist_id}","starred_url":"https://api.github.com/users/mipmapman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mipmapman/subscriptions","organizations_url":"https://api.github.com/users/mipmapman/orgs","repos_url":"https://api.github.com/users/mipmapman/repos","events_url":"https://api.github.com/users/mipmapman/events{/privacy}","received_events_url":"https://api.github.com/users/mipmapman/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-06-07T14:22:47Z","updated_at":"2016-08-19T09:13:18Z","closed_at":null,"body":"I'm using version 0.3.0 of jmh-gradle-plugin in a Gradle 2.13 build.\r\n\r\nI've encountered a problem where the build fails unless I have a `src/test/resources` folder in existence and containing at least one file. For the moment I've created a `src/test/resources` folder and populated with it a dummy text file. It would be nice not to have this workaround though.\r\n\r\nI've had a quick look at the source but am lost in the world of Gradle code. To be honest I'm not even sure if what I'm trying to do is valid in the world of Gradle or if it is a bug in Gradle and not the JMH plugin.\r\n\r\nI've created a simple project here which demonstrates the issue I am facing:\r\n\r\n[https://github.com/mipmapman/bar](https://github.com/mipmapman/bar)\r\n\r\nNote that it occurs because I have the following:\r\n\r\n```\r\ndependencies {\r\n    jmh sourceSets.test.output\r\n}\r\n```\r\nI need this because my benchmark code extends/makes use of my test code. I am using this because even if I use the following in the JMH config without the above dependency line, I can't get past the compilation stage:\r\n\r\n`includeTests = true`\r\n\r\nWhen I run:\r\n\r\n`gradle clean jmhJar`\r\n\r\nI get the exception listed below.\r\n\r\nAs mentioned, to workaround this if I add a `src/test/resources` folder with a dummy file then the build works fine...\r\n\r\nI'm struggling to see how I can specify to just use the compiled test classes and not expect test resources when stating:\r\n```\r\ndependencies {\r\n    jmh sourceSets.test.output\r\n}\r\n```\r\n\r\n---\r\n\r\n```\r\n:clean\r\n:compileJava UP-TO-DATE\r\n:processResources UP-TO-DATE\r\n:classes UP-TO-DATE\r\n:compileTestJava\r\n:processTestResources UP-TO-DATE\r\n:testClasses\r\n:compileJmhJava\r\n:processJmhResources UP-TO-DATE\r\n:jmhClasses\r\n:jmhRunBytecodeGenerator\r\nProcessing 1 classes from /Users/nick/Documents/Personal/projects/tsl8r/bar/build/classes/jmh with \"reflection\" generator\r\nWriting out Java source to /Users/nick/Documents/Personal/projects/tsl8r/bar/build/jmh-generated-sources and resources to /Users/nick/Documents/Personal/projects/tsl8r/bar/build/jmh-generated-classes\r\n:jmhCompileGeneratedClasses\r\n:jmhJar FAILED\r\n\r\nFAILURE: Build failed with an exception.\r\n\r\n* What went wrong:\r\nExecution failed for task ':jmhJar'.\r\n> Cannot expand ZIP '/Users/nick/Documents/Personal/projects/tsl8r/bar/build/resources/test' as it does not exist.\r\n\r\n* Try:\r\nRun with --info or --debug option to get more log output.\r\n\r\n* Exception is:\r\norg.gradle.api.tasks.TaskExecutionException: Execution failed for task ':jmhJar'.\r\n\tat org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:69)\r\n\tat org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:46)\r\n\tat org.gradle.api.internal.tasks.execution.PostExecutionAnalysisTaskExecuter.execute(PostExecutionAnalysisTaskExecuter.java:35)\r\n\tat org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:68)\r\n\tat org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58)\r\n\tat org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:52)\r\n\tat org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52)\r\n\tat org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:53)\r\n\tat org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)\r\n\tat org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:203)\r\n\tat org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:185)\r\n\tat org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.processTask(AbstractTaskPlanExecutor.java:66)\r\n\tat org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.run(AbstractTaskPlanExecutor.java:50)\r\n\tat org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:54)\r\n\tat org.gradle.internal.concurrent.StoppableExecutorImpl$1.run(StoppableExecutorImpl.java:40)\r\nCaused by: org.gradle.api.InvalidUserDataException: Cannot expand ZIP '/Users/nick/Documents/Personal/projects/tsl8r/bar/build/resources/test' as it does not exist.\r\n\tat org.gradle.api.internal.file.archive.ZipFileTree.visit(ZipFileTree.java:66)\r\n\tat org.gradle.api.internal.file.collections.FileTreeAdapter.visit(FileTreeAdapter.java:109)\r\n\tat org.gradle.api.internal.file.AbstractFileTree$FilteredFileTreeImpl.visit(AbstractFileTree.java:141)\r\n\tat org.gradle.api.internal.file.CompositeFileTree.visit(CompositeFileTree.java:58)\r\n\tat org.gradle.api.internal.file.copy.CopySpecActionImpl.execute(CopySpecActionImpl.java:37)\r\n\tat org.gradle.api.internal.file.copy.CopySpecActionImpl.execute(CopySpecActionImpl.java:24)\r\n\tat org.gradle.api.internal.file.copy.DefaultCopySpec$DefaultCopySpecResolver.walk(DefaultCopySpec.java:498)\r\n\tat org.gradle.api.internal.file.copy.DefaultCopySpec$DefaultCopySpecResolver.walk(DefaultCopySpec.java:500)\r\n\tat org.gradle.api.internal.file.copy.DefaultCopySpec$DefaultCopySpecResolver.walk(DefaultCopySpec.java:500)\r\n\tat org.gradle.api.internal.file.copy.DefaultCopySpec.walk(DefaultCopySpec.java:322)\r\n\tat org.gradle.api.internal.file.copy.CopySpecBackedCopyActionProcessingStream.process(CopySpecBackedCopyActionProcessingStream.java:36)\r\n\tat org.gradle.api.internal.file.copy.DuplicateHandlingCopyActionDecorator$1.process(DuplicateHandlingCopyActionDecorator.java:44)\r\n\tat org.gradle.api.internal.file.copy.NormalizingCopyActionDecorator$1.process(NormalizingCopyActionDecorator.java:56)\r\n\tat org.gradle.api.internal.file.archive.ZipCopyAction$1.execute(ZipCopyAction.java:64)\r\n\tat org.gradle.api.internal.file.archive.ZipCopyAction$1.execute(ZipCopyAction.java:62)\r\n\tat org.gradle.internal.IoActions.withResource(IoActions.java:74)\r\n\tat org.gradle.api.internal.file.archive.ZipCopyAction.execute(ZipCopyAction.java:62)\r\n\tat org.gradle.api.internal.file.copy.NormalizingCopyActionDecorator.execute(NormalizingCopyActionDecorator.java:52)\r\n\tat org.gradle.api.internal.file.copy.DuplicateHandlingCopyActionDecorator.execute(DuplicateHandlingCopyActionDecorator.java:42)\r\n\tat org.gradle.api.internal.file.copy.CopyActionExecuter.execute(CopyActionExecuter.java:38)\r\n\tat org.gradle.api.tasks.AbstractCopyTask.copy(AbstractCopyTask.java:83)\r\n\tat org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:75)\r\n\tat org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.doExecute(AnnotationProcessingTaskFactory.java:228)\r\n\tat org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:221)\r\n\tat org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:210)\r\n\tat org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:585)\r\n\tat org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:568)\r\n\tat org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:80)\r\n\tat org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:61)\r\n\t... 14 more\r\n\r\n```\r\n\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/melix/jmh-gradle-plugin/issues/comments/240968645","html_url":"https://github.com/melix/jmh-gradle-plugin/issues/79#issuecomment-240968645","issue_url":"https://api.github.com/repos/melix/jmh-gradle-plugin/issues/79","id":240968645,"user":{"login":"vyazelenko","id":696855,"avatar_url":"https://avatars.githubusercontent.com/u/696855?v=3","gravatar_id":"","url":"https://api.github.com/users/vyazelenko","html_url":"https://github.com/vyazelenko","followers_url":"https://api.github.com/users/vyazelenko/followers","following_url":"https://api.github.com/users/vyazelenko/following{/other_user}","gists_url":"https://api.github.com/users/vyazelenko/gists{/gist_id}","starred_url":"https://api.github.com/users/vyazelenko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vyazelenko/subscriptions","organizations_url":"https://api.github.com/users/vyazelenko/orgs","repos_url":"https://api.github.com/users/vyazelenko/repos","events_url":"https://api.github.com/users/vyazelenko/events{/privacy}","received_events_url":"https://api.github.com/users/vyazelenko/received_events","type":"User","site_admin":false},"created_at":"2016-08-19T09:13:18Z","updated_at":"2016-08-19T09:13:18Z","body":"The duplicateStrategy can be changed in the build as described in the README, e.g.:\r\n```gradle\r\njmh {\r\n  duplicateClassesStrategy = 'warn'\r\n}\r\n```"}}
{"actor":{"display_login":"vyazelenko"}}