[jboss-cvs] JBossAS SVN: r105647 - in projects/jpa/tags: jboss-jpa-vfs3-1.0.2-alpha-2 and 1 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Thu Jun 3 11:19:44 EDT 2010
Author: ALRubinger
Date: 2010-06-03 11:19:43 -0400 (Thu, 03 Jun 2010)
New Revision: 105647
Added:
projects/jpa/tags/jboss-jpa-vfs3-1.0.2-alpha-2/
projects/jpa/tags/jboss-jpa-vfs3-1.0.2-alpha-2/pom.xml
projects/jpa/tags/jboss-jpa-vfs3-1.0.2-alpha-2/src/main/java/org/jboss/jpa/deployment/vfs3/PersistenceUnitDeploymentImpl.java
Removed:
projects/jpa/tags/jboss-jpa-vfs3-1.0.2-alpha-2/pom.xml
projects/jpa/tags/jboss-jpa-vfs3-1.0.2-alpha-2/src/main/java/org/jboss/jpa/deployment/vfs3/PersistenceUnitDeploymentImpl.java
Log:
[maven-release-plugin] copy for tag jboss-jpa-vfs3-1.0.2-alpha-2
Copied: projects/jpa/tags/jboss-jpa-vfs3-1.0.2-alpha-2 (from rev 105644, projects/jpa/trunk/vfs3)
Deleted: projects/jpa/tags/jboss-jpa-vfs3-1.0.2-alpha-2/pom.xml
===================================================================
--- projects/jpa/trunk/vfs3/pom.xml 2010-06-03 14:45:37 UTC (rev 105644)
+++ projects/jpa/tags/jboss-jpa-vfs3-1.0.2-alpha-2/pom.xml 2010-06-03 15:19:43 UTC (rev 105647)
@@ -1,45 +0,0 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <parent>
- <groupId>org.jboss.jpa</groupId>
- <artifactId>jboss-jpa-build</artifactId>
- <relativePath>../build/pom.xml</relativePath>
- <version>1.0.1</version>
- </parent>
- <modelVersion>4.0.0</modelVersion>
- <artifactId>jboss-jpa-vfs3</artifactId>
- <version>1.0.2-SNAPSHOT</version>
- <packaging>jar</packaging>
- <name>JBoss Container Managed JPA VFS3 Integration</name>
- <description>
- Integration project to support VFS3.
- </description>
-
- <properties>
- <version.org.jboss.jpa-deployers>1.0.2-alpha-1</version.org.jboss.jpa-deployers>
- <version.org.jboss.vfs>3.0.0.CR1</version.org.jboss.vfs>
- <version.org.jboss.deployers>2.2.0.Alpha2</version.org.jboss.deployers>
- </properties>
-
- <dependencies>
- <dependency>
- <groupId>org.jboss.jpa</groupId>
- <artifactId>jboss-jpa-deployers</artifactId>
- <version>${version.org.jboss.jpa-deployers}</version>
- </dependency>
- <dependency>
- <groupId>org.jboss</groupId>
- <artifactId>jboss-vfs</artifactId>
- <version>${version.org.jboss.vfs}</version>
- </dependency>
- <dependency>
- <groupId>org.jboss.deployers</groupId>
- <artifactId>jboss-deployers-vfs</artifactId>
- <version>${version.org.jboss.deployers}</version>
- </dependency>
- <dependency>
- <groupId>org.jboss.deployers</groupId>
- <artifactId>jboss-deployers-vfs-spi</artifactId>
- <version>${version.org.jboss.deployers}</version>
- </dependency>
- </dependencies>
-</project>
Copied: projects/jpa/tags/jboss-jpa-vfs3-1.0.2-alpha-2/pom.xml (from rev 105646, projects/jpa/trunk/vfs3/pom.xml)
===================================================================
--- projects/jpa/tags/jboss-jpa-vfs3-1.0.2-alpha-2/pom.xml (rev 0)
+++ projects/jpa/tags/jboss-jpa-vfs3-1.0.2-alpha-2/pom.xml 2010-06-03 15:19:43 UTC (rev 105647)
@@ -0,0 +1,51 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <parent>
+ <groupId>org.jboss.jpa</groupId>
+ <artifactId>jboss-jpa-build</artifactId>
+ <relativePath>../build/pom.xml</relativePath>
+ <version>1.0.1</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <artifactId>jboss-jpa-vfs3</artifactId>
+ <version>1.0.2-alpha-2</version>
+ <packaging>jar</packaging>
+ <name>JBoss Container Managed JPA VFS3 Integration</name>
+ <description>
+ Integration project to support VFS3.
+ </description>
+
+ <properties>
+ <version.org.jboss.jpa-deployers>1.0.2-alpha-1</version.org.jboss.jpa-deployers>
+ <version.org.jboss.vfs>3.0.0.CR1</version.org.jboss.vfs>
+ <version.org.jboss.deployers>2.2.0.Alpha2</version.org.jboss.deployers>
+ </properties>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.jboss.jpa</groupId>
+ <artifactId>jboss-jpa-deployers</artifactId>
+ <version>${version.org.jboss.jpa-deployers}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss</groupId>
+ <artifactId>jboss-vfs</artifactId>
+ <version>${version.org.jboss.vfs}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.deployers</groupId>
+ <artifactId>jboss-deployers-vfs</artifactId>
+ <version>${version.org.jboss.deployers}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.deployers</groupId>
+ <artifactId>jboss-deployers-vfs-spi</artifactId>
+ <version>${version.org.jboss.deployers}</version>
+ </dependency>
+ </dependencies>
+
+ <scm>
+ <connection>scm:svn:http://anonsvn.jboss.org/repos/jbossas/projects/jpa/tags/jboss-jpa-vfs3-1.0.2-alpha-2</connection>
+ <developerConnection>scm:svn:https://svn.jboss.org/repos/jbossas/projects/jpa/tags/jboss-jpa-vfs3-1.0.2-alpha-2</developerConnection>
+ <url>http://viewvc.jboss.org/cgi-bin/viewvc.cgi/jbossas/projects/jpa/tags/jboss-jpa-vfs3-1.0.2-alpha-2</url>
+ </scm>
+</project>
Deleted: projects/jpa/tags/jboss-jpa-vfs3-1.0.2-alpha-2/src/main/java/org/jboss/jpa/deployment/vfs3/PersistenceUnitDeploymentImpl.java
===================================================================
--- projects/jpa/trunk/vfs3/src/main/java/org/jboss/jpa/deployment/vfs3/PersistenceUnitDeploymentImpl.java 2010-06-03 14:45:37 UTC (rev 105644)
+++ projects/jpa/tags/jboss-jpa-vfs3-1.0.2-alpha-2/src/main/java/org/jboss/jpa/deployment/vfs3/PersistenceUnitDeploymentImpl.java 2010-06-03 15:19:43 UTC (rev 105647)
@@ -1,137 +0,0 @@
-/*
-
- * JBoss, Home of Professional Open Source
- * Copyright 2009, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.jpa.deployment.vfs3;
-
-import java.io.IOException;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.List;
-import java.util.Properties;
-
-import javax.naming.InitialContext;
-
-import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
-import org.jboss.jpa.deployment.PersistenceDeployment;
-import org.jboss.jpa.deployment.PersistenceUnitDeployment;
-import org.jboss.metadata.jpa.spec.PersistenceUnitMetaData;
-import org.jboss.vfs.VirtualFile;
-import org.jboss.vfs.VirtualFileVisitor;
-import org.jboss.vfs.VisitorAttributes;
-
-/**
- * Instance of PersistenceUnitDeployment that uses VFS2 roots
- *
- * @author John Bailey
- */
-public class PersistenceUnitDeploymentImpl extends PersistenceUnitDeployment
-{
-
- /**
- * Constructs a new PersistenceUnitDeploymentImpl
- *
- * @param initialContext
- * @param deployment
- * @param explicitEntityClasses
- * @param metadata
- * @param kernelName
- * @param deploymentUnit
- * @param defaultPersistenceProperties
- */
- public PersistenceUnitDeploymentImpl(InitialContext initialContext, PersistenceDeployment deployment,
- List<String> explicitEntityClasses, PersistenceUnitMetaData metadata, String kernelName,
- VFSDeploymentUnit deploymentUnit, Properties defaultPersistenceProperties)
- {
- super(initialContext, deployment, explicitEntityClasses, metadata, kernelName, deploymentUnit, defaultPersistenceProperties);
- }
-
- /** {@inheritdoc} */
- @Override
- protected URL getPersistenceUnitURL()
- {
- try {
- VirtualFile metaData = di.getMetaDataFile("persistence.xml");
- assert metaData != null : "Can't find persistence.xml in " + di;
- return getJarFileUrl(metaData.getParent().getParent());
- }
- catch (Exception e) {
- throw new RuntimeException(e);
- }
- }
-
- /** {@inheritdoc} */
- @Override
- protected URL getRelativeURL(String jar)
- {
- try {
- return new URL(jar);
- }
- catch (MalformedURLException e) {
- try {
- VirtualFile deploymentUnitFile = di.getFile("");
- VirtualFile parent = deploymentUnitFile.getParent();
- VirtualFile baseDir = (parent != null ? parent : deploymentUnitFile);
- VirtualFile jarFile = baseDir.getChild(jar);
- if (jarFile == null)
- throw new RuntimeException("could not find child '" + jar + "' on '" + baseDir + "'");
- return getJarFileUrl(jarFile);
- }
- catch (Exception e1) {
- throw new RuntimeException("could not find relative path: " + jar, e1);
- }
- }
- }
-
- /**
- * This method is a hack. This should be replace with a hook in VFS to fully explode a
- * zip filesystem. Better yet, this should be removed once there is a way to inject a VFS
- * based JarScanner into hibernate.
- */
- private URL getJarFileUrl(VirtualFile virtualFile) throws MalformedURLException, IOException {
- if(virtualFile.isDirectory())
- {
- VirtualFileVisitor visitor = new VirtualFileVisitor()
- {
- public void visit(VirtualFile virtualFile)
- {
- try
- {
- virtualFile.getPhysicalFile();
- }
- catch (IOException e)
- {
- throw new RuntimeException("Failed to force explosion of VirtualFile: " + virtualFile, e);
- }
- }
-
- public VisitorAttributes getAttributes()
- {
- return VisitorAttributes.RECURSE_LEAVES_ONLY;
- }
- };
- virtualFile.visit(visitor);
- return virtualFile.getPhysicalFile().toURI().toURL();
- }
- return virtualFile.toURL();
- }
-
-}
Copied: projects/jpa/tags/jboss-jpa-vfs3-1.0.2-alpha-2/src/main/java/org/jboss/jpa/deployment/vfs3/PersistenceUnitDeploymentImpl.java (from rev 105645, projects/jpa/trunk/vfs3/src/main/java/org/jboss/jpa/deployment/vfs3/PersistenceUnitDeploymentImpl.java)
===================================================================
--- projects/jpa/tags/jboss-jpa-vfs3-1.0.2-alpha-2/src/main/java/org/jboss/jpa/deployment/vfs3/PersistenceUnitDeploymentImpl.java (rev 0)
+++ projects/jpa/tags/jboss-jpa-vfs3-1.0.2-alpha-2/src/main/java/org/jboss/jpa/deployment/vfs3/PersistenceUnitDeploymentImpl.java 2010-06-03 15:19:43 UTC (rev 105647)
@@ -0,0 +1,100 @@
+/*
+
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.jpa.deployment.vfs3;
+
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.List;
+import java.util.Properties;
+
+import javax.naming.InitialContext;
+
+import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
+import org.jboss.jpa.deployment.PersistenceDeployment;
+import org.jboss.jpa.deployment.PersistenceUnitDeployment;
+import org.jboss.metadata.jpa.spec.PersistenceUnitMetaData;
+import org.jboss.vfs.VirtualFile;
+
+/**
+ * Instance of PersistenceUnitDeployment that uses VFS2 roots
+ *
+ * @author John Bailey
+ */
+public class PersistenceUnitDeploymentImpl extends PersistenceUnitDeployment
+{
+
+ /**
+ * Constructs a new PersistenceUnitDeploymentImpl
+ *
+ * @param initialContext
+ * @param deployment
+ * @param explicitEntityClasses
+ * @param metadata
+ * @param kernelName
+ * @param deploymentUnit
+ * @param defaultPersistenceProperties
+ */
+ public PersistenceUnitDeploymentImpl(InitialContext initialContext, PersistenceDeployment deployment,
+ List<String> explicitEntityClasses, PersistenceUnitMetaData metadata, String kernelName,
+ VFSDeploymentUnit deploymentUnit, Properties defaultPersistenceProperties)
+ {
+ super(initialContext, deployment, explicitEntityClasses, metadata, kernelName, deploymentUnit, defaultPersistenceProperties);
+ }
+
+ /** {@inheritdoc} */
+ @Override
+ protected URL getPersistenceUnitURL()
+ {
+ try {
+ VirtualFile metaData = di.getMetaDataFile("persistence.xml");
+ assert metaData != null : "Can't find persistence.xml in " + di;
+ return metaData.getParent().getParent().toURL();
+ }
+ catch (Exception e) {
+ throw new RuntimeException(e);
+ }
+ }
+
+ /** {@inheritdoc} */
+ @Override
+ protected URL getRelativeURL(String jar)
+ {
+ try {
+ return new URL(jar);
+ }
+ catch (MalformedURLException e) {
+ try {
+ VirtualFile deploymentUnitFile = di.getFile("");
+ VirtualFile parent = deploymentUnitFile.getParent();
+ VirtualFile baseDir = (parent != null ? parent : deploymentUnitFile);
+ VirtualFile jarFile = baseDir.getChild(jar);
+ if (jarFile == null)
+ throw new RuntimeException("could not find child '" + jar + "' on '" + baseDir + "'");
+ return jarFile.toURL();
+ }
+ catch (Exception e1) {
+ throw new RuntimeException("could not find relative path: " + jar, e1);
+ }
+ }
+ }
+}
More information about the jboss-cvs-commits
mailing list