karaf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbono...@apache.org
Subject svn commit: r1688715 [16/23] - in /karaf/site/production/manual/latest: ./ commands/ developers-guide/ users-guide/
Date Wed, 01 Jul 2015 19:43:38 GMT
Modified: karaf/site/production/manual/latest/developers-guide/karaf-maven-plugin-features-validate-descriptor.html
URL: http://svn.apache.org/viewvc/karaf/site/production/manual/latest/developers-guide/karaf-maven-plugin-features-validate-descriptor.html?rev=1688715&r1=1688714&r2=1688715&view=diff
==============================================================================
--- karaf/site/production/manual/latest/developers-guide/karaf-maven-plugin-features-validate-descriptor.html (original)
+++ karaf/site/production/manual/latest/developers-guide/karaf-maven-plugin-features-validate-descriptor.html Wed Jul  1 19:43:35 2015
@@ -8,7 +8,7 @@
     <link href="../css/style.css" rel="stylesheet" type="text/css"/>
     <link href="../css/pygmentize.css" rel="stylesheet" type="text/css"/>
     <title>
-      Apache Karaf 3.0.3-SNAPSHOT Guides
+      Apache Karaf 4.0.1-SNAPSHOT Guides
     </title>
   </head>
   <body>
@@ -101,7 +101,7 @@
               </td>
               <td height="100%" width="100%">
                 <div class="wiki-content">
-<h2 id="Goalkaraffeaturesvalidatedescriptor">Goal <tt>karaf:features-validate-descriptor</tt></h2><p>The <tt>karaf:features-validate-descriptor</tt> goal validates a features XML descriptor by checking if all the required imports for the bundles defined in the features can be matched to a provided export.</p><p>By default, the plugin tries to add the Karaf core features (standard and enterprise) in the repositories set.<br/>It means that it's not required to explicitly define the Karaf features descriptor in the repository section of your features descriptor.</p><h3 id="Example">Example</h3><p>The example below validates the features defined in the <tt>target/features.xml</tt> by checking all the imports and exports.  It reads the definition for the packages that are exported by the system bundle from the <tt>src/main/resources/config.properties</tt> file.</p><div class="syntax"><div class="highlight"><pre><span class="nt">&lt;project&gt;</span>&#x000A;  <span class="nt">&lt;build&g
 t;</span>&#x000A;    <span class="nt">&lt;plugins&gt;</span>&#x000A;      <span class="nt">&lt;plugin&gt;</span>&#x000A;        <span class="nt">&lt;groupId&gt;</span>org.apache.karaf.tooling<span class="nt">&lt;/groupId&gt;</span>&#x000A;        <span class="nt">&lt;artifactId&gt;</span>karaf-maven-plugin<span class="nt">&lt;/artifactId&gt;</span>&#x000A;        <span class="nt">&lt;version&gt;</span>3.0.3-SNAPSHOT<span class="nt">&lt;/version&gt;</span>&#x000A;          <span class="nt">&lt;executions&gt;</span>&#x000A;            <span class="nt">&lt;execution&gt;</span>&#x000A;              <span class="nt">&lt;id&gt;</span>validate<span class="nt">&lt;/id&gt;</span>&#x000A;              <span class="nt">&lt;phase&gt;</span>process-resources<span class="nt">&lt;/phase&gt;</span>&#x000A;              <span class="nt">&lt;goals&gt;</span>&#x000A;                <span class="nt">&lt;goal&gt;</span>features-validate-descriptor<span class="nt">&lt;/goal&gt;</span>&#x000A;            
   <span class="nt">&lt;/goals&gt;</span>&#x000A;              <span class="nt">&lt;configuration&gt;</span>&#x000A;                <span class="nt">&lt;file&gt;</span>target/features.xml<span class="nt">&lt;/file&gt;</span>&#x000A;                <span class="nt">&lt;karafConfig&gt;</span>src/main/resources/config.properties<span class="nt">&lt;/karafConfig&gt;</span>&#x000A;              <span class="nt">&lt;/configuration&gt;</span>&#x000A;            <span class="nt">&lt;/execution&gt;</span>&#x000A;          <span class="nt">&lt;/executions&gt;</span>&#x000A;          <span class="nt">&lt;dependencies&gt;</span>&#x000A;            <span class="nt">&lt;dependency&gt;</span>&#x000A;              <span class="nt">&lt;groupId&gt;</span>org.slf4j<span class="nt">&lt;/groupId&gt;</span>&#x000A;              <span class="nt">&lt;artifactId&gt;</span>slf4j-simple<span class="nt">&lt;/artifactId&gt;</span>&#x000A;              <span class="nt">&lt;version&gt;</span>1.4.3<span class="nt">
 &lt;/version&gt;</span>&#x000A;	        <span class="nt">&lt;/dependency&gt;</span>&#x000A;          <span class="nt">&lt;/dependencies&gt;</span>&#x000A;        <span class="nt">&lt;/plugin&gt;</span>&#x000A;    <span class="nt">&lt;/plugins&gt;</span>&#x000A;  <span class="nt">&lt;/build&gt;</span>&#x000A;<span class="nt">&lt;/project&gt;</span>&#x000A;</pre></div>&#x000A;</div><h3 id="Parameters">Parameters</h3><div class="table-wrap"><table class="confluenceTable"><tr><th class="confluenceTh"> Name </th><th class="confluenceTh"> Type </th><th class="confluenceTh"> Description </th></tr><tr><td class="confluenceTd"> <tt>file</tt> </td><td class="confluenceTd"> <tt>File</tt> </td><td class="confluenceTd"> The features XML descriptor file to validate. <br/> Default value: <tt>/home/jbonofre/Workspace/karaf/manual/target/classes/features.xml</tt> </td></tr><tr><td class="confluenceTd"> <tt>karafConfig</tt> </td><td class="confluenceTd"> <tt>String</tt> </td><td class="confluenceTd">
  The Karaf <tt>config.properties</tt> file to use during the validation process <br/> Default value: <tt>config.properties</tt> </td></tr><tr><td class="confluenceTd"> <tt>jreVersion</tt> </td><td class="confluenceTd"> <tt>String</tt> </td><td class="confluenceTd"> The JRE version that is used during the validation process <br/> Default value: {{jre-1.5}) </td></tr><tr><td class="confluenceTd"> <tt>karafVersion</tt> </td><td class="confluenceTd"> <tt>String</tt> </td><td class="confluenceTd"> The target Karaf version used to get the Karaf core features (standard and enterprise) <br/> Default is the version of the plugin </td></tr><tr><td class="confluenceTd"> <tt>repositories</tt> </td><td class="confluenceTd"> <tt>String[]</tt> </td><td class="confluenceTd"> Additional features XML descriptors that will be used during the validation process </td></tr></table></div>
