2 <!-- Generated by Apache Maven Doxia Site Renderer 1.6 at 2016-03-09 -->
3 <!-- Current: cpd.html -->
4 <!-- Active: project-reports.html -->
5 <!-- Path: [index.html, project-reports.html, cpd.html] -->
6 <!-- Skiplist: [index.html, configuration.html, create-mojo.html, drop-mojo.html, debugging.html, skip.html, force.html, pitfalls.html] -->
9 <title>juplo - Hibernate Maven Plugin - CPD</title>
10 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
11 <link rel="canonical" href="http://juplo.de/hibernate-maven-plugin/cpd.html"/>
12 <meta name="viewport" content="width=device-width, initial-scale=1" />
13 <link rel="stylesheet" type="text/css" href="/css/base.css" />
14 <style type="text/css">
15 @import '/css/screen.css' screen;
17 <script src="/js/prettify.js"></script>
19 <script src="/js/html5shiv.js"></script>
22 <link rel="stylesheet" type="text/css" href="/css/ie8.css" />
26 <body class="menu" onload="prettyPrint()">
27 <div id="page" class="cf">
29 <h1 id="logo"><a href="/" title="Home" class="l">juplo</a></h1>
30 <span id="slogan"><strong>Java</strong> bits from nerds for nerds</span>
34 <strong class="b title">You are here:</strong>
36 <li class="b"><a class="b" href="/">Home</a></li>
37 <li class="b"><a class="b" href="/projects.html">Projects</a></li>
38 <li class="b"><a class="b" href="./index.html">Hibernate Maven Plugin</a></li>
39 <li class="b"> <a href="project-reports.html" class="b" title="Project Reports">Project Reports</a>
41 <li class="b"><strong class="b">CPD</strong></li>
43 <a class="hide" href="#navigation">Jump to navigation</a>
46 <main class="content cf">
47 <article id="content" class="main">
48 <header><h1>CPD</h1></header>
50 <h2><a name="CPD_Results"></a>CPD Results</h2>
51 <p>The following document contains the results of PMD's <a class="externalLink" href="http://pmd.sourceforge.net/cpd.html">CPD</a> 5.2.3.</p></div>
53 <h2><a name="Duplications"></a>Duplications</h2>
54 <table border="0" class="bodyTable">
59 <td>de/juplo/plugins/hibernate/CreateMojo.java</td>
60 <td><a href="./xref/de/juplo/plugins/hibernate/CreateMojo.html#L35">35</a></td></tr>
62 <td>de/juplo/plugins/hibernate/DropMojo.java</td>
63 <td><a href="./xref/de/juplo/plugins/hibernate/DropMojo.html#L35">35</a></td></tr>
64 <tr class="b"><td colspan='2'>
66 <pre>public class CreateMojo extends AbstractSchemaMojo
71 * If the specified filename is not absolut, the file will be created
72 * relative to the project build directory
73 * (<code>project.build.directory</code>).
75 * @parameter property="hibernate.schema.export.create" default-value="create.sql"
78 private String outputFile;
82 public final void execute()
85 MojoExecutionException
87 super.execute(outputFile);
92 void build(MetadataImplementor metadata)
94 MojoExecutionException,
97 SchemaExport schemaExport = new SchemaExport(metadata, createNamespaces);
98 schemaExport.setDelimiter(delimiter);
99 schemaExport.setFormat(format);
101 File output = new File(outputFile);
103 if (!output.isAbsolute())
105 // Interpret relative file path relative to build directory
106 output = new File(buildDirectory, outputFile);
107 getLog().debug("Adjusted relative path, resulting path is " + output.getPath());
110 // Ensure that directory path for specified file exists
111 File outFileParentDir = output.getParentFile();
112 if (null != outFileParentDir && !outFileParentDir.exists())
116 getLog().info("Creating directory path for output file:" + outFileParentDir.getPath());
117 outFileParentDir.mkdirs();
121 getLog().error("Error creating directory path for output file: " + e.getLocalizedMessage());
125 schemaExport.setOutputFile(output.getPath());
126 schemaExport.execute(false, this.export, false, true);</pre></div></td></tr></table></div>
128 <div class="marginal">
131 <a id="navigation"></a>
132 <a class="hide" href="#top" title="Show Content">Jump back to the top of the page</a>
133 <h2 class="nav menu">Section-Menu</h2>
135 <li class="m blog"><a href="/blog/" class="m">Blog</a></li>
136 <li class="m projects"><a href="/projects.html" class="m selected">Projects</a></li>
137 <li class="m about"><a href="/about.html" class="m">About</a></li>
139 <h2 class="nav submenu">
140 <span class="s">Submenu for section</span>
141 <a class="s selected" href="/projects.html">Projects</a>
143 <ul id="submenu" class="s">
145 <a class="s selected" href="./index.html">Hibernate Maven Plugin</a>
148 <a href="configuration.html" class="s" title="Configuration Examples">Configuration Examples</a>
151 <a href="create-mojo.html" class="s" title="Goal: CREATE">Goal: CREATE</a>
154 <a href="drop-mojo.html" class="s" title="Goal: DROP">Goal: DROP</a>
157 <a href="debugging.html" class="s" title="Enable Debug-Output">Enable Debug-Output</a>
160 <a href="skip.html" class="s" title="Skipping Execution">Skipping Execution</a>
163 <a href="force.html" class="s" title="Force Exceution">Force Exceution</a>
166 <a href="pitfalls.html" class="s" title="Known Pitfalls (FAQ)">Known Pitfalls (FAQ)</a>
168 <li class="s sub off">
169 <a href="project-info.html" class="s" title="Project Information">Project Information</a>
172 <a href="project-reports.html" class="s selected" title="Project Reports">Project Reports</a>
173 <ul class="s active">
175 <a href="testapidocs/index.html" class="s" title="Test JavaDocs">Test JavaDocs</a>
178 <a href="apidocs/index.html" class="s" title="JavaDocs">JavaDocs</a>
181 <a href="xref/index.html" class="s" title="Source Xref">Source Xref</a>
184 <a href="xref-test/index.html" class="s" title="Test Source Xref">Test Source Xref</a>
187 <strong class="s">CPD</strong>
190 <a href="pmd.html" class="s" title="PMD">PMD</a>
193 <a href="plugin-info.html" class="s" title="Plugin Documentation">Plugin Documentation</a>
203 <a href="http://maven.apache.org/" title="Built by Maven" class="poweredBy">
204 <img class="poweredBy" alt="Built by Maven" src="./images/logos/maven-feather.png" />
211 <ul id="footerlinks">
212 <li class="f" id="copyright">© <strong>mo</strong> 2016
214 <li class="f"><a class="f" href="/impressum.html">Impressum</a></li>
215 <li class="f about"><a class="f" href="/about.html">About</a></li>
219 <script type="text/javascript"><!--//--><![CDATA[//><!--
220 var _gaq = _gaq || [];
221 _gaq.push(['_setAccount', 'UA-571104-3']);
222 _gaq.push(['_trackPageview']);
224 var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
225 ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
226 var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);