Return-Path: X-Original-To: apmail-maven-dev-archive@www.apache.org Delivered-To: apmail-maven-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id D9C60184A0 for ; Sun, 17 Jan 2016 16:57:03 +0000 (UTC) Received: (qmail 22798 invoked by uid 500); 17 Jan 2016 16:57:03 -0000 Delivered-To: apmail-maven-dev-archive@maven.apache.org Received: (qmail 22720 invoked by uid 500); 17 Jan 2016 16:57:03 -0000 Mailing-List: contact dev-help@maven.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Maven Developers List" Reply-To: "Maven Developers List" Delivered-To: mailing list dev@maven.apache.org Received: (qmail 22707 invoked by uid 99); 17 Jan 2016 16:57:03 -0000 Received: from Unknown (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 17 Jan 2016 16:57:03 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id B3E6E1A041E for ; Sun, 17 Jan 2016 16:57:02 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.9 X-Spam-Level: ** X-Spam-Status: No, score=2.9 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=3, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=disabled Authentication-Results: spamd2-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=googlemail.com Received: from mx1-us-west.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id HnOkD2bsWZAk for ; Sun, 17 Jan 2016 16:56:53 +0000 (UTC) Received: from mail-lb0-f178.google.com (mail-lb0-f178.google.com [209.85.217.178]) by mx1-us-west.apache.org (ASF Mail Server at mx1-us-west.apache.org) with ESMTPS id E4D3920520 for ; Sun, 17 Jan 2016 16:56:52 +0000 (UTC) Received: by mail-lb0-f178.google.com with SMTP id x4so79890067lbm.0 for ; Sun, 17 Jan 2016 08:56:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=fNRikOPvAwjfcZbj32T163ZeK4aoZXIYaVlRC3J4zeQ=; b=YELecwj6Ls73xO4Pi9UMDGMSI7fMX6TAQ1vZRJBZDIjWxMDppvhZMzDW+4HGRbmI+z oqo48S4vXtwsXBn8LOtKm7cJ8mzFYYFqEFl0CETt7yJvbZ0qYddshlB2rIR/HVUTRxYP 3EC0aOxayXU+qFPMaFhgly+5v1PI9zQsqeRhxgZ8JAJ/7pcighFmtSlAStbU4/F0EIuG XBF9/zD13hZwvDKEA+90HrpK6HCPOu80lCygmr+LlY7/6MW9hb4LbcoiAk7J9K7LZ+CB ghJKNe/uXGns2CvSxMG1pT4Yj5HHLHWdzlKgqPQ56v1oMCoZKrtBSn21TQ2xDWbwjni8 w/uA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=fNRikOPvAwjfcZbj32T163ZeK4aoZXIYaVlRC3J4zeQ=; b=MZg9PtXYHyjcplQV7owatSyrzjNQ2xZI2ixxLT+Cj5NYwVtRnIiTKRuEu6kwfZ2/kZ caL3sEYFeFWbDPVNEWe9L2dBMaS4y2RhtvMGy6JK71w+pCU5nWxmaZsJYyKWjhEirQZR ujMYe0lb28c/ZadnwoYD4XZ+Tq6MXg8rh5zpdwZwFrzTlEi3MIej3aAN94dp0BglNjdV 20J4DkosQr266SOqcrkoTKE9CVmixHNTx/22vmoRFCREVjLZPAZYdEhplLhyMkNe1HGU /KnIU23+MTrOUYz0Z9f0LPBh3tUPReHEhGogjDI1A1Ji1mBHuQ5m43vk3PWfW9jnz8KQ 0WiA== X-Gm-Message-State: ALoCoQk39DEgP2pY1oLHrVd0zixjAXfdr2UtFKSenk5CzmSVFoNCzYZTK+3Aaf4geqZND0wSjoMKyIlFFjkBf36XMcQLAgtKMw== MIME-Version: 1.0 X-Received: by 10.112.167.130 with SMTP id zo2mr5600442lbb.129.1453049804733; Sun, 17 Jan 2016 08:56:44 -0800 (PST) Received: by 10.25.21.68 with HTTP; Sun, 17 Jan 2016 08:56:44 -0800 (PST) In-Reply-To: References: Date: Sun, 17 Jan 2016 17:56:44 +0100 Message-ID: Subject: Re: migrating Surefire to 3.0-RC1 From: Tibor Digana To: Maven Developers List Content-Type: multipart/alternative; boundary=001a11c33e9673c74505298a8584 --001a11c33e9673c74505298a8584 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi Robert, A new problem with maven-artifact-transfer. Should we really shade it? Not able to inject ArtifactResolver as it seems: [INFO] --- maven-surefire-plugin:2.19.2-SNAPSHOT:test (default-test) @ child --- [WARNING] Error injecting: org.apache.maven.plugin.surefire.SurefirePlugin com.google.inject.ProvisionException: Guice provision errors: 1) No implementation for org.apache.maven.surefire.shade.org.apache.maven.shared.artifact.resolve.Ar= tifactResolver was bound. while locating org.apache.maven.plugin.surefire.SurefirePlugin 1 error at com.google.inject.internal.InjectorImpl$2.get(InjectorImpl.java:1006= ) at com.google.inject.internal.InjectorImpl.getInstance(InjectorImpl.java:1032) at org.eclipse.sisu.space.AbstractDeferredClass.get(AbstractDeferredClass.java= :48) at com.google.inject.internal.ProviderInternalFactory.provision(ProviderIntern= alFactory.java:86) at com.google.inject.internal.InternalFactoryToInitializableAdapter.provision(= InternalFactoryToInitializableAdapter.java:55) at com.google.inject.internal.ProviderInternalFactory$1.call(ProviderInternalF= actory.java:70) at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provisi= on(ProvisionListenerStackCallback.java:100) at org.eclipse.sisu.plexus.PlexusLifecycleManager.onProvision(PlexusLifecycleM= anager.java:133) at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provisi= on(ProvisionListenerStackCallback.java:109) at com.google.inject.internal.ProvisionListenerStackCallback.provision(Provisi= onListenerStackCallback.java:55) at com.google.inject.internal.ProviderInternalFactory.circularGet(ProviderInte= rnalFactory.java:68) at com.google.inject.internal.InternalFactoryToInitializableAdapter.get(Intern= alFactoryToInitializableAdapter.java:47) at com.google.inject.internal.InjectorImpl$2$1.call(InjectorImpl.java:997) at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:104= 7) at com.google.inject.internal.InjectorImpl$2.get(InjectorImpl.java:993) at com.google.inject.Scopes$1$1.get(Scopes.java:59) at org.eclipse.sisu.inject.LazyBeanEntry.getValue(LazyBeanEntry.java:82= ) at org.eclipse.sisu.plexus.LazyPlexusBean.getValue(LazyPlexusBean.java:51) at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.ja= va:260) at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.ja= va:252) at org.apache.maven.plugin.internal.DefaultMavenPluginManager.getConfiguredMoj= o(DefaultMavenPluginManager.java:462) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildP= luginManager.java:120) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:= 208) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:= 153) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:= 145) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(Lif= ecycleModuleBuilder.java:108) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(Lif= ecycleModuleBuilder.java:76) at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBu= ilder.build(SingleThreadedBuilder.java:51) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStart= er.java:116) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:361) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:155) at org.apache.maven.cli.MavenCli.execute(MavenCli.java:584) at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:213) at org.apache.maven.cli.MavenCli.main(MavenCli.java:157) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:6= 2) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImp= l.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.j= ava:289) at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher= .java:415) at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356) at org.codehaus.classworlds.Launcher.main(Launcher.java:46) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:6= 2) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImp= l.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at com.intellij.rt.execution.application.AppMain.main(AppMain.java:140) [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 1.702 s [INFO] Finished at: 2016-01-17T17:53:06+01:00 [INFO] Final Memory: 9M/155M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.19.2-SNAPSHOT:test (default-test) on project child: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.19.2-SNAPSHOT:test failed: Unable to load the mojo 'test' (or one of its required components) from the plugin 'org.apache.maven.plugins:maven-surefire-plugin:2.19.2-SNAPSHOT': com.google.inject.ProvisionException: Guice provision errors: [ERROR] [ERROR] 1) No implementation for org.apache.maven.surefire.shade.org.apache.maven.shared.artifact.resolve.Ar= tifactResolver was bound. [ERROR] while locating org.apache.maven.plugin.surefire.SurefirePlugin [ERROR] at ClassRealm[plugin>org.apache.maven.plugins:maven-surefire-plugin:2.19.2-SNA= PSHOT, parent: sun.misc.Launcher$AppClassLoader@7852e922] [ERROR] while locating org.apache.maven.plugin.Mojo annotated with @com.google.inject.name.Named(value=3Dorg.apache.maven.plugins:maven-surefi= re-plugin:2.19.2-SNAPSHOT:test) [ERROR] [ERROR] 1 error [ERROR] role: org.apache.maven.plugin.Mojo [ERROR] roleHint: org.apache.maven.plugins:maven-surefire-plugin:2.19.2-SNAPSHOT:test On Sat, Jan 9, 2016 at 1:17 PM, Robert Scholte wrote= : > Hi Tibor, > > Regarding the artifactResolver.resolveTransitively, this has been replace= d > with dependencyResolver. The reason is that an artifact is basically a > coordinate with a file, it is not aware of dependencies. > > I've traced one down for you: > org.apache.maven.plugin.surefire.AbstractSurefireMojo.getForkConfiguratio= n() > contains > Artifact shadeFire =3D getPluginArtifactMap().get( > "org.apache.maven.surefire:surefire-shadefire" ); > > If you get the Plugin instead and use > org.apache.maven.shared.dependency.TransferUtils.toDependencyCoordinate( > plugin ) > , then you'll be able to get all dependencies and their artifacts for the > classpath. > > I'll leave the fixing up to you to get some more feedback on the > maven-artifact-transfer components. > > thanks, > Robert > > Op Thu, 07 Jan 2016 20:33:47 +0100 schreef Tibor Digana < > tibor.digana@googlemail.com>: > > > Now I removed maven-compat completely. >> >> >> org.apache.maven.shared >> maven-artifact-transfer >> 3.0-SNAPSHOT >> >> >> It seems release version is not available. >> >> I should resolve compilation error after new 3.0 AtrifactResolver and >> I will come back to you. >> >> >> >> >> return artifactResolver.resolveTransitively( Collections.singleton( >> providerArtifact ), originatingArtifact, >> localRepository, >> remoteRepositories, artifactMetadataSource, >> filter ); >> >> >> >> >> On Thu, Jan 7, 2016 at 7:39 PM, Robert Scholte >> wrote: >> >> Hi Tibor, >>> >>> Bullet 4: Remove maven-compat (or give it the test-scope if it is >>> required >>> by the maven-plugin-testing-harness) >>> >>> Now I think you're at a state where Maven2 classes must be replaced wit= h >>> Maven3 solutions. >>> >>> Robert >>> >>> Op Thu, 07 Jan 2016 18:54:06 +0100 schreef Tibor Digana < >>> tibor.digana@googlemail.com>: >>> >>> >>> Hi Robert, >>> >>>> >>>> I did as you said and I have new issue. Any dea? >>>> >>>> >>>> >>>> >>>> testSurefireReportSingleError(org.apache.maven.plugins.surefire.report= .SurefireReportMojoTest) >>>> Time elapsed: 0.042 sec <<< ERROR! >>>> >>>> >>>> org.codehaus.plexus.component.repository.exception.ComponentLookupExce= ption: >>>> java.util.NoSuchElementException >>>> role: org.apache.maven.repository.RepositorySystem >>>> roleHint: >>>> at >>>> >>>> >>>> org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContain= er.java:253) >>>> at >>>> >>>> >>>> org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContain= er.java:241) >>>> at >>>> >>>> >>>> org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContain= er.java:235) >>>> at >>>> org.codehaus.plexus.PlexusTestCase.lookup(PlexusTestCase.java:207) >>>> at >>>> >>>> >>>> org.apache.maven.plugin.testing.AbstractMojoTestCase.setUp(AbstractMoj= oTestCase.java:118) >>>> at >>>> >>>> >>>> org.apache.maven.plugins.surefire.report.SurefireReportMojoTest.setUp(= SurefireReportMojoTest.java:56) >>>> at junit.framework.TestCase.runBare(TestCase.java:139) >>>> at junit.framework.TestResult$1.protect(TestResult.java:122) >>>> at junit.framework.TestResult.runProtected(TestResult.java:142) >>>> at junit.framework.TestResult.run(TestResult.java:125) >>>> at junit.framework.TestCase.run(TestCase.java:129) >>>> at junit.framework.TestSuite.runTest(TestSuite.java:252) >>>> at junit.framework.TestSuite.run(TestSuite.java:247) >>>> at >>>> >>>> >>>> org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.j= ava:86) >>>> at >>>> >>>> >>>> org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider= .java:252) >>>> at >>>> >>>> >>>> org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4P= rovider.java:141) >>>> at >>>> >>>> >>>> org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.= java:112) >>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >>>> at >>>> >>>> >>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.j= ava:62) >>>> at >>>> >>>> >>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccess= orImpl.java:43) >>>> at java.lang.reflect.Method.invoke(Method.java:497) >>>> at >>>> >>>> >>>> org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(R= eflectionUtils.java:189) >>>> at >>>> >>>> >>>> org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(= ProviderFactory.java:165) >>>> at >>>> >>>> >>>> org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(Provid= erFactory.java:85) >>>> at >>>> >>>> >>>> org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(Forke= dBooter.java:115) >>>> at >>>> org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:7= 5) >>>> Caused by: java.util.NoSuchElementException >>>> at java.util.Collections$EmptyIterator.next(Collections.java:4189) >>>> at >>>> >>>> >>>> org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContain= er.java:249) >>>> ... 25 more >>>> >>>> >>>> >>>> >>>> >>>> On Thu, Jan 7, 2016 at 6:10 PM, Robert Scholte >>>> wrote: >>>> >>>> Hi Tibor, >>>> >>>>> >>>>> so this is not how it should be done. >>>>> Compat contains classes which Maven2 classes which have been replaced >>>>> by >>>>> Maven3 or are not used anymore. >>>>> Only plugins which need to stay compatible with Maven2 should include >>>>> this >>>>> dependency. >>>>> >>>>> I'll update the page, because we've decided to change the version to >>>>> 3.0-SNAPSHOT >>>>> >>>>> And regarding your other message: see the third bullet when using >>>>> maven-plugin-testing-harness. Use version 2.1 if you want to ensure >>>>> that >>>>> the tests are Maven 3.0 compatible. >>>>> >>>>> If you need help, just let me know. By now I can recognize most of th= e >>>>> migration issues :) >>>>> >>>>> thanks, >>>>> Robert >>>>> >>>>> Op Thu, 07 Jan 2016 00:50:10 +0100 schreef Tibor Digana < >>>>> tibordigana@apache.org>: >>>>> >>>>> P=3DNP >>>>> >>>>> maven-compat made the trick >>>>>> >>>>>> >>>>>> org.apache.maven >>>>>> maven-compat >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> On Thu, Jan 7, 2016 at 12:09 AM, Tibor Digana-2 [via Maven] < >>>>>> ml-node+s40175n5858124h84@n5.nabble.com> wrote: >>>>>> >>>>>> I missing this import in MOJO after migrating plugin to 3.0 >>>>>> >>>>>> >>>>>>> >>>>>>> import org.apache.maven.shared.artifact.resolve.ArtifactResolver; >>>>>>> >>>>>>> The doc [1] says that maven-artifact-transfer should be used but it >>>>>>> does >>>>>>> not have yet a release version, or? >>>>>>> >>>>>>> >>>>>>> org.apache.maven.shared >>>>>>> maven-artifact-transfer >>>>>>> 0.0.1-SNAPSHOT >>>>>>> >>>>>>> >>>>>>> [1] >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> https://cwiki.apache.org/confluence/display/MAVEN/Plugin+migration+= to+Maven3+dependencies >>>>>>> >>>>>>> -- >>>>>>> Cheers >>>>>>> Tibor >>>>>>> >>>>>>> >>>>>>> ------------------------------ >>>>>>> If you reply to this email, your message will be added to the >>>>>>> discussion >>>>>>> below: >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> http://maven.40175.n5.nabble.com/migrating-Surefire-to-3-0-RC1-tp58= 58124.html >>>>>>> To start a new topic under Maven Developers, email >>>>>>> ml-node+s40175n142166h86@n5.nabble.com >>>>>>> To unsubscribe from Maven Developers, click here >>>>>>> < >>>>>>> >>>>>>> >>>>>>> http://maven.40175.n5.nabble.com/template/NamlServlet.jtp?macro=3Du= nsubscribe_by_code&node=3D142166&code=3DdGlib3JkaWdhbmFAYXBhY2hlLm9yZ3wxNDI= xNjZ8LTI4OTQ5MjEwMg=3D=3D >>>>>>> > >>>>>>> . >>>>>>> NAML >>>>>>> < >>>>>>> >>>>>>> >>>>>>> http://maven.40175.n5.nabble.com/template/NamlServlet.jtp?macro=3Dm= acro_viewer&id=3Dinstant_html%21nabble%3Aemail.naml&base=3Dnabble.naml.name= spaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.= web.template.NodeNamespace&breadcrumbs=3Dnotify_subscribers%21nabble%3Aemai= l.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Ae= mail.naml >>>>>>> > >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>> >>>>>> -- >>>>>> View this message in context: >>>>>> >>>>>> >>>>>> http://maven.40175.n5.nabble.com/migrating-Surefire-to-3-0-RC1-tp585= 8124p5858130.html >>>>>> Sent from the Maven Developers mailing list archive at Nabble.com. >>>>>> >>>>>> >>>>>> --------------------------------------------------------------------= - >>>>> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org >>>>> For additional commands, e-mail: dev-help@maven.apache.org >>>>> >>>>> >>>>> >>>>> >>>> --------------------------------------------------------------------- >>> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org >>> For additional commands, e-mail: dev-help@maven.apache.org >>> >>> >>> >> > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org > For additional commands, e-mail: dev-help@maven.apache.org > > --=20 Cheers Tibor --001a11c33e9673c74505298a8584--