[webbeans-commits] Webbeans SVN: r1547 - tck/trunk/impl and 1 other directories.

webbeans-commits at lists.jboss.org webbeans-commits at lists.jboss.org
Mon Feb 16 14:39:54 EST 2009


Author: pete.muir at jboss.org
Date: 2009-02-16 14:39:54 -0500 (Mon, 16 Feb 2009)
New Revision: 1547

Modified:
   ri/trunk/jboss-tck-runner/src/main/java/org/jboss/webbeans/tck/integration/jbossas/ProfileServiceContainersImpl.java
   tck/trunk/impl/pom.xml
   tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/impl/packaging/ArtifactDescriptor.java
Log:
Fixes for windows

Modified: ri/trunk/jboss-tck-runner/src/main/java/org/jboss/webbeans/tck/integration/jbossas/ProfileServiceContainersImpl.java
===================================================================
--- ri/trunk/jboss-tck-runner/src/main/java/org/jboss/webbeans/tck/integration/jbossas/ProfileServiceContainersImpl.java	2009-02-16 19:03:19 UTC (rev 1546)
+++ ri/trunk/jboss-tck-runner/src/main/java/org/jboss/webbeans/tck/integration/jbossas/ProfileServiceContainersImpl.java	2009-02-16 19:39:54 UTC (rev 1547)
@@ -42,7 +42,14 @@
    public void setup() throws IOException
    {
       super.setup();
-      
+      try 
+      {
+		 initDeploymentManager();
+	  }
+      catch (Exception e) 
+	  {
+	     throw new IOException(e);
+	  }
    }
    
    public void deploy(InputStream archiveStream, String name) throws DeploymentException, IOException

Modified: tck/trunk/impl/pom.xml
===================================================================
--- tck/trunk/impl/pom.xml	2009-02-16 19:03:19 UTC (rev 1546)
+++ tck/trunk/impl/pom.xml	2009-02-16 19:39:54 UTC (rev 1547)
@@ -233,10 +233,10 @@
                        <tasks>
                          <java classname="org.jboss.jsr299.tck.api.TCK" classpathref="maven.compile.classpath" failonerror="true" fork="true">
                             <jvmarg line="-DdumpArtifacts=true"/>
-                            <jvmarg line="-Dorg.jboss.jsr299.tck.outputDirectory=${project.build.directory}/jsr299-artifacts" />
+                            <jvmarg line="-Dorg.jboss.jsr299.tck.outputDirectory=target/jsr299-artifacts" />
                             <jvmarg line="-Dorg.jboss.jsr299.tck.libraryDirectory=${libraryDirectory}" />
                          </java>
-                         <echo>Dumped artifacts to ${project.build.directory}/jsr299-artifacts</echo>
+                         <echo>Dumped artifacts to ${basedir}/target/jsr299-artifacts</echo>
                        </tasks>
                      </configuration>
                      <goals>

Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/impl/packaging/ArtifactDescriptor.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/impl/packaging/ArtifactDescriptor.java	2009-02-16 19:03:19 UTC (rev 1546)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/impl/packaging/ArtifactDescriptor.java	2009-02-16 19:39:54 UTC (rev 1547)
@@ -21,6 +21,7 @@
 import java.util.HashSet;
 import java.util.Random;
 import java.util.Set;
+import java.util.jar.Attributes;
 import java.util.jar.JarEntry;
 import java.util.jar.JarOutputStream;
 import java.util.jar.Manifest;
@@ -31,6 +32,8 @@
 import org.apache.log4j.Logger;
 import org.jboss.jsr299.tck.impl.util.Files;
 
+import com.sun.java_cup.internal.runtime.Scanner;
+
 public class ArtifactDescriptor
 {
   
@@ -173,7 +176,11 @@
       public InputStream jar() throws IOException
       {
          ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
-         JarOutputStream jarOutputStream = new JarOutputStream(byteArrayOutputStream, new Manifest());
+         Manifest manifest = new Manifest();
+         Attributes attributes = manifest.getMainAttributes();
+         attributes.putValue("Created-By", "JSR-299 TCK Harness");
+         attributes.put(Attributes.Name.MANIFEST_VERSION, "1.0");
+         JarOutputStream jarOutputStream = new JarOutputStream(byteArrayOutputStream, manifest);
          jar(root, jarOutputStream);
          jarOutputStream.close();
          return new ByteArrayInputStream(byteArrayOutputStream.toByteArray());
@@ -192,7 +199,7 @@
             else
             {
                FileInputStream fis = new FileInputStream(child); 
-               JarEntry jarEntry = new JarEntry(child.getPath().substring(root.getPath().length() + 1));  
+               JarEntry jarEntry = new JarEntry(child.getPath().substring(root.getPath().length() + 1).replaceAll("\\" + File.separator, "/"));  
                jarOutputStream.putNextEntry(jarEntry);  
                Files.copy(fis, jarOutputStream);
                fis.close();




More information about the weld-commits mailing list