{"action":"reopened","issue":{"url":"https://api.github.com/repos/STAMP-project/dspot/issues/538","repository_url":"https://api.github.com/repos/STAMP-project/dspot","labels_url":"https://api.github.com/repos/STAMP-project/dspot/issues/538/labels{/name}","comments_url":"https://api.github.com/repos/STAMP-project/dspot/issues/538/comments","events_url":"https://api.github.com/repos/STAMP-project/dspot/issues/538/events","html_url":"https://github.com/STAMP-project/dspot/issues/538","id":356797147,"node_id":"MDU6SXNzdWUzNTY3OTcxNDc=","number":538,"title":"When generating new tests keep the original test class license headers","user":{"login":"vmassol","id":628267,"node_id":"MDQ6VXNlcjYyODI2Nw==","avatar_url":"https://avatars3.githubusercontent.com/u/628267?v=4","gravatar_id":"","url":"https://api.github.com/users/vmassol","html_url":"https://github.com/vmassol","followers_url":"https://api.github.com/users/vmassol/followers","following_url":"https://api.github.com/users/vmassol/following{/other_user}","gists_url":"https://api.github.com/users/vmassol/gists{/gist_id}","starred_url":"https://api.github.com/users/vmassol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vmassol/subscriptions","organizations_url":"https://api.github.com/users/vmassol/orgs","repos_url":"https://api.github.com/users/vmassol/repos","events_url":"https://api.github.com/users/vmassol/events{/privacy}","received_events_url":"https://api.github.com/users/vmassol/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-09-04T12:56:29Z","updated_at":"2018-09-04T13:38:24Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"Original test:\r\n\r\n```\r\n/*\r\n * See the NOTICE file distributed with this work for additional\r\n * information regarding copyright ownership.\r\n *\r\n * This is free software; you can redistribute it and/or modify it\r\n * under the terms of the GNU Lesser General Public License as\r\n * published by the Free Software Foundation; either version 2.1 of\r\n * the License, or (at your option) any later version.\r\n *\r\n * This software is distributed in the hope that it will be useful,\r\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\r\n * Lesser General Public License for more details.\r\n *\r\n * You should have received a copy of the GNU Lesser General Public\r\n * License along with this software; if not, write to the Free\r\n * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA\r\n * 02110-1301 USA, or see the FSF site: http://www.fsf.org.\r\n */\r\npackage org.xwiki.component.embed;\r\n\r\nimport static org.mockito.Mockito.mock;\r\nimport static org.mockito.Mockito.verify;\r\n\r\nimport java.lang.reflect.Type;\r\nimport java.util.List;\r\nimport java.util.Map;\r\n\r\nimport org.junit.Assert;\r\nimport org.junit.Test;\r\nimport org.slf4j.Logger;\r\nimport org.xwiki.component.annotation.DisposePriority;\r\nimport org.xwiki.component.descriptor.ComponentDescriptor;\r\nimport org.xwiki.component.descriptor.ComponentInstantiationStrategy;\r\nimport org.xwiki.component.descriptor.DefaultComponentDependency;\r\nimport org.xwiki.component.descriptor.DefaultComponentDescriptor;\r\nimport org.xwiki.component.manager.ComponentEventManager;\r\nimport org.xwiki.component.manager.ComponentLifecycleException;\r\nimport org.xwiki.component.manager.ComponentLookupException;\r\nimport org.xwiki.component.manager.ComponentManager;\r\nimport org.xwiki.component.phase.Disposable;\r\nimport org.xwiki.component.phase.Initializable;\r\nimport org.xwiki.component.phase.InitializationException;\r\nimport org.xwiki.component.util.DefaultParameterizedType;\r\n\r\n/**\r\n * Unit tests for {@link EmbeddableComponentManager}.\r\n *\r\n * @version $Id: 03bb5bd6b5e9ff32e9f04d9681dad9501692dd17 $\r\n * @since 2.0M1\r\n */\r\npublic class EmbeddableComponentManagerTest\r\n{\r\n...\r\n```\r\n\r\nTest class generated by DSpot:\r\n\r\n```\r\npackage org.xwiki.component.embed;\r\n\r\n\r\nimport org.junit.Assert;\r\nimport org.junit.Test;\r\nimport org.mockito.Mockito;\r\nimport org.slf4j.Logger;\r\nimport org.xwiki.component.annotation.DisposePriority;\r\nimport org.xwiki.component.descriptor.ComponentDescriptor;\r\nimport org.xwiki.component.descriptor.DefaultComponentDescriptor;\r\nimport org.xwiki.component.manager.ComponentEventManager;\r\nimport org.xwiki.component.manager.ComponentLifecycleException;\r\nimport org.xwiki.component.manager.ComponentManager;\r\nimport org.xwiki.component.phase.Disposable;\r\nimport org.xwiki.component.phase.Initializable;\r\nimport org.xwiki.component.phase.InitializationException;\r\n\r\n\r\npublic class AmplEmbeddableComponentManagerTest {\r\n...\r\n```\r\n\r\nThe problem is that we can't automatically include the generated tests in the xwiki sources since they fail the build since all files must have a license header:\r\n\r\n```\r\n[INFO] -------------------------------------------------------\r\n[INFO]  T E S T S\r\n[INFO] -------------------------------------------------------\r\n[INFO] Running org.xwiki.component.embed.AmplEmbeddableComponentManagerTest\r\n[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.981 s - in org.xwiki.component.embed.AmplEmbeddableComponentManagerTest\r\n[INFO] Running org.xwiki.component.embed.EmbeddableComponentManagerTest\r\n[INFO] Tests run: 24, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.004 s - in org.xwiki.component.embed.EmbeddableComponentManagerTest\r\n[INFO] Running org.xwiki.component.guice.GuiceCompatibilityTest\r\n[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.356 s - in org.xwiki.component.guice.GuiceCompatibilityTest\r\n[INFO] Running org.xwiki.component.internal.StackingComponentEventManagerTest\r\n[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.092 s - in org.xwiki.component.internal.StackingComponentEventManagerTest\r\n[INFO] Running org.xwiki.component.ProviderTest\r\n[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.022 s - in org.xwiki.component.ProviderTest\r\n[INFO] Running org.xwiki.component.annotation.ComponentDescriptorFactoryTest\r\n[INFO] Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.003 s - in org.xwiki.component.annotation.ComponentDescriptorFactoryTest\r\n[INFO] Running org.xwiki.component.annotation.ComponentAnnotationLoaderTest\r\n[INFO] Tests run: 8, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.023 s - in org.xwiki.component.annotation.ComponentAnnotationLoaderTest\r\n[INFO] \r\n[INFO] Results:\r\n[INFO] \r\n[INFO] Tests run: 43, Failures: 0, Errors: 0, Skipped: 0\r\n[INFO] \r\n[INFO] \r\n[INFO] --- maven-jar-plugin:3.1.0:jar (default-jar) @ xwiki-commons-component-default ---\r\n[INFO] Building jar: /Users/vmassol/dev/xwiki/xwiki-commons/xwiki-commons-core/xwiki-commons-component/xwiki-commons-component-default/target/xwiki-commons-component-default-10.8-SNAPSHOT.jar\r\n[INFO] \r\n[INFO] --- maven-checkstyle-plugin:3.0.0:check (default) @ xwiki-commons-component-default ---\r\n[INFO] Starting audit...\r\n[WARN] /Users/vmassol/dev/xwiki/xwiki-commons/xwiki-commons-core/xwiki-commons-component/xwiki-commons-component-default/src/main/java/org/xwiki/component/annotation/ComponentDescriptorFactory.java:159: Comment matches to-do format 'TODO'. [TodoComment]\r\nAudit done.\r\n[INFO] \r\n[INFO] --- maven-checkstyle-plugin:3.0.0:check (blocker) @ xwiki-commons-component-default ---\r\n[INFO] Starting audit...\r\nAudit done.\r\n[INFO] \r\n[INFO] --- license-maven-plugin:3.0:check (default) @ xwiki-commons-component-default ---\r\n[INFO] Checking licenses...\r\n[WARNING] Missing header in: /Users/vmassol/dev/xwiki/xwiki-commons/xwiki-commons-core/xwiki-commons-component/xwiki-commons-component-default/src/test/dspot/org/xwiki/component/embed/AmplEmbeddableComponentManagerTest.java\r\n[INFO] ------------------------------------------------------------------------\r\n[INFO] BUILD FAILURE\r\n[INFO] ------------------------------------------------------------------------\r\n[INFO] Total time: 11.804 s\r\n[INFO] Finished at: 2018-09-04T14:54:03+02:00\r\n[INFO] Final Memory: 52M/556M\r\n[INFO] ------------------------------------------------------------------------\r\n[ERROR] Failed to execute goal com.mycila:license-maven-plugin:3.0:check (default) on project xwiki-commons-component-default: Some files do not have the expected license header -> [Help 1]\r\n[ERROR] \r\n[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.\r\n[ERROR] Re-run Maven using the -X switch to enable full debug logging.\r\n[ERROR] \r\n[ERROR] For more information about the errors and possible solutions, please read the following articles:\r\n[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException\r\nvmassol ~/dev/xwiki/xwiki-commons/xwiki-commons-core/xwiki-commons-component/xwiki-commons-component-default (master *+) $ \r\n```\r\n"}}
{"actor":{"display_login":"vmassol"}}