ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From xav...@apache.org
Subject svn commit: r662718 - in /ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/parser/m2: DefaultPomDependencyMgt.java PomModuleDescriptorBuilder.java PomModuleDescriptorParser.java
Date Tue, 03 Jun 2008 09:23:41 GMT
Author: xavier
Date: Tue Jun  3 02:23:40 2008
New Revision: 662718

URL: http://svn.apache.org/viewvc?rev=662718&view=rev
Log:
fix style

Modified:
    ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/parser/m2/DefaultPomDependencyMgt.java
    ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorBuilder.java
    ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorParser.java

Modified: ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/parser/m2/DefaultPomDependencyMgt.java
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/parser/m2/DefaultPomDependencyMgt.java?rev=662718&r1=662717&r2=662718&view=diff
==============================================================================
--- ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/parser/m2/DefaultPomDependencyMgt.java
(original)
+++ ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/parser/m2/DefaultPomDependencyMgt.java
Tue Jun  3 02:23:40 2008
@@ -23,7 +23,8 @@
     private String version;
     private String scope;
     
-    public DefaultPomDependencyMgt(String groupId, String artifactId, String version, String
scope) {
+    public DefaultPomDependencyMgt(
+            String groupId, String artifactId, String version, String scope) {
         this.groupId = groupId;
         this.artifactId = artifactId;
         this.version = version;

Modified: ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorBuilder.java
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorBuilder.java?rev=662718&r1=662717&r2=662718&view=diff
==============================================================================
--- ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorBuilder.java
(original)
+++ ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorBuilder.java
Tue Jun  3 02:23:40 2008
@@ -241,7 +241,7 @@
                 .getArtifactId(), version);
         DefaultDependencyDescriptor dd = new DefaultDependencyDescriptor(ivyModuleDescriptor,
                 moduleRevId, true, false, true);
-        scope = (scope == null || scope.length() == 0) ? getDefaultScope(dep): scope;
+        scope = (scope == null || scope.length() == 0) ? getDefaultScope(dep) : scope;
         ConfMapper mapping = (ConfMapper) MAVEN2_CONF_MAPPING.get(scope);
         mapping.addMappingConfs(dd, dep.isOptional());
         Map extraAtt = new HashMap();
@@ -289,7 +289,8 @@
         String key = getDependencyMgtExtraInfoKeyForVersion(dep.getGroupId(), dep.getArtifactId());
         ivyModuleDescriptor.addExtraInfo(key, dep.getVersion());
         if (dep.getScope() != null) {
-            String scopeKey = getDependencyMgtExtraInfoKeyForScope(dep.getGroupId(), dep.getArtifactId());
+            String scopeKey = getDependencyMgtExtraInfoKeyForScope(
+                                    dep.getGroupId(), dep.getArtifactId());
             ivyModuleDescriptor.addExtraInfo(scopeKey, dep.getScope());
         }
         // dependency management info is also used for version mediation of transitive dependencies
@@ -355,12 +356,12 @@
     }
 
     private String getDefaultVersion(PomDependencyData dep) {
-        String key = getDependencyMgtExtraInfoKeyForVersion(dep.getGroupId(), dep.getArtifactId());
       
+        String key = getDependencyMgtExtraInfoKeyForVersion(dep.getGroupId(), dep.getArtifactId());
         return (String) ivyModuleDescriptor.getExtraInfo().get(key);
     }
 
     private String getDefaultScope(PomDependencyData dep) {
-        String key = getDependencyMgtExtraInfoKeyForScope(dep.getGroupId(), dep.getArtifactId());
       
+        String key = getDependencyMgtExtraInfoKeyForScope(dep.getGroupId(), dep.getArtifactId());
         String result = (String) ivyModuleDescriptor.getExtraInfo().get(key);
         if (result == null) {
             result = "compile";
@@ -368,7 +369,8 @@
         return result;
     }
 
-    private static String getDependencyMgtExtraInfoKeyForVersion(String groupId, String artifaceId)
{
+    private static String getDependencyMgtExtraInfoKeyForVersion(
+                                String groupId, String artifaceId) {
         return DEPENDENCY_MANAGEMENT + EXTRA_INFO_DELIMITER + groupId
                 + EXTRA_INFO_DELIMITER + artifaceId + EXTRA_INFO_DELIMITER + "version";
     }
@@ -413,8 +415,12 @@
                     Message.warn("what seem to be a dependency management extra info "
                         + "doesn't match expected pattern: " + key);
                 } else {
-                    String versionKey = DEPENDENCY_MANAGEMENT + EXTRA_INFO_DELIMITER + parts[1]
+ EXTRA_INFO_DELIMITER + parts[2] + EXTRA_INFO_DELIMITER + "version";
-                    String scopeKey = DEPENDENCY_MANAGEMENT + EXTRA_INFO_DELIMITER + parts[1]
+ EXTRA_INFO_DELIMITER + parts[2] + EXTRA_INFO_DELIMITER + "scope";
+                    String versionKey = DEPENDENCY_MANAGEMENT + EXTRA_INFO_DELIMITER + parts[1]

+                                        + EXTRA_INFO_DELIMITER + parts[2] 
+                                        + EXTRA_INFO_DELIMITER + "version";
+                    String scopeKey = DEPENDENCY_MANAGEMENT + EXTRA_INFO_DELIMITER + parts[1]

+                                        + EXTRA_INFO_DELIMITER + parts[2] 
+                                        + EXTRA_INFO_DELIMITER + "scope";
 
                     String version = (String) md.getExtraInfo().get(versionKey);
                     String scope = (String) md.getExtraInfo().get(scopeKey);

Modified: ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorParser.java
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorParser.java?rev=662718&r1=662717&r2=662718&view=diff
==============================================================================
--- ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorParser.java
(original)
+++ ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorParser.java
Tue Jun  3 02:23:40 2008
@@ -213,7 +213,8 @@
                     }
                     
                     // add plugins from parent
-                    List /*<PomDependencyMgt>*/ plugins = PomModuleDescriptorBuilder.getPlugins(parentDescr);
+                    List /*<PomDependencyMgt>*/ plugins = 
+                                    PomModuleDescriptorBuilder.getPlugins(parentDescr);
                     for (Iterator it = plugins.iterator(); it.hasNext();) {
                         mdBuilder.addPlugin((PomDependencyMgt) it.next());
                     }



Mime
View raw message