gump-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sand...@apache.org
Subject svn commit: r264924 - /gump/branches/Gump3/pygump/python/gump/engine/mavenizer.py
Date Wed, 31 Aug 2005 02:35:16 GMT
Author: sanders
Date: Tue Aug 30 19:35:11 2005
New Revision: 264924

URL: http://svn.apache.org/viewcvs?rev=264924&view=rev
Log:
change to use OS's path separator - Contribution by Justin Merz (jrmerz at ucdavis.edu)

Modified:
    gump/branches/Gump3/pygump/python/gump/engine/mavenizer.py

Modified: gump/branches/Gump3/pygump/python/gump/engine/mavenizer.py
URL: http://svn.apache.org/viewcvs/gump/branches/Gump3/pygump/python/gump/engine/mavenizer.py?rev=264924&r1=264923&r2=264924&view=diff
==============================================================================
--- gump/branches/Gump3/pygump/python/gump/engine/mavenizer.py (original)
+++ gump/branches/Gump3/pygump/python/gump/engine/mavenizer.py Tue Aug 30 19:35:11 2005
@@ -4,6 +4,8 @@
 from gump.engine.modeller import _find_element_text
 from gump.util.io import VFS
 
+slash = os.sep
+
 def _parse_maven_projects( module_node, download_func, get_vfs):
         """Looks for <project type="maven"> and converts those."""
         #create maven DOM
@@ -101,7 +103,7 @@
 	
 	#find root of metadata/ where data is coming from
 	home_dir = get_vfs
-	mavenfile = open("%s\\%s" % (home_dir, filename), "w")
+	mavenfile = open("%s%s%s" % (home_dir, slash, filename), "w")
 	mavenfile.write( '<?xml version="1.0" encoding="UTF-8"?> \n' )
 	mavenfile.write( license() )
 	mavenfile.write( '  <project name="%s">\n\n' % name)
@@ -135,6 +137,7 @@
 		if path:
 			mavenfile.write( '      <path>%s</path>\n' % path )
 		mavenfile.write( '    </repository>\n\n')
+	mavenfile.write( '    <depend project="maven"/>\n')
 	for dependency in dependencies:
 		depend = _find_element_text( dependency, "artifactId" )
 		if map:
@@ -164,7 +167,7 @@
 	#open config file, set up dictonary
 	try:
 		mycwd = os.getcwd()
-		IDfile = open("%s\python\gump\util\mavenToGump.conf" % mycwd , "r")
+		IDfile = open("%s%spython%sgump%sutil%smavenToGump.conf" % (mycwd, slash, slash, slash,
slash) , "r")
 		relation = IDfile.readline()
 		parts = relation.split(',')
 		IDmap = { parts[0]:parts[1][1:parts[1].index(':')] }



Mime
View raw message