Uploaded image for project: 'PUBLIC - Liferay Maven'
  1. PUBLIC - Liferay Maven
  2. MAVEN-140

service builder portlet projects can't resolve non-installed sibling *-service projects anymore

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: Master
    • Fix Version/s: Master
    • Component/s: Plugins
    • Labels:
      None

      Description

      Prior to MAVEN-89 we were using maven 2.0 plugin api. In MAVEN-89 we switched to the current 3.0 api to take advantage of the maven-plugin-test-harness unit/integration testing framework.

      In the process we no longer can use the "mavenProjectBuilder" component from 2.0 plugin API and had to switch to just "projectBuilder" component. However, this component was not configured properly during the API port during MAVEN-89.

      This means that for our servicebuilder style projects with a -portlet and -portlet-service sibling projects, the "build-service" and "build-wsdd" goals will not be able to resolve the sibling "-portlet-service" project unless it is already installed locally.

      This means that if you create a new liferay project using the servicebuilder archetype and then try to run "mvn liferay:build-service" on the portlet project, it will fail to resolve the sibling project with the following exception:

      [ERROR] Failed to execute goal com.liferay.maven.plugins:liferay-maven-plugin:7.0.0-SNAPSHOT:build-service (default-cli) on project sbtest-portlet: Error resolving project artifact: Could not find artifact com.liferay.test:sbtest-portlet-service:pom:1.0.0-SNAPSHOT for project com.liferay.test:sbtest-portlet-service:pom:1.0.0-SNAPSHOT -> [Help 1]
      org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.liferay.maven.plugins:liferay-maven-plugin:7.0.0-SNAPSHOT:build-service (default-cli) on project sbtest-portlet: Error resolving project artifact: Could not find artifact com.liferay.test:sbtest-portlet-service:pom:1.0.0-SNAPSHOT for project com.liferay.test:sbtest-portlet-service:pom:1.0.0-SNAPSHOT
      	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:216)
      	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(LifecycleModuleBuilder.java:116)
      	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
      	at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
      	at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:120)
      	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:355)
      	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:216)
      	at org.apache.maven.cli.MavenCli.main(MavenCli.java:160)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:606)
      	at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java: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)
      Caused by: org.apache.maven.plugin.MojoExecutionException: Error resolving project artifact: Could not find artifact com.liferay.test:sbtest-portlet-service:pom:1.0.0-SNAPSHOT for project com.liferay.test:sbtest-portlet-service:pom:1.0.0-SNAPSHOT
      	at com.liferay.maven.plugins.AbstractToolsLiferayMojo.execute(AbstractToolsLiferayMojo.java:90)
      	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:132)
      	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
      	... 19 more
      Caused by: org.apache.maven.project.ProjectBuildingException: Error resolving project artifact: Could not find artifact com.liferay.test:sbtest-portlet-service:pom:1.0.0-SNAPSHOT for project com.liferay.test:sbtest-portlet-service:pom:1.0.0-SNAPSHOT
      	at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:351)
      	at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:284)
      	at com.liferay.maven.plugins.AbstractToolsLiferayMojo.resolveProject(AbstractToolsLiferayMojo.java:587)
      	at com.liferay.maven.plugins.AbstractToolsLiferayMojo.getProjectClassPath(AbstractToolsLiferayMojo.java:279)
      	at com.liferay.maven.plugins.ServiceBuilderMojo.getProjectClassPath(ServiceBuilderMojo.java:172)
      	at com.liferay.maven.plugins.AbstractToolsLiferayMojo.getProjectClassLoader(AbstractToolsLiferayMojo.java:257)
      	at com.liferay.maven.plugins.ServiceBuilderMojo.doExecute(ServiceBuilderMojo.java:161)
      	at com.liferay.maven.plugins.AbstractToolsLiferayMojo.execute(AbstractToolsLiferayMojo.java:83)
      	... 21 more
      Caused by: org.eclipse.aether.resolution.ArtifactResolutionException: Could not find artifact com.liferay.test:sbtest-portlet-service:pom:1.0.0-SNAPSHOT
      	at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:444)
      	at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:246)
      	at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:223)
      	at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveArtifact(DefaultRepositorySystem.java:294)
      	at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:340)
      	... 28 more
      Caused by: org.eclipse.aether.transfer.ArtifactNotFoundException: Could not find artifact com.liferay.test:sbtest-portlet-service:pom:1.0.0-SNAPSHOT
      	at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:434)
      	... 32 more
      
      

        Attachments

          Activity

            People

            • Assignee:
              gregory.amerson Gregory Amerson
              Reporter:
              gregory.amerson Gregory Amerson
              Participants of an Issue:
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Days since last comment:
                4 years, 40 weeks, 4 days ago

                Packages

                Version Package
                Master