jena-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From build...@apache.org
Subject svn commit: r941552 - in /websites/staging/jena/trunk/content: ./ documentation/tools/schemagen-maven.html
Date Thu, 26 Feb 2015 15:20:40 GMT
Author: buildbot
Date: Thu Feb 26 15:20:39 2015
New Revision: 941552

Log:
Staging update by buildbot for jena

Modified:
    websites/staging/jena/trunk/content/   (props changed)
    websites/staging/jena/trunk/content/documentation/tools/schemagen-maven.html

Propchange: websites/staging/jena/trunk/content/
------------------------------------------------------------------------------
--- cms:source-revision (original)
+++ cms:source-revision Thu Feb 26 15:20:39 2015
@@ -1 +1 @@
-1662191
+1662479

Modified: websites/staging/jena/trunk/content/documentation/tools/schemagen-maven.html
==============================================================================
--- websites/staging/jena/trunk/content/documentation/tools/schemagen-maven.html (original)
+++ websites/staging/jena/trunk/content/documentation/tools/schemagen-maven.html Thu Feb 26
15:20:39 2015
@@ -152,28 +152,49 @@ names of RDF classes, properties and ind
 it can be used by IDE's such as Eclipse to provide name-completion for
 constants from the ontology.</p>
 <p>For some projects, invoking <code>schemagen</code> from the command
line, perhaps via <code>ant</code>,
-is sufficient. For projects organised around Apache maven, it would be convenient to integrate
-the schemagen translation step into maven's normal build process. This plugin
+is sufficient. For projects organised around Apache Maven, it would be convenient to integrate
+the schemagen translation step into Maven's normal build process. This plugin
 provides a means to do just that.</p>
 <h2 id="pre-requisites">Pre-requisites</h2>
-<p>This plugin adds a step to the maven build process to automatically translate RDFS
+<p>This plugin adds a step to the Maven build process to automatically translate RDFS
 and OWL files, encoded as RDF/XML, Turtle or N-triples into Java source files.
-This plugin is designed to be used with a Java project that is already using Apache maven
to
+This plugin is designed to be used with a Java project that is already using Apache Maven
to
 control the build. Non-Java projects do not need this tool. Projects that are
 not using Maven should see the <a href="schemagen.html">schemagen documentation</a>
 for ways to run <code>schemagen</code> from the command line.</p>
 <h2 id="installing">Installing</h2>
 <p>Schemagen is available from the maven central repository. To use it, add
 the following dependency to your <code>pom.xml</code>:</p>
-<div class="codehilite"><pre><span class="nt">&lt;dependency&gt;</span>
-  <span class="nt">&lt;groupId&gt;</span>org.apache.jena.tools<span
class="nt">&lt;/groupId&gt;</span>
-  <span class="nt">&lt;artifactId&gt;</span>schemagen<span class="nt">&lt;/artifactId&gt;</span>
-  <span class="nt">&lt;version&gt;</span>0.2-SNAPSHOT<span class="nt">&lt;/version&gt;</span>
-  <span class="nt">&lt;type&gt;</span>maven-plugin<span class="nt">&lt;/type&gt;</span>
-<span class="nt">&lt;/dependency&gt;</span>
+<div class="codehilite"><pre><span class="nt">&lt;build&gt;</span>
+  <span class="nt">&lt;plugins&gt;</span>
+    <span class="nt">&lt;plugin&gt;</span>
+      <span class="nt">&lt;groupId&gt;</span>org.apache.jena<span
class="nt">&lt;/groupId&gt;</span>
+      <span class="nt">&lt;artifactId&gt;</span>jena-maven-tools<span
class="nt">&lt;/artifactId&gt;</span>
+      <span class="nt">&lt;version&gt;</span>x.y.z<span class="nt">&lt;/version&gt;</span>
+      <span class="nt">&lt;executions&gt;</span>
+        <span class="nt">&lt;execution&gt;</span>
+          <span class="nt">&lt;id&gt;</span>schemagen<span class="nt">&lt;/id&gt;</span>
+          <span class="nt">&lt;goals&gt;</span>
+            <span class="nt">&lt;goal&gt;</span>translate<span class="nt">&lt;/goal&gt;</span>
+          <span class="nt">&lt;/goals&gt;</span>
+        <span class="nt">&lt;/execution&gt;</span>
+      <span class="nt">&lt;/executions&gt;</span>
+    <span class="nt">&lt;/plugin&gt;</span>
+  <span class="nt">&lt;/plugins&gt;</span>
+<span class="nt">&lt;/build&gt;</span>
+<span class="nt">&lt;dependencies&gt;</span>
+   <span class="nt">&lt;dependency&gt;</span>
+     <span class="nt">&lt;groupId&gt;</span>org.apache.jena<span class="nt">&lt;/groupId&gt;</span>
+     <span class="nt">&lt;artifactId&gt;</span>jena-core<span class="nt">&lt;/artifactId&gt;</span>
+     <span class="nt">&lt;version&gt;</span>x.y.z<span class="nt">&lt;/version&gt;</span>
+  <span class="nt">&lt;/dependency&gt;</span>
+<span class="nt">&lt;/dependencies&gt;</span>
 </pre></div>
 
 