+<h2 id="Goalkaraffeaturesvalidatedescriptor">Goal <tt>karaf:features-validate-descriptor</tt></h2><p>The <tt>karaf:features-validate-descriptor</tt> goal validates a features XML descriptor by checking if all the required imports for the bundles defined in the features can be matched to a provided export.</p><p>By default, the plugin tries to add the Karaf core features (standard and enterprise) in the repositories set.<br/>It means that it's not required to explicitly define the Karaf features descriptor in the repository section of your features descriptor.</p><h3 id="Example">Example</h3><p>The example below validates the features defined in the <tt>target/features.xml</tt> by checking all the imports and exports.  It reads the definition for the packages that are exported by the system bundle from the <tt>src/main/resources/config.properties</tt> file.</p><div class="syntax"><div class="highlight"><pre><span class="nt">&lt;project&gt;</span>&#x000A;  <span class="nt">&lt;build&g
 t;</span>&#x000A;    <span class="nt">&lt;plugins&gt;</span>&#x000A;      <span class="nt">&lt;plugin&gt;</span>&#x000A;        <span class="nt">&lt;groupId&gt;</span>org.apache.karaf.tooling<span class="nt">&lt;/groupId&gt;</span>&#x000A;        <span class="nt">&lt;artifactId&gt;</span>karaf-maven-plugin<span class="nt">&lt;/artifactId&gt;</span>&#x000A;        <span class="nt">&lt;version&gt;</span>4.0.1-SNAPSHOT<span class="nt">&lt;/version&gt;</span>&#x000A;          <span class="nt">&lt;executions&gt;</span>&#x000A;            <span class="nt">&lt;execution&gt;</span>&#x000A;              <span class="nt">&lt;id&gt;</span>validate<span class="nt">&lt;/id&gt;</span>&#x000A;              <span class="nt">&lt;phase&gt;</span>process-resources<span class="nt">&lt;/phase&gt;</span>&#x000A;              <span class="nt">&lt;goals&gt;</span>&#x000A;                <span class="nt">&lt;goal&gt;</span>features-validate-descriptor<span class="nt">&lt;/goal&gt;</span>&#x000A;            
   <span class="nt">&lt;/goals&gt;</span>&#x000A;              <span class="nt">&lt;configuration&gt;</span>&#x000A;                <span class="nt">&lt;file&gt;</span>target/features.xml<span class="nt">&lt;/file&gt;</span>&#x000A;                <span class="nt">&lt;karafConfig&gt;</span>src/main/resources/config.properties<span class="nt">&lt;/karafConfig&gt;</span>&#x000A;              <span class="nt">&lt;/configuration&gt;</span>&#x000A;            <span class="nt">&lt;/execution&gt;</span>&#x000A;          <span class="nt">&lt;/executions&gt;</span>&#x000A;          <span class="nt">&lt;dependencies&gt;</span>&#x000A;            <span class="nt">&lt;dependency&gt;</span>&#x000A;              <span class="nt">&lt;groupId&gt;</span>org.slf4j<span class="nt">&lt;/groupId&gt;</span>&#x000A;              <span class="nt">&lt;artifactId&gt;</span>slf4j-simple<span class="nt">&lt;/artifactId&gt;</span>&#x000A;              <span class="nt">&lt;version&gt;</span>1.4.3<span class="nt">
 &lt;/version&gt;</span>&#x000A;	        <span class="nt">&lt;/dependency&gt;</span>&#x000A;          <span class="nt">&lt;/dependencies&gt;</span>&#x000A;        <span class="nt">&lt;/plugin&gt;</span>&#x000A;    <span class="nt">&lt;/plugins&gt;</span>&#x000A;  <span class="nt">&lt;/build&gt;</span>&#x000A;<span class="nt">&lt;/project&gt;</span>&#x000A;</pre></div>&#x000A;</div><h3 id="Parameters">Parameters</h3><div class="table-wrap"><table class="confluenceTable"><tr><th class="confluenceTh"> Name </th><th class="confluenceTh"> Type </th><th class="confluenceTh"> Description </th></tr><tr><td class="confluenceTd"> <tt>file</tt> </td><td class="confluenceTd"> <tt>File</tt> </td><td class="confluenceTd"> The features XML descriptor file to validate. <br/> Default value: <tt>/home/jbonofre/Workspace/karaf/manual/target/classes/features.xml</tt> </td></tr><tr><td class="confluenceTd"> <tt>karafConfig</tt> </td><td class="confluenceTd"> <tt>String</tt> </td><td class="confluenceTd">
  The Karaf <tt>config.properties</tt> file to use during the validation process <br/> Default value: <tt>config.properties</tt> </td></tr><tr><td class="confluenceTd"> <tt>jreVersion</tt> </td><td class="confluenceTd"> <tt>String</tt> </td><td class="confluenceTd"> The JRE version that is used during the validation process <br/> Default value: {{jre-1.5}) </td></tr><tr><td class="confluenceTd"> <tt>karafVersion</tt> </td><td class="confluenceTd"> <tt>String</tt> </td><td class="confluenceTd"> The target Karaf version used to get the Karaf core features (standard and enterprise) <br/> Default is the version of the plugin </td></tr><tr><td class="confluenceTd"> <tt>repositories</tt> </td><td class="confluenceTd"> <tt>String[]</tt> </td><td class="confluenceTd"> Additional features XML descriptors that will be used during the validation process </td></tr></table></div>
                 </div>
               </td>
             </tr>
