Projekt-Dokumentation (Aktueller Stand von juplo.de) hinzugefĆ¼gt
[website] / dist / hibernate4-maven-plugin-1.1.0 / skip.html
1 <!DOCTYPE html>
2 <!-- Generated by Apache Maven Doxia Site Renderer 1.6 at 2015-09-08 -->
3                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           <!-- Current: skip.html -->
4 <!-- Active: index.html -->
5 <!-- Path: [index.html, skip.html] -->
6 <!-- Skiplist: [index.html, configuration.html, export-mojo.html, debugging.html, skip.html, force.html, pitfalls.html] -->
7 <html>
8   <head>
9     <title>juplo - Hibernate 4 Maven Plugin - Skipping Execution</title>
10     <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
11     <link rel="canonical" href="http://juplo.de/hibernate4-maven-plugin/skip.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;
16     </style>
17     <script src="/js/prettify.js"></script>
18     <!--[if lt IE 9]>
19       <script src="/js/html5shiv.js"></script>
20     <![endif]-->
21     <!--[if IE 8]>
22       <link rel="stylesheet" type="text/css" href="/css/ie8.css" />
23     <![endif]-->
24         <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
25   </head>
26   <body class="menu" onload="prettyPrint()">
27     <div id="page" class="cf">
28       <header id="header">
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>
31         <hr class="h" />
32       </header>
33       <div id="breadcrumb">
34         <strong class="b title">You are here:</strong>
35         <ol class="b">
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 4 Maven Plugin</a></li>
39                         <li class="b"><strong class="b">Skipping Execution</strong></li>
40                   </ol>
41         <a class="hide" href="#navigation">Jump to navigation</a>
42         <hr class="b" />
43       </div>
44       <main class="content cf">
45         <article id="content" class="main">
46           <header><h1>Skipping Execution</h1></header>
47           
48  
49  
50   
51 <p>
52   In most use-cases, the hibernate4-maven-plugin is used to create a
53   test-database automatically. In this use-cases, it is very likely, that it
54   will result in mistakes/errors, if the goal is executed, when the tests
55   are skipped.
56   For example, one might manually overwrite the database-url with the url of
57   the production-database, in order to run other tests, like starting a
58   local webserver with the
59   <a class="externalLink" href="http://wiki.eclipse.org/Jetty/Feature/Jetty_Maven_Plugin">jetty-maven-plugin</a>.
60   If the export-goal would be executed in such a scenario, it might erase the
61   hole production-database, which is not very desireable.
62   </p>
63   
64 <p>
65   Because of this, the configuration-parameter <tt>skip</tt> defaults to the value
66   of the proptery <tt>maven.test.skip</tt>. This way, the execution of the
67   hibernate4-maven-plugin is skipped automatically, when the tests are
68   skipped. Think of it as a build-in security-belt.
69   </p>
70   
71 <p>
72   If you do not like that, because you need the plugin to always execute the
73   export-goal, even if the tests are skipped you can configure that explicitly,
74   by setting the configuration-parameter <tt>skip</tt> to false:
75   </p>
76   
77 <div>
78 <pre class="prettyprint linenums lang-html">
79 &lt;plugin&gt;
80   &lt;groupId&gt;de.juplo&lt;/groupId&gt;
81   &lt;artifactId&gt;hibernate4-maven-plugin&lt;/artifactId&gt;
82   ...
83   &lt;configuration&gt;
84     &lt;skip&gt;false&lt;/skip&gt;
85   &lt;/configuration&gt;
86 &lt;/plugin&gt;</pre></div>
87   
88 <p>
89   Or, if you want the export-goal to be executed by default and to be skipped
90   if you say so, you can bind the value of the configuration-parameter
91   <tt>skip</tt> to a custom property. For example:
92   </p>
93   
94 <div>
95 <pre class="prettyprint linenums lang-html">
96 &lt;plugin&gt;
97   &lt;groupId&gt;de.juplo&lt;/groupId&gt;
98   &lt;artifactId&gt;hibernate4-maven-plugin&lt;/artifactId&gt;
99   ...
100   &lt;configuration&gt;
101     &lt;skip&gt;${foo.bar}&lt;/skip&gt;
102   &lt;/configuration&gt;
103 &lt;/plugin&gt;</pre></div>
104   
105 <p>
106   This way, the export-goal would be skipped, if you set the property
107   <tt>foo.bar</tt> to <tt>true</tt>. For example, if you specify <tt>-Dfoo.bar=true</tt>
108   on the command-line.
109   </p>
110  
111
112         </article>
113         <div class="marginal">
114           <nav id="nav">
115             <hr class="n" />
116             <a id="navigation"></a>
117             <a class="hide" href="#top" title="Show Content">Jump back to the top of the page</a>
118             <h2 class="nav menu">Section-Menu</h2>
119             <ul id="menu">
120               <li class="m blog"><a href="/blog/" class="m">Blog</a></li>
121               <li class="m projects"><a href="/projects.html" class="m selected">Projects</a></li>
122               <li class="m about"><a href="/about.html" class="m">About</a></li>
123             </ul>
124             <h2 class="nav submenu">
125               <span class="s">Submenu for section</span>
126               <a class="s selected" href="/projects.html">Projects</a>
127             </h2>
128             <ul id="submenu" class="s">
129                                                               <li class="s sub">
130                                           <a class="s selected" href="./index.html">Hibernate 4 Maven Plugin</a>
131                                         <ul class="s active">
132                                                                                                                                                                                                                                                           <li class="s">
133                     <a href="configuration.html" class="s" title="Configuration Examples">Configuration Examples</a>
134                 </li>
135                                                                                                                   <li class="s">
136                     <a href="export-mojo.html" class="s" title="Parameter Documentation">Parameter Documentation</a>
137                 </li>
138                                                                                                                   <li class="s">
139                     <a href="debugging.html" class="s" title="Enable Debug-Output">Enable Debug-Output</a>
140                 </li>
141                                                                                                                         <li class="s">
142               <strong class="s">Skipping Execution</strong>
143                 </li>
144                                                                                                                   <li class="s">
145                     <a href="force.html" class="s" title="Force Exceution">Force Exceution</a>
146                 </li>
147                                                                                                                   <li class="s">
148                     <a href="pitfalls.html" class="s" title="Known Pitfalls (FAQ)">Known Pitfalls (FAQ)</a>
149                 </li>
150                                                                                                                                                                                                                                                                                                                                                   <li class="s sub">
151                     <a href="project-info.html" class="s" title="Project Information">Project Information</a>
152                 </li>
153                                                                                                                                                                                                   <li class="s sub">
154                     <a href="project-reports.html" class="s" title="Project Reports">Project Reports</a>
155                 </li>
156                                                                                               </ul>
157                   </li>
158                                           </ul>
159             <hr class="n" />
160           </nav>
161           <aside class="m">
162             <a href="http://maven.apache.org/" title="Built by Maven" class="poweredBy">
163               <img class="poweredBy" alt="Built by Maven" src="./images/logos/maven-feather.png" />
164             </a>
165           </aside>
166         </div>
167       </main>
168       <footer id="footer">
169         <hr class="f" />
170         <ul id="footerlinks">
171           <li class="f" id="copyright">&#xa9; <strong>mo</strong>             2015
172       </li>
173           <li class="f"><a class="f" href="/impressum.html">Impressum</a></li>
174           <li class="f about"><a class="f" href="/about.html">About</a></li>
175         </ul>
176       </footer>
177     </div>
178         <script type="text/javascript"><!--//--><![CDATA[//><!--
179       var _gaq = _gaq || [];
180       _gaq.push(['_setAccount', 'UA-571104-3']);
181       _gaq.push(['_trackPageview']);
182       (function() {
183         var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
184         ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
185         var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
186       })();
187     //--><!]]>
188     </script>
189       </body>
190 </html>