+<p>Replace the <code>x.y.z</code> above with the latest versions as found
by
+browsing <a href="http://central.maven.org/maven2/org/apache/jena/jena-maven-tools/">jena-maven-tools</a>

+and <a href="http://central.maven.org/maven2/org/apache/jena/jena-core/">jena-core</a>
in Maven Central.</p>
 <h2 id="configuration-basic-principles">Configuration: basic principles</h2>
 <p>Schemagen supports a large number of options, controlling such things as the name
of the
 input file, the RDF namespace to expect, which Java package to place the output in and
@@ -187,14 +208,14 @@ been generated). So we need:</p>
 <li>a mechanism to specify common options for all input files</li>
 <li>a mechanism to specify per-file unique options</li>
 </ul>
-<p>In maven, all such configuration information is provided via the <code>pom.xml</code>
file. We tell
-maven to use the plugin via the <code>&lt;build&gt;/&lt;plugins&gt;</code>
section:</p>
+<p>In Maven, all such configuration information is provided via the <code>pom.xml</code>
file. We tell
+Maven to use the plugin via the <code>&lt;build&gt; &lt;plugins&gt;</code>
section:</p>
 <div class="codehilite"><pre><span class="nt">&lt;build&gt;</span>
   <span class="nt">&lt;plugins&gt;</span>
     <span class="nt">&lt;plugin&gt;</span>
-      <span class="nt">&lt;groupId&gt;</span>org.openjena.tools<span
class="nt">&lt;/groupId&gt;</span>
-      <span class="nt">&lt;artifactId&gt;</span>schemagen<span class="nt">&lt;/artifactId&gt;</span>
-      <span class="nt">&lt;version&gt;</span>0.2-SNAPSHOT<span class="nt">&lt;/version&gt;</span>
+      <span class="nt">&lt;groupId&gt;</span>org.apache.jena<span
class="nt">&lt;/groupId&gt;</span>
+      <span class="nt">&lt;artifactId&gt;</span>jena-maven-tools<span
class="nt">&lt;/artifactId&gt;</span>
+      <span class="nt">&lt;version&gt;</span>x.y.z<span class="nt">&lt;/version&gt;</span>
       <span class="nt">&lt;configuration&gt;</span>
       <span class="nt">&lt;/configuration&gt;</span>
       <span class="nt">&lt;executions&gt;</span>
@@ -211,6 +232,9 @@ maven to use the plugin via the <code>&l
 </pre></div>
 
 
+<p>Replace the <code>x.y.z</code> above with the latest versions as found
by
+browsing <a href="http://central.maven.org/maven2/org/apache/jena/jena-maven-tools/">jena-maven-tools</a>

