maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From khmarba...@apache.org
Subject svn commit: r1761800 - in /maven/shared/trunk/maven-artifact-transfer/src/main/java/org/apache/maven/shared/project: deploy/ deploy/internal/ install/ install/internal/
Date Wed, 21 Sep 2016 19:36:48 GMT
Author: khmarbaise
Date: Wed Sep 21 19:36:48 2016
New Revision: 1761800

URL: http://svn.apache.org/viewvc?rev=1761800&view=rev
Log:
Consistently renamed methods in interfaces
 ProjectDeployer from deployProject() into deploy().
 ProjectInstaller from installProject() into install(). 

Modified:
    maven/shared/trunk/maven-artifact-transfer/src/main/java/org/apache/maven/shared/project/deploy/ProjectDeployer.java
    maven/shared/trunk/maven-artifact-transfer/src/main/java/org/apache/maven/shared/project/deploy/internal/DefaultProjectDeployer.java
    maven/shared/trunk/maven-artifact-transfer/src/main/java/org/apache/maven/shared/project/install/ProjectInstaller.java
    maven/shared/trunk/maven-artifact-transfer/src/main/java/org/apache/maven/shared/project/install/internal/DefaultProjectInstaller.java
    maven/shared/trunk/maven-artifact-transfer/src/main/java/org/apache/maven/shared/project/install/internal/DualDigester.java

Modified: maven/shared/trunk/maven-artifact-transfer/src/main/java/org/apache/maven/shared/project/deploy/ProjectDeployer.java
URL: http://svn.apache.org/viewvc/maven/shared/trunk/maven-artifact-transfer/src/main/java/org/apache/maven/shared/project/deploy/ProjectDeployer.java?rev=1761800&r1=1761799&r2=1761800&view=diff
==============================================================================
--- maven/shared/trunk/maven-artifact-transfer/src/main/java/org/apache/maven/shared/project/deploy/ProjectDeployer.java
(original)
+++ maven/shared/trunk/maven-artifact-transfer/src/main/java/org/apache/maven/shared/project/deploy/ProjectDeployer.java
Wed Sep 21 19:36:48 2016
@@ -56,19 +56,20 @@ public interface ProjectDeployer
      * appropriate remote repository.
      * 
      * <pre class="java">
-     *  ..
+     *  @Parameter( defaultValue = "${session}", required=true, readonly = true)
      *  MavenSession session;
+     *  @Parameter( defaultValue = "${project}", required=true, readonly = true)
      *  MavenProject project;
      *  ..
-     *  &#64;Inject
+     *  &#64;Component
      *  ProjectDeployer deployer;
      *  
-     *  ProjectBuildingRequest pbr = 
-     *    new ProjectBuildingRequest()
-     *    .setProject (project)
-     *    .setUpdateReleaseInfo( true );
-     *    
-     *  deployer.deploy (session.getProjectBuildingRequest(), pbr, artifactRepository);
+     *  ProjectDeployerRequest pdr = 
+     *      new ProjectDeployerRequest()
+     *        .setProject (project)
+     *        .setUpdateReleaseInfo( true );
+     *  
+     *  deployer.deploy (session.getProjectBuildingRequest(), pdr, artifactRepository);
      * </pre>
      * 
      * @param buildingRequest {@link ProjectBuildingRequest}
@@ -77,7 +78,7 @@ public interface ProjectDeployer
      * @throws IOException In case of problems related to checksums.
      * @throws NoFileAssignedException In case of missing file which has not been assigned
to project.
      */
