tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rf...@apache.org
Subject svn commit: r618848 - /incubator/tuscany/java/sca/tools/maven/maven-web-junit/src/main/java/org/apache/tuscany/tools/sca/web/junit/plugin/WebJUnitGeneratorMojo.java
Date Wed, 06 Feb 2008 01:12:10 GMT
Author: rfeng
Date: Tue Feb  5 17:12:08 2008
New Revision: 618848

URL: http://svn.apache.org/viewvc?rev=618848&view=rev
Log:
Make sure File.separator is used for the file name

Modified:
    incubator/tuscany/java/sca/tools/maven/maven-web-junit/src/main/java/org/apache/tuscany/tools/sca/web/junit/plugin/WebJUnitGeneratorMojo.java

Modified: incubator/tuscany/java/sca/tools/maven/maven-web-junit/src/main/java/org/apache/tuscany/tools/sca/web/junit/plugin/WebJUnitGeneratorMojo.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/tools/maven/maven-web-junit/src/main/java/org/apache/tuscany/tools/sca/web/junit/plugin/WebJUnitGeneratorMojo.java?rev=618848&r1=618847&r2=618848&view=diff
==============================================================================
--- incubator/tuscany/java/sca/tools/maven/maven-web-junit/src/main/java/org/apache/tuscany/tools/sca/web/junit/plugin/WebJUnitGeneratorMojo.java
(original)
+++ incubator/tuscany/java/sca/tools/maven/maven-web-junit/src/main/java/org/apache/tuscany/tools/sca/web/junit/plugin/WebJUnitGeneratorMojo.java
Tue Feb  5 17:12:08 2008
@@ -98,12 +98,18 @@
     private MavenProject project;
 
     public void execute() throws MojoExecutionException {
-        File webxml =
-            new File(project.getBasedir(), "target/" + project.getArtifactId() + "-" + project.getVersion()
+ "/WEB-INF/web.xml".replace('/', File.separatorChar));
+        File base =
+            new File(project.getBasedir(), "target" + File.separator
+                + project.getArtifactId()
+                + "-"
+                + project.getVersion()
+                + File.separator
+                + "WEB-INF");
+        base.mkdirs();
+        File webxml = new File(base, "web.xml");
         getLog().info("Generating " + webxml.toString());
         String content = setParameter(WEB_XML, "display.name", project.getName());
         try {
-            webxml.getParentFile().mkdirs();
             FileWriter writer = new FileWriter(webxml);
             writer.append(content);
             writer.close();
@@ -112,9 +118,7 @@
         }
 
         if (geronimo) {
-            File geronimoxml =
-                new File(project.getBasedir(), "target/" + project.getArtifactId() + "-"
+ project.getVersion() + "/WEB-INF/geronimo-web.xml".replace('/',
-                                                                                        
         File.separatorChar));
+            File geronimoxml = new File(base, "geronimo-web.xml");
             getLog().info("Generating " + geronimoxml.toString());
             content = setParameter(GERONIMO_WEB_XML, "groupId", project.getGroupId());
             content = setParameter(content, "artifactId", project.getArtifactId());



---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org


Mime
View raw message