+ in Maven Central.</p>
 <p>The configuration options all nest inside the <code>&lt;configuration&gt;</code>
section.</p>
 <h3 id="specifying-files-to-process">Specifying files to process</h3>
 <p>An <code>&lt;include&gt;</code> directive specifies one file
pattern to include in the set of
@@ -227,7 +251,7 @@ in <code>src/main/vocabs</code>:</p>
 <h3 id="specifying-processing-options">Specifying processing options</h3>
 <p>Options are, in general, given in the <code>&lt;fileOptions&gt;</code>
section. A given
 <code>&lt;source&gt;</code> refers to one input source - one file - as
named by the
-`<input> name. The actual option names are taken from the RDF <a href="http://jena.apache.org/documentation/tools/schemagen.html">config
+<code>&lt;input&gt;</code> name. The actual option names are taken from
the RDF <a href="http://jena.apache.org/documentation/tools/schemagen.html">config
 file property names</a>,
 omitting the namespace:</p>
 <div class="codehilite"><pre>      <span class="nt">&lt;fileOptions&gt;</span>
@@ -250,40 +274,50 @@ across all input sources:</p>
 
 
 <h2 id="example-configuration">Example configuration</h2>
+<p><strong>Note:</strong> Replace the <code>x.y.z</code> below
with the latest versions as found by
+browsing <a href="http://central.maven.org/maven2/org/apache/jena/jena-maven-tools/">jena-maven-tools</a>

+and <a href="http://central.maven.org/maven2/org/apache/jena/jena-core/">jena-core</a>
in Maven Central.</p>
 <div class="codehilite"><pre><span class="nt">&lt;build&gt;</span>
-  <span class="nt">&lt;plugins&gt;</span>
-    <span class="nt">&lt;plugin&gt;</span>
-      <span class="nt">&lt;groupId&gt;</span>org.openjena.tools<span
class="nt">&lt;/groupId&gt;</span>
-      <span class="nt">&lt;artifactId&gt;</span>schemagen<span class="nt">&lt;/artifactId&gt;</span>
-      <span class="nt">&lt;version&gt;</span>0.2-SNAPSHOT<span class="nt">&lt;/version&gt;</span>
-      <span class="nt">&lt;configuration&gt;</span>
-        <span class="nt">&lt;includes&gt;</span>
-          <span class="nt">&lt;include&gt;</span>src/main/vocabs/*.ttl<span
class="nt">&lt;/include&gt;</span>
-          <span class="nt">&lt;include&gt;</span>src/main/vocabs/foaf.rdf<span
class="nt">&lt;/include&gt;</span>
-        <span class="nt">&lt;/includes&gt;</span>
-        <span class="nt">&lt;fileOptions&gt;</span>
-          <span class="nt">&lt;source&gt;</span>
-            <span class="nt">&lt;input&gt;</span>default<span class="nt">&lt;/input&gt;</span>
-            <span class="nt">&lt;package-name&gt;</span>org.example.test<span
class="nt">&lt;/package-name&gt;</span>
-          <span class="nt">&lt;/source&gt;</span>
-          <span class="nt">&lt;source&gt;</span>
-            <span class="c">&lt;!-- Test2.java (only) will contain OntModel declarations
--&gt;</span>
-            <span class="nt">&lt;input&gt;</span>src/main/vocabs/demo2.ttl<span
class="nt">&lt;/input&gt;</span>
-            <span class="nt">&lt;ontology&gt;</span>true<span class="nt">&lt;/ontology&gt;</span>
-          <span class="nt">&lt;/source&gt;</span>
-        <span class="nt">&lt;/fileOptions&gt;</span>
-      <span class="nt">&lt;/configuration&gt;</span>
-      <span class="nt">&lt;executions&gt;</span>
-        <span class="nt">&lt;execution&gt;</span>
-          <span class="nt">&lt;id&gt;</span>schemagen<span class="nt">&lt;/id&gt;</span>
-          <span class="nt">&lt;goals&gt;</span>
-            <span class="nt">&lt;goal&gt;</span>translate<span class="nt">&lt;/goal&gt;</span>
-          <span class="nt">&lt;/goals&gt;</span>
-        <span class="nt">&lt;/execution&gt;</span>
-      <span class="nt">&lt;/executions&gt;</span>
+ <span class="nt">&lt;plugins&gt;</span>
+  <span class="nt">&lt;plugin&gt;</span>
+    <span class="nt">&lt;groupId&gt;</span>org.apache.jena<span class="nt">&lt;/groupId&gt;</span>
+    <span class="nt">&lt;artifactId&gt;</span>jena-maven-tools<span
class="nt">&lt;/artifactId&gt;</span>
+    <span class="nt">&lt;version&gt;</span>x.y.z<span class="nt">&lt;/version&gt;</span>
+    <span class="nt">&lt;configuration&gt;</span>
+      <span class="nt">&lt;includes&gt;</span>
+        <span class="nt">&lt;include&gt;</span>src/main/vocabs/*.ttl<span
class="nt">&lt;/include&gt;</span>
+        <span class="nt">&lt;include&gt;</span>src/main/vocabs/foaf.rdf<span
class="nt">&lt;/include&gt;</span>
+      <span class="nt">&lt;/includes&gt;</span>
+      <span class="nt">&lt;fileOptions&gt;</span>
+        <span class="nt">&lt;source&gt;</span>
+          <span class="nt">&lt;input&gt;</span>default<span class="nt">&lt;/input&gt;</span>
+          <span class="nt">&lt;package-name&gt;</span>org.example.test<span
class="nt">&lt;/package-name&gt;</span>
+        <span class="nt">&lt;/source&gt;</span>
+        <span class="nt">&lt;source&gt;</span>
+          <span class="c">&lt;!-- Test2.java (only) will contain OntModel declarations
--&gt;</span>
+          <span class="nt">&lt;input&gt;</span>src/main/vocabs/demo2.ttl<span
class="nt">&lt;/input&gt;</span>
+          <span class="nt">&lt;ontology&gt;</span>true<span class="nt">&lt;/ontology&gt;</span>
+        <span class="nt">&lt;/source&gt;</span>
+      <span class="nt">&lt;/fileOptions&gt;</span>
+    <span class="nt">&lt;/configuration&gt;</span>
+    <span class="nt">&lt;executions&gt;</span>
+     <span class="nt">&lt;execution&gt;</span>
+      <span class="nt">&lt;id&gt;</span>schemagen<span class="nt">&lt;/id&gt;</span>
+       <span class="nt">&lt;goals&gt;</span>
+        <span class="nt">&lt;goal&gt;</span>translate<span class="nt">&lt;/goal&gt;</span>
+       <span class="nt">&lt;/goals&gt;</span>
+      <span class="nt">&lt;/execution&gt;</span>
+     <span class="nt">&lt;/executions&gt;</span>
     <span class="nt">&lt;/plugin&gt;</span>
-  <span class="nt">&lt;/plugins&gt;</span>
-<span class="nt">&lt;/build&gt;</span>
+   <span class="nt">&lt;/plugins&gt;</span>
+  <span class="nt">&lt;/build&gt;</span>
+  <span class="nt">&lt;dependencies&gt;</span>
+    <span class="nt">&lt;dependency&gt;</span>
+     <span class="nt">&lt;groupId&gt;</span>org.apache.jena<span class="nt">&lt;/groupId&gt;</span>
+     <span class="nt">&lt;artifactId&gt;</span>jena-core<span class="nt">&lt;/artifactId&gt;</span>
+     <span class="nt">&lt;version&gt;</span>x.y.z<span class="nt">&lt;/version&gt;</span>
+    <span class="nt">&lt;/dependency&gt;</span>
+  <span class="nt">&lt;/dependencies&gt;</span>
 </pre></div>
   </div>
 </div>



Mime
View raw message