[jboss-dev-forums] [Design the new POJO MicroContainer] - Re: virtualFile.toURL().openStream() does not provide a JarI

scott.stark@jboss.org do-not-reply at jboss.com
Fri Sep 5 16:07:23 EDT 2008


Note I updated the vfs test to use a src/test/resources/vfs/test/web_pkg_scope.ear from the vfs project itself. To change the ear edit the vfs/archives/web_pkg_scope maven projects and then you can generate the web_pkg_scope.ear by doing mvn package from archives/web_pkg_scope:


  | [558][valkyrie: web_pkg_scope]$ mvn package
  | [INFO] Scanning for projects...
  | [INFO] Reactor build order: 
  | [INFO]   web_pkg_scope parent
  | [INFO]   web_pkg_scope war
  | [INFO]   web_pkg_scope ear
  | [INFO] ------------------------------------------------------------------------
  | [INFO] Building web_pkg_scope parent
  | [INFO]    task-segment: [package]
  | [INFO] ------------------------------------------------------------------------
  | [INFO] [site:attach-descriptor]
  | [INFO] ------------------------------------------------------------------------
  | [INFO] Building web_pkg_scope war
  | [INFO]    task-segment: [package]
  | [INFO] ------------------------------------------------------------------------
  | [INFO] [resources:resources]
  | [INFO] Using default encoding to copy filtered resources.
  | [INFO] [compiler:compile]
  | [INFO] Compiling 2 source files to /Users/svn/JBossAS/projects/vfs/trunk/archives/web_pkg_scope/war/target/classes
  | [INFO] [resources:testResources]
  | [INFO] Using default encoding to copy filtered resources.
  | [INFO] [compiler:testCompile]
  | [INFO] No sources to compile
  | [INFO] [surefire:test]
  | [INFO] No tests to run.
  | [INFO] [war:war]
  | [INFO] Packaging webapp
  | [INFO] Assembling webapp[web_pkg_scope_web] in [/Users/svn/JBossAS/projects/vfs/trunk/archives/web_pkg_scope/war/target/web_pkg_scope_web]
  | [INFO] Processing war project
  | [INFO] Webapp assembled in[52 msecs]
  | [INFO] Building war: /Users/svn/JBossAS/projects/vfs/trunk/archives/web_pkg_scope/war/target/web_pkg_scope_web.war
  | [INFO] ------------------------------------------------------------------------
  | [INFO] Building web_pkg_scope ear
  | [INFO]    task-segment: [package]
  | [INFO] ------------------------------------------------------------------------
  | [INFO] [ear:generate-application-xml]
  | [INFO] Generating application.xml
  | [INFO] [resources:resources]
  | [INFO] Using default encoding to copy filtered resources.
  | [INFO] [ear:ear]
  | [INFO] Copying artifact[war:org.jboss.vfs:web_pkg_scope_web:1.0-SNAPSHOT] to[web_pkg_scope_web.war]
  | [INFO] Could not find manifest file: /Users/svn/JBossAS/projects/vfs/trunk/archives/web_pkg_scope/ear/src/main/application/META-INF/MANIFEST.MF - Generating one
  | [INFO] Building jar: /Users/svn/JBossAS/projects/vfs/trunk/archives/web_pkg_scope/ear/target/web_pkg_scope.ear
  | [INFO] 
  | [INFO] 
  | [INFO] ------------------------------------------------------------------------
  | [INFO] Reactor Summary:
  | [INFO] ------------------------------------------------------------------------
  | [INFO] web_pkg_scope parent .................................. SUCCESS [2.141s]
  | [INFO] web_pkg_scope war ..................................... SUCCESS [1.710s]
  | [INFO] web_pkg_scope ear ..................................... SUCCESS [0.442s]
  | [INFO] ------------------------------------------------------------------------
  | [INFO] ------------------------------------------------------------------------
  | [INFO] BUILD SUCCESSFUL
  | [INFO] ------------------------------------------------------------------------
  | [INFO] Total time: 4 seconds
  | [INFO] Finished at: Fri Sep 05 13:02:49 PDT 2008
  | [INFO] Final Memory: 11M/20M
  | [INFO] ------------------------------------------------------------------------
  | [559][valkyrie: web_pkg_scope]$ jar -tf ear/target/web_pkg_scope.ear 
  | META-INF/
  | META-INF/MANIFEST.MF
  | META-INF/application.xml
  | web_pkg_scope_web.war
  | META-INF/maven/
  | META-INF/maven/org.jboss.vfs/
  | META-INF/maven/org.jboss.vfs/web_pkg_scope_ear/
  | META-INF/maven/org.jboss.vfs/web_pkg_scope_ear/pom.xml
  | META-INF/maven/org.jboss.vfs/web_pkg_scope_ear/pom.properties
  | 

and the test fails to show any of the contents under the WEB-INF/classes, which is consistent with the tck test.

  | junit.framework.AssertionFailedError: No missing entries: [META-INF/, web_pkg_scope/servlet/, web_pkg_scope/, web_pkg_scope/entity/Account.class, web_pkg_scope/entity/, web_pkg_scope/servlet/JpaServlet.class, META-INF/persistence.xml] expected:<0> but was:<7>
  | 	at junit.framework.Assert.fail(Assert.java:47)
  | 	at junit.framework.Assert.failNotEquals(Assert.java:282)
  | 	at junit.framework.Assert.assertEquals(Assert.java:64)
  | 	at junit.framework.Assert.assertEquals(Assert.java:201)
  | 	at org.jboss.test.virtual.test.JARVFSContextUnitTestCase.testWarClassesJarInputStream(JARVFSContextUnitTestCase.java:284)
  | 

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4174720#4174720

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4174720



More information about the jboss-dev-forums mailing list