@@ -121,7 +121,7 @@
         <td id="cell-3-2">
           <div id="footer">
             <div id="site-footer">
-              &copy; 2008-2011 The Apache Software Foundation
+              &copy; 2008-2014 The Apache Software Foundation
               <br/>
               Apache Karaf, Karaf, Apache, the Apache feather logo, and the Apache Karaf project logo are trademarks of The Apache Software Foundation.
             </div>

Modified: karaf/site/production/manual/latest/developers-guide/karaf-maven-plugin-instance-create-archive.html
URL: http://svn.apache.org/viewvc/karaf/site/production/manual/latest/developers-guide/karaf-maven-plugin-instance-create-archive.html?rev=1688715&r1=1688714&r2=1688715&view=diff
==============================================================================
--- karaf/site/production/manual/latest/developers-guide/karaf-maven-plugin-instance-create-archive.html (original)
+++ karaf/site/production/manual/latest/developers-guide/karaf-maven-plugin-instance-create-archive.html Wed Jul  1 19:43:35 2015
@@ -8,7 +8,7 @@
     <link href="../css/style.css" rel="stylesheet" type="text/css"/>
     <link href="../css/pygmentize.css" rel="stylesheet" type="text/css"/>
     <title>
-      Apache Karaf 3.0.3-SNAPSHOT Guides
+      Apache Karaf 4.0.1-SNAPSHOT Guides
     </title>
   </head>
   <body>
@@ -101,7 +101,7 @@
               </td>
               <td height="100%" width="100%">
                 <div class="wiki-content">
-<h2 id="Goalkarafinstancecreatearchive">Goal <tt>karaf:instance-create-archive</tt></h2><p>Normally this is run as part of the karaf-assembly packaging.</p><p>The <tt>karaf:instance-create-archive</tt> goal packages a Karaf instance archive from a given assembled instance.</p><p>Both tar.gz and zip formats are generated in the destination folder.</p><h3 id="Example">Example</h3><p>The example below create archives for the given Karaf instance:</p><div class="syntax"><div class="highlight"><pre><span class="nt">&lt;project&gt;</span>&#x000A;  <span class="nt">&lt;build&gt;</span>&#x000A;    <span class="nt">&lt;plugins&gt;</span>&#x000A;      <span class="nt">&lt;plugin&gt;</span>&#x000A;        <span class="nt">&lt;groupId&gt;</span>org.apache.karaf.tooling<span class="nt">&lt;/groupId&gt;</span>&#x000A;        <span class="nt">&lt;artifactId&gt;</span>karaf-maven-plugin<span class="nt">&lt;/artifactId&gt;</span>&#x000A;        <span class="nt">&lt;version&gt;</span>3.0.3-SNAPSHOT<s
 pan class="nt">&lt;/version&gt;</span>&#x000A;          <span class="nt">&lt;executions&gt;</span>&#x000A;            <span class="nt">&lt;execution&gt;</span>&#x000A;              <span class="nt">&lt;id&gt;</span>generate<span class="nt">&lt;/id&gt;</span>&#x000A;              <span class="nt">&lt;phase&gt;</span>package<span class="nt">&lt;/phase&gt;</span>&#x000A;              <span class="nt">&lt;goals&gt;</span>&#x000A;                <span class="nt">&lt;goal&gt;</span>instance-create-archive<span class="nt">&lt;/goal&gt;</span>&#x000A;              <span class="nt">&lt;/goals&gt;</span>&#x000A;              <span class="nt">&lt;configuration&gt;</span>&#x000A;                <span class="nt">&lt;destDir&gt;</span>/home/jbonofre/Workspace/karaf/manual/target<span class="nt">&lt;/destDir&gt;</span>&#x000A;                <span class="nt">&lt;targetServerDirectory&gt;</span>/home/jbonofre/Workspace/karaf/manual/target/assembly<span class="nt">&lt;/targetServerDirectory&gt;</spa
 n>&#x000A;                <span class="nt">&lt;targetFile&gt;</span>/home/jbonofre/Workspace/karaf/manual/pom.xml<span class="nt">&lt;/targetFile&gt;</span>&#x000A;              <span class="nt">&lt;/configuration&gt;</span>&#x000A;            <span class="nt">&lt;/execution&gt;</span>&#x000A;          <span class="nt">&lt;/executions&gt;</span>&#x000A;        <span class="nt">&lt;/plugin&gt;</span>&#x000A;    <span class="nt">&lt;/plugins&gt;</span>&#x000A;  <span class="nt">&lt;/build&gt;</span>&#x000A;<span class="nt">&lt;/project&gt;</span>&#x000A;</pre></div>&#x000A;</div><h3 id="Parameters">Parameters</h3><div class="table-wrap"><table class="confluenceTable"><tr><th class="confluenceTh"> Name </th><th class="confluenceTh"> Type </th><th class="confluenceTh"> Description </th></tr><tr><td class="confluenceTd"> <tt>destDir</tt> </td><td class="confluenceTd"> <tt>File</tt> </td><td class="confluenceTd"> The target directory of the project. <br/> Default value: /home/jbonofre/Wor
 kspace/karaf/manual/target </td></tr><tr><td class="confluenceTd"> <tt>targetServerDirectory</tt> </td><td class="confluenceTd"> <tt>File</tt> </td><td class="confluenceTd"> The location of the server repository. <br/> Default value: /home/jbonofre/Workspace/karaf/manual/target/assembly </td></tr><tr><td class="confluenceTd"> <tt>targetFile</tt> </td><td class="confluenceTd"> <tt>File</tt> </td><td class="confluenceTd"> The target file to set as the project's artifact. <br/> Default value: /home/jbonofre/Workspace/karaf/manual/pom.xml </td></tr></table></div>
