Created
October 1, 2012 11:54
-
-
Save gamlerhart/3811183 to your computer and use it in GitHub Desktop.
VJPA and Maven
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<plugin> | |
<artifactId>maven-antrun-plugin</artifactId> | |
<version>1.6</version> | |
<dependencies> | |
<!-- Using the Versant JPA enhancer as a dependency here --> | |
<dependency> | |
<groupId>com.versant</groupId> | |
<artifactId>versant-jpa-enhancer</artifactId> | |
<version>1.0-SNAPSHOT</version> | |
</dependency> | |
</dependencies> | |
<executions> | |
<execution> | |
<phase>compile</phase> | |
<configuration> | |
<target> | |
<!-- From here it is the regular ANT build step. | |
See chapter: 3.3.Enhancing Y our V/JP A Entity Classes in the Versant JPA reference | |
--> | |
<taskdef name="VJPAEnhancer" | |
classname="com.versant.jpa.enhancer.ant.EnhancerTask" /> | |
<VJPAEnhancer destdir="target/classes" | |
classpathref="maven.compile.classpath" | |
lenient="true"> | |
<fileset dir="target/classes"> | |
<include name="**/*.class"/> | |
</fileset> | |
</VJPAEnhancer> | |
</target> | |
</configuration> | |
<goals> | |
<goal>run</goal> | |
</goals> | |
</execution> | |
</executions> | |
</plugin> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rem VJPA_DIR needs to point to your VJPA directory | |
set LIB_PATH=%VJPA_DIR%/lib | |
echo "Installing Versant JPA" | |
call mvn install:install-file -DgroupId=com.versant -DartifactId=versant-jpa -Dpackaging=jar -Dversion=1.0-SNAPSHOT -Dfile=%LIB_PATH%/versantjpa-1.0.jar -DpomFile=./pom-versant-jpa.xml | |
echo "Installing Versant JPA Enhancer" | |
call mvn install:install-file -DgroupId=com.versant -DartifactId=versant-jpa-enhancer -Dpackaging=jar -Dversion=1.0-SNAPSHOT -Dfile=%LIB_PATH%/versantjpa-agent-1.0.jar -DpomFile=./pom-versant-jpa-enhancer.xml |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
#VJPA_DIR needs to point to your VJPA directory | |
LIB_PATH=$VJPA_DIR/lib | |
echo "Installing Versant JPA" | |
mvn install:install-file -DgroupId=com.versant -DartifactId=versant-jpa -Dpackaging=jar -Dversion=1.0-SNAPSHOT -Dfile=$LIB_PATH/versantjpa-1.0.jar -DpomFile=./pom-versant-jpa.xml | |
echo "Installing Versant JPA Enhancer" | |
mvn install:install-file -DgroupId=com.versant -DartifactId=versant-jpa-enhancer -Dpackaging=jar -Dversion=1.0-SNAPSHOT -Dfile=$LIB_PATH/versantjpa-agent-1.0.jar -DpomFile=./pom-versant-jpa-enhancer.xml |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>com.versant</groupId> | |
<artifactId>versant-jpa-enhancer</artifactId> | |
<version>1.0-SNAPSHOT</version> | |
<description>Versant JPA Bytecode Enhancer</description> | |
<dependencies> | |
<dependency> | |
<groupId>com.versant</groupId> | |
<artifactId>versant-jpa</artifactId> | |
<version>1.0-SNAPSHOT</version> | |
</dependency> | |
</dependencies> | |
</project> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>com.versant</groupId> | |
<artifactId>versant-jpa</artifactId> | |
<version>1.0-SNAPSHOT</version> | |
<description>Versant JPA Provider</description> | |
<dependencies> | |
<!-- The JPA API. Can be from a different repository / group-id --> | |
<dependency> | |
<groupId>org.hibernate.javax.persistence</groupId> | |
<artifactId>hibernate-jpa-2.0-api</artifactId> | |
<version>1.0.1.Final</version> | |
</dependency> | |
<dependency> | |
<groupId>org.ow2.asm</groupId> | |
<artifactId>asm-all</artifactId> | |
<version>4.0</version> | |
</dependency> | |
<dependency> | |
<groupId>org.slf4j</groupId> | |
<artifactId>slf4j-api</artifactId> | |
<version>1.7.2</version> | |
</dependency> | |
<dependency> | |
<groupId>org.antlr</groupId> | |
<artifactId>antlr-runtime</artifactId> | |
<version>3.3</version> | |
</dependency> | |
<dependency> | |
<groupId>javax.transaction</groupId> | |
<artifactId>jta</artifactId> | |
<version>1.1</version> | |
</dependency> | |
</dependencies> | |
</project> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<dependency> | |
<groupId>com.versant</groupId> | |
<artifactId>versant-jpa</artifactId> | |
<version>1.0-SNAPSHOT</version> | |
</dependency> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment