diff --git a/Doc/Persist/topics.xml b/Doc/Persist/topics.xml index eea2e689e318f7ddc4ff8f87303dc27bbd90a73d..637b8883e54c4244caa6d7d3d6b7cae3fe5f6729 100644 --- a/Doc/Persist/topics.xml +++ b/Doc/Persist/topics.xml @@ -93,7 +93,7 @@ <orderedlist> <listitem> <para>Be sure to configure the <link - linkend="sd1SectUsingMaven">supplementary MI Maven + linkend="sd1SectUsingMavenEclipse">supplementary MI Maven archetypes</link> in your Eclipse IDE.</para> </listitem> diff --git a/Doc/Sd1/objectsClasses.xml b/Doc/Sd1/objectsClasses.xml index 56a4cc2716d68122d4febdd4e86b355c97158c58..9dc27cf2f0691c21aab3e040b16cb98deaefdaf4 100644 --- a/Doc/Sd1/objectsClasses.xml +++ b/Doc/Sd1/objectsClasses.xml @@ -9,16 +9,18 @@ xmlns:db="http://docbook.org/ns/docbook"> <title>Objects and Classes</title> - <section xml:id="sd1SectUsingMaven"> - <title>Preliminaries: Using <xref linkend="glo_Maven"/></title> + <section xml:id="sd1SectUsingMavenEclipse"> + <title>Preliminaries: Using <xref linkend="glo_Maven"/> in <xref + linkend="glo_Soft_Eclipse"/></title> <para>We extensively use <xref linkend="glo_Maven"/> both in the current and in subsequent lectures. <xref linkend="glo_Maven"/> in the first place is independent from Eclipse and other IDEs. Most IDEs however do provide - at least some level of Maven integration. Your Eclipse J2EE version ships - with full Maven integration. The Maven software itself is already - installed at MI and in the current lecture's VirtualBox image as - well.</para> + at least some level of Maven integration. The <link + xlink:href="http://www.eclipse.org/downloads/packages/eclipse-ide-java-ee-developers/mars2">Eclipse + J2EE version</link> ships with first class Maven support. The Maven + software itself is already installed at MI/Ubuntu and in the current + lecture's VirtualBox image as well.</para> <para>You may want to watch the introduction <quote xlink:href="https://www.youtube.com/watch?v=X8lu7Oi23YQ">Creating a Simple @@ -269,6 +271,169 @@ javac 1.8.0_66</programlisting> </section> </section> + <section xml:id="sd1SectUsingMavenShell"> + <title>Preliminaries: Using <xref linkend="glo_Maven"/> from a + shell</title> + + <para><xref linkend="glo_Soft_Eclipse"/> is actually not required for + <xref linkend="glo_Maven"/> based development. We may create <xref + linkend="glo_Maven"/> projects starting from a command prompt:</para> + + <programlisting language="none"><command>mvn</command> -e archetype:generate <co + linkends="sd1CalloutMavenCmdLine-1" + xml:id="sd1CalloutMavenCmdLine-1-co"/> -DarchetypeCatalog=https://maven.mi.hdm-stuttgart.de/archetype-catalog.xml <co + linkends="sd1CalloutMavenCmdLine-2" + xml:id="sd1CalloutMavenCmdLine-2-co"/>\ + -DarchetypeGroupId=de.hdm-stuttgart.mi -DarchetypeArtifactId=mi-maven-archetype-quickstart <co + linkends="sd1CalloutMavenCmdLine-3" + xml:id="sd1CalloutMavenCmdLine-3-co"/>\ + -DgroupId=my.base.url <co linkends="sd1CalloutMavenCmdLine-4" + xml:id="sd1CalloutMavenCmdLine-4-co"/> -DartifactId=gettingstarted <co + linkends="sd1CalloutMavenCmdLine-4" + xml:id="sd1CalloutMavenCmdLine-5-co"/> -Dversion=0.9 <co + linkends="sd1CalloutMavenCmdLine-6" + xml:id="sd1CalloutMavenCmdLine-6-co"/> -DinteractiveMode=false <co + linkends="sd1CalloutMavenCmdLine-7" + xml:id="sd1CalloutMavenCmdLine-7-co"/></programlisting> + + <calloutlist> + <callout arearefs="sd1CalloutMavenCmdLine-1-co" + xml:id="sd1CalloutMavenCmdLine-1"> + <para>Create a <xref linkend="glo_Maven"/> project using an + archetype.</para> + </callout> + + <callout arearefs="sd1CalloutMavenCmdLine-2-co" + xml:id="sd1CalloutMavenCmdLine-2"> + <para>Since our MI <xref linkend="glo_Maven"/> are not publicly + available we must indicate the archetype's repository <xref + linkend="glo_URL"/> explicitly.</para> + </callout> + + <callout arearefs="sd1CalloutMavenCmdLine-3-co" + xml:id="sd1CalloutMavenCmdLine-3"> + <para>The archetype's unique name within the repository.</para> + </callout> + + <callout arearefs="sd1CalloutMavenCmdLine-4-co sd1CalloutMavenCmdLine-5-co" + xml:id="sd1CalloutMavenCmdLine-4"> + <para>The parameters <property>archetypeGroupId</property> and + <property>archetypeArtifactId</property> will define e.g. the + generated project's default base package.</para> + </callout> + + <callout arearefs="sd1CalloutMavenCmdLine-6-co" + xml:id="sd1CalloutMavenCmdLine-6"> + <para>The generated project's version.</para> + </callout> + + <callout arearefs="sd1CalloutMavenCmdLine-7-co" + xml:id="sd1CalloutMavenCmdLine-7"> + <para>While generation the project <xref linkend="glo_Maven"/> shall + remain silent.</para> + </callout> + </calloutlist> + + <para>Entering the project allows for compiling, testing and installing. + The latter obviously is not very useful until a sensible implementation + has been added:</para> + + <glosslist> + <glossentry> + <glossterm><command>mvn</command> <option>compile</option> + </glossterm> + + <glossdef> + <programlisting language="none">goik@mi-ESPRIMO-P910 gettingstarted> mvn compile +[INFO] Scanning for projects... +[INFO] +[INFO] ------------------------------------------------------------------------ +[INFO] Building gettingstarted 0.9 +[INFO] ------------------------------------------------------------------------ +[INFO] +[INFO] --- maven-resources-plugin:2.3:resources (default-resources) @ gettingstarted --- +[INFO] Using 'UTF-8' encoding to copy filtered resources. +[INFO] Copying 1 resource +[INFO] +[INFO] --- maven-compiler-plugin:3.3:compile (default-compile) @ gettingstarted --- +[INFO] Nothing to compile - all classes are up to date +[INFO] ------------------------------------------------------------------------ +[INFO] BUILD SUCCESS +[INFO] ------------------------------------------------------------------------ +[INFO] Total time: 0.552s +[INFO] Finished at: Sun Apr 10 20:01:01 CEST 2016</programlisting> + </glossdef> + </glossentry> + + <glossentry> + <glossterm><command>mvn</command> <option>test</option></glossterm> + + <glossdef> + <programlisting language="none">goik@mi-ESPRIMO-P910 gettingstarted> mvn test +[INFO] Scanning for projects... +[INFO] ------------------------------------------------------------------------ +... +[INFO] Surefire report directory: /ma/goik/gettingstarted/target/surefire-reports + +------------------------------------------------------- + T E S T S +------------------------------------------------------- +Running my.base.url.AppTest +Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.045 sec + +Results : + +Tests run: 1, Failures: 0, Errors: 0, Skipped: 0 + +[INFO] ------------------------------------------------------------------------ +[INFO] BUILD SUCCESS +[INFO] ------------------------------------------------------------------------</programlisting> + </glossdef> + </glossentry> + + <glossentry> + <glossterm><command>mvn</command> <option>install</option></glossterm> + + <glossdef> + <programlisting language="none">goik@mi-ESPRIMO-P910 gettingstarted> mvn install +[INFO] Scanning for projects... +... +[INFO] +[INFO] --- maven-install-plugin:2.3:install (default-install) @ gettingstarted --- +[INFO] Installing .../<filename>gettingstarted-0.9.jar</filename> to /ma/goik/.m2/repository/my/base/url/gettingstarted/0.9/gettingstarted-0.9.jar</programlisting> + + <para>Notice the installation of + <filename>gettingstarted-0.9.jar</filename> to the user's local + <xref linkend="glo_Maven"/> cached repository.</para> + </glossdef> + </glossentry> + + <glossentry> + <glossterm><command>mvn</command> <option>clean</option></glossterm> + + <glossdef> + <programlisting language="none">goik@mi-ESPRIMO-P910 gettingstarted> mvn clean +[INFO] Scanning for projects... +[INFO] +[INFO] ------------------------------------------------------------------------ +[INFO] Building gettingstarted 0.9 +[INFO] ------------------------------------------------------------------------ +[INFO] +[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ gettingstarted --- +[INFO] Deleting /ma/goik/gettingstarted/target</programlisting> + + <para>This will effectively clean up all generated + <filename>*.class</filename> files. If you used to work on an <xref + linkend="glo_Soft_Eclipse"/> project you may want to use + <command>mvn</command> <option>clean eclipse:clean</option>. This + removes files like <filename>.project</filename> and + <filename>.classpath</filename> along with the + <filename>.settings</filename> subdirectory.</para> + </glossdef> + </glossentry> + </glosslist> + </section> + <section xml:id="sd1SectCreatingAnObject"> <title>Creating An Object</title> @@ -5374,7 +5539,7 @@ sin(4 * PI)=4518.2187229323445, difference=4518.2187229323445</programlisting> <m:mi>2</m:mi> - <m:mo> â¢</m:mo> + <m:mo>â¢</m:mo> <m:mi>Ï€</m:mi> </m:mrow> diff --git a/Doc/Sda1/sax.xml b/Doc/Sda1/sax.xml index 8f7b26453946e3400e904a111d0c52d31720dcf5..2a845fb096fbeda3e7a64bb1785133abd9819b8c 100644 --- a/Doc/Sda1/sax.xml +++ b/Doc/Sda1/sax.xml @@ -574,8 +574,8 @@ Closing Document <listitem> <para>The application is not aware of namespaces. Thus reading e.g. - <abbrev xlink:href="https://www.w3.org/Style/XSL">XSL</abbrev> document - instances will not allow to distinguish between elements from + <abbrev xlink:href="https://www.w3.org/Style/XSL">XSL</abbrev> + document instances will not allow to distinguish between elements from different namespaces like HTML.</para> </listitem> @@ -740,7 +740,8 @@ public class ElementCount { <para>You should start from the <xref linkend="glo_MIB"/> Maven archetype <code>mi-maven-archetype-sax</code>. Configuration hints - are available at <xref linkend="sd1SectUsingMaven"/>.</para> + are available at <xref + linkend="sd1SectUsingMavenEclipse"/>.</para> </question> <answer> diff --git a/Doc/lectures.xml b/Doc/lectures.xml index 0da0fd74c7e326306419fe1cdd270990928923b5..118b10a2d2ea3549c3c81c706bdf6727a908553f 100644 --- a/Doc/lectures.xml +++ b/Doc/lectures.xml @@ -8,7 +8,7 @@ xmlns:html="http://www.w3.org/1999/xhtml" xmlns:db="http://docbook.org/ns/docbook"> <info> - <title>kLecture notes</title> + <title>Lecture notes</title> <author> <personname