You are viewing a plain text version of this content. The canonical link for it is here.
Posted to npanday-commits@incubator.apache.org by br...@apache.org on 2013/03/07 06:14:54 UTC

svn commit: r1453696 - /incubator/npanday/trunk/dotnet/assemblies/NPanday.ProjectImporter/Engine/src/main/csharp/Converter/Algorithms/AbstractPomConverter.cs

Author: brett
Date: Thu Mar  7 06:14:53 2013
New Revision: 1453696

URL: http://svn.apache.org/r1453696
Log:
[NPANDAY-578] remove properties

These seemed like a good idea, but system properties will not resolve correctly
when used as transitive dependencies, so they are not effective to retain

Modified:
    incubator/npanday/trunk/dotnet/assemblies/NPanday.ProjectImporter/Engine/src/main/csharp/Converter/Algorithms/AbstractPomConverter.cs

Modified: incubator/npanday/trunk/dotnet/assemblies/NPanday.ProjectImporter/Engine/src/main/csharp/Converter/Algorithms/AbstractPomConverter.cs
URL: http://svn.apache.org/viewvc/incubator/npanday/trunk/dotnet/assemblies/NPanday.ProjectImporter/Engine/src/main/csharp/Converter/Algorithms/AbstractPomConverter.cs?rev=1453696&r1=1453695&r2=1453696&view=diff
==============================================================================
--- incubator/npanday/trunk/dotnet/assemblies/NPanday.ProjectImporter/Engine/src/main/csharp/Converter/Algorithms/AbstractPomConverter.cs (original)
+++ incubator/npanday/trunk/dotnet/assemblies/NPanday.ProjectImporter/Engine/src/main/csharp/Converter/Algorithms/AbstractPomConverter.cs Thu Mar  7 06:14:53 2013
@@ -862,9 +862,12 @@ namespace NPanday.ProjectImporter.Conver
                     // Note that a "provided" scope may be more appropriate here, if NPanday were to support it
                     // This could likewise replace the GAC types as all of that lookup should occur at build time
 
-                    string var = "npanday." + entry.Key;
-                    AddProperty(var, directory);
-                    Dependency refDependency = CreateDependencyFromSystemPath(reference, "${" + var + "}/" + reference.Name + ".dll");
+                    // While it would be nice to introduce properties to make them replacable and reduce repetition, these will not resolve correctly
+                    // for transitive dependencies in Maven, so we need to remove them.
+                    // string var = "npanday." + entry.Key;
+                    // AddProperty(var, directory);
+                    // Dependency refDependency = CreateDependencyFromSystemPath(reference, "${" + var + "}/" + reference.Name + ".dll");
+                    Dependency refDependency = CreateDependencyFromSystemPath(reference, path);
 
                     // We do not list these as non-portable, for two reasons:
                     //  - they should not be copied to the local repository, because there can be multiple conflicting versions in different SDKs
@@ -1054,15 +1057,17 @@ namespace NPanday.ProjectImporter.Conver
             else
             {
                 // if it is in the project, we still consider it non-portable because packaging plugins will exclude system dependencies
-                // however, we can adjust the path to be a bit more portable across different checkouts
+                // it would be nice to adjust the path to be a bit more portable across different checkouts like below, however basedir
+                // will not resolve correctly as a transitive dependency
+                // logic retained in case other opportunities return in the future
                 // first, check if the library is somewhere inside the solution (mainPomFile is top-most POM)
-                string projectRoot = new DirectoryInfo(mainPomFile).Parent.FullName;
-                if (PathUtility.IsSubdirectoryOf(projectRoot, path))
-                {
+                // string projectRoot = new DirectoryInfo(mainPomFile).Parent.FullName;
+                // if (PathUtility.IsSubdirectoryOf(projectRoot, path))
+                // {
                     // if so, adjust path to be relative to this project's POM file
-                    path = "${basedir}\\" + PathUtility.MakeRelative(projectDigest.FullDirectoryName + "\\", path);
-                    refDependency.systemPath = path;
-                }
+                    // path = "${basedir}\\" + PathUtility.MakeRelative(projectDigest.FullDirectoryName + "\\", path);
+                    // refDependency.systemPath = path;
+                // }
                 log.WarnFormat("Adding non-portable reference to POM: {0}", path);
             }