+<h2 id="Goalkarafarchive">Goal <tt>karaf:archive</tt></h2><p>Normally this is run as part of the karaf-assembly packaging.</p><p>The <tt>karaf:archive</tt> goal packages a Karaf instance archive from a given assembled instance.</p><p>Both tar.gz and zip formats are generated in the destination folder.</p><h3 id="Example">Example</h3><p>The example below create archives for the given Karaf instance:</p><div class="syntax"><div class="highlight"><pre><span class="nt">&lt;project&gt;</span>&#x000A;  <span class="nt">&lt;build&gt;</span>&#x000A;    <span class="nt">&lt;plugins&gt;</span>&#x000A;      <span class="nt">&lt;plugin&gt;</span>&#x000A;        <span class="nt">&lt;groupId&gt;</span>org.apache.karaf.tooling<span class="nt">&lt;/groupId&gt;</span>&#x000A;        <span class="nt">&lt;artifactId&gt;</span>karaf-maven-plugin<span class="nt">&lt;/artifactId&gt;</span>&#x000A;        <span class="nt">&lt;version&gt;</span>4.0.1-SNAPSHOT<span class="nt">&lt;/version&gt;</span>&#x000A;
           <span class="nt">&lt;executions&gt;</span>&#x000A;            <span class="nt">&lt;execution&gt;</span>&#x000A;              <span class="nt">&lt;id&gt;</span>generate<span class="nt">&lt;/id&gt;</span>&#x000A;              <span class="nt">&lt;phase&gt;</span>package<span class="nt">&lt;/phase&gt;</span>&#x000A;              <span class="nt">&lt;goals&gt;</span>&#x000A;                <span class="nt">&lt;goal&gt;</span>archive<span class="nt">&lt;/goal&gt;</span>&#x000A;              <span class="nt">&lt;/goals&gt;</span>&#x000A;              <span class="nt">&lt;configuration&gt;</span>&#x000A;                <span class="nt">&lt;destDir&gt;</span>/home/jbonofre/Workspace/karaf/manual/target<span class="nt">&lt;/destDir&gt;</span>&#x000A;                <span class="nt">&lt;targetServerDirectory&gt;</span>/home/jbonofre/Workspace/karaf/manual/target/assembly<span class="nt">&lt;/targetServerDirectory&gt;</span>&#x000A;                <span class="nt">&lt;targetFile&gt;<
 /span>/home/jbonofre/Workspace/karaf/manual/pom.xml<span class="nt">&lt;/targetFile&gt;</span>&#x000A;              <span class="nt">&lt;/configuration&gt;</span>&#x000A;            <span class="nt">&lt;/execution&gt;</span>&#x000A;          <span class="nt">&lt;/executions&gt;</span>&#x000A;        <span class="nt">&lt;/plugin&gt;</span>&#x000A;    <span class="nt">&lt;/plugins&gt;</span>&#x000A;  <span class="nt">&lt;/build&gt;</span>&#x000A;<span class="nt">&lt;/project&gt;</span>&#x000A;</pre></div>&#x000A;</div><h3 id="Parameters">Parameters</h3><div class="table-wrap"><table class="confluenceTable"><tr><th class="confluenceTh"> Name </th><th class="confluenceTh"> Type </th><th class="confluenceTh"> Description </th></tr><tr><td class="confluenceTd"> <tt>destDir</tt> </td><td class="confluenceTd"> <tt>File</tt> </td><td class="confluenceTd"> The target directory of the project. <br/> Default value: /home/jbonofre/Workspace/karaf/manual/target </td></tr><tr><td class="confluence
 Td"> <tt>targetServerDirectory</tt> </td><td class="confluenceTd"> <tt>File</tt> </td><td class="confluenceTd"> The location of the server repository. <br/> Default value: /home/jbonofre/Workspace/karaf/manual/target/assembly </td></tr><tr><td class="confluenceTd"> <tt>targetFile</tt> </td><td class="confluenceTd"> <tt>File</tt> </td><td class="confluenceTd"> The target file to set as the project's artifact. <br/> Default value: /home/jbonofre/Workspace/karaf/manual/pom.xml </td></tr></table></div>
                 </div>
               </td>
             </tr>
@@ -121,7 +121,7 @@
         <td id="cell-3-2">
           <div id="footer">
             <div id="site-footer">
