gump-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From billbar...@apache.org
Subject svn commit: r365532 - /gump/trunk/python/gump/core/build/mvn.py
Date Tue, 03 Jan 2006 03:52:36 GMT
Author: billbarker
Date: Mon Jan  2 19:52:34 2006
New Revision: 365532

URL: http://svn.apache.org/viewcvs?rev=365532&view=rev
Log:
Fix the output file name, and XML generation.

This still doesn't do anything useful, but at least now Maven2 reads the file and doesn't
choke on it.

Modified:
    gump/trunk/python/gump/core/build/mvn.py

Modified: gump/trunk/python/gump/core/build/mvn.py
URL: http://svn.apache.org/viewcvs/gump/trunk/python/gump/core/build/mvn.py?rev=365532&r1=365531&r2=365532&view=diff
==============================================================================
--- gump/trunk/python/gump/core/build/mvn.py (original)
+++ gump/trunk/python/gump/core/build/mvn.py Mon Jan  2 19:52:34 2006
@@ -205,7 +205,7 @@
         #
         basedir = project.mvn.getBaseDirectory() or project.getBaseDirectory()
         if not propertiesFile: 
-            propertiesFile=os.path.abspath(os.path.join(basedir,'profile.xml'))
+            propertiesFile=os.path.abspath(os.path.join(basedir,'profiles.xml'))
             
         # Ensure containing directory exists, or make it.
         propsdir=os.path.dirname(propertiesFile)
@@ -220,7 +220,7 @@
         props=open(propertiesFile,'w')
         
         props.write('<?xml version="1.0"?>\n')
-        props.write(("""<!-- ------------------------------------------------------------------------
+        props.write(("""<!-- 
 # DO NOT EDIT  DO NOT EDIT  DO NOT EDIT  DO NOT EDIT  DO NOT EDIT  DO NOT EDIT  DO NOT EDIT

 #
 # File Automatically Generated by Gump, see http://gump.apache.org/
@@ -230,55 +230,44 @@
 #
 #
 # DO NOT EDIT  DO NOT EDIT  DO NOT EDIT  DO NOT EDIT  DO NOT EDIT  DO NOT EDIT  DO NOT EDIT
-# ------------------------------------------------------------------------
+# 
 -->\n""")	%	(project.getName(), time.strftime('%Y-%m-%d %H:%M:%S')) )
         props.write("<profiles>\n")
-        props.write("  <project>\n")
+        props.write("  <profile>\n")
         props.write("   <id>Gump</id>\n")
         props.write("   <activation><activeByDefault/></activation>\n")
         (classpath,bootclasspath)=languageHelper.getClasspathObjects(project)
         
         # :TODO: write...
-        props.write("   <dependencies>\n")
+        props.write("   <properties>\n")
         for annotatedPath in classpath.getPathParts()+bootclasspath.getPathParts():
             if isinstance(annotatedPath,gump.core.language.path.AnnotatedPath):
-                props.write("    <dependency>\n")
                 # Sort of punting here
-                props.write("<!-- Contributor: %s -->\n    <groupId>%s</groupId>\n"
% \
-                    ( annotatedPath.getContributor(),
-                      annotatedPath.getContributor()))
-                props.write("     <artifactId>%s</artifactId>\n" % \
-                             (annotatedPath.getId()))
-                props.write("     <scope>SYSTEM</scope>\n")
-                props.write("     <systemPath>%s</systemPath>\n" % \
-                             (annotatedPath.getPath().replace('\\', '/')))
-                props.write("   </dependency>\n")
-
-        props.write("   </dependencies>\n")
-
-        props.write("   <properties>\n")   
+                props.write("<!-- Contributor: %s -->\n" % \
+                    ( annotatedPath.getContributor() ))
+                props.write("     <maven.jar.%s>%s</maven.jar.%s>\n" % \
+                             (annotatedPath.getId(), \
+                              annotatedPath.getPath(), \
+                              annotatedPath.getId()))
         #
         # Output basic properties
         #
         for property in project.getWorkspace().getProperties()+project.getMvn().getProperties():
             # build.sysclasspath makes Maven sick.
             if not 'build.sysclasspath' == property.name:
-                props.write(('<property><name>%s</name><value>%s</value></property>\n')
% (property.name,property.value.replace('\\','/')))            
+                props.write(('<%s>%s</%s>\n') % \
+                   (property.name,property.value,property.name))            
         
         #
         # Output classpath properties
         #
         props.write("""<!--
-# ------------------------------------------------------------------------
+# 
 # M A V E N  J A R  O V E R R I D E
-# ------------------------------------------------------------------------
+# 
 -->
-<property><name>maven.jar.override</name><value>on</value></property>
-<!--
-# ------------------------------------------------------------------------
-# Jars set explicity by path.
-# ------------------------------------------------------------------------
--->""")
+<maven.jar.override>on</maven.jar.override>
+""")
         
         props.write("   </properties>\n")
         props.write("</profile></profiles>\n")



Mime
View raw message