From issues-return-131711-archive-asf-public=cust-asf.ponee.io@maven.apache.org Fri Apr 20 19:57:05 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id B197218076D for ; Fri, 20 Apr 2018 19:57:04 +0200 (CEST) Received: (qmail 21869 invoked by uid 500); 20 Apr 2018 17:57:03 -0000 Mailing-List: contact issues-help@maven.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@maven.apache.org Delivered-To: mailing list issues@maven.apache.org Received: (qmail 21858 invoked by uid 99); 20 Apr 2018 17:57:03 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 20 Apr 2018 17:57:03 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 43D6BC0313 for ; Fri, 20 Apr 2018 17:57:03 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -109.509 X-Spam-Level: X-Spam-Status: No, score=-109.509 tagged_above=-999 required=6.31 tests=[ENV_AND_HDR_SPF_MATCH=-0.5, KAM_ASCII_DIVIDERS=0.8, KAM_SHORT=0.001, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01, URIBL_BLOCKED=0.001, USER_IN_DEF_SPF_WL=-7.5, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id hGdxZeouqtCe for ; Fri, 20 Apr 2018 17:57:01 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 295CA5F188 for ; Fri, 20 Apr 2018 17:57:01 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 5CD30E00CC for ; Fri, 20 Apr 2018 17:57:00 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 14B80240C6 for ; Fri, 20 Apr 2018 17:57:00 +0000 (UTC) Date: Fri, 20 Apr 2018 17:57:00 +0000 (UTC) From: "simon cierniak (JIRA)" To: issues@maven.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Comment Edited] (SUREFIRE-1517) Getting ClassNotFoundException when filtering tests from a dependency jar MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/SUREFIRE-1517?page=3Dcom.atlass= ian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D1= 6445943#comment-16445943 ]=20 simon cierniak edited comment on SUREFIRE-1517 at 4/20/18 5:56 PM: ------------------------------------------------------------------- {color:#333333}I found a workaround by adding "Spec" after the * =20 {color} {noformat} mvn test -Dtest=3D**/package2/* =C2=A0 =3D> throws exception mvn test -Dtest=3D**/package2/*Spec=C2=A0=C2=A0=C2=A0 =3D> works{noformat} {color:#333333} =20 Simon{color} was (Author: scierniak): {color:#333333}I found a workaround by adding "Spec" after the * =20 mvn test -Dtest=3D**/package2*/* * =C2=A0 =3D> throws exception mvn test -Dtest=3D**/package2/*Spec=C2=A0=C2=A0=C2=A0 =3D> works =20 Simon{color} > Getting ClassNotFoundException when filtering tests from a dependency jar > ------------------------------------------------------------------------- > > Key: SUREFIRE-1517 > URL: https://issues.apache.org/jira/browse/SUREFIRE-1517 > Project: Maven Surefire > Issue Type: Bug > Components: Maven Surefire Plugin > Affects Versions: 2.21.0 > Environment: Windows > Reporter: simon cierniak > Priority: Minor > Attachments: 2018-04-19T12-07-18_153-jvmRun1.dump > > > The issue happens only when I am using tests from a test jar (using optio= n dependenciesToScan) and when tests are not into a final package meaning h= aving sub-package.=C2=A0 FYI, I am executing Spock tests. > To create my test jar, I followed doc [https://maven.apache.org/plugins/m= aven-jar-plugin/examples/create-test-jar.html] > =C2=A0 > *+Structure+* > {noformat} > com.bug.package1.ASpec > com.bug.package1.BSpec > com.bug.package2.CSpec > com.bug.package2.DSpec > com.bug.package2.subpackage.C1Spec > com.bug.package2.subpackage.C2Spec > {noformat} > =C2=A0 > +*Commands:*+ > mvn test -Dtest=3D***/*Spec* =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=C2=A0 wor= ks : execute ASpec, BSpec, CSpec, DSpec, C1Spec and C2Spec > mvn test -Dtest=3DASpec=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=C2=A0 wo= rks : execute ASpec > mvn test -Dtest=3D***/package1/**=C2=A0 works : execute ASpec and BSpec > mvn test -Dtest=3DC1Spec=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0 works : execute C1Spec > mvn test -Dtest=3D***/package2/subpackage/**=C2=A0 works : execute C1Spec= and C2Spec > mvn test -Dtest=3DCSpec=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0 works : execute CSpec > {color:#ff0000}mvn test -Dtest=3D***/package2/**=C2=A0 fails with error: = RuntimeException: Unable to create test class 'com.bug.package2.subpackage.= ' ... caused by: java.lang.ClassNotFoundException: com.bug.package2.subpack= age.{color} > {color:#ff0000}The tests executed should be CSpec and DSpec{color} > same error when filtering by com/bug/***/** > =C2=A0 > +*Pom.xml*+ > {noformat} > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 xsi:schemaLocation=3D"ht= tp://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> > =C2=A0=C2=A0 =C2=A04.0.0 > =C2=A0=C2=A0 =C2=A0com.bug > =C2=A0=C2=A0 =C2=A0demo-execution > =C2=A0=C2=A0 =C2=A01.0-SNAPSHOT > =C2=A0=C2=A0 =C2=A0jar > =C2=A0=C2=A0 =C2=A0Test Bug > =C2=A0=C2=A0 =C2=A0 > =C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0UTF-8= > =C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A02.4.5 > =C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A01.0-groovy-2.4 > =C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0false > =C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0**/*Spec.java > =C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0 > =C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0 > =C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0 > =C2=A0 > =C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A04.11 > =C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A01.1.1 > =C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A02.21.0 > =C2=A0=C2=A0 =C2=A0 > =C2=A0=C2=A0 =C2=A0 > =C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0 > =C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0 > =C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0 > =C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2= =A0org.apache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2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2= =A0=C2=A0=C2=A0 =C2=A0 > =C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2= =A0=C2=A0=C2=A0 =C2=A0${junit.groups} > =C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2= =A0=C2=A0=C2=A0 =C2=A0${junit.excludedGroups} > =C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2= =A0 > =C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0 > =C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0 > =C2=A0=C2=A0 =C2=A0 > =C2=A0=C2=A0 =C2=A0 > =C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0 > =C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0com.bug= > =C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0demo= -tests > =C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A01.0 > =C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0 > =C2=A0=C2=A0 =C2=A0 > > {noformat} > =C2=A0 > =C2=A0I tested also with version 2.20.1 and 2.19.1 and got same errors. -- This message was sent by Atlassian JIRA (v7.6.3#76005)