-              &copy; 2008-2011 The Apache Software Foundation
+              &copy; 2008-2014 The Apache Software Foundation
               <br/>
               Apache Karaf, Karaf, Apache, the Apache feather logo, and the Apache Karaf project logo are trademarks of The Apache Software Foundation.
             </div>

Modified: karaf/site/production/manual/latest/developers-guide/karaf-maven-plugin.html
URL: http://svn.apache.org/viewvc/karaf/site/production/manual/latest/developers-guide/karaf-maven-plugin.html?rev=1688715&r1=1688714&r2=1688715&view=diff
==============================================================================
--- karaf/site/production/manual/latest/developers-guide/karaf-maven-plugin.html (original)
+++ karaf/site/production/manual/latest/developers-guide/karaf-maven-plugin.html Wed Jul  1 19:43:35 2015
@@ -8,7 +8,7 @@
     <link href="../css/style.css" rel="stylesheet" type="text/css"/>
     <link href="../css/pygmentize.css" rel="stylesheet" type="text/css"/>
     <title>
-      Apache Karaf 3.0.3-SNAPSHOT Guides
+      Apache Karaf 4.0.1-SNAPSHOT Guides
     </title>
   </head>
   <body>
@@ -108,7 +108,7 @@
                 &lt;plugin>
                     &lt;groupId>org.apache.karaf.tooling&lt;/groupId>
                     &lt;artifactId>karaf-maven-plugin&lt;/artifactId>
-                    &lt;version>3.0.3-SNAPSHOT&lt;/version>
+                    &lt;version>4.0.1-SNAPSHOT&lt;/version>
                     &lt;extensions>true&lt;/extensions>
                 &lt;/plugin>
             &lt;/plugins>
@@ -122,7 +122,7 @@
     &lt;/build>
 </pre><p>Then specify the packaging in your project as usual, e.g.</p><pre>
     &lt;packaging>kar&lt;/packaging>
-</pre><div class="table-wrap"><table class="confluenceTable"><tr><th class="confluenceTh"> Packaging </th><th class="confluenceTh"> Description </th></tr><tr><td class="confluenceTd"> feature </td><td class="confluenceTd"> The feature packaging generates a features.xml descriptor using the <tt><a href="karaf-maven-plugin-features-generate-descriptor.html">karaf:features-generate-descriptor</a></tt> </td></tr><tr><td class="confluenceTd"> kar </td><td class="confluenceTd"> The kar packaging generates a features.xml descriptor using the <tt><a href="karaf-maven-plugin-features-generate-descriptor.html">karaf:features-generate-descriptor</a></tt> and then packages a kar using the <tt><a href="karaf-maven-plugin-features-create-kar.html">karaf:features-create-kar</a></tt> </td></tr><tr><td class="confluenceTd"> <tt><a href="custom-distribution.html">karaf-assembly</a></tt> </td><td class="confluenceTd"> Assembles a Karaf server based on the features descriptors and kar files listed as M
 aven dependencies. </td></tr></table></div><h2 id="Commandsgoals">Commands goals</h2><p>The <tt>karaf-maven-plugin</tt> is able to generate documentation for Karaf commands:</p><div class="table-wrap"><table class="confluenceTable"><tr><th class="confluenceTh"> Goal </th><th class="confluenceTh"> Description </th></tr><tr><td class="confluenceTd"> <tt><a href="karaf-maven-plugin-commands-generate-help.html">karaf:commands-generate-help</a></tt> </td><td class="confluenceTd"> Generates help for Karaf commands. </td></tr></table></div><h2 id="Featuresgoals">Features goals</h2><p>Normally you should use the features or kar packagings instead of these individual goals.<br/>The <tt>karaf-maven-plugin</tt> provides several goals to help you create and validate features XML descriptors as well as leverage your features to create a custom Karaf distribution.</p><div class="table-wrap"><table class="confluenceTable"><tr><th class="confluenceTh"> Goal </th><th class="confluenceTh"> Descriptio
 n </th></tr><tr><td class="confluenceTd"> <tt><a href="karaf-maven-plugin-features-generate-descriptor.html">karaf:features-generate-descriptor</a></tt> </td><td class="confluenceTd"> Generates a features XML descriptor for a set of bundles.  Used in feature and kar packagings. </td></tr><tr><td class="confluenceTd"> <tt><a href="karaf-maven-plugin-features-validate-descriptor.html">karaf:features-validate-descriptor</a></tt> </td><td class="confluenceTd"> Validate a features XML descriptor by checking if all the required imports can be matched to exports </td></tr><tr><td class="confluenceTd"> <tt><a href="karaf-maven-plugin-features-create-kar.html">karaf:features-create-kar</a></tt> </td><td class="confluenceTd"> Assemble a KAR archive from a features XML descriptor. Used in kar packaging.</td></tr></table></div><h2 id="Instancesanddistributionsgoals">Instances and distributions goals</h2><p>Normally you should use the karaf-assembly packaging instead of this individual goal.<br/
 >The <tt>karaf-maven-plugin</tt> helps you to build custom Karaf distributions or archives existing Karaf instances:</p><div class="table-wrap"><table class="confluenceTable"><tr><th class="confluenceTh"> Goal </th><th class="confluenceTh"> Description </th></tr><tr><td class="confluenceTd"> <tt>karaf:install-kars</tt> </td><td class="confluenceTd"> Assemble a server from Maven feature-repo and kar dependencies. Used in karaf-assembly packaging.  See <tt><a href="custom-distribution.html">karaf-assembly</a></tt>. </td></tr><tr><td class="confluenceTd"> <tt><a href="karaf-maven-plugin-instance-create-archive.html">karaf:instance-create-archive</a></tt> </td><td class="confluenceTd"> Package a server archive from an assembled server. . Used in karaf-assembly packaging.  See also <tt><a href="custom-distribution.html">karaf-assembly</a></tt>.</td></tr><tr><td class="confluenceTd"> <tt><a href="karaf-maven-plugin-features-add-to-repository.html">karaf:features-add-to-repository</a></tt>
  </td><td class="confluenceTd"> (old style manual assemblies) Copies all the bundles required for a given set of features into a directory <br/> (e.g. for creating your own Karaf-based distribution) </td></tr></table></div>
