Last active
September 18, 2017 21:17
-
-
Save cristiandley/14a4908a1083d34e5650c6dc16dacb67 to your computer and use it in GitHub Desktop.
POM EJEMPLO PARA ALUMNOS
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
# Root logger option | |
log4j.rootLogger=INFO, stdout | |
# Direct log messages to stdout | |
log4j.appender.stdout=org.apache.log4j.ConsoleAppender | |
log4j.appender.stdout.Target=System.out | |
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout | |
log4j.appender.stdout.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %-5p %c{1}:%L - %m%n |
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" ?> | |
<persistence xmlns="http://xmlns.jcp.org/xml/ns/persistence" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/persistence | |
http://xmlns.jcp.org/xml/ns/persistence/persistence_2_1.xsd" version="2.1"> | |
<persistence-unit name="test"> | |
<class>dom.Persona</class> | |
<exclude-unlisted-classes/> | |
<properties> | |
<property name="datanucleus.ConnectionDriverName" value="com.mysql.Driver"/> | |
<property name="datanucleus.ConnectionURL" value="jdbc:mysql://localhost/test/"/> | |
<property name="datanucleus.ConnectionUserName" value="root"/> | |
<property name="datanucleus.ConnectionPassword" value="root"/> | |
</properties> | |
</persistence-unit> | |
<persistence-unit name="test2"> | |
<class>dom.Materia</class> | |
<exclude-unlisted-classes/> | |
<properties> | |
<property name="datanucleus.ConnectionDriverName" value="com.mysql.Driver"/> | |
<property name="datanucleus.ConnectionURL" value="jdbc:mysql://localhost/test2/"/> | |
<property name="datanucleus.ConnectionUserName" value="root"/> | |
<property name="datanucleus.ConnectionPassword" value="root"/> | |
</properties> | |
</persistence-unit> | |
</persistence> | |
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
<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/xsd/maven-4.0.0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>com.ifes</groupId> | |
<artifactId>datanucleus</artifactId> | |
<version>0.0.1-SNAPSHOT</version> | |
<dependencies> | |
<dependency> | |
<groupId>org.datanucleus</groupId> | |
<artifactId>javax.jdo</artifactId> | |
<version>3.2.0-m6</version> | |
</dependency> | |
<dependency> | |
<groupId>org.datanucleus</groupId> | |
<artifactId>datanucleus-core</artifactId> | |
<version>[5.0.0-release, )</version> | |
</dependency> | |
<dependency> | |
<groupId>org.datanucleus</groupId> | |
<artifactId>datanucleus-api-jdo</artifactId> | |
<version>[5.0.0-release, )</version> | |
</dependency> | |
<dependency> | |
<groupId>org.datanucleus</groupId> | |
<artifactId>datanucleus-rdbms</artifactId> | |
<version>[5.0.0-release, )</version> | |
</dependency> | |
<dependency> | |
<groupId>mysql</groupId> | |
<artifactId>mysql-connector-java</artifactId> | |
<version>5.1.6</version> | |
</dependency> | |
<dependency> | |
<groupId>log4j</groupId> | |
<artifactId>log4j</artifactId> | |
<version>1.2.17</version> | |
</dependency> | |
</dependencies> | |
<build> | |
<plugins> | |
<plugin> | |
<groupId>org.datanucleus</groupId> | |
<artifactId>datanucleus-maven-plugin</artifactId> | |
<version>5.0.2</version> | |
<configuration> | |
<api>JDO</api> | |
<persistenceUnitName>test</persistenceUnitName> | |
<log4jConfiguration>${basedir}/log4j.properties</log4jConfiguration> | |
<verbose>true</verbose> | |
</configuration> | |
<executions> | |
<execution> | |
<phase>process-classes</phase> | |
<goals> | |
<goal>enhance</goal> | |
</goals> | |
</execution> | |
</executions> | |
</plugin> | |
</plugins> | |
</build> | |
</project> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment