You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by GitBox <gi...@apache.org> on 2022/07/09 11:43:25 UTC

[GitHub] [maven-install-plugin] slawekjaranowski commented on a diff in pull request #32: Streamline the plugin

slawekjaranowski commented on code in PR #32:
URL: https://github.com/apache/maven-install-plugin/pull/32#discussion_r917258353


##########
src/main/java/org/apache/maven/plugins/install/InstallMojo.java:
##########
@@ -153,31 +163,90 @@ private boolean allProjectsMarked()
         return true;
     }
 
-    private void installProject( MavenProject pir )
-        throws MojoFailureException, MojoExecutionException
+    private void installProject( MavenProject project ) throws MojoExecutionException, MojoFailureException
     {
         try
         {
-            installer.install( session.getProjectBuildingRequest(), new ProjectInstallerRequest().setProject( pir ) );
+            repositorySystem.install( session.getRepositorySession(), processProject( project ) );
         }
-        catch ( IOException e )
+        catch ( IllegalArgumentException e )
         {
-            throw new MojoFailureException( "IOException", e );
+            throw new MojoFailureException( e.getMessage(), e );

Review Comment:
   why not `MojoExecutionException`
   
   I must find a discussion, but as I remember `MojoFailureException` should not be used .... 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org