+</pre><div class="table-wrap"><table class="confluenceTable"><tr><th class="confluenceTh"> Packaging </th><th class="confluenceTh"> Description </th></tr><tr><td class="confluenceTd"> feature </td><td class="confluenceTd"> The feature packaging generates a features.xml descriptor using the <tt><a href="karaf-maven-plugin-features-generate-descriptor.html">karaf:features-generate-descriptor</a></tt> </td></tr><tr><td class="confluenceTd"> kar </td><td class="confluenceTd"> The kar packaging generates a features.xml descriptor using the <tt><a href="karaf-maven-plugin-features-generate-descriptor.html">karaf:features-generate-descriptor</a></tt> and then packages a kar using the <tt><a href="karaf-maven-plugin-features-create-kar.html">karaf:features-create-kar</a></tt> </td></tr><tr><td class="confluenceTd"> <tt><a href="custom-distribution.html">karaf-assembly</a></tt> </td><td class="confluenceTd"> Assembles a Karaf server based on the features descriptors and kar files listed as M
 aven dependencies. </td></tr></table></div><h2 id="Commandsgoals">Commands goals</h2><p>The <tt>karaf-maven-plugin</tt> is able to generate documentation for Karaf commands:</p><div class="table-wrap"><table class="confluenceTable"><tr><th class="confluenceTh"> Goal </th><th class="confluenceTh"> Description </th></tr><tr><td class="confluenceTd"> <tt><a href="karaf-maven-plugin-commands-generate-help.html">karaf:commands-generate-help</a></tt> </td><td class="confluenceTd"> Generates help for Karaf commands. </td></tr></table></div><h2 id="Featuresgoals">Features goals</h2><p>Normally you should use the features or kar packagings instead of these individual goals.<br/>The <tt>karaf-maven-plugin</tt> provides several goals to help you create and validate features XML descriptors as well as leverage your features to create a custom Karaf distribution.</p><div class="table-wrap"><table class="confluenceTable"><tr><th class="confluenceTh"> Goal </th><th class="confluenceTh"> Descriptio
 n </th></tr><tr><td class="confluenceTd"> <tt><a href="karaf-maven-plugin-features-generate-descriptor.html">karaf:features-generate-descriptor</a></tt> </td><td class="confluenceTd"> Generates a features XML descriptor for a set of bundles.  Used in feature and kar packagings. </td></tr><tr><td class="confluenceTd"> <tt><a href="karaf-maven-plugin-features-validate-descriptor.html">karaf:features-validate-descriptor</a></tt> </td><td class="confluenceTd"> Validate a features XML descriptor by checking if all the required imports can be matched to exports </td></tr><tr><td class="confluenceTd"> <tt><a href="karaf-maven-plugin-features-create-kar.html">karaf:kar</a></tt> </td><td class="confluenceTd"> Assemble a KAR archive from a features XML descriptor. Used in kar packaging.</td></tr></table></div><h2 id="Instancesanddistributionsgoals">Instances and distributions goals</h2><p>Normally you should use the karaf-assembly packaging instead of this individual goal.<br/>The <tt>karaf-m
 aven-plugin</tt> helps you to build custom Karaf distributions or archives existing Karaf instances:</p><div class="table-wrap"><table class="confluenceTable"><tr><th class="confluenceTh"> Goal </th><th class="confluenceTh"> Description </th></tr><tr><td class="confluenceTd"> <tt>karaf:assembly</tt> </td><td class="confluenceTd"> Assemble a server from Maven feature-repo and kar dependencies. Used in karaf-assembly packaging.  See <tt><a href="custom-distribution.html">karaf-assembly</a></tt>. </td></tr><tr><td class="confluenceTd"> <tt><a href="karaf-maven-plugin-instance-create-archive.html">karaf:archive</a></tt> </td><td class="confluenceTd"> Package a server archive from an assembled server. . Used in karaf-assembly packaging.  See also <tt><a href="custom-distribution.html">karaf-assembly</a></tt>.</td></tr><tr><td class="confluenceTd"> <tt><a href="karaf-maven-plugin-features-add-to-repository.html">karaf:features-add-to-repository</a></tt> </td><td class="confluenceTd"> (old
  style manual assemblies) Copies all the bundles required for a given set of features into a directory <br/> (e.g. for creating your own Karaf-based distribution) </td></tr></table></div>
                 </div>
               </td>
             </tr>
@@ -142,7 +142,7 @@
         <td id="cell-3-2">
           <div id="footer">
             <div id="site-footer">
-              &copy; 2008-2011 The Apache Software Foundation
+              &copy; 2008-2014 The Apache Software Foundation
               <br/>
               Apache Karaf, Karaf, Apache, the Apache feather logo, and the Apache Karaf project logo are trademarks of The Apache Software Foundation.
             </div>

