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