Download Latest Version mardao-2.0.3-all.zip (271.5 kB)
Email in envelope

Get an email when there's a new version of Architect's Java DAO Generator

Home / 1.0
Name Modified Size InfoDownloads / Week
Parent folder
maven-mardao-plugin 2010-06-01
parent-1.0.pom 2010-06-01 3.8 kB
README 2010-06-01 5.1 kB
mardao-1.0.tar.gz 2010-06-01 4.7 MB
Totals: 4 Items   4.7 MB 0
README for the mardao Architect's Java DAO generator
Version: 1.0
License: http://www.gnu.org/licenses/lgpl.html

Mardao is a maven plugin, which you configure in your project's pom.xml.
It then generates DAO classes using your annotated domain classes as input.

For support, visit the mardao-usage mailing list at 
https://lists.sourceforge.net/lists/listinfo/mardao-usage

pom.xml example:
<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>
	<parent>
		<groupId>net.sf.mardao</groupId>
		<artifactId>parent</artifactId>
		<version>1.0-SNAPSHOT</version>
	</parent>
	<artifactId>basic-plugin-test</artifactId>
	<packaging>jar</packaging>
	<name>${groupId}::${artifactId}</name>

	<build>
		<plugins>
			<plugin>
				<artifactId>maven-compiler-plugin</artifactId>
				<configuration>
					<source>1.6</source>
					<target>1.6</target>
				</configuration>
				<executions>
					<!-- extra compile step of domain classes before generator processing -->
					<execution>
						<id>compile-entities</id>
						<phase>generate-sources</phase>
						<goals>
							<goal>compile</goal>
						</goals>
						<configuration>
							<verbose>false</verbose>
							<fork>true</fork>
							<includes>
								<include>**/domain/*.java</include>
							</includes>
						</configuration>
					</execution>
				</executions>
			</plugin>
			<!--
				two phases: to generate generics (in generate-sources), then
				generate daos (in process-sources)
			-->
			<plugin>
				<groupId>net.sf.mardao</groupId>
				<artifactId>maven-mardao-plugin</artifactId>
				<version>1.0-SNAPSHOT</version>
				<executions>
					<execution>
						<id>generate-generics</id>
						<phase>generate-sources</phase>
						<goals>
							<goal>generate-sources</goal>
						</goals>
					</execution>
					<execution>
						<id>generate-daos</id>
						<phase>process-sources</phase>
						<goals>
							<goal>process-classes</goal>
						</goals>
					</execution>
				</executions>
				<configuration>
					<!--
						Templates are retreived from plugin jar by default:
						<templateFolder>C:/workspaces/Misc/eclipse/Scanner/src/main/resources</templateFolder>
					-->
					<basePackage>net.sf.mardao.test.basic</basePackage>
					<!--
						Scan here for entity classes:
						<classpathElement>target/entity-classes</classpathElement>
					-->
					<!--
						<additionalClasspathElements> <param>c:/develop</param>
						<param>h:/</param> </additionalClasspathElements>
					-->
					<!--
						Override default ${basePackage}.domain
						<domanBasePackage></domanBasePackage>
					-->
					<!--
						Override default ${basePackage}.dao
						<daoBasePackage></daoBasePackage>
					-->
					<!--
						default is transactions-optional:
						<persistenceUnitName>JpaPU2</persistenceUnitName>
					-->
					<!-- default is true: 
					<containerManagedEntityManager>false</containerManagedEntityManager> -->
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>build-helper-maven-plugin</artifactId>
				<version>1.5</version>
				<executions>
					<execution>
						<id>add-source</id>
						<phase>generate-sources</phase>
						<goals>
							<goal>add-source</goal>
						</goals>
						<configuration>
							<sources>
								<source>${basedir}/target/generated-sources/dao</source>
							</sources>
						</configuration>
					</execution>
				</executions>
			</plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-source-plugin</artifactId>
				<executions>
					<execution>
						<id>attach-sources</id>
						<goals>
							<goal>jar</goal>
						</goals>
					</execution>
				</executions>
			</plugin>

		</plugins>
	</build>

	<dependencies>
		<dependency>
			<groupId>commons-dbcp</groupId>
			<artifactId>commons-dbcp</artifactId>
			<version>1.2.2</version>
		</dependency>
		<dependency>
			<groupId>log4j</groupId>
			<artifactId>log4j</artifactId>
		</dependency>
		<dependency>
			<groupId>org.aspectj</groupId>
			<artifactId>aspectjweaver</artifactId>
			<version>1.6.2</version>
			<scope>compile</scope>
		</dependency>
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-context</artifactId>
			<version>${spring.version}</version>
			<scope>compile</scope>
		</dependency>
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-jdbc</artifactId>
			<version>${spring.version}</version>
			<scope>compile</scope>
		</dependency>
		<dependency>
			<groupId>org.apache.geronimo.specs</groupId>
			<artifactId>geronimo-jpa_3.0_spec</artifactId>
			<version>1.1.1</version>
		</dependency>
		<!--  Test scope dependencies: -->
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
		</dependency>
		<dependency>
			<groupId>mysql</groupId>
			<artifactId>mysql-connector-java</artifactId>
			<version>5.1.10</version>
			<scope>test</scope>
		</dependency>
	</dependencies>
</project>
Source: README, updated 2010-06-01