Modified: karaf/site/production/manual/latest/developers-guide/scripting.html
URL: http://svn.apache.org/viewvc/karaf/site/production/manual/latest/developers-guide/scripting.html?rev=1688715&r1=1688714&r2=1688715&view=diff
==============================================================================
--- karaf/site/production/manual/latest/developers-guide/scripting.html (original)
+++ karaf/site/production/manual/latest/developers-guide/scripting.html Wed Jul  1 19:43:35 2015
@@ -8,7 +8,7 @@
     <link href="../css/style.css" rel="stylesheet" type="text/css"/>
     <link href="../css/pygmentize.css" rel="stylesheet" type="text/css"/>
     <title>
-      Apache Karaf 3.0.3-SNAPSHOT Guides
+      Apache Karaf 4.0.1-SNAPSHOT Guides
     </title>
   </head>
   <body>
@@ -113,7 +113,20 @@ hello world
 </pre><p>The () are execution quotes (like the backquotes when you use bash on Unix).</p><pre>
 karaf@root()> ($.context bundle 1) location
 mvn:org.apache.karaf.jaas/org.apache.karaf.jaas.modules/3.0.1-SNAPSHOT
-</pre><p>The <tt>$.context</tt> access the context variables in the current session.<br/>We access to the <tt>bundle</tt> variable (an array containing all bundles), and we want to display the bundle location for<br/>the bundle at the index 1 in the bundle array.</p><h2 id="Listmapspipesandclosures">List, maps, pipes and closures</h2><p>Using [], you can define array variable:</p><pre>
+</pre><p>The <tt>$.context</tt> access the context variables in the current session.<br/>We access to the <tt>bundle</tt> variable (an array containing all bundles), and we want to display the bundle location for<br/>the bundle at the index 1 in the bundle array.</p><h2 id="Expressions">Expressions</h2><p>The shell has a built-in expression parser.  Expressions must be enclosed with the <tt>%(...)</tt> syntax.</p><p>Examples:</p><pre>
+karaf@root()> %(1+2)
+3
+karaf@root()> a = 0
+0
+karaf@root()> %(a+=1)
+1
+karaf@root()> %(a+=1)
+2
+karaf@root()> b=1
+1
+karaf@root()> %(SQRT(a^2 + b^2))
+1.7320508
+</pre><h3 id="MathematicalOperators">Mathematical Operators</h3><div class="table-wrap"><table class="confluenceTable"><tr><th class="confluenceTh"> Operator </th><th class="confluenceTh"> Description </th></tr><tr><td class="confluenceTd"> + </td><td class="confluenceTd"> Additive operator </td></tr><tr><td class="confluenceTd"> - </td><td class="confluenceTd"> Subtraction operator </td></tr><tr><td class="confluenceTd"> * </td><td class="confluenceTd"> Multiplication operator </td></tr><tr><td class="confluenceTd"> / </td><td class="confluenceTd"> Division operator </td></tr><tr><td class="confluenceTd"> % </td><td class="confluenceTd"> Remainder operator (Modulo) </td></tr><tr><td class="confluenceTd"> ^ </td><td class="confluenceTd"> Power operator </td></tr></table></div><h3 id="BooleanOperators">Boolean Operators</h3><div class="table-wrap"><table class="confluenceTable"><tr><th class="confluenceTh"> Operator </th><th class="confluenceTh"> Description </th></tr><tr><td class="
 confluenceTd"> =    </td><td class="confluenceTd"> Equals </td></tr><tr><td class="confluenceTd"> ==   </td><td class="confluenceTd"> Equals </td></tr><tr><td class="confluenceTd"> !=   </td><td class="confluenceTd"> Not equals </td></tr><tr><td class="confluenceTd"> &lt;>   </td><td class="confluenceTd"> Not equals </td></tr><tr><td class="confluenceTd"> &lt;    </td><td class="confluenceTd"> Less than </td></tr><tr><td class="confluenceTd"> &lt;=   </td><td class="confluenceTd"> Less than or equal to </td></tr><tr><td class="confluenceTd"> >    </td><td class="confluenceTd"> Greater than </td></tr><tr><td class="confluenceTd"> >=   </td><td class="confluenceTd"> Greater than or equal to </td></tr><tr><td class="confluenceTd"> &amp;&amp;   </td><td class="confluenceTd"> Boolean and </td></tr><tr><td class="confluenceTd"> \</td><td class="confluenceTd">\</td></tr></table></div><h3 id="SupportedFunctions">Supported Functions</h3><div class="table-wrap"><table class="confluenceTable">
 <tr><th class="confluenceTh"> Function </th><th class="confluenceTh"> Description </th></tr><tr><td class="confluenceTd"> NOT(<em>expression</em>)             </td><td class="confluenceTd"> Boolean negation, 1 (means true) if the expression is not zero </td></tr><tr><td class="confluenceTd"> IF(<em>condition</em>,<em>value_if_true</em>,<em>value_if_false</em>) </td><td class="confluenceTd"> Returns one value if the condition evaluates to true or the other if it evaluates to false </td></tr><tr><td class="confluenceTd"> RANDOM()                      </td><td class="confluenceTd"> Produces a random number between 0 and 1 </td></tr><tr><td class="confluenceTd"> MIN(<em>e1</em>,<em>e2</em>)                </td><td class="confluenceTd"> Returns the smaller of both expressions </td></tr><tr><td class="confluenceTd"> MAX(<em>e1</em>,<em>e2</em>)                </td><td class="confluenceTd"> Returns the bigger of both expressions </td></tr><tr><td class="confluenceTd"> ABS(<em>expression</e
 m>)             </td><td class="confluenceTd"> Returns the absolute (non-negative) value of the expression </td></tr><tr><td class="confluenceTd"> ROUND(<em>expression</em>,precision) </td><td class="confluenceTd"> Rounds a value to a certain number of digits, uses the current rounding mode </td></tr><tr><td class="confluenceTd"> FLOOR(<em>expression</em>)           </td><td class="confluenceTd"> Rounds the value down to the nearest integer </td></tr><tr><td class="confluenceTd"> CEILING(<em>expression</em>)         </td><td class="confluenceTd"> Rounds the value up to the nearest integer </td></tr><tr><td class="confluenceTd"> LOG(<em>expression</em>)             </td><td class="confluenceTd"> Returns the natural logarithm (base e) of an expression </td></tr><tr><td class="confluenceTd"> SQRT(<em>expression</em>)            </td><td class="confluenceTd"> Returns the square root of an expression </td></tr><tr><td class="confluenceTd"> SIN(<em>expression</em>)             </td><td cl
 ass="confluenceTd"> Returns the trigonometric sine of an angle (in degrees) </td></tr><tr><td class="confluenceTd"> COS(<em>expression</em>)             </td><td class="confluenceTd"> Returns the trigonometric cosine of an angle (in degrees) </td></tr><tr><td class="confluenceTd"> TAN(<em>expression</em>)             </td><td class="confluenceTd"> Returns the trigonometric tangens of an angle (in degrees) </td></tr><tr><td class="confluenceTd"> SINH(<em>expression</em>)            </td><td class="confluenceTd"> Returns the hyperbolic sine of a value </td></tr><tr><td class="confluenceTd"> COSH(<em>expression</em>)            </td><td class="confluenceTd"> Returns the hyperbolic cosine of a value </td></tr><tr><td class="confluenceTd"> TANH(<em>expression</em>)            </td><td class="confluenceTd"> Returns the hyperbolic tangens of a value </td></tr><tr><td class="confluenceTd"> RAD(<em>expression</em>)             </td><td class="confluenceTd"> Converts an angle measured in degr
 ees to an approximately equivalent angle measured in radians </td></tr><tr><td class="confluenceTd"> DEG(<em>expression</em>)             </td><td class="confluenceTd"> Converts an angle measured in radians to an approximately equivalent angle measured in degrees </td></tr></table></div><p>Functions names are case insensitive.</p><h3 id="SupportedConstants">Supported Constants</h3><div class="table-wrap"><table class="confluenceTable"><tr><th class="confluenceTh"> Constant </th><th class="confluenceTh"> Description </th></tr><tr><td class="confluenceTd"> PI        </td><td class="confluenceTd"> The value of <em>PI</em>, exact to 100 digits </td></tr><tr><td class="confluenceTd"> TRUE      </td><td class="confluenceTd"> The value one </td></tr><tr><td class="confluenceTd"> FALSE     </td><td class="confluenceTd"> The value zero </td></tr></table></div><h2 id="Listmapspipesandclosures">List, maps, pipes and closures</h2><p>Using [], you can define array variable:</p><pre>
 karaf@root()> list = [1 2 a b]
 1
 2