-    void deployProject( ProjectBuildingRequest buildingRequest, ProjectDeployerRequest request,
+    void deploy( ProjectBuildingRequest buildingRequest, ProjectDeployerRequest request,
                         ArtifactRepository artifactRepository )
         throws IOException, NoFileAssignedException;
 

Modified: maven/shared/trunk/maven-artifact-transfer/src/main/java/org/apache/maven/shared/project/deploy/internal/DefaultProjectDeployer.java
URL: http://svn.apache.org/viewvc/maven/shared/trunk/maven-artifact-transfer/src/main/java/org/apache/maven/shared/project/deploy/internal/DefaultProjectDeployer.java?rev=1761800&r1=1761799&r2=1761800&view=diff
==============================================================================
--- maven/shared/trunk/maven-artifact-transfer/src/main/java/org/apache/maven/shared/project/deploy/internal/DefaultProjectDeployer.java
(original)
+++ maven/shared/trunk/maven-artifact-transfer/src/main/java/org/apache/maven/shared/project/deploy/internal/DefaultProjectDeployer.java
Wed Sep 21 19:36:48 2016
@@ -42,8 +42,9 @@ import org.slf4j.LoggerFactory;
 /**
  * This will deploy a whole project into the appropriate remote repository.
  * 
- * @author Karl Heinz Marbaise <a href="mailto:khmarbaise@apache.org">khmarbaise@apache.org</a>
Most of the code is
- *         taken from maven-dependency-plugin.
+ * @author Karl Heinz Marbaise <a href="mailto:khmarbaise@apache.org">khmarbaise@apache.org</a>

+ * 
+ * Most of the code is taken from maven-deploy-plugin.
  */
 @Component( role = ProjectDeployer.class )
 public class DefaultProjectDeployer
@@ -61,13 +62,12 @@ public class DefaultProjectDeployer
      * @param request {@link ProjectDeployerRequest}
      * @param artifactRepository {@link ArtifactRepository}
      * @throws IllegalArgumentException in case of artifact is not correctly assigned.
-     * @throws NoFileAssignedException 
+     * @throws NoFileAssignedException
      */
-    public void deployProject( ProjectBuildingRequest buildingRequest, ProjectDeployerRequest
request,
-                               ArtifactRepository artifactRepository )
+    public void deploy( ProjectBuildingRequest buildingRequest, ProjectDeployerRequest request,
+                        ArtifactRepository artifactRepository )
         throws IOException, NoFileAssignedException
     {
-        List<Artifact> deployableArtifacts = new ArrayList<Artifact>();
 
         Artifact artifact = request.getProject().getArtifact();
         String packaging = request.getProject().getPackaging();
@@ -98,6 +98,7 @@ public class DefaultProjectDeployer
 
         try
         {
+            List<Artifact> deployableArtifacts = new ArrayList<Artifact>();
             if ( isPomArtifact )
             {
                 deployableArtifacts.add( artifact );

Modified: maven/shared/trunk/maven-artifact-transfer/src/main/java/org/apache/maven/shared/project/install/ProjectInstaller.java
URL: http://svn.apache.org/viewvc/maven/shared/trunk/maven-artifact-transfer/src/main/java/org/apache/maven/shared/project/install/ProjectInstaller.java?rev=1761800&r1=1761799&r2=1761800&view=diff
==============================================================================
--- maven/shared/trunk/maven-artifact-transfer/src/main/java/org/apache/maven/shared/project/install/ProjectInstaller.java
(original)
+++ maven/shared/trunk/maven-artifact-transfer/src/main/java/org/apache/maven/shared/project/install/ProjectInstaller.java
Wed Sep 21 19:36:48 2016
@@ -37,6 +37,25 @@ public interface ProjectInstaller
      * This will install a single project which may contain several artifacts. Those artifacts
will be installed into
      * the appropriate repository.
      * 
+     * <pre class="java">
+     *  @Parameter( defaultValue = "${session}", required=true, readonly = true)
+     *  MavenSession session;
+     *  @Parameter( defaultValue = "${project}", required=true, readonly = true)
+     *  MavenProject project;
+     *  ..
+     *  &#64;Component
+     *  ProjectInstaller installer;
+     *  
+     *    ProjectInstallerRequest pir =
+     *      new ProjectInstallerRequest()
+     *         .setProject( mavenProject )
+     *         .setCreateChecksum( false )
+     *         .setUpdateReleaseInfo( false );
+     *  
+     *  installer.install (session.getProjectBuildingRequest(), pir, artifactRepository);
+     * </pre>
+     * 
+     * 
      * @param projectBuildingRequest {@link ProjectBuildingRequest}
      * @param projectInstallerRequest {@link ProjectInstallerRequest}
      * @param artifactRepository {@link ArtifactRepository}
@@ -44,7 +63,7 @@ public interface ProjectInstaller
      * @throws ArtifactInstallerException In case of problems to install artifacts.
      * @throws NoFileAssignedException If no file has been assigned to the project.
      */
-    void installProject( ProjectBuildingRequest projectBuildingRequest, ProjectInstallerRequest
projectInstallerRequest,
+    void install( ProjectBuildingRequest projectBuildingRequest, ProjectInstallerRequest
projectInstallerRequest,
                          ArtifactRepository artifactRepository )
         throws IOException, ArtifactInstallerException, NoFileAssignedException;
 

Modified: maven/shared/trunk/maven-artifact-transfer/src/main/java/org/apache/maven/shared/project/install/internal/DefaultProjectInstaller.java
URL: http://svn.apache.org/viewvc/maven/shared/trunk/maven-artifact-transfer/src/main/java/org/apache/maven/shared/project/install/internal/DefaultProjectInstaller.java?rev=1761800&r1=1761799&r2=1761800&view=diff
==============================================================================
--- maven/shared/trunk/maven-artifact-transfer/src/main/java/org/apache/maven/shared/project/install/internal/DefaultProjectInstaller.java
(original)
+++ maven/shared/trunk/maven-artifact-transfer/src/main/java/org/apache/maven/shared/project/install/internal/DefaultProjectInstaller.java
Wed Sep 21 19:36:48 2016
@@ -68,7 +68,7 @@ public class DefaultProjectInstaller
     /**
      * {@inheritDoc}
      */
-    public void installProject( ProjectBuildingRequest buildingRequest, ProjectInstallerRequest
request,
+    public void install( ProjectBuildingRequest buildingRequest, ProjectInstallerRequest
request,
                                 ArtifactRepository artifactRepository )
         throws IOException, ArtifactInstallerException, NoFileAssignedException
     {

Modified: maven/shared/trunk/maven-artifact-transfer/src/main/java/org/apache/maven/shared/project/install/internal/DualDigester.java
URL: http://svn.apache.org/viewvc/maven/shared/trunk/maven-artifact-transfer/src/main/java/org/apache/maven/shared/project/install/internal/DualDigester.java?rev=1761800&r1=1761799&r2=1761800&view=diff
==============================================================================
--- maven/shared/trunk/maven-artifact-transfer/src/main/java/org/apache/maven/shared/project/install/internal/DualDigester.java
(original)
+++ maven/shared/trunk/maven-artifact-transfer/src/main/java/org/apache/maven/shared/project/install/internal/DualDigester.java
Wed Sep 21 19:36:48 2016
@@ -37,7 +37,10 @@ import org.codehaus.plexus.util.IOUtil;
  *
  * @author Kristian Rosenvold
  */
-public class DualDigester
+//TODO: Think about this class if we could use the ChecksumUtils class of
+// aether-util ? I think we need to go via reflection.
+//
+class DualDigester
 {
     private final MessageDigest md5 = getDigester( "MD5" );
 



Mime
View raw message