maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vsive...@apache.org
Subject svn commit: r675944 - in /maven/plugins/trunk/maven-project-info-reports-plugin/src/main/java/org/apache/maven/report/projectinfo/dependencies: RepositoryUtils.java renderer/DependenciesRenderer.java
Date Fri, 11 Jul 2008 13:26:34 GMT
Author: vsiveton
Date: Fri Jul 11 06:26:33 2008
New Revision: 675944

URL: http://svn.apache.org/viewvc?rev=675944&view=rev
Log:
o reduced visibility for getProxyInfo()

Modified:
    maven/plugins/trunk/maven-project-info-reports-plugin/src/main/java/org/apache/maven/report/projectinfo/dependencies/RepositoryUtils.java
    maven/plugins/trunk/maven-project-info-reports-plugin/src/main/java/org/apache/maven/report/projectinfo/dependencies/renderer/DependenciesRenderer.java

Modified: maven/plugins/trunk/maven-project-info-reports-plugin/src/main/java/org/apache/maven/report/projectinfo/dependencies/RepositoryUtils.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-project-info-reports-plugin/src/main/java/org/apache/maven/report/projectinfo/dependencies/RepositoryUtils.java?rev=675944&r1=675943&r2=675944&view=diff
==============================================================================
--- maven/plugins/trunk/maven-project-info-reports-plugin/src/main/java/org/apache/maven/report/projectinfo/dependencies/RepositoryUtils.java
(original)
+++ maven/plugins/trunk/maven-project-info-reports-plugin/src/main/java/org/apache/maven/report/projectinfo/dependencies/RepositoryUtils.java
Fri Jul 11 06:26:33 2008
@@ -57,6 +57,8 @@
 import java.util.List;
 
 /**
+ * Utilities methods to play with repository
+ *
  * @version $Id$
  * @since 2.1
  */
@@ -187,7 +189,7 @@
         {
             AuthenticationInfo auth = wagonManager.getAuthenticationInfo( repo.getId() );
 
-            ProxyInfo proxyInfo = getProxyInfo( settings );
+            ProxyInfo proxyInfo = getProxyInfo();
             if ( proxyInfo != null )
             {
                 wagon.connect( repository, auth, proxyInfo );
@@ -238,40 +240,13 @@
     }
 
     /**
-     * Convenience method to map a <code>Proxy</code> object from the user system
settings to a <code>ProxyInfo</code>
-     * object.
-     *
-     * @param settings the system settings
-     * @return a proxyInfo object instanced or null if no active proxy is define in the settings.xml
-     */
-    public ProxyInfo getProxyInfo( Settings settings )
-    {
-        ProxyInfo proxyInfo = null;
-        if ( settings != null && settings.getActiveProxy() != null )
-        {
-            Proxy settingsProxy = settings.getActiveProxy();
-
-            proxyInfo = new ProxyInfo();
-            proxyInfo.setHost( settingsProxy.getHost() );
-            proxyInfo.setType( settingsProxy.getProtocol() );
-            proxyInfo.setPort( settingsProxy.getPort() );
-            proxyInfo.setNonProxyHosts( settingsProxy.getNonProxyHosts() );
-            proxyInfo.setUserName( settingsProxy.getUsername() );
-            proxyInfo.setPassword( settingsProxy.getPassword() );
-        }
-
-        return proxyInfo;
-    }
-
-    /**
      * Get the <code>Maven project</code> from the repository depending the <code>Artifact</code>
given.
      *
      * @param artifact an artifact
-     * @param localRepository the local repository
      * @return the Maven project for the given artifact
-     * @throws org.apache.maven.project.ProjectBuildingException if any
+     * @throws ProjectBuildingException if any
      */
-    public MavenProject getMavenProjectFromRepository( Artifact artifact, ArtifactRepository
localRepository )
+    public MavenProject getMavenProjectFromRepository( Artifact artifact )
         throws ProjectBuildingException
     {
         Artifact projectArtifact = artifact;
@@ -344,4 +319,34 @@
 
         return repo.getUrl() + "/" + repo.pathOf( copyArtifact );
     }
+
+    // ----------------------------------------------------------------------
+    // Private methods
+    // ----------------------------------------------------------------------
+
+    /**
+     * Convenience method to map a <code>Proxy</code> object from the user system
settings to a <code>ProxyInfo</code>
+     * object.
+     *
+     * @param settings the system settings
+     * @return a proxyInfo object instanced or null if no active proxy is define in the settings.xml
+     */
+    private ProxyInfo getProxyInfo()
+    {
+        ProxyInfo proxyInfo = null;
+        if ( settings != null && settings.getActiveProxy() != null )
+        {
+            Proxy settingsProxy = settings.getActiveProxy();
+
+            proxyInfo = new ProxyInfo();
+            proxyInfo.setHost( settingsProxy.getHost() );
+            proxyInfo.setType( settingsProxy.getProtocol() );
+            proxyInfo.setPort( settingsProxy.getPort() );
+            proxyInfo.setNonProxyHosts( settingsProxy.getNonProxyHosts() );
+            proxyInfo.setUserName( settingsProxy.getUsername() );
+            proxyInfo.setPassword( settingsProxy.getPassword() );
+        }
+
+        return proxyInfo;
+    }
 }

Modified: maven/plugins/trunk/maven-project-info-reports-plugin/src/main/java/org/apache/maven/report/projectinfo/dependencies/renderer/DependenciesRenderer.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-project-info-reports-plugin/src/main/java/org/apache/maven/report/projectinfo/dependencies/renderer/DependenciesRenderer.java?rev=675944&r1=675943&r2=675944&view=diff
==============================================================================
--- maven/plugins/trunk/maven-project-info-reports-plugin/src/main/java/org/apache/maven/report/projectinfo/dependencies/renderer/DependenciesRenderer.java
(original)
+++ maven/plugins/trunk/maven-project-info-reports-plugin/src/main/java/org/apache/maven/report/projectinfo/dependencies/renderer/DependenciesRenderer.java
Fri Jul 11 06:26:33 2008
@@ -619,8 +619,7 @@
             Artifact artifact = (Artifact) it.next();
             try
             {
-                MavenProject artifactProject = repoUtils.getMavenProjectFromRepository( artifact,
repoUtils
-                    .getLocalRepository() );
+                MavenProject artifactProject = repoUtils.getMavenProjectFromRepository( artifact
);
 
                 populateRepositoryMap( repoMap, artifactProject.getRemoteArtifactRepositories()
);
             }
@@ -930,8 +929,7 @@
         {
             try
             {
-                MavenProject artifactProject = repoUtils.getMavenProjectFromRepository( artifact,
repoUtils
-                    .getLocalRepository() );
+                MavenProject artifactProject = repoUtils.getMavenProjectFromRepository( artifact
);
                 String artifactDescription = artifactProject.getDescription();
                 String artifactUrl = artifactProject.getUrl();
                 String artifactName = artifactProject.getName();



Mime
View raw message