@@ -144,7 +157,7 @@ i
 karaf@root> echo $inc
 ii
 karaf@root>
-</pre><h2 id="Builtinvariablesandcommands">Built-in variables and commands</h2><p>Apache Karaf console provides built-in variable very useful for scripting:</p><ul><li><tt>$args</tt> retrieves the list of script parameters, given to the closure being executed</li><li><tt>$1 .. $999</tt> retrieves the nth argument of the closure</li><li><tt>$it</tt> (same as <tt>$1</tt>) is used in a loop to access the current iterator value</li></ul><p>Apache Karaf console provides commands for scripting:</p><ul><li><tt>shell:if</tt></li><li><tt>shell:new</tt></li><li><tt>shell:each</tt></li><li>...</li></ul><h2 id="LeveragingexistingJavacapabilitiesviareflection">Leveraging existing Java capabilities (via reflection)</h2><p>Apache Karaf console supports loading and execution of Java classes.</p><p>The <tt>$karaf.lastException</tt> implicit variable contains the latest Exception thrown.</p><pre>
+</pre><h2 id="Builtinvariablesandcommands">Built-in variables and commands</h2><p>Apache Karaf console provides built-in variable very useful for scripting:</p><ul><li><tt>$args</tt> retrieves the list of script parameters, given to the closure being executed</li><li><tt>$1 .. $999</tt> retrieves the nth argument of the closure</li><li><tt>$it</tt> (same as <tt>$1</tt>) is used in a loop to access the current iterator value</li></ul><p>Apache Karaf console provides commands for scripting:</p><ul><li><tt>shell:if</tt></li><li><tt>shell:new</tt></li><li><tt>shell:each</tt></li><li>...</li></ul><p>See the <a href="../commands/commands.html">full list of <tt>shell</tt> commands</a>.</p><h2 id="LeveragingexistingJavacapabilitiesviareflection">Leveraging existing Java capabilities (via reflection)</h2><p>Apache Karaf console supports loading and execution of Java classes.</p><p>The <tt>$karaf.lastException</tt> implicit variable contains the latest Exception thrown.</p><pre>
 karaf@root()> ($.context bundle) loadClass foo
 Error executing command: foo not found by org.apache.karaf.shell.console [17]
 karaf@root()> $karaf.lastException printStackTrace
@@ -244,7 +257,7 @@ wait-for-command = {
         <td id="cell-3-2">
           <div id="footer">
             <div id="site-footer">
-              &copy; 2008-2011 The Apache Software Foundation
+              &copy; 2008-2014 The Apache Software Foundation
               <br/>
               Apache Karaf, Karaf, Apache, the Apache feather logo, and the Apache Karaf project logo are trademarks of The Apache Software Foundation.
             </div>



Mime
View raw message