<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://protegewiki.stanford.edu/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Johner</id>
		<title>Protege Wiki - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="https://protegewiki.stanford.edu/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Johner"/>
		<link rel="alternate" type="text/html" href="https://protegewiki.stanford.edu/wiki/Special:Contributions/Johner"/>
		<updated>2026-04-09T16:24:13Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.27.7</generator>

	<entry>
		<id>https://protegewiki.stanford.edu/index.php?title=Stanford:DeveloperGuide&amp;diff=10069</id>
		<title>Stanford:DeveloperGuide</title>
		<link rel="alternate" type="text/html" href="https://protegewiki.stanford.edu/index.php?title=Stanford:DeveloperGuide&amp;diff=10069"/>
				<updated>2011-06-05T08:47:51Z</updated>
		
		<summary type="html">&lt;p&gt;Johner: /* Maven */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=In a nutshell=&lt;br /&gt;
You work as you typically work just using Eclipse to develop and test. There are only a few things you need to consider:&lt;br /&gt;
* The initial setup of your Eclipse project is done with Maven.&lt;br /&gt;
* Prefer TestNG over JUnit in order to write unit tests.&lt;br /&gt;
* We encourage you to write UI tests using the Selenium framework.&lt;br /&gt;
* We encourage you to deploy your artifacts not just to the file system (local Maven repository) but also to the central Nexus repository, at least if you have the privileges to do so.&lt;br /&gt;
&lt;br /&gt;
And don’t forget to update and commit to/from on a daily basis.&lt;br /&gt;
&lt;br /&gt;
=How to start from scratch=&lt;br /&gt;
==Downloads and Installs==&lt;br /&gt;
[[Image:eclipse-jdk.png|thumb|Use the JDK instead of the JRE]]&lt;br /&gt;
===JAVA===&lt;br /&gt;
* Download and install java. &lt;br /&gt;
* Set environment setting &amp;lt;tt&amp;gt;JAVA_HOME&amp;lt;/tt&amp;gt; pointing to the java folder, e.g. &amp;lt;tt&amp;gt;C:\Program Files\Java\jdk1.6.0_21\bin&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===Maven===&lt;br /&gt;
* Download Maven from http://maven.apache.org/download.html und chose apache-maven-2.2.1.&lt;br /&gt;
* Add system environment variable M2_HOME pointing to new directory apache-maven-2.2.1&lt;br /&gt;
* Add to Path &amp;lt;tt&amp;gt;;%M2_HOME%\bin&amp;lt;/tt&amp;gt;&lt;br /&gt;
* Modify &amp;lt;tt&amp;gt;/conf/settings.xml&amp;lt;/tt&amp;gt;: Path to Nexus and you operating system. There is an [[Stanford:SettingsXmlExample|example page for a settings file]].&lt;br /&gt;
&lt;br /&gt;
If you update to Maven 3, there is no need to update the scripts (pom.xml).&lt;br /&gt;
&lt;br /&gt;
===Eclipse===&lt;br /&gt;
* Download, extract and start eclipse&lt;br /&gt;
* Install subclipse plugin (update site is http://subclipse.tigris.org/update_1.6.x). Check all options, otherwise the SCM handler of Maven will be missing.&lt;br /&gt;
* Install GWT plusing (update site is http://dl.google.com/eclipse/plugin/3.6) with Helios 3.6, otherwise 3.5&lt;br /&gt;
* Install m2eclipse plugin (Update site is http://m2eclipse.sonatype.org/sites/m2e) &lt;br /&gt;
* Optional: Install m2eclipse extra plugin (Update site is http://m2eclipse.sonatype.org/sites/m2e-extras). Select Maven SCM handler for Subclipse and Maven SCM integration.&lt;br /&gt;
* Let Eclipse know the location of your installed JDK (nor JRE!) &lt;br /&gt;
* Start Eclipse with JDK (not JRE!) as described in http://help.eclipse.org/help33/index.jsp?topic=/org.eclipse.platform.doc.user/tasks/running_eclipse.htm. Example: &lt;br /&gt;
   &amp;quot;C:\Program Files\eclipse-jee-helios-SR1-win32\eclipse\eclipse.exe&amp;quot; -vm &amp;quot;C:\Programme\Java\jdk1.6.0_21\bin\javaw.exe&amp;quot; &lt;br /&gt;
&lt;br /&gt;
===Firefox &amp;amp; GWT plugin (only for GWT UI testing)===&lt;br /&gt;
After download and install of Firefox we recommend adding a new profile. Rationale: Selenium typically initiates a new Firefox profile which is missing the GWT Firefox plugin. Therefore we generate a new one:&lt;br /&gt;
* Open command window and go to Firefox directory &lt;br /&gt;
* Execute firefox -P. Plugin manager shows up.&lt;br /&gt;
* Add new profile and chose a directory, e.g. one Protégé related. &lt;br /&gt;
* Start Firefox and start eclipse. Open page http://127.0.0.1:8888/WebProtege.html?gwt.codesvr=127.0.0.1:9997. This prompts you to install the GWT plugin.&lt;br /&gt;
* Save the profile&lt;br /&gt;
&lt;br /&gt;
===Selenium (only for GWT UI testing)===&lt;br /&gt;
Please refer to chapter in section administration. TODO add link.&lt;br /&gt;
&lt;br /&gt;
Start server with &amp;lt;tt&amp;gt;java –jar selenium-server.jar -firefoxProfileTemplate &amp;lt;Path2Profile&amp;gt;&amp;lt;/tt&amp;gt;. &amp;lt;Path2Profile&amp;gt; is the folder you were choosing when creating the new profile. &lt;br /&gt;
&lt;br /&gt;
Example: &lt;br /&gt;
&lt;br /&gt;
  C:\Users\DrCJ\selenium-server-1.0.3&amp;gt;java -jar selenium-server.jar  -firefoxProfileTemplate c:\Users\DrCJ\firefoxprofile&lt;br /&gt;
&lt;br /&gt;
==Start working with a project e.g. with Protégé==&lt;br /&gt;
===Option 1: import project using Subclipse (preferred)===&lt;br /&gt;
Pretty straight forward&lt;br /&gt;
* Import project from repository using Subclipse.&lt;br /&gt;
**	File  &amp;gt; Import &amp;gt; SVN &amp;gt; SVN Projects. Import desired project and branch.&lt;br /&gt;
**	Use “Create Project wizard”, use “Next” instead of “Finish” button and add a new source folder “src/main/java” and remove “src” from build path. &lt;br /&gt;
**	Copy imported files from src to “src/main/java” folder. There will be problems, since libraries are missing. Do not tweak build path, this will be done automatically in the next step.&lt;br /&gt;
* Execute mvn eclipse:eclipse from command line&lt;br /&gt;
* Refresh project (F5)&lt;br /&gt;
&lt;br /&gt;
To update classpath (e.g. if there is a new jar (as defined in the pom.xml)) just repeat these steps.&lt;br /&gt;
&lt;br /&gt;
If there are still libraries missing (which are obviously defined in your pom.xml), please consult with your project manager or upload the artifacts to the respository as described in the project manager guide.&lt;br /&gt;
&lt;br /&gt;
[[Media:Import-Project.flv|import project using Subclipse (video tutorial)]]&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
| [[Image:eclipse-checkout-maven.png|thumb|upright|alt=Maven can be used to check out the project|Maven can be used to check out the project]]&lt;br /&gt;
| [[Image:eclipse-import-project.png|thumb|upright|alt=Or use SVN to download. Then call mvn eclipse:eclipse and import project|Or use SVN to download. Then call mvn eclipse:eclipse and import project]]&lt;br /&gt;
| [[Image:eclipse-gwt.png|thumb|upright|alt=make project to become a GWT project|make project to become a GWT project]]&lt;br /&gt;
| [[Image:eclipse-gwt-2.png|thumb|upright|alt=Set the webapp folder for the GWT compiled code|Set the webapp folder for the GWT compiled code]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Option 2: import project from command line (using a SVN client)===&lt;br /&gt;
* Download project  from repository with Tortoise or other (command line based) SVN client&lt;br /&gt;
* Execute mvn eclipse:eclipse from command line&lt;br /&gt;
* Refresh project (F5)&lt;br /&gt;
&lt;br /&gt;
To update classpath (e.g. if there is a new pom.xml) just repeat these steps.&lt;br /&gt;
&lt;br /&gt;
===Option 3: using the m2eclipse plugin===&lt;br /&gt;
Chose “Project” from the “File” menu, select Maven and then “Checkout maven Projects from SCM”.&lt;br /&gt;
 &lt;br /&gt;
===Configure GWT plugin===&lt;br /&gt;
* Select Project Properties and check under Google “Use Google App Engine”&lt;br /&gt;
* In project properties set plugin as active and change WAR directory to be /src/main/webapp (there is no longer a /war directory!)&lt;br /&gt;
&lt;br /&gt;
=Questions that may arise during development=&lt;br /&gt;
==How do I work with multiple projects in parallel==&lt;br /&gt;
To given an example: We work with projects A and B where B depends on A. (An example would be A = Protégé, B = WebProtégé.) &lt;br /&gt;
&lt;br /&gt;
Assuming you would like to make a change to project A which is required to continue working with project B:&lt;br /&gt;
&lt;br /&gt;
# Make the change in project A&lt;br /&gt;
# Go to the command line in project A's directory (e.g. in &amp;lt;tt&amp;gt;/home/&amp;lt;USER_NAME&amp;gt;/workspace/projectA&amp;lt;/tt&amp;gt;) and enter &amp;lt;tt&amp;gt;mvn install&amp;lt;/tt&amp;gt; [1], [2]. This will update your local Maven repository (M2_REPO) which typically is located in &amp;lt;tt&amp;gt;/home/.m2/repository&amp;lt;/tt&amp;gt; respectively in &amp;lt;tt&amp;gt;c:\user\&amp;lt;username&amp;gt;\.m2\repository&amp;lt;/tt&amp;gt;. [1]&lt;br /&gt;
# Go to the command line of project B and enter &amp;lt;tt&amp;gt;mvn eclipse:eclipse&amp;lt;/tt&amp;gt; [2]. This will update the classpath and (re)load the artifact of project A.&lt;br /&gt;
# Continue developing in project B.&lt;br /&gt;
&lt;br /&gt;
Actually there are two variants:&lt;br /&gt;
# Variant 1: you do not change the version number of the artifact of project A. In this case you do not have to modify the version number in project A's pom.xml. This is an advantage, another advantage is that you do not need to update the dependency section in the pom.xml of project B.&lt;br /&gt;
# Variant 2: you change the version number of the artifact of project A in the project A' pom.xml. This requires that you update the version in the dependency section in project B's pom.xml. The advantage of this variant is that you easily can switch back to the old version of project A's artifact, you even can have multiple versions in your repository.&lt;br /&gt;
&lt;br /&gt;
The dependency section in the pom.xml the text above is refering to looks like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;dependency&amp;gt;&lt;br /&gt;
    &amp;lt;groupId&amp;gt;protege&amp;lt;/groupId&amp;gt;&lt;br /&gt;
    &amp;lt;artifactId&amp;gt;protege-core&amp;lt;/artifactId&amp;gt;&lt;br /&gt;
    &amp;lt;version&amp;gt;3.4.2&amp;lt;/version&amp;gt;&lt;br /&gt;
  &amp;lt;/dependency&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[1]: If you want to skip the unit tests use &amp;lt;tt&amp;gt;mvn install -DskipTests=true&amp;lt;/tt&amp;gt; instead.&lt;br /&gt;
&lt;br /&gt;
[2]: Alternatively you can use the m2eclipse plugin.&lt;br /&gt;
&lt;br /&gt;
==How do I deploy my artifacts to the (central) Nexus repository==&lt;br /&gt;
First you have to have write privileges to BMIR's Nexus repository (http://bmir-hudson1.stanford.edu/nexus). Typically these privileges are only granted to a closed group of developers. Both, these privileges (-&amp;gt; credentials) and the path to the repository have to be entered to your Maven settings file (&amp;lt;tt&amp;gt;&amp;lt;MAVEN_INSTALL_DIR&amp;gt;/conf/settings.xml&amp;lt;/tt&amp;gt;). There is a [[Stanford:SettingsXmlExample|complete example of this file]] available. &lt;br /&gt;
&lt;br /&gt;
As soon you execute &amp;lt;tt&amp;gt;mvn deploy&amp;lt;/tt&amp;gt; the Nexus repository is updated. Please keep in mind that your artifact either is stored in the snapshot or in the release repository dependent on the version number in your pom.xml: If the version number ends with &amp;lt;tt&amp;gt;SNAPSHOT&amp;lt;/tt&amp;gt; the snapshot directory is addressed, otherwise the release repository.&lt;br /&gt;
&lt;br /&gt;
Keep in mind that...&lt;br /&gt;
* the SNAPSHOT repository allows the redeployment of an artifact (with the same version number), the release repository doesn't,&lt;br /&gt;
* a deployment (&amp;lt;tt&amp;gt;mvn deploy&amp;lt;/tt&amp;gt;) to the SNAPSHOT repository will autoincrement the version number of your artifact (if not explicitly turned off in the pom.xml), a deployment to the release repository won't.&lt;br /&gt;
* there is no autoincrement of the version number during install  (&amp;lt;tt&amp;gt;mvn install&amp;lt;/tt&amp;gt;),&lt;br /&gt;
* there is no need to install a local Nexus repository on your machine.&lt;br /&gt;
&lt;br /&gt;
==How to update classpath==&lt;br /&gt;
Just get latest pom.xml and execute mvn eclipse:eclipse. This will update (not overwrite) your classpath. Press refresh in Eclipse. There is not even a restart necessary.&lt;br /&gt;
&lt;br /&gt;
=How to write unit test case (TestNG, JUnit) and UI test cases (FEST, QFS)=&lt;br /&gt;
This section is about standard unit tests, i.e. not about writing UI tests/integrations tests using Selenium.&lt;br /&gt;
==How to re-use existing JUnit test cases==&lt;br /&gt;
===Option 1: Convert JUnit test cases to TestNG test cases===&lt;br /&gt;
You either can do that programmatically as described in http://testng.org/doc/migrating.html or you do that manually. TestNG tests look pretty much the same then JUnit tests. What has to be done typically includes:&lt;br /&gt;
* Change &amp;lt;tt&amp;gt;import to org.testng.annotations.*;&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;import static org.testng.Assert.*;&amp;lt;/tt&amp;gt;&lt;br /&gt;
* Add annotation &amp;lt;tt&amp;gt;@BeforeClass&amp;lt;/tt&amp;gt; to setup-method.&lt;br /&gt;
* Add annotation &amp;lt;tt&amp;gt;@Test&amp;lt;/tt&amp;gt; to your test methods&lt;br /&gt;
&lt;br /&gt;
===Option 2: Keep JUnit tests cases as they are and run it from TestNG===&lt;br /&gt;
In the &amp;lt;tt&amp;gt;/src/test/resources/unit-tests.xml&amp;lt;/tt&amp;gt; there is a section with &amp;lt;tt&amp;gt;junit=true&amp;lt;/tt&amp;gt;. Just add your tests there.&lt;br /&gt;
&lt;br /&gt;
Example (mind second set of tests)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;!DOCTYPE suite SYSTEM &amp;quot;http://testng.org/testng-1.0.dtd&amp;quot; &amp;gt;&lt;br /&gt;
  &amp;lt;suite name=&amp;quot;ProtegeTestSuite&amp;quot; verbose=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;test name=&amp;quot;TestNG-Tests&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;classes&amp;gt;&lt;br /&gt;
        &amp;lt;class name=&amp;quot;edu.stanford.bmir.protege.web.server.WatchedEntitiesCacheTest&amp;quot;&amp;gt;&amp;lt;/class&amp;gt;&lt;br /&gt;
        &amp;lt;class name=&amp;quot;client.TestUnitProtege&amp;quot;&amp;gt;&amp;lt;/class&amp;gt;&lt;br /&gt;
      &amp;lt;/classes&amp;gt;&lt;br /&gt;
    &amp;lt;/test&amp;gt;&lt;br /&gt;
    &amp;lt;test name=&amp;quot;JUnit-Tests (Example)&amp;quot; junit=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;classes&amp;gt;&lt;br /&gt;
        &amp;lt;class name=&amp;quot;client.JUnitExample&amp;quot;&amp;gt;&amp;lt;/class&amp;gt;&lt;br /&gt;
      &amp;lt;/classes&amp;gt;&lt;br /&gt;
    &amp;lt;/test&amp;gt;&lt;br /&gt;
  &amp;lt;/suite&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There are (theoretically) two options how to include JUnit tests cases to the continuous integration. &lt;br /&gt;
# Make sure that your test classes are in the designated folder /src/test/java and that they are following the naming convention *Test.java&lt;br /&gt;
# Specify the classes in the xml file in /src/test/resources&lt;br /&gt;
We decided to go for the latter option. All types of specification as test parameters, grouping of tests and running tests in parallel have to be defined in theses TestNG-XML-files (and not(!) in the pom.xml). In the pom.xml we deliberatly disabled the automatic execution of JUnit tests in the line &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;plugin&amp;gt;  &lt;br /&gt;
    &amp;lt;groupId&amp;gt;org.apache.maven.plugins&amp;lt;/groupId&amp;gt;&lt;br /&gt;
    &amp;lt;artifactId&amp;gt;maven-surefire-plugin&amp;lt;/artifactId&amp;gt;&lt;br /&gt;
    &amp;lt;configuration&amp;gt;&lt;br /&gt;
      &amp;lt;skip&amp;gt;true&amp;lt;/skip&amp;gt;&lt;br /&gt;
    &amp;lt;/configuration&amp;gt;&lt;br /&gt;
    ...&lt;br /&gt;
  &amp;lt;/plugin&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Write new TestNG test cases==&lt;br /&gt;
The vest resource to start is http://www.testng.org. Nevertheless the following lines might be helpful:&lt;br /&gt;
&lt;br /&gt;
It is recommended to use the TestNG plugin for Eclipse since it adds all libraries to your classpath. Then writing a new test case is straight forward:&lt;br /&gt;
* write a standard Java class. Even there is no naming convention required it is recommended to call the class XXXTest, whereas XXX stands for the class under test.&lt;br /&gt;
* Write some test methods. Even there is no naming convention required it is recommended to call the method testXXX, whereas XXX stands for the method to be tested. However the test methods require the annotation @Test.&lt;br /&gt;
* Optionally have methods which have to be executed one before the test class is executed respectively which are executed before each test method. Add annotations @BeforeClass, @AfterClass, @BeforeMethod, respectively @AfterMetehod&lt;br /&gt;
* Fix imports&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
  import junit.framework.Assert;&lt;br /&gt;
  import org.testng.annotations.AfterClass;&lt;br /&gt;
  import org.testng.annotations.BeforeClass;&lt;br /&gt;
  import org.testng.annotations.Parameters;&lt;br /&gt;
  import org.testng.annotations.Test;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Optional enhancements&lt;br /&gt;
** Add dependencies between methods e.g. &amp;lt;tt&amp;gt;@Test (dependsOnMethods = {&amp;quot;openICDTree&amp;quot;})&amp;lt;/tt&amp;gt; where openICDTree is the name of the other method.&lt;br /&gt;
** Move test parameters from test code to the configuration file, e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;test name=&amp;quot;Navigation 1&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;parameter name=&amp;quot;username&amp;quot;  value=&amp;quot;protege&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;parameter name=&amp;quot;username&amp;quot;  value=&amp;quot;secret&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;classes&amp;gt;&lt;br /&gt;
      &amp;lt;class name=&amp;quot;selenium.TestICat&amp;quot;&amp;gt;&amp;lt;/class&amp;gt;&lt;br /&gt;
    &amp;lt;/classes&amp;gt;&lt;br /&gt;
  &amp;lt;/test&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Refer to these parameters in the Java code&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
  @Test&lt;br /&gt;
  @Parameters({ &amp;quot;username&amp;quot;, &amp;quot;password&amp;quot; })&lt;br /&gt;
  public void login(String username, String password) throws InterruptedException {...}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Add new test case to the test-configuration xml as shown above.&lt;br /&gt;
&lt;br /&gt;
==How to write UI test cases (web) with Selenium==&lt;br /&gt;
===General===&lt;br /&gt;
The UI tests use the Selenium test framework. You either can write the tests from scratch or use the Selenium IDE, a Firefox Plugin to record actions and to generate Java Code (TestNG classes).&lt;br /&gt;
&lt;br /&gt;
The biggest challenge with writing UI tests is the identification of UI components since one can not relay on the id of the component. These ids are generated by GWT dynamically. &lt;br /&gt;
&lt;br /&gt;
===Example Code===&lt;br /&gt;
s. example.&lt;br /&gt;
===How to locate UI elements===&lt;br /&gt;
s. example.&lt;br /&gt;
===Resources===&lt;br /&gt;
* How to locate elements&lt;br /&gt;
** General: http://seleniumhq.org/docs/04_selenese_commands.html#locating-elements&lt;br /&gt;
** Usefull X-Path patterns: http://seleniumhq.org/docs/appendix_locating_techniques.html#useful-xpath-patterns&lt;br /&gt;
** X-Path in general: http://www.w3schools.com/xpath/xpath_examples.asp&lt;br /&gt;
** Calendars, Comboboxes, Popup etc: http://www.ibm.com/developerworks/opensource/library/os-webautoselenium/index.html?cmp=dw&amp;amp;cpb=dwope&amp;amp;ct=dwnew&amp;amp;cr=dwnen&amp;amp;ccy=zz&amp;amp;csr=120910&lt;br /&gt;
&lt;br /&gt;
==Comprehensive example==&lt;br /&gt;
There is a project that shows everything related to build and testing:&lt;br /&gt;
* how to write a pom.xml&lt;br /&gt;
* how to write and integrate unit tests (JUnit and TestNG)&lt;br /&gt;
* how to write and integrate integration tests (selenium)&lt;br /&gt;
&lt;br /&gt;
Please visit https://bmir-gforge.stanford.edu/svn/hudson-test/Hudson-Test.&lt;br /&gt;
==How to write UI test cases (Swing) using FEST==&lt;br /&gt;
The tutorial on how to write FEST tests will be written upon decision for/against FEST. So far please refer to the official documentation: http://docs.codehaus.org/display/FEST/Getting+Started&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;Example-Project&amp;quot; (Hudson) also contains a demo application using FEST: https://bmir-gforge.stanford.edu/svn/hudson-test/Hudson-Test&lt;br /&gt;
&lt;br /&gt;
==How to write UI test cases (Swing) using QF-Test==&lt;br /&gt;
The tutorial on how to write QFS tests will be written upon decision for/against QFS. So far please refer to the official documentation: &lt;br /&gt;
http://www.qfs.de (tutorials in English available).&lt;br /&gt;
&lt;br /&gt;
=Other questions=&lt;br /&gt;
==How to switch to ICD11 with all data (database)==&lt;br /&gt;
Follow instructions given in http://groups.google.com/group/icat-users/web/accessing-the-icat-content-programmatically?hl=en&amp;amp;_done=%2Fgroup%2Ficat-users%3Fhl%3Den%26&amp;amp;hl=en &lt;br /&gt;
&lt;br /&gt;
On Windows the import command might be slightly different than described in the website. Use instead&lt;br /&gt;
  mysql --user=protege --password=protege &amp;lt; c:\protege_2010-11-01_04h02m.Monday.sql&lt;br /&gt;
&lt;br /&gt;
In summary you need to&lt;br /&gt;
* import database (and check that protege DB acutally exists afterwards)&lt;br /&gt;
* add user&lt;br /&gt;
* grant rights to the user&lt;br /&gt;
&lt;br /&gt;
In order to do so, make use of the follwing commands:&lt;br /&gt;
  mysql -u root&lt;br /&gt;
  mysql&amp;gt; -u root connect to localhost;&lt;br /&gt;
  mysql&amp;gt; show databases;&lt;br /&gt;
  mysql&amp;gt; use protege;&lt;br /&gt;
  mysql&amp;gt; show tables;&lt;br /&gt;
  mysql&amp;gt; CREATE USER protege IDENTIFIED BY 'protege';&lt;br /&gt;
  mysql&amp;gt; GRANT SELECT, INSERT, UPDATE, DELETE on *.* to 'protege'@'localhost';&lt;br /&gt;
&lt;br /&gt;
More useful commands: http://www.pantz.org/software/mysql/mysqlcommands.html&lt;br /&gt;
&lt;br /&gt;
[[Category:QualityAssurance]]&lt;/div&gt;</summary>
		<author><name>Johner</name></author>	</entry>

	<entry>
		<id>https://protegewiki.stanford.edu/index.php?title=ProtegeQAGuide&amp;diff=10068</id>
		<title>ProtegeQAGuide</title>
		<link rel="alternate" type="text/html" href="https://protegewiki.stanford.edu/index.php?title=ProtegeQAGuide&amp;diff=10068"/>
				<updated>2011-06-05T08:46:26Z</updated>
		
		<summary type="html">&lt;p&gt;Johner: /* Contact and further Information */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is the start page on how to (automatically) build and test all applications/projects related to Protégé.&lt;br /&gt;
&lt;br /&gt;
=Guidance Documents=&lt;br /&gt;
[[File:infrastructure-2.png|thumb|Infrastructure with all servers and information flow]]&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
| On the &amp;lt;span style=&amp;quot;font-variant:small-caps;font-size:1.3em;font-weight:bold&amp;quot;&amp;gt;[[Stanford:OverviewPage|Overview Page]]&amp;lt;/span&amp;gt;&lt;br /&gt;
you find &lt;br /&gt;
* some background information describing the rationale for caring about automated builds and testing and for establishing a corresponding infrastructure. &lt;br /&gt;
* an overview chart displaying the entire infrastructure landscape. &lt;br /&gt;
* a short description of all the relevant tools and the rationale for chosing the selected ones&lt;br /&gt;
&lt;br /&gt;
| The &amp;lt;span style=&amp;quot;font-variant:small-caps;font-size:1.3em;font-weight:bold&amp;quot;&amp;gt;[[Stanford:AdministratorGuide|Administrator Guide]]&amp;lt;/span&amp;gt; (&amp;amp;rarr; Alex) &lt;br /&gt;
describes how to install and operate all the servers, among those:&lt;br /&gt;
* Nexus repository: http://bmir-hudson1.stanford.edu/nexus&lt;br /&gt;
* Hudson Build Sever (build statistics, administration of jobs): http://bmir-hudson1.stanford.edu &lt;br /&gt;
* Sonar Server (code and architecture metrics, coverage reports and more): http://bmir-hudson1.stanford.edu/sonar (use link from Hudson to Sonar reports instead)&lt;br /&gt;
* Tomcat Server (automated UI testing, not of general interest): http://bmir-hudson1.stanford.edu:8080&lt;br /&gt;
* SVN-Repository: http://smi-protege.stanford.edu/repos/protege/&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| The &amp;lt;span style=&amp;quot;font-variant:small-caps;font-size:1.3em;font-weight:bold&amp;quot;&amp;gt;[[Stanford:DeveloperGuide|Developer Guide]]&amp;lt;/span&amp;gt; (&amp;amp;rarr; external and Stanford internal)&lt;br /&gt;
is the main page for developers. On these pages developers get answers to questions like&lt;br /&gt;
* How do I initially set up my tools to work with one or more of the Protégé projects? &lt;br /&gt;
* &amp;lt;strong&amp;gt;New:&amp;lt;/strong&amp;gt; Please watch video tutorial.&lt;br /&gt;
* How do I write test cases?&lt;br /&gt;
* How do I get the lastest downloads?&lt;br /&gt;
&lt;br /&gt;
| The &amp;lt;span style=&amp;quot;font-variant:small-caps;font-size:1.3em;font-weight:bold&amp;quot;&amp;gt;[[Stanford:QaGuide|QA &amp;amp; Project Manager Guide]]&amp;lt;/span&amp;gt; (&amp;amp;rarr; Tania, Jennifer, Tim &amp;amp;amp; other)&lt;br /&gt;
is the address for everybody interested in the success and quality of builds and code. It gives explanations like&lt;br /&gt;
* How to write/adjust the pom.xml?&lt;br /&gt;
* What do these metrics tell me?&lt;br /&gt;
* What do I have to do in order to add artifacts (e.g. jar-files) to my repository&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=Contact and further Information=&lt;br /&gt;
The selection, installation and testing of the infrastructure as well as the initial transistion from traditional ANT-based to Maven based projects was done by [mailto://c.faigle@gmx.net Christian Faigle] and [mailto://mail@johner.org Christian Johner]. Please contact either for questions related to&lt;br /&gt;
* Selection of tools&lt;br /&gt;
* Administration of tools&lt;br /&gt;
* Converting projects to MAVEN&lt;br /&gt;
* Interpretation and adaptation of reports&lt;br /&gt;
&lt;br /&gt;
This page originally was written by [mailto://christian@johner.org Christian Johner], [http://www.johner-institut.de Institute for Healthcare IT].&lt;br /&gt;
&lt;br /&gt;
The [[Stanford:ToDoPage|Todos]] (for Christian, Alex)&lt;/div&gt;</summary>
		<author><name>Johner</name></author>	</entry>

	<entry>
		<id>https://protegewiki.stanford.edu/index.php?title=Stanford:QaGuide&amp;diff=9326</id>
		<title>Stanford:QaGuide</title>
		<link rel="alternate" type="text/html" href="https://protegewiki.stanford.edu/index.php?title=Stanford:QaGuide&amp;diff=9326"/>
				<updated>2011-01-06T16:32:07Z</updated>
		
		<summary type="html">&lt;p&gt;Johner: /* My build fails since the sonar plugin was not found! What can I do? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=How-to for architects, test and project managers=&lt;br /&gt;
==Target audience and scope==&lt;br /&gt;
In this section you find how tos which are related to convert projects from ANT to Maven, to write pom.xml files etc.&lt;br /&gt;
==Comprehensive example==&lt;br /&gt;
There is a project that shows everything related to build and testing:&lt;br /&gt;
* how to write a pom.xml&lt;br /&gt;
* how to write and integrate unit tests (JUnit and TestNG)&lt;br /&gt;
* how to write and integrate integration tests (selenium)&lt;br /&gt;
&lt;br /&gt;
Please visit https://bmir-gforge.stanford.edu/svn/hudson-test/Hudson-Test.&lt;br /&gt;
&lt;br /&gt;
=How to create a new or convert an existing project =&lt;br /&gt;
This steps steps have to be done once per project)&lt;br /&gt;
==Establish or change to Maven directory structure==&lt;br /&gt;
The following is copied from http://maven.apache.org/guides/introduction/introduction-to-the-standard-directory-layout.html. It documents the directory layout expected by Maven and the directory layout created by Maven. Please try to conform to this structure as much as possible; however, if you can't these settings can be overridden via the project descriptor.&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
!Path &lt;br /&gt;
!Description &lt;br /&gt;
|-&lt;br /&gt;
|'''src/main/java''' &lt;br /&gt;
| Application/Library sources &lt;br /&gt;
|-&lt;br /&gt;
|'''src/main/resources''' &lt;br /&gt;
| Application/Library resources &lt;br /&gt;
|-&lt;br /&gt;
|src/main/filters &lt;br /&gt;
| Resource filter files &lt;br /&gt;
|-&lt;br /&gt;
|src/main/assembly &lt;br /&gt;
| Assembly descriptors &lt;br /&gt;
|-&lt;br /&gt;
|src/main/config &lt;br /&gt;
| Configuration files &lt;br /&gt;
|-&lt;br /&gt;
|'''src/main/webapp''' &lt;br /&gt;
| Web application sources &lt;br /&gt;
|-&lt;br /&gt;
|'''src/test/java''' &lt;br /&gt;
| Test sources &lt;br /&gt;
|-&lt;br /&gt;
|'''src/test/resources''' &lt;br /&gt;
| Test resources &lt;br /&gt;
|-&lt;br /&gt;
|src/test/filters &lt;br /&gt;
| Test resource fiter files &lt;br /&gt;
|-&lt;br /&gt;
|src/site &lt;br /&gt;
| Site &lt;br /&gt;
|-&lt;br /&gt;
|LICENSE.txt &lt;br /&gt;
| Project's license &lt;br /&gt;
|-&lt;br /&gt;
|NOTICE.txt &lt;br /&gt;
| Notices and attributions required by libraries that the project depends on &lt;br /&gt;
|-&lt;br /&gt;
|README.txt &lt;br /&gt;
| Project's readme &lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In the table the most relevant paths are marked bold.&lt;br /&gt;
&lt;br /&gt;
Additionally there are at the top level &lt;br /&gt;
* pom.xml &lt;br /&gt;
* other optional files as properties, maven.xml or build.xml (if using Ant). &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In order to get to the new file structure:&lt;br /&gt;
* Add folder inside /src: &amp;lt;tt&amp;gt;/src/main/java and /src/test/java&amp;lt;/tt&amp;gt;&lt;br /&gt;
* Move &amp;lt;tt&amp;gt;/src/edu&amp;lt;/tt&amp;gt; respectively &amp;lt;tt&amp;gt;/test/edu&amp;lt;/tt&amp;gt; folders into new folders.&lt;br /&gt;
* Delete folder test-lib&lt;br /&gt;
* Rename “war” to “webapp” and move folder under /src. (here I ran into problems. Really the best way?)&lt;br /&gt;
* Add folder &amp;lt;tt&amp;gt;/src/main/resources/config&amp;lt;/tt&amp;gt;. Add to this folder &amp;lt;tt&amp;gt;configuration.properties&amp;lt;/tt&amp;gt; file.&lt;br /&gt;
* Add under &amp;lt;tt&amp;gt;src/test/java&amp;lt;/tt&amp;gt; following folders: &amp;lt;tt&amp;gt;/client/&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;/selenium&amp;lt;/tt&amp;gt;??&lt;br /&gt;
* Delete files in root folder with exception of src. Delete e.g. /etc/, &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To move files/directories you can use Tortoise as described in http://stackoverflow.com/questions/62570/how-do-i-move-a-file-or-folder-from-one-folder-to-another-in-tortoisesvn. &lt;br /&gt;
&lt;br /&gt;
'''Hint:''' In the developer guide there is a description how to import a project from SVN and immediatelly update the src-folder to the expected structure.&lt;br /&gt;
&lt;br /&gt;
==How to upload required artifacts (typicall jar-files) to Nexus repository==&lt;br /&gt;
There are multiple ways of adding resources to the repository&lt;br /&gt;
# Direct copy ('''not recommended''')&lt;br /&gt;
#* Copy resources directly to Nexus subfolder e.g. to &amp;lt;tt&amp;gt;/var/nexus/sonatype-work/nexus/storage/thirdparty/edu/stanford/bmir/core/icd&amp;lt;/tt&amp;gt;.&lt;br /&gt;
#* You need to put the file the right directory and give it the name indicating the version number, e.g. &amp;lt;tt&amp;gt;/edu/Stanford/bmir/core/protégé-1.0.jar&amp;lt;/tt&amp;gt;&lt;br /&gt;
#* Goto nexus and right click on third party repository: reindex respectively rebuild metadata&lt;br /&gt;
# Uploaded file automatically in due course of a build process (this is '''recommended''' for &amp;quot;own&amp;quot; code as Snapshots and Releases).&lt;br /&gt;
#* There is nothing to do besides adding the &amp;lt;distributionManagement&amp;gt; tag to the pom.xml and use the deploy plugin. The PC specific &amp;lt;tt&amp;gt;settings.xml&amp;lt;/tt&amp;gt; has to point to the repository as described in the adminstrators guide in section TODO&lt;br /&gt;
# Uploaded file using the Nexus interface ('''recommended only for third party artifacts'''). This option is described in the following:&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
| [[Image:nexus-upload-1.png|thumb|upright|alt=Screenshot how to upload jars to Nexus (step 1)|upload an artifact to Nexus (part 1): Select repository]]&lt;br /&gt;
| [[Image:nexus-upload-2.png|thumb|upright|alt=Screenshot how to upload jars to Nexus (step 2)|upload an artifact to Nexus (part 2): Define GAV parameters]]&lt;br /&gt;
| [[Image:nexus-upload-3.png|thumb|upright|alt=Screenshot how to upload jars to Nexus (step 3)|upload an artifact to Nexus (part 3): Reindexing]]&lt;br /&gt;
| [[Image:nexus-get-dependency.png|thumb|upright|alt=Screenshot how copy the dependency snippet for pom.xml|copy the dependency snippet for pom.xml]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
	 &lt;br /&gt;
For each artifact (jar) you can later copy the dependency information for Maven (into the pom.xml). The code snipped look like:&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;dependency&amp;gt;&lt;br /&gt;
    &amp;lt;groupId&amp;gt;edu.stanford.bmir.core&amp;lt;/groupId&amp;gt;&lt;br /&gt;
    &amp;lt;artifact&amp;gt;protege&amp;lt;/artifact&amp;gt;&lt;br /&gt;
    &amp;lt;version&amp;gt;1.0&amp;lt;/version&amp;gt;&lt;br /&gt;
  &amp;lt;/dependency&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
TODO: define naming convention for groupId. Currently discussed are the following&lt;br /&gt;
* protege3&lt;br /&gt;
* protege4&lt;br /&gt;
* webprotege&lt;br /&gt;
* owl&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Further reading&lt;br /&gt;
* http://www.sonatype.com/books/nexus-book/reference/maven-sect-single-group.html &lt;br /&gt;
* http://www.sonatype.com/books/nexus-book/reference/maven-sect-single-group.html &lt;br /&gt;
*	http://stackoverflow.com/questions/1584763/how-do-i-deploy-to-nexus-hosted-by-secureci&lt;br /&gt;
&lt;br /&gt;
==How to write the Maven script (pom.xml)==&lt;br /&gt;
In our case the pom.xml typically will have the following structure:&lt;br /&gt;
* Some general information e.g.&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;modelVersion&amp;gt;4.0.0&amp;lt;/modelVersion&amp;gt;&lt;br /&gt;
  &amp;lt;groupId&amp;gt;edu.stanford.smi.protegex&amp;lt;/groupId&amp;gt;&lt;br /&gt;
  &amp;lt;artifactId&amp;gt;dlquery&amp;lt;/artifactId&amp;gt;&lt;br /&gt;
  &amp;lt;packaging&amp;gt;jar&amp;lt;/packaging&amp;gt;&lt;br /&gt;
  &amp;lt;name&amp;gt;protege-plugin-dlquery&amp;lt;/name&amp;gt;&lt;br /&gt;
  &amp;lt;version&amp;gt;0.0.3-SNAPSHOT&amp;lt;/version&amp;gt;&lt;br /&gt;
	&lt;br /&gt;
* Properties as the Java version&lt;br /&gt;
* the &amp;lt;tt&amp;gt;&amp;lt;distributionManagement&amp;gt;&amp;lt;/tt&amp;gt; tag which is necessary if artifacts have to deployed to a repository&lt;br /&gt;
* the &amp;lt;tt&amp;gt;&amp;lt;dependency/&amp;gt;&amp;lt;/tt&amp;gt; tags (an example was given above)&lt;br /&gt;
* the build part with its plugins (e.g. to compile, test, deploy)&lt;br /&gt;
* the reporting part with its plugins (e.g. PMD, Findbugs, JDepend)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It is recommended to use an existing &amp;lt;tt&amp;gt;pom.xml&amp;lt;/tt&amp;gt; as template. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Further hints and readings:&lt;br /&gt;
* the version number can be automatically adjusted with a version plugin. The postfix &amp;quot;&amp;lt;tt&amp;gt;SNAPSHOT&amp;lt;/tt&amp;gt;&amp;quot; determines that the artifact won't be uploaded to the release but to the snapshot repository. &lt;br /&gt;
* Both repositories (snapshot and release) are defined in the &amp;lt;tt&amp;gt;&amp;lt;distributionManagement&amp;gt;&amp;lt;/tt&amp;gt; section respectively in the &amp;lt;tt&amp;gt;/maven/conf/settings.xml&amp;lt;/tt&amp;gt; file.&lt;br /&gt;
* If you are deploying to tomcat, e.g. to perform integration tests, make sure that user and password match with tomcat manger credentials.&lt;br /&gt;
* GWT Plugin&lt;br /&gt;
** http://gwt-maven.googlecode.com/svn/docs/maven-googlewebtoolkit2-plugin/setup.html&lt;br /&gt;
** http://www.ducktools.org/2010/03/maven-and-gwt.html&lt;br /&gt;
** http://mojo.codehaus.org/gwt-maven-plugin/examples/compile.html&lt;br /&gt;
** http://zenoconsulting.wikidot.com/blog:16&lt;br /&gt;
* '''Please read the FAQ section with specific questions on how to write a pom.xml'''.&lt;br /&gt;
&lt;br /&gt;
==How to add project to Hudson==&lt;br /&gt;
[[File:hudson-configure-svn.png|thumb|Projects can be added from the Hudson administration interface]]&lt;br /&gt;
* Go to Hudson page (e.g. http://bmir-hudson1.stanford.edu). &lt;br /&gt;
* Add new job. Select name (e.g. WebProtégé”) and type of project (“Build a maven2 project”).&lt;br /&gt;
* Select in section “Source Code Management” the option “Subversion” and add SVN server URL (e.g. http://smi-protege.stanford.edu/repos/protege/web-protege/branches/who-maven/). Keep “Use update” checked. No local module directory. (no password needed?)&lt;br /&gt;
* Determine build interval respectively trigger. Currently we use “Build whenever a SNAPSHOT dependency is built”.&lt;br /&gt;
* Optionally enable email notification.&lt;br /&gt;
* Activate Sonar in “Post-Build-Activities” (Sonar needs to be installed first)&lt;br /&gt;
  &lt;br /&gt;
=FAQs=&lt;br /&gt;
==Related to reporting==&lt;br /&gt;
===My code coverage statistics aren’t updated. What can I do?===&lt;br /&gt;
Please change version in pom.xml to next snapshot respectively release number. Don’t forget the configuration.properties file.&lt;br /&gt;
&lt;br /&gt;
===I do not get code coverage statistics for my integration tests. What can I do?===&lt;br /&gt;
Currently nothing, this is the way maven handles the build process.&lt;br /&gt;
&lt;br /&gt;
==My build fails since the sonar plugin was not found! What can I do?==&lt;br /&gt;
Your Hudson build fails. In the console output you find this stacktrace:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  org.apache.maven.lifecycle.LifecycleExecutionException: The plugin 'org.codehaus.mojo:sonar-maven-plugin' does not exist or no valid version could be found&lt;br /&gt;
	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.verifyPlugin(DefaultLifecycleExecutor.java:1569)&lt;br /&gt;
	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.getMojoDescriptor(DefaultLifecycleExecutor.java:1851)&lt;br /&gt;
	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.segmentTaskListByAggregationNeeds(DefaultLifecycleExecutor.java:462)&lt;br /&gt;
	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:175)&lt;br /&gt;
	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Then you most probably ran into a Maven bug which is [http://docs.codehaus.org/display/SONAR/Frequently+Asked+Questions#FrequentlyAskedQuestions-Theplugin%27org.apache.maven.plugins%3Amavensonarplugin%27doesnotexistornovalidversioncouldbefound|described here].&lt;br /&gt;
&lt;br /&gt;
What can you do? As the plugin update is not working as it is supposed to do, please remove the following two directories:&lt;br /&gt;
# Maven local repository: &amp;lt;tt&amp;gt;sudo rm -r /usr/local/data/hudson/.m2/repository/org/codehaus/mojo/sonar-maven-plugin&amp;lt;/tt&amp;gt;&lt;br /&gt;
# Nexus repository: &amp;lt;tt&amp;gt;sudo rm -r /usr/local/data/sonatype-work/nexus/storage/central/org/codehaus/mojo/sonar-maven-plugin&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then run the build again. Now the repositories are updated and your build should run successfully.&lt;br /&gt;
&lt;br /&gt;
If this fails do addtionally the following:&lt;br /&gt;
# ssh to bmir-hudson1.standford.edu&lt;br /&gt;
# Switch user: &amp;lt;tt&amp;gt;sudo su - hudson&amp;lt;/tt&amp;gt;&lt;br /&gt;
# if Maven path is not yet set: &lt;br /&gt;
#* &amp;lt;tt&amp;gt;export M2_HOME=/usr/local/apache-maven-2.2.1&amp;lt;/tt&amp;gt;&lt;br /&gt;
#* &amp;lt;tt&amp;gt;export PATH=$PATH:$HOME/bin:$JAVA_HOME/bin:$M2_HOME/bin&amp;lt;/tt&amp;gt;&lt;br /&gt;
# Run one project from command line&lt;br /&gt;
#* switch to one project &amp;lt;tt&amp;gt;cd /usr/local/data/hudson/jobs/Example-Project/workspace&amp;lt;/tt&amp;gt;&lt;br /&gt;
#* &amp;lt;tt&amp;gt;mvn -U sonar:sonar&amp;lt;/tt&amp;gt; The -U forces the update. Now the maven plugin should be downloaded&lt;br /&gt;
&lt;br /&gt;
==Related to pom.xml==&lt;br /&gt;
===How can copy output to a specific directory?===&lt;br /&gt;
Remark: In the perfect world you are deploying your artifacts to a local or a remote repository. You are not supposed to work with specific target directories. Nevertheless there may be occasions where it is necessary to do so:&lt;br /&gt;
&lt;br /&gt;
====Step 1: Use Resource Plugin====&lt;br /&gt;
Add copy plugin to your pom.xml (in build section). Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;!--  Copy the stuff to the desired place --&amp;gt;&lt;br /&gt;
  &amp;lt;plugin&amp;gt;&lt;br /&gt;
    &amp;lt;artifactId&amp;gt;maven-resources-plugin&amp;lt;/artifactId&amp;gt;&lt;br /&gt;
    &amp;lt;version&amp;gt;2.4.3&amp;lt;/version&amp;gt;&lt;br /&gt;
    &amp;lt;executions&amp;gt;&lt;br /&gt;
      &amp;lt;execution&amp;gt;&lt;br /&gt;
        &amp;lt;id&amp;gt;copy-resources&amp;lt;/id&amp;gt;&lt;br /&gt;
        &amp;lt;!-- here the phase you need --&amp;gt;&lt;br /&gt;
        &amp;lt;phase&amp;gt;test&amp;lt;/phase&amp;gt;&lt;br /&gt;
        &amp;lt;goals&amp;gt;&lt;br /&gt;
          &amp;lt;goal&amp;gt;copy-resources&amp;lt;/goal&amp;gt;&lt;br /&gt;
        &amp;lt;/goals&amp;gt;&lt;br /&gt;
        &amp;lt;configuration&amp;gt;&lt;br /&gt;
          &amp;lt;outputDirectory&amp;gt;${outputdir}&amp;lt;/outputDirectory&amp;gt;&lt;br /&gt;
          &amp;lt;resources&amp;gt;&lt;br /&gt;
            &amp;lt;resource&amp;gt;&lt;br /&gt;
              &amp;lt;directory&amp;gt;src&amp;lt;/directory&amp;gt;&lt;br /&gt;
              &amp;lt;filtering&amp;gt;true&amp;lt;/filtering&amp;gt;&lt;br /&gt;
            &amp;lt;/resource&amp;gt;&lt;br /&gt;
          &amp;lt;/resources&amp;gt;&lt;br /&gt;
        &amp;lt;/configuration&amp;gt;&lt;br /&gt;
      &amp;lt;/execution&amp;gt;&lt;br /&gt;
    &amp;lt;/executions&amp;gt;&lt;br /&gt;
  &amp;lt;/plugin&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Step 2: Parametrize output directory====&lt;br /&gt;
Set the variable (outputdir) either in the properties-section of the pom.xml:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;properties&amp;gt;&lt;br /&gt;
    &amp;lt;maven.compiler.source&amp;gt;1.6&amp;lt;/maven.compiler.source&amp;gt;&lt;br /&gt;
    &amp;lt;maven.compiler.target&amp;gt;1.6&amp;lt;/maven.compiler.target&amp;gt;&lt;br /&gt;
    &amp;lt;outputdir&amp;gt;testoutput/testdirectory&amp;lt;/outputdir&amp;gt;&lt;br /&gt;
  &amp;lt;/properties&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Or in an external properties file. This requires the Maven properties plugin:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;plugin&amp;gt;&lt;br /&gt;
    &amp;lt;groupId&amp;gt;org.codehaus.mojo&amp;lt;/groupId&amp;gt;&lt;br /&gt;
    &amp;lt;artifactId&amp;gt;properties-maven-plugin&amp;lt;/artifactId&amp;gt;&lt;br /&gt;
    &amp;lt;version&amp;gt;1.0-alpha-1&amp;lt;/version&amp;gt;&lt;br /&gt;
    &amp;lt;executions&amp;gt;&lt;br /&gt;
      &amp;lt;execution&amp;gt;&lt;br /&gt;
        &amp;lt;phase&amp;gt;initialize&amp;lt;/phase&amp;gt;&lt;br /&gt;
        &amp;lt;goals&amp;gt;&lt;br /&gt;
          &amp;lt;goal&amp;gt;read-project-properties&amp;lt;/goal&amp;gt;&lt;br /&gt;
        &amp;lt;/goals&amp;gt;&lt;br /&gt;
        &amp;lt;configuration&amp;gt;&lt;br /&gt;
          &amp;lt;files&amp;gt;&lt;br /&gt;
            &amp;lt;file&amp;gt;src/main/resources/example.properties&amp;lt;/file&amp;gt;&lt;br /&gt;
          &amp;lt;/files&amp;gt;&lt;br /&gt;
        &amp;lt;/configuration&amp;gt;&lt;br /&gt;
      &amp;lt;/execution&amp;gt;&lt;br /&gt;
    &amp;lt;/executions&amp;gt;&lt;br /&gt;
  &amp;lt;/plugin&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this (latter) case there is a src/main/resources/example.properties with an entry&lt;br /&gt;
&lt;br /&gt;
  outputdir = testoutput2/testdirectory&lt;br /&gt;
&lt;br /&gt;
Further reading:&lt;br /&gt;
&lt;br /&gt;
* “Copy-plugin”: http://maven.apache.org/plugins/maven-resources-plugin/examples/copy-resources.html &lt;br /&gt;
* Version plugin: http://mojo.codehaus.org/properties-maven-plugin/plugin-info.html (not to be mixed up with similar plugin http://haroon.sis.utoronto.ca/zarar/properties-maven-plugin/usage.html)&lt;br /&gt;
&lt;br /&gt;
===How can I set the version number in the manifest of OSGI bundles?===&lt;br /&gt;
&lt;br /&gt;
Further reading&lt;br /&gt;
* http://felix.apache.org/site/apache-felix-maven-osgi-plugin.html&lt;br /&gt;
* http://felix.apache.org/site/apache-felix-maven-bundle-plugin-bnd.html &lt;br /&gt;
&lt;br /&gt;
===How can I set the version number of the build number===&lt;br /&gt;
====Do it the default way====&lt;br /&gt;
The easiest way is to do nothing. Maven automatically increases the version number for snapshot releases. You even would have to turn it off explicitly in the pom.xml:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;distributionManagement&amp;gt;&lt;br /&gt;
		&amp;lt;repository&amp;gt;&lt;br /&gt;
			&amp;lt;id&amp;gt;releases&amp;lt;/id&amp;gt;&lt;br /&gt;
			&amp;lt;url&amp;gt;${nexus.path}/bmir-release&amp;lt;/url&amp;gt;&lt;br /&gt;
		&amp;lt;/repository&amp;gt;&lt;br /&gt;
&lt;br /&gt;
		&amp;lt;snapshotRepository&amp;gt;&lt;br /&gt;
			&amp;lt;id&amp;gt;snapshots&amp;lt;/id&amp;gt;&lt;br /&gt;
			&amp;lt;name&amp;gt;Internal Snapshots&amp;lt;/name&amp;gt;&lt;br /&gt;
			&amp;lt;url&amp;gt;${nexus.path}/snapshots&amp;lt;/url&amp;gt;&lt;br /&gt;
			&amp;lt;uniqueVersion&amp;gt;false&amp;lt;/uniqueVersion&amp;gt; &amp;lt;!-- This is the important line--&amp;gt;&lt;br /&gt;
		&amp;lt;/snapshotRepository&amp;gt;&lt;br /&gt;
	&amp;lt;/distributionManagement&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Do it explicitly====&lt;br /&gt;
Another way to determine the build number is by using the Maven build number plugin. This is quite forward:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;build&amp;gt;&lt;br /&gt;
    &amp;lt;!-- The final name uses the build namber plugin. You can either us the repository id,&lt;br /&gt;
    an incremental number or a timestamp. Or combinations of those --&amp;gt;&lt;br /&gt;
    &amp;lt;finalName&amp;gt;${project.artifactId}-${project.version}-r${buildNumber}&amp;lt;/finalName&amp;gt;&lt;br /&gt;
	 	&lt;br /&gt;
    &amp;lt;plugins&amp;gt;&lt;br /&gt;
      &amp;lt;!-- This plugin is needed to autoincrement the version number --&amp;gt;&lt;br /&gt;
      &amp;lt;plugin&amp;gt;&lt;br /&gt;
        &amp;lt;groupId&amp;gt;org.codehaus.mojo&amp;lt;/groupId&amp;gt;&lt;br /&gt;
        &amp;lt;artifactId&amp;gt;buildnumber-maven-plugin&amp;lt;/artifactId&amp;gt;&lt;br /&gt;
        &amp;lt;version&amp;gt;1.0-beta-3&amp;lt;/version&amp;gt;&lt;br /&gt;
        &amp;lt;executions&amp;gt;&lt;br /&gt;
          &amp;lt;execution&amp;gt;&lt;br /&gt;
            &amp;lt;phase&amp;gt;validate&amp;lt;/phase&amp;gt;&lt;br /&gt;
            &amp;lt;goals&amp;gt;&lt;br /&gt;
              &amp;lt;goal&amp;gt;create&amp;lt;/goal&amp;gt;&lt;br /&gt;
            &amp;lt;/goals&amp;gt;&lt;br /&gt;
          &amp;lt;/execution&amp;gt;&lt;br /&gt;
        &amp;lt;/executions&amp;gt;&lt;br /&gt;
        &amp;lt;configuration&amp;gt;&lt;br /&gt;
          &amp;lt;!-- the &amp;quot;0&amp;quot; refers to item[0] which is the timestamp --&amp;gt;&lt;br /&gt;
          &amp;lt;format&amp;gt;{0,date,yyyy-MM-dd-HH-mm-ss}&amp;lt;/format&amp;gt;&lt;br /&gt;
          &amp;lt;items&amp;gt;&lt;br /&gt;
            &amp;lt;item&amp;gt;timestamp&amp;lt;/item&amp;gt;&lt;br /&gt;
          &amp;lt;/items&amp;gt;&lt;br /&gt;
        &amp;lt;/configuration&amp;gt;		&lt;br /&gt;
      &amp;lt;/plugin&amp;gt;&lt;br /&gt;
&lt;br /&gt;
      &amp;lt;!-- and now all the other plugins --&amp;gt;&lt;br /&gt;
    &amp;lt;/plugins&amp;gt;&lt;br /&gt;
  &amp;lt;/build&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The resulting file name could be sth. like &amp;lt;tt&amp;gt;dlquery-0.0.3-r2010-11-15-10-36-20.jar&amp;lt;/tt&amp;gt;. The &amp;lt;tt&amp;gt;dlquery&amp;lt;/tt&amp;gt; is the artifact id, &amp;lt;tt&amp;gt;0.0.3&amp;lt;/tt&amp;gt; the version, both read from the pom.xml (and not generated by the version plugin).&lt;br /&gt;
&lt;br /&gt;
The plugin also provides you the option to include this version in manifest files (jar, war).&lt;br /&gt;
&lt;br /&gt;
Additional ways to determine the build number:&lt;br /&gt;
* The plugin supports also to retrieve the version number from the current repository revision.&lt;br /&gt;
* You also can include the branch (${scmBranch}) into the version number.&lt;br /&gt;
* The plugin supports also autoincrement.&lt;br /&gt;
* You could use a property file which you can access in the &amp;lt;finalName&amp;gt; tag.&lt;br /&gt;
&lt;br /&gt;
Further reading&lt;br /&gt;
* http://mojo.codehaus.org/buildnumber-maven-plugin/usage.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===How and where to I decide if I want to make a snapshot release or a &amp;quot;real&amp;quot; release?===&lt;br /&gt;
Maven picks up your decision from the version. If your ends with &amp;lt;tt&amp;gt;-SNAPSHOT&amp;lt;/tt&amp;gt; then it is a snapshot release, otherweise are productive release.&lt;br /&gt;
&lt;br /&gt;
Example for a snapshot release:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;project xmlns=&amp;quot;http://maven.apache.org/POM/4.0.0&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;modelVersion&amp;gt;4.0.0&amp;lt;/modelVersion&amp;gt;&lt;br /&gt;
	&amp;lt;groupId&amp;gt;protege4&amp;lt;/groupId&amp;gt;&lt;br /&gt;
	&amp;lt;artifactId&amp;gt;xmlcatalog&amp;lt;/artifactId&amp;gt;&lt;br /&gt;
	&amp;lt;packaging&amp;gt;jar&amp;lt;/packaging&amp;gt;&lt;br /&gt;
	&amp;lt;name&amp;gt;xmlcatalog&amp;lt;/name&amp;gt;&lt;br /&gt;
	&amp;lt;version&amp;gt;1.0.0-SNAPSHOT&amp;lt;/version&amp;gt;&lt;br /&gt;
	...&lt;br /&gt;
  &amp;lt;/project&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===&amp;quot;I get a return error 400&amp;quot; or &amp;quot;I the deploy of artifacts to Nexus fails. What can I do?&amp;quot;===&lt;br /&gt;
There are two typical errors:&lt;br /&gt;
# the Maven setting.xml file (either locally or on Hudson) does not contain the right credentials.&lt;br /&gt;
# you are trying to deploy to a release repository. Per default it is not allowed to &amp;quot;overwrite&amp;quot; artifacts in a release repository. It is possible in Snapshot repositories. What type a repository has, you can find out by selecting the repository in Nexus (login first). The configuration tab will tell you.&lt;br /&gt;
&lt;br /&gt;
===What are the repositories I'm supposed to deploy to?===&lt;br /&gt;
We decided to work with two repositories only:&lt;br /&gt;
# BMIR-Release&lt;br /&gt;
# Snapshot&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===How do I assemple a complex project with dependencies?===&lt;br /&gt;
Please use the assembly plugin.&lt;br /&gt;
&lt;br /&gt;
Further reading:&lt;br /&gt;
* http://maven.apache.org/plugins/maven-assembly-plugin/index.html&lt;br /&gt;
* http://maven.apache.org/plugins/maven-dependency-plugin/ (includes the unpacking of artifacts into a directory)&lt;br /&gt;
&lt;br /&gt;
[[Category:QualityAssurance]]&lt;/div&gt;</summary>
		<author><name>Johner</name></author>	</entry>

	<entry>
		<id>https://protegewiki.stanford.edu/index.php?title=Main_Page&amp;diff=9295</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://protegewiki.stanford.edu/index.php?title=Main_Page&amp;diff=9295"/>
				<updated>2010-12-16T19:51:33Z</updated>
		
		<summary type="html">&lt;p&gt;Johner: /* Protege Developers */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
&amp;lt;div style=&amp;quot;background:#F0E6CA; border:1px solid #AE5B08; padding:10px 15px 10px 20px; margin:2em 0 0 0;&amp;quot;&amp;gt;&lt;br /&gt;
=== Welcome to the Protege Wiki! ===&lt;br /&gt;
&lt;br /&gt;
Protege is a free, open-source platform that provides a growing user community with a suite of tools to construct domain models and knowledge-based applications with ontologies.  Please see the [http://protege.stanford.edu/overview/index.html overview section] of the [http://protege.stanford.edu/ Protege website] for a more detailed description of what the Protege platform offers.&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;display:block; float:left; width:75%;&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Upcoming Events ==&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;'''[http://protege.stanford.edu/shortcourse/protege-owl/201103/ Protege-OWL Short Course]''', March 23-25, 2011, Stanford University.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Protege Users ==&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;padding-bottom:5px; list-style:circle;&amp;quot;&amp;gt;[http://protege.stanford.edu Protege Website]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;padding-bottom:5px; list-style:circle;&amp;quot;&amp;gt;Browse the [[Protege Plugin Library]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;padding-bottom:5px; list-style:circle;&amp;quot;&amp;gt;Browse the [[Protege Ontology Library]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;padding-bottom:5px; list-style:circle;&amp;quot;&amp;gt;&amp;lt;strong&amp;gt;[[ProtegeUserDocs|General Documentation]]&amp;lt;/strong&amp;gt; - this page is a collection of links to documentation that is applicable to all versions of Protege, including guidelines for developing ontologies, information about scalability and tuning in Protege, etc.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;padding-bottom:5px; list-style:circle;&amp;quot;&amp;gt;&amp;lt;strong&amp;gt;[[Protege3UserDocs|Protege 3 Documentation]]&amp;lt;/strong&amp;gt; - this page is a collection of links to documentation that is specific to the 3.x series such as Getting Started guides, User's Guides, etc.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;padding-bottom:5px; list-style:circle;&amp;quot;&amp;gt;&amp;lt;strong&amp;gt;[[Protege4UserDocs|Protege 4 Documentation]]&amp;lt;/strong&amp;gt; - this page is a collection of links to documentation that is specific to the 4.x series.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;list-style:circle;&amp;quot;&amp;gt;&amp;lt;strong&amp;gt;[[WebProtege|WebProtege Documentation]]&amp;lt;/strong&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Protege Developers ==&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;padding-bottom:5px; list-style:circle;&amp;quot;&amp;gt;&amp;lt;strong&amp;gt;[[ProtegeDevDocsGeneral|General Developer Documentation]]&amp;lt;/strong&amp;gt; - this page is a collection of links to developer documentation that is applicable to all versions of Protege, such as how to connect to our Subversion repository, etc.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;padding-bottom:5px; list-style:circle;&amp;quot;&amp;gt;&amp;lt;strong&amp;gt;[[Protege3DevDocs|Protege 3 Developer Documentation]]&amp;lt;/strong&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;padding-bottom:5px; list-style:circle;&amp;quot;&amp;gt;&amp;lt;strong&amp;gt;[[Protege4DevDocs|Protege 4 Developer Documentation]]&amp;lt;/strong&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;padding-bottom:5px; list-style:circle;&amp;quot;&amp;gt;&amp;lt;strong&amp;gt;[[WebProtegeDevelopersGuide|WebProtege Developer's Guide]]&amp;lt;/strong&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;padding-bottom:5px; list-style:circle;&amp;quot;&amp;gt;&amp;lt;strong&amp;gt;[[ProtegeQAGuide|Protege Guide to Quality Assurance]]&amp;lt;/strong&amp;gt; - this page is about Maven, continuous integration, build, testing and code/architecture metrics.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Wiki Help ==&lt;br /&gt;
If you are new to using a Wiki, please see the [[Help:Contents|Help page]] page for useful links to User's Guides, etc.  &lt;br /&gt;
&lt;br /&gt;
The [[Help:Contents|Help page]] also has suggestions for where to find help with using the Protege application.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;display:block; float:right; width:25%;&amp;quot;&amp;gt;&lt;br /&gt;
[[image:Protege-OWL.jpg|none|thumb|right|protege-owl editor]]&lt;br /&gt;
[[image:Protege-Frames.jpg|none|thumb|right|protege-frames editor]]&lt;br /&gt;
[[image:Webprotege.png|none|thumb|right|[[WebProtege|web-protege editor]] ]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;/div&gt;</summary>
		<author><name>Johner</name></author>	</entry>

	<entry>
		<id>https://protegewiki.stanford.edu/index.php?title=Stanford:ToDoPage&amp;diff=9294</id>
		<title>Stanford:ToDoPage</title>
		<link rel="alternate" type="text/html" href="https://protegewiki.stanford.edu/index.php?title=Stanford:ToDoPage&amp;diff=9294"/>
				<updated>2010-12-16T19:49:12Z</updated>
		
		<summary type="html">&lt;p&gt;Johner: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Christian=&lt;br /&gt;
==open==&lt;br /&gt;
* WebProtege: distinguish SNAPSHOT and release in terms of getting latest or defined dependencies.&lt;br /&gt;
==Pending==&lt;br /&gt;
* Pending (until further instructions): Copy plugin: instruction,with Tim: properties are overwritten, before war is actually is build&lt;br /&gt;
* Not really a task: http://icatdev.stanford.edu&lt;br /&gt;
* Pending (until further instructions): Copy plugin: instruction,with Tim: properties are overwritten, before war is actually is build&lt;br /&gt;
* Can not be reproduced: Tania's machine (/usr/locasl/icat-files/src/icat-maven): Maven runs out of diskspace, increase memory for Maven. /usr/locasl/icat-files/src/icat-maven (Alex: user access right). User right problem? &lt;br /&gt;
==done==&lt;br /&gt;
* Christian, please add this line to your ~/.bashrc: umask u=rwx,g=rwx,o=rx. thanks Alex&lt;br /&gt;
* SVN checkout problem in project project.editor.application: files are not check-out plugin.xml, version.properties. Update of svn-externals and Hudson solved the issued.&lt;br /&gt;
* pom.xml: Make configurable: GWT-compile only of certain modules and of the html file. (e.g. webprotege.html). Relevant web pages added to QaGuide. &lt;br /&gt;
* pom.xml: reduce size of war. the lib folder is cleaned, the svn is updated. Now only the libs defined in pom.xml are part of the war. Can be further reduced with &amp;lt;provided&amp;gt;true&amp;gt;&amp;lt;/provided&amp;gt;&lt;br /&gt;
* pom.xml: folder webprotege (generated by GWT with ugly files): all *.rpc files have to be copied one level up (same level as webprotege), http://maven.apache.org/plugins/maven-resources-plugin/examples/copy-resources.html&lt;br /&gt;
* Complete UI scripting for iCAT and finish automatic build and testing of WebProtege: Build 168: Strike!&lt;br /&gt;
&lt;br /&gt;
=Alex=&lt;br /&gt;
==open==&lt;br /&gt;
nothing&lt;br /&gt;
==status unclear==&lt;br /&gt;
# Synchronize times on different servers (especially SVN and bmir-husdson1), e.g. by using a time server/service (http://time.stanford.edu?).&lt;br /&gt;
==done==&lt;br /&gt;
# Setup X-Server and care about &amp;quot;export DISPLAY=localhost:0.0&amp;quot;&lt;br /&gt;
# have all servers running as service: Hudson, Sonar, Nexus, Tomcat (and have it restarted on a daily basis), Selenium&lt;br /&gt;
# Add plugins to MediaWiki:  &lt;br /&gt;
#* Add Syntaxhighlighter plugin to MediaWiki: http://www.mediawiki.org/wiki/Extension:SyntaxHighlight_GeSHi&lt;br /&gt;
#* Add Video-Plugin to MediaWiki: http://paulgu.com/wiki/FLV_Player&lt;br /&gt;
#* Give Christian Access to upload images and videos either per FTP or file upload&lt;br /&gt;
&lt;br /&gt;
[[Category:QualityAssurance]]&lt;/div&gt;</summary>
		<author><name>Johner</name></author>	</entry>

	<entry>
		<id>https://protegewiki.stanford.edu/index.php?title=Stanford:QaGuide&amp;diff=9293</id>
		<title>Stanford:QaGuide</title>
		<link rel="alternate" type="text/html" href="https://protegewiki.stanford.edu/index.php?title=Stanford:QaGuide&amp;diff=9293"/>
				<updated>2010-12-16T19:48:44Z</updated>
		
		<summary type="html">&lt;p&gt;Johner: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=How-to for architects, test and project managers=&lt;br /&gt;
==Target audience and scope==&lt;br /&gt;
In this section you find how tos which are related to convert projects from ANT to Maven, to write pom.xml files etc.&lt;br /&gt;
==Comprehensive example==&lt;br /&gt;
There is a project that shows everything related to build and testing:&lt;br /&gt;
* how to write a pom.xml&lt;br /&gt;
* how to write and integrate unit tests (JUnit and TestNG)&lt;br /&gt;
* how to write and integrate integration tests (selenium)&lt;br /&gt;
&lt;br /&gt;
Please visit https://bmir-gforge.stanford.edu/svn/hudson-test/Hudson-Test.&lt;br /&gt;
&lt;br /&gt;
=How to create a new or convert an existing project =&lt;br /&gt;
This steps steps have to be done once per project)&lt;br /&gt;
==Establish or change to Maven directory structure==&lt;br /&gt;
The following is copied from http://maven.apache.org/guides/introduction/introduction-to-the-standard-directory-layout.html. It documents the directory layout expected by Maven and the directory layout created by Maven. Please try to conform to this structure as much as possible; however, if you can't these settings can be overridden via the project descriptor.&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
!Path &lt;br /&gt;
!Description &lt;br /&gt;
|-&lt;br /&gt;
|'''src/main/java''' &lt;br /&gt;
| Application/Library sources &lt;br /&gt;
|-&lt;br /&gt;
|'''src/main/resources''' &lt;br /&gt;
| Application/Library resources &lt;br /&gt;
|-&lt;br /&gt;
|src/main/filters &lt;br /&gt;
| Resource filter files &lt;br /&gt;
|-&lt;br /&gt;
|src/main/assembly &lt;br /&gt;
| Assembly descriptors &lt;br /&gt;
|-&lt;br /&gt;
|src/main/config &lt;br /&gt;
| Configuration files &lt;br /&gt;
|-&lt;br /&gt;
|'''src/main/webapp''' &lt;br /&gt;
| Web application sources &lt;br /&gt;
|-&lt;br /&gt;
|'''src/test/java''' &lt;br /&gt;
| Test sources &lt;br /&gt;
|-&lt;br /&gt;
|'''src/test/resources''' &lt;br /&gt;
| Test resources &lt;br /&gt;
|-&lt;br /&gt;
|src/test/filters &lt;br /&gt;
| Test resource fiter files &lt;br /&gt;
|-&lt;br /&gt;
|src/site &lt;br /&gt;
| Site &lt;br /&gt;
|-&lt;br /&gt;
|LICENSE.txt &lt;br /&gt;
| Project's license &lt;br /&gt;
|-&lt;br /&gt;
|NOTICE.txt &lt;br /&gt;
| Notices and attributions required by libraries that the project depends on &lt;br /&gt;
|-&lt;br /&gt;
|README.txt &lt;br /&gt;
| Project's readme &lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In the table the most relevant paths are marked bold.&lt;br /&gt;
&lt;br /&gt;
Additionally there are at the top level &lt;br /&gt;
* pom.xml &lt;br /&gt;
* other optional files as properties, maven.xml or build.xml (if using Ant). &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In order to get to the new file structure:&lt;br /&gt;
* Add folder inside /src: &amp;lt;tt&amp;gt;/src/main/java and /src/test/java&amp;lt;/tt&amp;gt;&lt;br /&gt;
* Move &amp;lt;tt&amp;gt;/src/edu&amp;lt;/tt&amp;gt; respectively &amp;lt;tt&amp;gt;/test/edu&amp;lt;/tt&amp;gt; folders into new folders.&lt;br /&gt;
* Delete folder test-lib&lt;br /&gt;
* Rename “war” to “webapp” and move folder under /src. (here I ran into problems. Really the best way?)&lt;br /&gt;
* Add folder &amp;lt;tt&amp;gt;/src/main/resources/config&amp;lt;/tt&amp;gt;. Add to this folder &amp;lt;tt&amp;gt;configuration.properties&amp;lt;/tt&amp;gt; file.&lt;br /&gt;
* Add under &amp;lt;tt&amp;gt;src/test/java&amp;lt;/tt&amp;gt; following folders: &amp;lt;tt&amp;gt;/client/&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;/selenium&amp;lt;/tt&amp;gt;??&lt;br /&gt;
* Delete files in root folder with exception of src. Delete e.g. /etc/, &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To move files/directories you can use Tortoise as described in http://stackoverflow.com/questions/62570/how-do-i-move-a-file-or-folder-from-one-folder-to-another-in-tortoisesvn. &lt;br /&gt;
&lt;br /&gt;
'''Hint:''' In the developer guide there is a description how to import a project from SVN and immediatelly update the src-folder to the expected structure.&lt;br /&gt;
&lt;br /&gt;
==How to upload required artifacts (typicall jar-files) to Nexus repository==&lt;br /&gt;
There are multiple ways of adding resources to the repository&lt;br /&gt;
# Direct copy ('''not recommended''')&lt;br /&gt;
#* Copy resources directly to Nexus subfolder e.g. to &amp;lt;tt&amp;gt;/var/nexus/sonatype-work/nexus/storage/thirdparty/edu/stanford/bmir/core/icd&amp;lt;/tt&amp;gt;.&lt;br /&gt;
#* You need to put the file the right directory and give it the name indicating the version number, e.g. &amp;lt;tt&amp;gt;/edu/Stanford/bmir/core/protégé-1.0.jar&amp;lt;/tt&amp;gt;&lt;br /&gt;
#* Goto nexus and right click on third party repository: reindex respectively rebuild metadata&lt;br /&gt;
# Uploaded file automatically in due course of a build process (this is '''recommended''' for &amp;quot;own&amp;quot; code as Snapshots and Releases).&lt;br /&gt;
#* There is nothing to do besides adding the &amp;lt;distributionManagement&amp;gt; tag to the pom.xml and use the deploy plugin. The PC specific &amp;lt;tt&amp;gt;settings.xml&amp;lt;/tt&amp;gt; has to point to the repository as described in the adminstrators guide in section TODO&lt;br /&gt;
# Uploaded file using the Nexus interface ('''recommended only for third party artifacts'''). This option is described in the following:&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
| [[Image:nexus-upload-1.png|thumb|upright|alt=Screenshot how to upload jars to Nexus (step 1)|upload an artifact to Nexus (part 1): Select repository]]&lt;br /&gt;
| [[Image:nexus-upload-2.png|thumb|upright|alt=Screenshot how to upload jars to Nexus (step 2)|upload an artifact to Nexus (part 2): Define GAV parameters]]&lt;br /&gt;
| [[Image:nexus-upload-3.png|thumb|upright|alt=Screenshot how to upload jars to Nexus (step 3)|upload an artifact to Nexus (part 3): Reindexing]]&lt;br /&gt;
| [[Image:nexus-get-dependency.png|thumb|upright|alt=Screenshot how copy the dependency snippet for pom.xml|copy the dependency snippet for pom.xml]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
	 &lt;br /&gt;
For each artifact (jar) you can later copy the dependency information for Maven (into the pom.xml). The code snipped look like:&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;dependency&amp;gt;&lt;br /&gt;
    &amp;lt;groupId&amp;gt;edu.stanford.bmir.core&amp;lt;/groupId&amp;gt;&lt;br /&gt;
    &amp;lt;artifact&amp;gt;protege&amp;lt;/artifact&amp;gt;&lt;br /&gt;
    &amp;lt;version&amp;gt;1.0&amp;lt;/version&amp;gt;&lt;br /&gt;
  &amp;lt;/dependency&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
TODO: define naming convention for groupId. Currently discussed are the following&lt;br /&gt;
* protege3&lt;br /&gt;
* protege4&lt;br /&gt;
* webprotege&lt;br /&gt;
* owl&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Further reading&lt;br /&gt;
* http://www.sonatype.com/books/nexus-book/reference/maven-sect-single-group.html &lt;br /&gt;
* http://www.sonatype.com/books/nexus-book/reference/maven-sect-single-group.html &lt;br /&gt;
*	http://stackoverflow.com/questions/1584763/how-do-i-deploy-to-nexus-hosted-by-secureci&lt;br /&gt;
&lt;br /&gt;
==How to write the Maven script (pom.xml)==&lt;br /&gt;
In our case the pom.xml typically will have the following structure:&lt;br /&gt;
* Some general information e.g.&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;modelVersion&amp;gt;4.0.0&amp;lt;/modelVersion&amp;gt;&lt;br /&gt;
  &amp;lt;groupId&amp;gt;edu.stanford.smi.protegex&amp;lt;/groupId&amp;gt;&lt;br /&gt;
  &amp;lt;artifactId&amp;gt;dlquery&amp;lt;/artifactId&amp;gt;&lt;br /&gt;
  &amp;lt;packaging&amp;gt;jar&amp;lt;/packaging&amp;gt;&lt;br /&gt;
  &amp;lt;name&amp;gt;protege-plugin-dlquery&amp;lt;/name&amp;gt;&lt;br /&gt;
  &amp;lt;version&amp;gt;0.0.3-SNAPSHOT&amp;lt;/version&amp;gt;&lt;br /&gt;
	&lt;br /&gt;
* Properties as the Java version&lt;br /&gt;
* the &amp;lt;tt&amp;gt;&amp;lt;distributionManagement&amp;gt;&amp;lt;/tt&amp;gt; tag which is necessary if artifacts have to deployed to a repository&lt;br /&gt;
* the &amp;lt;tt&amp;gt;&amp;lt;dependency/&amp;gt;&amp;lt;/tt&amp;gt; tags (an example was given above)&lt;br /&gt;
* the build part with its plugins (e.g. to compile, test, deploy)&lt;br /&gt;
* the reporting part with its plugins (e.g. PMD, Findbugs, JDepend)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It is recommended to use an existing &amp;lt;tt&amp;gt;pom.xml&amp;lt;/tt&amp;gt; as template. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Further hints and readings:&lt;br /&gt;
* the version number can be automatically adjusted with a version plugin. The postfix &amp;quot;&amp;lt;tt&amp;gt;SNAPSHOT&amp;lt;/tt&amp;gt;&amp;quot; determines that the artifact won't be uploaded to the release but to the snapshot repository. &lt;br /&gt;
* Both repositories (snapshot and release) are defined in the &amp;lt;tt&amp;gt;&amp;lt;distributionManagement&amp;gt;&amp;lt;/tt&amp;gt; section respectively in the &amp;lt;tt&amp;gt;/maven/conf/settings.xml&amp;lt;/tt&amp;gt; file.&lt;br /&gt;
* If you are deploying to tomcat, e.g. to perform integration tests, make sure that user and password match with tomcat manger credentials.&lt;br /&gt;
* GWT Plugin&lt;br /&gt;
** http://gwt-maven.googlecode.com/svn/docs/maven-googlewebtoolkit2-plugin/setup.html&lt;br /&gt;
** http://www.ducktools.org/2010/03/maven-and-gwt.html&lt;br /&gt;
** http://mojo.codehaus.org/gwt-maven-plugin/examples/compile.html&lt;br /&gt;
** http://zenoconsulting.wikidot.com/blog:16&lt;br /&gt;
* '''Please read the FAQ section with specific questions on how to write a pom.xml'''.&lt;br /&gt;
&lt;br /&gt;
==How to add project to Hudson==&lt;br /&gt;
[[File:hudson-configure-svn.png|thumb|Projects can be added from the Hudson administration interface]]&lt;br /&gt;
* Go to Hudson page (e.g. http://bmir-hudson1.stanford.edu). &lt;br /&gt;
* Add new job. Select name (e.g. WebProtégé”) and type of project (“Build a maven2 project”).&lt;br /&gt;
* Select in section “Source Code Management” the option “Subversion” and add SVN server URL (e.g. http://smi-protege.stanford.edu/repos/protege/web-protege/branches/who-maven/). Keep “Use update” checked. No local module directory. (no password needed?)&lt;br /&gt;
* Determine build interval respectively trigger. Currently we use “Build whenever a SNAPSHOT dependency is built”.&lt;br /&gt;
* Optionally enable email notification.&lt;br /&gt;
* Activate Sonar in “Post-Build-Activities” (Sonar needs to be installed first)&lt;br /&gt;
  &lt;br /&gt;
=FAQs=&lt;br /&gt;
==Related to reporting==&lt;br /&gt;
===My code coverage statistics aren’t updated. What can I do?===&lt;br /&gt;
Please change version in pom.xml to next snapshot respectively release number. Don’t forget the configuration.properties file.&lt;br /&gt;
&lt;br /&gt;
===I do not get code coverage statistics for my integration tests. What can I do?===&lt;br /&gt;
Currently nothing, this is the way maven handles the build process.&lt;br /&gt;
&lt;br /&gt;
==My build fails since the sonar plugin was not found! What can I do?==&lt;br /&gt;
Your Hudson build fails. In the console output you find this stacktrace:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  org.apache.maven.lifecycle.LifecycleExecutionException: The plugin 'org.codehaus.mojo:sonar-maven-plugin' does not exist or no valid version could be found&lt;br /&gt;
	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.verifyPlugin(DefaultLifecycleExecutor.java:1569)&lt;br /&gt;
	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.getMojoDescriptor(DefaultLifecycleExecutor.java:1851)&lt;br /&gt;
	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.segmentTaskListByAggregationNeeds(DefaultLifecycleExecutor.java:462)&lt;br /&gt;
	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:175)&lt;br /&gt;
	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Then you most probably ran into a Maven bug which is [http://docs.codehaus.org/display/SONAR/Frequently+Asked+Questions#FrequentlyAskedQuestions-Theplugin%27org.apache.maven.plugins%3Amavensonarplugin%27doesnotexistornovalidversioncouldbefound|described here].&lt;br /&gt;
&lt;br /&gt;
What can you do? As the plugin update is not working as it is supposed to do, please remove the following two directories:&lt;br /&gt;
# Maven local repository: &amp;lt;tt&amp;gt;/usr/local/data/hudson/.m2/repository/org/codehaus/mojo/sonar-maven-plugin&amp;lt;/tt&amp;gt;&lt;br /&gt;
# Nexus repository: &amp;lt;tt&amp;gt;/usr/local/data/sonatype-work/nexus/storage/central/org/codehaus/mojo/sonar-maven-plugin&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then run the build again. Now the repositories are updated and your build should run successfully.&lt;br /&gt;
&lt;br /&gt;
If this fails do addtionally the following:&lt;br /&gt;
# ssh to bmir-hudson1.standford.edu&lt;br /&gt;
# Switch user: &amp;lt;tt&amp;gt;sudo su - hudson&amp;lt;/tt&amp;gt;&lt;br /&gt;
# if Maven path is not yet set: &lt;br /&gt;
#* &amp;lt;tt&amp;gt;export M2_HOME=/usr/local/apache-maven-2.2.1&amp;lt;/tt&amp;gt;&lt;br /&gt;
#* &amp;lt;tt&amp;gt;export PATH=$PATH:$HOME/bin:$JAVA_HOME/bin:$M2_HOME/bin&amp;lt;/tt&amp;gt;&lt;br /&gt;
# Run one project from command line&lt;br /&gt;
#* switch to one project &amp;lt;tt&amp;gt;cd /usr/local/data/hudson/jobs/Example-Project/workspace&amp;lt;/tt&amp;gt;&lt;br /&gt;
#* &amp;lt;tt&amp;gt;mvn -U sonar:sonar&amp;lt;/tt&amp;gt; The -U forces the update. Now the maven plugin should be downloaded&lt;br /&gt;
&lt;br /&gt;
==Related to pom.xml==&lt;br /&gt;
===How can copy output to a specific directory?===&lt;br /&gt;
Remark: In the perfect world you are deploying your artifacts to a local or a remote repository. You are not supposed to work with specific target directories. Nevertheless there may be occasions where it is necessary to do so:&lt;br /&gt;
&lt;br /&gt;
====Step 1: Use Resource Plugin====&lt;br /&gt;
Add copy plugin to your pom.xml (in build section). Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;!--  Copy the stuff to the desired place --&amp;gt;&lt;br /&gt;
  &amp;lt;plugin&amp;gt;&lt;br /&gt;
    &amp;lt;artifactId&amp;gt;maven-resources-plugin&amp;lt;/artifactId&amp;gt;&lt;br /&gt;
    &amp;lt;version&amp;gt;2.4.3&amp;lt;/version&amp;gt;&lt;br /&gt;
    &amp;lt;executions&amp;gt;&lt;br /&gt;
      &amp;lt;execution&amp;gt;&lt;br /&gt;
        &amp;lt;id&amp;gt;copy-resources&amp;lt;/id&amp;gt;&lt;br /&gt;
        &amp;lt;!-- here the phase you need --&amp;gt;&lt;br /&gt;
        &amp;lt;phase&amp;gt;test&amp;lt;/phase&amp;gt;&lt;br /&gt;
        &amp;lt;goals&amp;gt;&lt;br /&gt;
          &amp;lt;goal&amp;gt;copy-resources&amp;lt;/goal&amp;gt;&lt;br /&gt;
        &amp;lt;/goals&amp;gt;&lt;br /&gt;
        &amp;lt;configuration&amp;gt;&lt;br /&gt;
          &amp;lt;outputDirectory&amp;gt;${outputdir}&amp;lt;/outputDirectory&amp;gt;&lt;br /&gt;
          &amp;lt;resources&amp;gt;&lt;br /&gt;
            &amp;lt;resource&amp;gt;&lt;br /&gt;
              &amp;lt;directory&amp;gt;src&amp;lt;/directory&amp;gt;&lt;br /&gt;
              &amp;lt;filtering&amp;gt;true&amp;lt;/filtering&amp;gt;&lt;br /&gt;
            &amp;lt;/resource&amp;gt;&lt;br /&gt;
          &amp;lt;/resources&amp;gt;&lt;br /&gt;
        &amp;lt;/configuration&amp;gt;&lt;br /&gt;
      &amp;lt;/execution&amp;gt;&lt;br /&gt;
    &amp;lt;/executions&amp;gt;&lt;br /&gt;
  &amp;lt;/plugin&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Step 2: Parametrize output directory====&lt;br /&gt;
Set the variable (outputdir) either in the properties-section of the pom.xml:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;properties&amp;gt;&lt;br /&gt;
    &amp;lt;maven.compiler.source&amp;gt;1.6&amp;lt;/maven.compiler.source&amp;gt;&lt;br /&gt;
    &amp;lt;maven.compiler.target&amp;gt;1.6&amp;lt;/maven.compiler.target&amp;gt;&lt;br /&gt;
    &amp;lt;outputdir&amp;gt;testoutput/testdirectory&amp;lt;/outputdir&amp;gt;&lt;br /&gt;
  &amp;lt;/properties&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Or in an external properties file. This requires the Maven properties plugin:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;plugin&amp;gt;&lt;br /&gt;
    &amp;lt;groupId&amp;gt;org.codehaus.mojo&amp;lt;/groupId&amp;gt;&lt;br /&gt;
    &amp;lt;artifactId&amp;gt;properties-maven-plugin&amp;lt;/artifactId&amp;gt;&lt;br /&gt;
    &amp;lt;version&amp;gt;1.0-alpha-1&amp;lt;/version&amp;gt;&lt;br /&gt;
    &amp;lt;executions&amp;gt;&lt;br /&gt;
      &amp;lt;execution&amp;gt;&lt;br /&gt;
        &amp;lt;phase&amp;gt;initialize&amp;lt;/phase&amp;gt;&lt;br /&gt;
        &amp;lt;goals&amp;gt;&lt;br /&gt;
          &amp;lt;goal&amp;gt;read-project-properties&amp;lt;/goal&amp;gt;&lt;br /&gt;
        &amp;lt;/goals&amp;gt;&lt;br /&gt;
        &amp;lt;configuration&amp;gt;&lt;br /&gt;
          &amp;lt;files&amp;gt;&lt;br /&gt;
            &amp;lt;file&amp;gt;src/main/resources/example.properties&amp;lt;/file&amp;gt;&lt;br /&gt;
          &amp;lt;/files&amp;gt;&lt;br /&gt;
        &amp;lt;/configuration&amp;gt;&lt;br /&gt;
      &amp;lt;/execution&amp;gt;&lt;br /&gt;
    &amp;lt;/executions&amp;gt;&lt;br /&gt;
  &amp;lt;/plugin&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this (latter) case there is a src/main/resources/example.properties with an entry&lt;br /&gt;
&lt;br /&gt;
  outputdir = testoutput2/testdirectory&lt;br /&gt;
&lt;br /&gt;
Further reading:&lt;br /&gt;
&lt;br /&gt;
* “Copy-plugin”: http://maven.apache.org/plugins/maven-resources-plugin/examples/copy-resources.html &lt;br /&gt;
* Version plugin: http://mojo.codehaus.org/properties-maven-plugin/plugin-info.html (not to be mixed up with similar plugin http://haroon.sis.utoronto.ca/zarar/properties-maven-plugin/usage.html)&lt;br /&gt;
&lt;br /&gt;
===How can I set the version number in the manifest of OSGI bundles?===&lt;br /&gt;
&lt;br /&gt;
Further reading&lt;br /&gt;
* http://felix.apache.org/site/apache-felix-maven-osgi-plugin.html&lt;br /&gt;
* http://felix.apache.org/site/apache-felix-maven-bundle-plugin-bnd.html &lt;br /&gt;
&lt;br /&gt;
===How can I set the version number of the build number===&lt;br /&gt;
====Do it the default way====&lt;br /&gt;
The easiest way is to do nothing. Maven automatically increases the version number for snapshot releases. You even would have to turn it off explicitly in the pom.xml:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;distributionManagement&amp;gt;&lt;br /&gt;
		&amp;lt;repository&amp;gt;&lt;br /&gt;
			&amp;lt;id&amp;gt;releases&amp;lt;/id&amp;gt;&lt;br /&gt;
			&amp;lt;url&amp;gt;${nexus.path}/bmir-release&amp;lt;/url&amp;gt;&lt;br /&gt;
		&amp;lt;/repository&amp;gt;&lt;br /&gt;
&lt;br /&gt;
		&amp;lt;snapshotRepository&amp;gt;&lt;br /&gt;
			&amp;lt;id&amp;gt;snapshots&amp;lt;/id&amp;gt;&lt;br /&gt;
			&amp;lt;name&amp;gt;Internal Snapshots&amp;lt;/name&amp;gt;&lt;br /&gt;
			&amp;lt;url&amp;gt;${nexus.path}/snapshots&amp;lt;/url&amp;gt;&lt;br /&gt;
			&amp;lt;uniqueVersion&amp;gt;false&amp;lt;/uniqueVersion&amp;gt; &amp;lt;!-- This is the important line--&amp;gt;&lt;br /&gt;
		&amp;lt;/snapshotRepository&amp;gt;&lt;br /&gt;
	&amp;lt;/distributionManagement&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Do it explicitly====&lt;br /&gt;
Another way to determine the build number is by using the Maven build number plugin. This is quite forward:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;build&amp;gt;&lt;br /&gt;
    &amp;lt;!-- The final name uses the build namber plugin. You can either us the repository id,&lt;br /&gt;
    an incremental number or a timestamp. Or combinations of those --&amp;gt;&lt;br /&gt;
    &amp;lt;finalName&amp;gt;${project.artifactId}-${project.version}-r${buildNumber}&amp;lt;/finalName&amp;gt;&lt;br /&gt;
	 	&lt;br /&gt;
    &amp;lt;plugins&amp;gt;&lt;br /&gt;
      &amp;lt;!-- This plugin is needed to autoincrement the version number --&amp;gt;&lt;br /&gt;
      &amp;lt;plugin&amp;gt;&lt;br /&gt;
        &amp;lt;groupId&amp;gt;org.codehaus.mojo&amp;lt;/groupId&amp;gt;&lt;br /&gt;
        &amp;lt;artifactId&amp;gt;buildnumber-maven-plugin&amp;lt;/artifactId&amp;gt;&lt;br /&gt;
        &amp;lt;version&amp;gt;1.0-beta-3&amp;lt;/version&amp;gt;&lt;br /&gt;
        &amp;lt;executions&amp;gt;&lt;br /&gt;
          &amp;lt;execution&amp;gt;&lt;br /&gt;
            &amp;lt;phase&amp;gt;validate&amp;lt;/phase&amp;gt;&lt;br /&gt;
            &amp;lt;goals&amp;gt;&lt;br /&gt;
              &amp;lt;goal&amp;gt;create&amp;lt;/goal&amp;gt;&lt;br /&gt;
            &amp;lt;/goals&amp;gt;&lt;br /&gt;
          &amp;lt;/execution&amp;gt;&lt;br /&gt;
        &amp;lt;/executions&amp;gt;&lt;br /&gt;
        &amp;lt;configuration&amp;gt;&lt;br /&gt;
          &amp;lt;!-- the &amp;quot;0&amp;quot; refers to item[0] which is the timestamp --&amp;gt;&lt;br /&gt;
          &amp;lt;format&amp;gt;{0,date,yyyy-MM-dd-HH-mm-ss}&amp;lt;/format&amp;gt;&lt;br /&gt;
          &amp;lt;items&amp;gt;&lt;br /&gt;
            &amp;lt;item&amp;gt;timestamp&amp;lt;/item&amp;gt;&lt;br /&gt;
          &amp;lt;/items&amp;gt;&lt;br /&gt;
        &amp;lt;/configuration&amp;gt;		&lt;br /&gt;
      &amp;lt;/plugin&amp;gt;&lt;br /&gt;
&lt;br /&gt;
      &amp;lt;!-- and now all the other plugins --&amp;gt;&lt;br /&gt;
    &amp;lt;/plugins&amp;gt;&lt;br /&gt;
  &amp;lt;/build&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The resulting file name could be sth. like &amp;lt;tt&amp;gt;dlquery-0.0.3-r2010-11-15-10-36-20.jar&amp;lt;/tt&amp;gt;. The &amp;lt;tt&amp;gt;dlquery&amp;lt;/tt&amp;gt; is the artifact id, &amp;lt;tt&amp;gt;0.0.3&amp;lt;/tt&amp;gt; the version, both read from the pom.xml (and not generated by the version plugin).&lt;br /&gt;
&lt;br /&gt;
The plugin also provides you the option to include this version in manifest files (jar, war).&lt;br /&gt;
&lt;br /&gt;
Additional ways to determine the build number:&lt;br /&gt;
* The plugin supports also to retrieve the version number from the current repository revision.&lt;br /&gt;
* You also can include the branch (${scmBranch}) into the version number.&lt;br /&gt;
* The plugin supports also autoincrement.&lt;br /&gt;
* You could use a property file which you can access in the &amp;lt;finalName&amp;gt; tag.&lt;br /&gt;
&lt;br /&gt;
Further reading&lt;br /&gt;
* http://mojo.codehaus.org/buildnumber-maven-plugin/usage.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===How and where to I decide if I want to make a snapshot release or a &amp;quot;real&amp;quot; release?===&lt;br /&gt;
Maven picks up your decision from the version. If your ends with &amp;lt;tt&amp;gt;-SNAPSHOT&amp;lt;/tt&amp;gt; then it is a snapshot release, otherweise are productive release.&lt;br /&gt;
&lt;br /&gt;
Example for a snapshot release:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;project xmlns=&amp;quot;http://maven.apache.org/POM/4.0.0&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;modelVersion&amp;gt;4.0.0&amp;lt;/modelVersion&amp;gt;&lt;br /&gt;
	&amp;lt;groupId&amp;gt;protege4&amp;lt;/groupId&amp;gt;&lt;br /&gt;
	&amp;lt;artifactId&amp;gt;xmlcatalog&amp;lt;/artifactId&amp;gt;&lt;br /&gt;
	&amp;lt;packaging&amp;gt;jar&amp;lt;/packaging&amp;gt;&lt;br /&gt;
	&amp;lt;name&amp;gt;xmlcatalog&amp;lt;/name&amp;gt;&lt;br /&gt;
	&amp;lt;version&amp;gt;1.0.0-SNAPSHOT&amp;lt;/version&amp;gt;&lt;br /&gt;
	...&lt;br /&gt;
  &amp;lt;/project&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===&amp;quot;I get a return error 400&amp;quot; or &amp;quot;I the deploy of artifacts to Nexus fails. What can I do?&amp;quot;===&lt;br /&gt;
There are two typical errors:&lt;br /&gt;
# the Maven setting.xml file (either locally or on Hudson) does not contain the right credentials.&lt;br /&gt;
# you are trying to deploy to a release repository. Per default it is not allowed to &amp;quot;overwrite&amp;quot; artifacts in a release repository. It is possible in Snapshot repositories. What type a repository has, you can find out by selecting the repository in Nexus (login first). The configuration tab will tell you.&lt;br /&gt;
&lt;br /&gt;
===What are the repositories I'm supposed to deploy to?===&lt;br /&gt;
We decided to work with two repositories only:&lt;br /&gt;
# BMIR-Release&lt;br /&gt;
# Snapshot&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===How do I assemple a complex project with dependencies?===&lt;br /&gt;
Please use the assembly plugin.&lt;br /&gt;
&lt;br /&gt;
Further reading:&lt;br /&gt;
* http://maven.apache.org/plugins/maven-assembly-plugin/index.html&lt;br /&gt;
* http://maven.apache.org/plugins/maven-dependency-plugin/ (includes the unpacking of artifacts into a directory)&lt;br /&gt;
&lt;br /&gt;
[[Category:QualityAssurance]]&lt;/div&gt;</summary>
		<author><name>Johner</name></author>	</entry>

	<entry>
		<id>https://protegewiki.stanford.edu/index.php?title=Stanford:AdministratorGuide&amp;diff=9292</id>
		<title>Stanford:AdministratorGuide</title>
		<link rel="alternate" type="text/html" href="https://protegewiki.stanford.edu/index.php?title=Stanford:AdministratorGuide&amp;diff=9292"/>
				<updated>2010-12-16T19:48:28Z</updated>
		
		<summary type="html">&lt;p&gt;Johner: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Installation and configuration of central server infrastructure =&lt;br /&gt;
[[File:infrastructure-2.png|thumb|Infrastructure with all servers and information flow]]&lt;br /&gt;
It is recommended to install the tools in the proposed sequence, since we have the following dependencies:&lt;br /&gt;
* Hudson uses Maven&lt;br /&gt;
* Hudson includes the Sonar plugin and triggers Sonar&lt;br /&gt;
* Maven retrieves libraries from Nexus&lt;br /&gt;
* Hudson executes the Maven script&lt;br /&gt;
* Maven includes profiles from Sonar and Nexus.&lt;br /&gt;
&lt;br /&gt;
We assume that SVN is already installed and that the projects exist in SVN.&lt;br /&gt;
&lt;br /&gt;
=JAVA=&lt;br /&gt;
* Download and install java. &lt;br /&gt;
* Set environment setting JAVA_HOME pointing to the java folder (e.g. on Windows “C:\Program Files\Java\jdk1.6.0_21\bin”).&lt;br /&gt;
&lt;br /&gt;
=Nexus=&lt;br /&gt;
==Initial Installation and configuration (one time)==&lt;br /&gt;
Download file (OS dependent) from http:////nexus.sonatype.org/downloads (e.g. “nexus-oss-webapp-1.8.0-bundle.zip”). Extract files to final directory. &lt;br /&gt;
OS dependent&lt;br /&gt;
* Windows: Open command line with bin folder as current directory (e.g. “C:\nexus\nexus-oss-webapp-1.8.0\bin\jsw\windows-x86-32”). Run Installnexus and Startnexus from command line. Windows Users (Vista, Windows 7) need to execute cmd.exe as Administrator (go to “All Programs”, “Accessories”, “Command Prompt”, right mouse click on “Run as Administrator”.&lt;br /&gt;
* Linux: Create folder /var/nexus/. Copy downloaded filder into this folder. Open command line with bin folder as current (e.g. /var/nexus/nexus-oss-webapp-1.8.0/bin/jsw/linux-x86-32). Run sudo ./nexus start&lt;br /&gt;
&lt;br /&gt;
Alternatively you can install Nexus as service as described in http://www.sonatype.com/books/nexus-book/reference/ch03s06.html. &lt;br /&gt;
&lt;br /&gt;
Test Nexus: http://localhost:8081/nexus/index.html. Login to Nexus with user name and password “admin” respectively XXX (/var/nexus/nexus-oss-webapp-1.8.0/conf/users.txt). Optionally make SMTP settings.&lt;br /&gt;
&lt;br /&gt;
==How to change the password==&lt;br /&gt;
If the NEXUS password is changed (TODO: has to be done soon), this has to happen in two places:&lt;br /&gt;
1.	Change it in Nexus itself using the administration/security interface&lt;br /&gt;
2.	Change it in the settings.xml in maven/conf/ directory. &lt;br /&gt;
&lt;br /&gt;
TODO: Change password.&lt;br /&gt;
==Setting up repositories==&lt;br /&gt;
===Option 1: Upload files individually===&lt;br /&gt;
Nexus comes with a predefined set of repositories. Now add the artifacts as described in the project manager's guide. TODO add link.&lt;br /&gt;
&lt;br /&gt;
===Option 2: Optionally import external repositories===&lt;br /&gt;
After install there is a “storage” folder  (e.g. “C:\nexus\sonatype-work\nexus\storage”).&lt;br /&gt;
&lt;br /&gt;
Copy Sonar folder to storage and overwrite folder “thirdparty”. In thirdparty there are the Stanford libs. Please refer to the appendix to get an overview.&lt;br /&gt;
&lt;br /&gt;
Current problem: the jars in the official repositories have not distinct versions. So it is not possible to point to a specific version. We are talking about the jars mentioned in the WebProtege developer guide (http://protegewiki.stanford.edu/wiki/WebProtegeDevelopersGuide) section “Fix project compilation errors”. &lt;br /&gt;
&lt;br /&gt;
=Sonar=&lt;br /&gt;
Just download zip file sonar-2.2 from http://www.sonarsource.org/. Unpack it to our tools folder (e.g. to /var/sonar/sonar-2.2).&lt;br /&gt;
&lt;br /&gt;
Start sonar from bin folder (e.g. /var/sonar/sonar-2.2/bin/linux-x86-32 folder:&lt;br /&gt;
* Windows  StartSonar&lt;br /&gt;
* Linux: sonar.sh (don’t forget to make this file and wrapper to be executable (set permissions)&lt;br /&gt;
&lt;br /&gt;
Test Sonar via http://localhost:9000. The default admin user name and password are admin/admin, however, there is no need to login.&lt;br /&gt;
&lt;br /&gt;
Optionally install Sonar as LINUX service. Command line /var/sonar/sonar-2.2.3/sudo cp bin/linux-x86-64/sonar.sh /etc/init.d/sonar&lt;br /&gt;
&lt;br /&gt;
The default password is changed. The current one can be found in /var/sonar/sonar-2.3/conf/users.txt. Or ask christian.johner@johner-institut.de.&lt;br /&gt;
&lt;br /&gt;
=Maven=&lt;br /&gt;
==Installation==&lt;br /&gt;
Download Maven from http://maven.apache.org/download.html und chose apache-maven-2.2.1.&lt;br /&gt;
&lt;br /&gt;
Add system environment variables:&lt;br /&gt;
* M2_HOME pointing to new directory apache-maven-2.2.1&lt;br /&gt;
* JAVA_HOME (if not already set)&lt;br /&gt;
&lt;br /&gt;
Add to Path ;%M2_HOME%\bin&lt;br /&gt;
&lt;br /&gt;
==Configuration==&lt;br /&gt;
Change file “apache-maven-2.2.1/conf/settings.xml”&lt;br /&gt;
* Add mirror (http://localhost:8081/nexus/content/groups/public) &lt;br /&gt;
  &amp;lt;mirrors&amp;gt;&lt;br /&gt;
    &amp;lt;mirror&amp;gt;&lt;br /&gt;
      &amp;lt;!--This sends everything else to /public --&amp;gt;&lt;br /&gt;
      &amp;lt;id&amp;gt;nexus&amp;lt;/id&amp;gt;&lt;br /&gt;
      &amp;lt;mirrorOf&amp;gt;*&amp;lt;/mirrorOf&amp;gt;&lt;br /&gt;
      &amp;lt;url&amp;gt;http://localhost:8081/nexus/content/groups/public&amp;lt;/url&amp;gt;&lt;br /&gt;
    &amp;lt;/mirror&amp;gt;&lt;br /&gt;
  &amp;lt;/mirrors&amp;gt;&lt;br /&gt;
* Add profiles for sonar and nexus&lt;br /&gt;
  &amp;lt;profiles&amp;gt;&lt;br /&gt;
    &amp;lt;profile&amp;gt;&lt;br /&gt;
      &amp;lt;id&amp;gt;nexus&amp;lt;/id&amp;gt;&lt;br /&gt;
      &amp;lt;!--Enable snapshots for the built in central repo to direct --&amp;gt;&lt;br /&gt;
      &amp;lt;!--all requests to nexus via the mirror --&amp;gt;&lt;br /&gt;
      &amp;lt;repositories&amp;gt;&lt;br /&gt;
        &amp;lt;repository&amp;gt;&lt;br /&gt;
          &amp;lt;id&amp;gt;central&amp;lt;/id&amp;gt;&lt;br /&gt;
          &amp;lt;url&amp;gt;http://central&amp;lt;/url&amp;gt;&lt;br /&gt;
          &amp;lt;releases&amp;gt;&amp;lt;enabled&amp;gt;true&amp;lt;/enabled&amp;gt;&amp;lt;/releases&amp;gt;&lt;br /&gt;
          &amp;lt;snapshots&amp;gt;&amp;lt;enabled&amp;gt;true&amp;lt;/enabled&amp;gt;&amp;lt;/snapshots&amp;gt;&lt;br /&gt;
        &amp;lt;/repository&amp;gt;&lt;br /&gt;
      &amp;lt;/repositories&amp;gt;&lt;br /&gt;
     &amp;lt;pluginRepositories&amp;gt;&lt;br /&gt;
        &amp;lt;pluginRepository&amp;gt;&lt;br /&gt;
          &amp;lt;id&amp;gt;central&amp;lt;/id&amp;gt;&lt;br /&gt;
          &amp;lt;url&amp;gt;http://central&amp;lt;/url&amp;gt;&lt;br /&gt;
          &amp;lt;releases&amp;gt;&amp;lt;enabled&amp;gt;true&amp;lt;/enabled&amp;gt;&amp;lt;/releases&amp;gt;&lt;br /&gt;
          &amp;lt;snapshots&amp;gt;&amp;lt;enabled&amp;gt;true&amp;lt;/enabled&amp;gt;&amp;lt;/snapshots&amp;gt;&lt;br /&gt;
        &amp;lt;/pluginRepository&amp;gt;&lt;br /&gt;
      &amp;lt;/pluginRepositories&amp;gt;&lt;br /&gt;
    &amp;lt;/profile&amp;gt;&lt;br /&gt;
        &amp;lt;profile&amp;gt;&lt;br /&gt;
            &amp;lt;id&amp;gt;sonar&amp;lt;/id&amp;gt;&lt;br /&gt;
            &amp;lt;activation&amp;gt;&lt;br /&gt;
                &amp;lt;activeByDefault&amp;gt;true&amp;lt;/activeByDefault&amp;gt;&lt;br /&gt;
            &amp;lt;/activation&amp;gt;&lt;br /&gt;
            &amp;lt;properties&amp;gt;&lt;br /&gt;
            &amp;lt;/properties&amp;gt;&lt;br /&gt;
        &amp;lt;/profile&amp;gt;&lt;br /&gt;
  &amp;lt;/profiles&amp;gt;&lt;br /&gt;
  &amp;lt;activeProfiles&amp;gt;&lt;br /&gt;
    &amp;lt;!--make the profile active all the time --&amp;gt;&lt;br /&gt;
    &amp;lt;activeProfile&amp;gt;nexus&amp;lt;/activeProfile&amp;gt;&lt;br /&gt;
  &amp;lt;/activeProfiles&amp;gt;&lt;br /&gt;
* Add servers&lt;br /&gt;
  &amp;lt;servers&amp;gt;&lt;br /&gt;
    &amp;lt;server&amp;gt;&lt;br /&gt;
      &amp;lt;id&amp;gt;snapshots&amp;lt;/id&amp;gt;&lt;br /&gt;
      &amp;lt;username&amp;gt;admin&amp;lt;/username&amp;gt;&lt;br /&gt;
      &amp;lt;password&amp;gt;admin123&amp;lt;/password&amp;gt;&lt;br /&gt;
    &amp;lt;/server&amp;gt;&lt;br /&gt;
    &amp;lt;!-- Distribution directory --&amp;gt;&lt;br /&gt;
    &amp;lt;server&amp;gt;&lt;br /&gt;
      &amp;lt;id&amp;gt;releases&amp;lt;/id&amp;gt;&lt;br /&gt;
      &amp;lt;username&amp;gt;admin&amp;lt;/username&amp;gt;&lt;br /&gt;
      &amp;lt;password&amp;gt;admin123&amp;lt;/password&amp;gt;&lt;br /&gt;
    &amp;lt;/server&amp;gt;&lt;br /&gt;
  &amp;lt;/servers&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Hint:''' the passwords shown in the code above have been the default passwords. They do not match the actual password. The actual password can be found in the Maven directory /conf/settings.xml on bmir-hudson.standford.edu.&lt;br /&gt;
&lt;br /&gt;
A complete settings.xml file can be downloaded from [[Stanford:SettingsXmlExample|here]].&lt;br /&gt;
&lt;br /&gt;
=Hudson=&lt;br /&gt;
==Install (one time) and start Hudson==&lt;br /&gt;
Windows&lt;br /&gt;
* Download war-file from www.hudson-ci.org. Just click on “latest and greatest”.&lt;br /&gt;
* Start server with java –jar hudson.war. Runs on http://localhost:8080 &lt;br /&gt;
&lt;br /&gt;
Linux&lt;br /&gt;
* Follow steps as described in http://hudson-ci.org/redhat/ (to use YUM) which are &lt;br /&gt;
* sudo rpm --import http://hudson-ci.org/redhat/hudson-ci.org.key&lt;br /&gt;
* wget -O /tmp/hudson.rpm http://hudson-ci.org/latest/redhat/hudson.rpm&lt;br /&gt;
* sudo rpm --install /tmp/hudson.rpm&lt;br /&gt;
* Start: sudo /etc/rc.d/init.d/hudson start&lt;br /&gt;
&lt;br /&gt;
==Initial Configuration (one time)==&lt;br /&gt;
[[File:hudson-add-sonar.png|thumb|Sonar can be added as plugin]]&lt;br /&gt;
Add plugins&lt;br /&gt;
* Go to “Manage Hudson” &amp;amp;rarr; “Manage Plugins”. &lt;br /&gt;
* Go to available plugins and install “Hudson Sonar Plugin”.&lt;br /&gt;
* Optionally add additional plugins. E.g. for Twitter, Trigger, e.g. jabber. Build reports is not needed as we use Sonar.&lt;br /&gt;
&lt;br /&gt;
[[File:hudson-configure.png|thumb|Paths to Maven and JDK to be defined in the configuration settings]]&lt;br /&gt;
Go back to “Manage Hudson” and select “Configure System” and make the following changes/settings&lt;br /&gt;
* Jdk: set name (e.g. “Java 1.6”) and path to Java (e.g. “C:\Program Files\Java\jdk1.6.0_21”). Hudson does not read the system variable JAVA_HOME.&lt;br /&gt;
* Maven: Add Maven (not ANT) and set name (e.g. “Maven 2”) and path to Maven (e.g. “C:\Tools\apache-maven-2.2.1” respectively ). Hudson does not read the system variable MAVEN_HOME.&lt;br /&gt;
* “Add Sonar”. Just add a name (e.g. “Sonar”). Set location e.g. to http://bmir-hudson1:9000.&lt;br /&gt;
* Optionally set e-mail notifications&lt;br /&gt;
&lt;br /&gt;
==Add projects==&lt;br /&gt;
Please refer to the project manager section. TODO add link.&lt;br /&gt;
&lt;br /&gt;
==Add Users==&lt;br /&gt;
Go to Hudson &amp;gt; Manage Server &amp;gt; Configure System and add an user by entering a name in text field &amp;quot;User/group to add&amp;quot;. Ignore the warning symbol, it will disappear as soon the user has registered himself. Give user rights by checking checkboxes. Click save.&lt;br /&gt;
&lt;br /&gt;
=Selenium Server (Selenium Remote Control)=&lt;br /&gt;
Set up a central Selenium Server. &lt;br /&gt;
* Download Selenium RC from http://seleniumhq.org/download/. &lt;br /&gt;
* Unzip file. We only need selenium-server-1.0.3 subfolder.&lt;br /&gt;
* Start server with java –jar selenium-server.jar &lt;br /&gt;
* Make sure that the display is set, e.g. export DISPLAY=…  (case sensitive, only WLAN IP worked?!?)&lt;br /&gt;
&lt;br /&gt;
There is already a file /etc/init.d/start-selenium-server.sh.&lt;br /&gt;
 [johner@bmir-hudson1 ~]$ export DISPLAY=10.39.35.249:0.0&lt;br /&gt;
 [johner@bmir-hudson1 ~]$ xhost&lt;br /&gt;
  access control disabled, clients can connect from any host&lt;br /&gt;
  INET:DN0a2723f9.SUNet&lt;br /&gt;
  LOCAL:&lt;br /&gt;
  INET:bmir-hudson1.stanford.edu&lt;br /&gt;
 [johner@bmir-hudson1 ~]$ java -jar /var/selenium/selenium-server.jar&lt;br /&gt;
&lt;br /&gt;
Note: the display settings have to be done before selenium is started!&lt;br /&gt;
&lt;br /&gt;
Either there is a XServer running on the test machine or a client machine (or server itself) needs running X-Server, e.g. run xming –ac. XMing is available for Windows.&lt;br /&gt;
&lt;br /&gt;
=Tomcat=&lt;br /&gt;
Standard out of the box: Either use yum or just download and extract apache-tomcat. Change in server-xml port to 8082 in order to avoid conflicts with Hudson.&lt;br /&gt;
&lt;br /&gt;
old:&lt;br /&gt;
  sudo /opt/tomcat/bin/startup.sh&lt;br /&gt;
  user name and password currently are currently set to admin/protégé.&lt;br /&gt;
&lt;br /&gt;
Change by Alex: /usr/local/tomcat6   it should start with /sbin/service tomact6 start&lt;br /&gt;
Password can be found in /etc/tomcat6/tomcat-users.xml&lt;br /&gt;
&lt;br /&gt;
[[Category:QualityAssurance]]&lt;/div&gt;</summary>
		<author><name>Johner</name></author>	</entry>

	<entry>
		<id>https://protegewiki.stanford.edu/index.php?title=Stanford:DeveloperGuide&amp;diff=9291</id>
		<title>Stanford:DeveloperGuide</title>
		<link rel="alternate" type="text/html" href="https://protegewiki.stanford.edu/index.php?title=Stanford:DeveloperGuide&amp;diff=9291"/>
				<updated>2010-12-16T19:48:01Z</updated>
		
		<summary type="html">&lt;p&gt;Johner: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=In a nutshell=&lt;br /&gt;
You work as you typically work just using Eclipse to develop and test. There are only a few things you need to consider:&lt;br /&gt;
* The initial setup of your Eclipse project is done with Maven.&lt;br /&gt;
* Prefer TestNG over JUnit in order to write unit tests.&lt;br /&gt;
* We encourage you to write UI tests using the Selenium framework.&lt;br /&gt;
* We encourage you to deploy your artifacts not just to the file system (local Maven repository) but also to the central Nexus repository, at least if you have the privileges to do so.&lt;br /&gt;
&lt;br /&gt;
And don’t forget to update and commit to/from on a daily basis.&lt;br /&gt;
&lt;br /&gt;
=How to start from scratch=&lt;br /&gt;
==Downloads and Installs==&lt;br /&gt;
[[Image:eclipse-jdk.png|thumb|Use the JDK instead of the JRE]]&lt;br /&gt;
===JAVA===&lt;br /&gt;
* Download and install java. &lt;br /&gt;
* Set environment setting &amp;lt;tt&amp;gt;JAVA_HOME&amp;lt;/tt&amp;gt; pointing to the java folder, e.g. &amp;lt;tt&amp;gt;C:\Program Files\Java\jdk1.6.0_21\bin&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===Maven===&lt;br /&gt;
* Download Maven from http://maven.apache.org/download.html und chose apache-maven-2.2.1.&lt;br /&gt;
* Add system environment variable M2_HOME pointing to new directory apache-maven-2.2.1&lt;br /&gt;
* Add to Path &amp;lt;tt&amp;gt;;%M2_HOME%\bin&amp;lt;/tt&amp;gt;&lt;br /&gt;
* Modify &amp;lt;tt&amp;gt;/conf/settings.xml&amp;lt;/tt&amp;gt;: Path to Nexus and you operating system. There is an [[Stanford:SettingsXmlExample|example page for a settings file]].&lt;br /&gt;
&lt;br /&gt;
===Eclipse===&lt;br /&gt;
* Download, extract and start eclipse&lt;br /&gt;
* Install subclipse plugin (update site is http://subclipse.tigris.org/update_1.6.x). Check all options, otherwise the SCM handler of Maven will be missing.&lt;br /&gt;
* Install GWT plusing (update site is http://dl.google.com/eclipse/plugin/3.6) with Helios 3.6, otherwise 3.5&lt;br /&gt;
* Install m2eclipse plugin (Update site is http://m2eclipse.sonatype.org/sites/m2e) &lt;br /&gt;
* Optional: Install m2eclipse extra plugin (Update site is http://m2eclipse.sonatype.org/sites/m2e-extras). Select Maven SCM handler for Subclipse and Maven SCM integration.&lt;br /&gt;
* Let Eclipse know the location of your installed JDK (nor JRE!) &lt;br /&gt;
* Start Eclipse with JDK (not JRE!) as described in http://help.eclipse.org/help33/index.jsp?topic=/org.eclipse.platform.doc.user/tasks/running_eclipse.htm. Example: &lt;br /&gt;
   &amp;quot;C:\Program Files\eclipse-jee-helios-SR1-win32\eclipse\eclipse.exe&amp;quot; -vm &amp;quot;C:\Programme\Java\jdk1.6.0_21\bin\javaw.exe&amp;quot; &lt;br /&gt;
&lt;br /&gt;
===Firefox &amp;amp; GWT plugin (only for GWT UI testing)===&lt;br /&gt;
After download and install of Firefox we recommend adding a new profile. Rationale: Selenium typically initiates a new Firefox profile which is missing the GWT Firefox plugin. Therefore we generate a new one:&lt;br /&gt;
* Open command window and go to Firefox directory &lt;br /&gt;
* Execute firefox -P. Plugin manager shows up.&lt;br /&gt;
* Add new profile and chose a directory, e.g. one Protégé related. &lt;br /&gt;
* Start Firefox and start eclipse. Open page http://127.0.0.1:8888/WebProtege.html?gwt.codesvr=127.0.0.1:9997. This prompts you to install the GWT plugin.&lt;br /&gt;
* Save the profile&lt;br /&gt;
&lt;br /&gt;
===Selenium (only for GWT UI testing)===&lt;br /&gt;
Please refer to chapter in section administration. TODO add link.&lt;br /&gt;
&lt;br /&gt;
Start server with &amp;lt;tt&amp;gt;java –jar selenium-server.jar -firefoxProfileTemplate &amp;lt;Path2Profile&amp;gt;&amp;lt;/tt&amp;gt;. &amp;lt;Path2Profile&amp;gt; is the folder you were choosing when creating the new profile. &lt;br /&gt;
&lt;br /&gt;
Example: &lt;br /&gt;
&lt;br /&gt;
  C:\Users\DrCJ\selenium-server-1.0.3&amp;gt;java -jar selenium-server.jar  -firefoxProfileTemplate c:\Users\DrCJ\firefoxprofile&lt;br /&gt;
&lt;br /&gt;
==Start working with a project e.g. with Protégé==&lt;br /&gt;
===Option 1: import project using Subclipse (preferred)===&lt;br /&gt;
Pretty straight forward&lt;br /&gt;
* Import project from repository using Subclipse.&lt;br /&gt;
**	File  &amp;gt; Import &amp;gt; SVN &amp;gt; SVN Projects. Import desired project and branch.&lt;br /&gt;
**	Use “Create Project wizard”, use “Next” instead of “Finish” button and add a new source folder “src/main/java” and remove “src” from build path. &lt;br /&gt;
**	Copy imported files from src to “src/main/java” folder. There will be problems, since libraries are missing. Do not tweak build path, this will be done automatically in the next step.&lt;br /&gt;
* Execute mvn eclipse:eclipse from command line&lt;br /&gt;
* Refresh project (F5)&lt;br /&gt;
&lt;br /&gt;
To update classpath (e.g. if there is a new jar (as defined in the pom.xml)) just repeat these steps.&lt;br /&gt;
&lt;br /&gt;
If there are still libraries missing (which are obviously defined in your pom.xml), please consult with your project manager or upload the artifacts to the respository as described in the project manager guide.&lt;br /&gt;
&lt;br /&gt;
[[Media:Import-Project.flv|import project using Subclipse (video tutorial)]]&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
| [[Image:eclipse-checkout-maven.png|thumb|upright|alt=Maven can be used to check out the project|Maven can be used to check out the project]]&lt;br /&gt;
| [[Image:eclipse-import-project.png|thumb|upright|alt=Or use SVN to download. Then call mvn eclipse:eclipse and import project|Or use SVN to download. Then call mvn eclipse:eclipse and import project]]&lt;br /&gt;
| [[Image:eclipse-gwt.png|thumb|upright|alt=make project to become a GWT project|make project to become a GWT project]]&lt;br /&gt;
| [[Image:eclipse-gwt-2.png|thumb|upright|alt=Set the webapp folder for the GWT compiled code|Set the webapp folder for the GWT compiled code]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Option 2: import project from command line (using a SVN client)===&lt;br /&gt;
* Download project  from repository with Tortoise or other (command line based) SVN client&lt;br /&gt;
* Execute mvn eclipse:eclipse from command line&lt;br /&gt;
* Refresh project (F5)&lt;br /&gt;
&lt;br /&gt;
To update classpath (e.g. if there is a new pom.xml) just repeat these steps.&lt;br /&gt;
&lt;br /&gt;
===Option 3: using the m2eclipse plugin===&lt;br /&gt;
Chose “Project” from the “File” menu, select Maven and then “Checkout maven Projects from SCM”.&lt;br /&gt;
 &lt;br /&gt;
===Configure GWT plugin===&lt;br /&gt;
* Select Project Properties and check under Google “Use Google App Engine”&lt;br /&gt;
* In project properties set plugin as active and change WAR directory to be /src/main/webapp (there is no longer a /war directory!)&lt;br /&gt;
&lt;br /&gt;
=Questions that may arise during development=&lt;br /&gt;
==How do I work with multiple projects in parallel==&lt;br /&gt;
To given an example: We work with projects A and B where B depends on A. (An example would be A = Protégé, B = WebProtégé.) &lt;br /&gt;
&lt;br /&gt;
Assuming you would like to make a change to project A which is required to continue working with project B:&lt;br /&gt;
&lt;br /&gt;
# Make the change in project A&lt;br /&gt;
# Go to the command line in project A's directory (e.g. in &amp;lt;tt&amp;gt;/home/&amp;lt;USER_NAME&amp;gt;/workspace/projectA&amp;lt;/tt&amp;gt;) and enter &amp;lt;tt&amp;gt;mvn install&amp;lt;/tt&amp;gt; [1], [2]. This will update your local Maven repository (M2_REPO) which typically is located in &amp;lt;tt&amp;gt;/home/.m2/repository&amp;lt;/tt&amp;gt; respectively in &amp;lt;tt&amp;gt;c:\user\&amp;lt;username&amp;gt;\.m2\repository&amp;lt;/tt&amp;gt;. [1]&lt;br /&gt;
# Go to the command line of project B and enter &amp;lt;tt&amp;gt;mvn eclipse:eclipse&amp;lt;/tt&amp;gt; [2]. This will update the classpath and (re)load the artifact of project A.&lt;br /&gt;
# Continue developing in project B.&lt;br /&gt;
&lt;br /&gt;
Actually there are two variants:&lt;br /&gt;
# Variant 1: you do not change the version number of the artifact of project A. In this case you do not have to modify the version number in project A's pom.xml. This is an advantage, another advantage is that you do not need to update the dependency section in the pom.xml of project B.&lt;br /&gt;
# Variant 2: you change the version number of the artifact of project A in the project A' pom.xml. This requires that you update the version in the dependency section in project B's pom.xml. The advantage of this variant is that you easily can switch back to the old version of project A's artifact, you even can have multiple versions in your repository.&lt;br /&gt;
&lt;br /&gt;
The dependency section in the pom.xml the text above is refering to looks like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;dependency&amp;gt;&lt;br /&gt;
    &amp;lt;groupId&amp;gt;protege&amp;lt;/groupId&amp;gt;&lt;br /&gt;
    &amp;lt;artifactId&amp;gt;protege-core&amp;lt;/artifactId&amp;gt;&lt;br /&gt;
    &amp;lt;version&amp;gt;3.4.2&amp;lt;/version&amp;gt;&lt;br /&gt;
  &amp;lt;/dependency&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[1]: If you want to skip the unit tests use &amp;lt;tt&amp;gt;mvn install -DskipTests=true&amp;lt;/tt&amp;gt; instead.&lt;br /&gt;
&lt;br /&gt;
[2]: Alternatively you can use the m2eclipse plugin.&lt;br /&gt;
&lt;br /&gt;
==How do I deploy my artifacts to the (central) Nexus repository==&lt;br /&gt;
First you have to have write privileges to BMIR's Nexus repository (http://bmir-hudson1.stanford.edu/nexus). Typically these privileges are only granted to a closed group of developers. Both, these privileges (-&amp;gt; credentials) and the path to the repository have to be entered to your Maven settings file (&amp;lt;tt&amp;gt;&amp;lt;MAVEN_INSTALL_DIR&amp;gt;/conf/settings.xml&amp;lt;/tt&amp;gt;). There is a [[Stanford:SettingsXmlExample|complete example of this file]] available. &lt;br /&gt;
&lt;br /&gt;
As soon you execute &amp;lt;tt&amp;gt;mvn deploy&amp;lt;/tt&amp;gt; the Nexus repository is updated. Please keep in mind that your artifact either is stored in the snapshot or in the release repository dependent on the version number in your pom.xml: If the version number ends with &amp;lt;tt&amp;gt;SNAPSHOT&amp;lt;/tt&amp;gt; the snapshot directory is addressed, otherwise the release repository.&lt;br /&gt;
&lt;br /&gt;
Keep in mind that...&lt;br /&gt;
* the SNAPSHOT repository allows the redeployment of an artifact (with the same version number), the release repository doesn't,&lt;br /&gt;
* a deployment (&amp;lt;tt&amp;gt;mvn deploy&amp;lt;/tt&amp;gt;) to the SNAPSHOT repository will autoincrement the version number of your artifact (if not explicitly turned off in the pom.xml), a deployment to the release repository won't.&lt;br /&gt;
* there is no autoincrement of the version number during install  (&amp;lt;tt&amp;gt;mvn install&amp;lt;/tt&amp;gt;),&lt;br /&gt;
* there is no need to install a local Nexus repository on your machine.&lt;br /&gt;
&lt;br /&gt;
==How to update classpath==&lt;br /&gt;
Just get latest pom.xml and execute mvn eclipse:eclipse. This will update (not overwrite) your classpath. Press refresh in Eclipse. There is not even a restart necessary.&lt;br /&gt;
&lt;br /&gt;
=How to write unit test case (TestNG, JUnit) and UI test cases (FEST, QFS)=&lt;br /&gt;
This section is about standard unit tests, i.e. not about writing UI tests/integrations tests using Selenium.&lt;br /&gt;
==How to re-use existing JUnit test cases==&lt;br /&gt;
===Option 1: Convert JUnit test cases to TestNG test cases===&lt;br /&gt;
You either can do that programmatically as described in http://testng.org/doc/migrating.html or you do that manually. TestNG tests look pretty much the same then JUnit tests. What has to be done typically includes:&lt;br /&gt;
* Change &amp;lt;tt&amp;gt;import to org.testng.annotations.*;&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;import static org.testng.Assert.*;&amp;lt;/tt&amp;gt;&lt;br /&gt;
* Add annotation &amp;lt;tt&amp;gt;@BeforeClass&amp;lt;/tt&amp;gt; to setup-method.&lt;br /&gt;
* Add annotation &amp;lt;tt&amp;gt;@Test&amp;lt;/tt&amp;gt; to your test methods&lt;br /&gt;
&lt;br /&gt;
===Option 2: Keep JUnit tests cases as they are and run it from TestNG===&lt;br /&gt;
In the &amp;lt;tt&amp;gt;/src/test/resources/unit-tests.xml&amp;lt;/tt&amp;gt; there is a section with &amp;lt;tt&amp;gt;junit=true&amp;lt;/tt&amp;gt;. Just add your tests there.&lt;br /&gt;
&lt;br /&gt;
Example (mind second set of tests)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;!DOCTYPE suite SYSTEM &amp;quot;http://testng.org/testng-1.0.dtd&amp;quot; &amp;gt;&lt;br /&gt;
  &amp;lt;suite name=&amp;quot;ProtegeTestSuite&amp;quot; verbose=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;test name=&amp;quot;TestNG-Tests&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;classes&amp;gt;&lt;br /&gt;
        &amp;lt;class name=&amp;quot;edu.stanford.bmir.protege.web.server.WatchedEntitiesCacheTest&amp;quot;&amp;gt;&amp;lt;/class&amp;gt;&lt;br /&gt;
        &amp;lt;class name=&amp;quot;client.TestUnitProtege&amp;quot;&amp;gt;&amp;lt;/class&amp;gt;&lt;br /&gt;
      &amp;lt;/classes&amp;gt;&lt;br /&gt;
    &amp;lt;/test&amp;gt;&lt;br /&gt;
    &amp;lt;test name=&amp;quot;JUnit-Tests (Example)&amp;quot; junit=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;classes&amp;gt;&lt;br /&gt;
        &amp;lt;class name=&amp;quot;client.JUnitExample&amp;quot;&amp;gt;&amp;lt;/class&amp;gt;&lt;br /&gt;
      &amp;lt;/classes&amp;gt;&lt;br /&gt;
    &amp;lt;/test&amp;gt;&lt;br /&gt;
  &amp;lt;/suite&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There are (theoretically) two options how to include JUnit tests cases to the continuous integration. &lt;br /&gt;
# Make sure that your test classes are in the designated folder /src/test/java and that they are following the naming convention *Test.java&lt;br /&gt;
# Specify the classes in the xml file in /src/test/resources&lt;br /&gt;
We decided to go for the latter option. All types of specification as test parameters, grouping of tests and running tests in parallel have to be defined in theses TestNG-XML-files (and not(!) in the pom.xml). In the pom.xml we deliberatly disabled the automatic execution of JUnit tests in the line &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;plugin&amp;gt;  &lt;br /&gt;
    &amp;lt;groupId&amp;gt;org.apache.maven.plugins&amp;lt;/groupId&amp;gt;&lt;br /&gt;
    &amp;lt;artifactId&amp;gt;maven-surefire-plugin&amp;lt;/artifactId&amp;gt;&lt;br /&gt;
    &amp;lt;configuration&amp;gt;&lt;br /&gt;
      &amp;lt;skip&amp;gt;true&amp;lt;/skip&amp;gt;&lt;br /&gt;
    &amp;lt;/configuration&amp;gt;&lt;br /&gt;
    ...&lt;br /&gt;
  &amp;lt;/plugin&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Write new TestNG test cases==&lt;br /&gt;
The vest resource to start is http://www.testng.org. Nevertheless the following lines might be helpful:&lt;br /&gt;
&lt;br /&gt;
It is recommended to use the TestNG plugin for Eclipse since it adds all libraries to your classpath. Then writing a new test case is straight forward:&lt;br /&gt;
* write a standard Java class. Even there is no naming convention required it is recommended to call the class XXXTest, whereas XXX stands for the class under test.&lt;br /&gt;
* Write some test methods. Even there is no naming convention required it is recommended to call the method testXXX, whereas XXX stands for the method to be tested. However the test methods require the annotation @Test.&lt;br /&gt;
* Optionally have methods which have to be executed one before the test class is executed respectively which are executed before each test method. Add annotations @BeforeClass, @AfterClass, @BeforeMethod, respectively @AfterMetehod&lt;br /&gt;
* Fix imports&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
  import junit.framework.Assert;&lt;br /&gt;
  import org.testng.annotations.AfterClass;&lt;br /&gt;
  import org.testng.annotations.BeforeClass;&lt;br /&gt;
  import org.testng.annotations.Parameters;&lt;br /&gt;
  import org.testng.annotations.Test;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Optional enhancements&lt;br /&gt;
** Add dependencies between methods e.g. &amp;lt;tt&amp;gt;@Test (dependsOnMethods = {&amp;quot;openICDTree&amp;quot;})&amp;lt;/tt&amp;gt; where openICDTree is the name of the other method.&lt;br /&gt;
** Move test parameters from test code to the configuration file, e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;test name=&amp;quot;Navigation 1&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;parameter name=&amp;quot;username&amp;quot;  value=&amp;quot;protege&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;parameter name=&amp;quot;username&amp;quot;  value=&amp;quot;secret&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;classes&amp;gt;&lt;br /&gt;
      &amp;lt;class name=&amp;quot;selenium.TestICat&amp;quot;&amp;gt;&amp;lt;/class&amp;gt;&lt;br /&gt;
    &amp;lt;/classes&amp;gt;&lt;br /&gt;
  &amp;lt;/test&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Refer to these parameters in the Java code&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
  @Test&lt;br /&gt;
  @Parameters({ &amp;quot;username&amp;quot;, &amp;quot;password&amp;quot; })&lt;br /&gt;
  public void login(String username, String password) throws InterruptedException {...}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Add new test case to the test-configuration xml as shown above.&lt;br /&gt;
&lt;br /&gt;
==How to write UI test cases (web) with Selenium==&lt;br /&gt;
===General===&lt;br /&gt;
The UI tests use the Selenium test framework. You either can write the tests from scratch or use the Selenium IDE, a Firefox Plugin to record actions and to generate Java Code (TestNG classes).&lt;br /&gt;
&lt;br /&gt;
The biggest challenge with writing UI tests is the identification of UI components since one can not relay on the id of the component. These ids are generated by GWT dynamically. &lt;br /&gt;
&lt;br /&gt;
===Example Code===&lt;br /&gt;
s. example.&lt;br /&gt;
===How to locate UI elements===&lt;br /&gt;
s. example.&lt;br /&gt;
===Resources===&lt;br /&gt;
* How to locate elements&lt;br /&gt;
** General: http://seleniumhq.org/docs/04_selenese_commands.html#locating-elements&lt;br /&gt;
** Usefull X-Path patterns: http://seleniumhq.org/docs/appendix_locating_techniques.html#useful-xpath-patterns&lt;br /&gt;
** X-Path in general: http://www.w3schools.com/xpath/xpath_examples.asp&lt;br /&gt;
** Calendars, Comboboxes, Popup etc: http://www.ibm.com/developerworks/opensource/library/os-webautoselenium/index.html?cmp=dw&amp;amp;cpb=dwope&amp;amp;ct=dwnew&amp;amp;cr=dwnen&amp;amp;ccy=zz&amp;amp;csr=120910&lt;br /&gt;
&lt;br /&gt;
==Comprehensive example==&lt;br /&gt;
There is a project that shows everything related to build and testing:&lt;br /&gt;
* how to write a pom.xml&lt;br /&gt;
* how to write and integrate unit tests (JUnit and TestNG)&lt;br /&gt;
* how to write and integrate integration tests (selenium)&lt;br /&gt;
&lt;br /&gt;
Please visit https://bmir-gforge.stanford.edu/svn/hudson-test/Hudson-Test.&lt;br /&gt;
==How to write UI test cases (Swing) using FEST==&lt;br /&gt;
The tutorial on how to write FEST tests will be written upon decision for/against FEST. So far please refer to the official documentation: http://docs.codehaus.org/display/FEST/Getting+Started&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;Example-Project&amp;quot; (Hudson) also contains a demo application using FEST: https://bmir-gforge.stanford.edu/svn/hudson-test/Hudson-Test&lt;br /&gt;
&lt;br /&gt;
==How to write UI test cases (Swing) using QF-Test==&lt;br /&gt;
The tutorial on how to write QFS tests will be written upon decision for/against QFS. So far please refer to the official documentation: &lt;br /&gt;
http://www.qfs.de (tutorials in English available).&lt;br /&gt;
&lt;br /&gt;
=Other questions=&lt;br /&gt;
==How to switch to ICD11 with all data (database)==&lt;br /&gt;
Follow instructions given in http://groups.google.com/group/icat-users/web/accessing-the-icat-content-programmatically?hl=en&amp;amp;_done=%2Fgroup%2Ficat-users%3Fhl%3Den%26&amp;amp;hl=en &lt;br /&gt;
&lt;br /&gt;
On Windows the import command might be slightly different than described in the website. Use instead&lt;br /&gt;
  mysql --user=protege --password=protege &amp;lt; c:\protege_2010-11-01_04h02m.Monday.sql&lt;br /&gt;
&lt;br /&gt;
In summary you need to&lt;br /&gt;
* import database (and check that protege DB acutally exists afterwards)&lt;br /&gt;
* add user&lt;br /&gt;
* grant rights to the user&lt;br /&gt;
&lt;br /&gt;
In order to do so, make use of the follwing commands:&lt;br /&gt;
  mysql -u root&lt;br /&gt;
  mysql&amp;gt; -u root connect to localhost;&lt;br /&gt;
  mysql&amp;gt; show databases;&lt;br /&gt;
  mysql&amp;gt; use protege;&lt;br /&gt;
  mysql&amp;gt; show tables;&lt;br /&gt;
  mysql&amp;gt; CREATE USER protege IDENTIFIED BY 'protege';&lt;br /&gt;
  mysql&amp;gt; GRANT SELECT, INSERT, UPDATE, DELETE on *.* to 'protege'@'localhost';&lt;br /&gt;
&lt;br /&gt;
More useful commands: http://www.pantz.org/software/mysql/mysqlcommands.html&lt;br /&gt;
&lt;br /&gt;
[[Category:QualityAssurance]]&lt;/div&gt;</summary>
		<author><name>Johner</name></author>	</entry>

	<entry>
		<id>https://protegewiki.stanford.edu/index.php?title=Stanford:OverviewPage&amp;diff=9290</id>
		<title>Stanford:OverviewPage</title>
		<link rel="alternate" type="text/html" href="https://protegewiki.stanford.edu/index.php?title=Stanford:OverviewPage&amp;diff=9290"/>
				<updated>2010-12-16T19:47:12Z</updated>
		
		<summary type="html">&lt;p&gt;Johner: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Overview=&lt;br /&gt;
==Infrastructure==&lt;br /&gt;
[[File:infrastructure-2.png|thumb|Infrastructure with all servers and information flow]]&lt;br /&gt;
&lt;br /&gt;
The workflow is supposed to work as follows (the numbers refer to the numbers in figure XY):&lt;br /&gt;
# The developer works on his machine where he/she writes code and tests. He works with the usual set of tools as Eclipse and GWT as well as Selenium, JUnit respectively TestNG for testing.&lt;br /&gt;
# After development code including test code is checked in to a version control system as SVN.&lt;br /&gt;
# This or a schedulder triggers a build on the integration server. We chose Hudson for continuous integration. On this server the usual steps are described in a Maven script: &lt;br /&gt;
## Retrieve code (including test code)&lt;br /&gt;
## Retrieve libraries&lt;br /&gt;
## Compile code (including test code)&lt;br /&gt;
## Run Unit-Tests via TestNG&lt;br /&gt;
## Deploy artifacts to test environment and/or other servers&lt;br /&gt;
## Run UI- and System-Tests on test enviroment via TestNG and Selenium&lt;br /&gt;
## Generate reports&lt;br /&gt;
# The war file is deployed to Tomcat (optional step)&lt;br /&gt;
# The UI- and System-Tests are executed via TestNG scripts using Selenium. (optional step)&lt;br /&gt;
# The reporting (e.g. error reports, compile errors, code and architecture metrics) which is triggered by Hudson is done via Sonar which also performs an analysis of code and architecture.&lt;br /&gt;
# Hudson is capable to communicate the results by the means of RSS, Twitter, Mail or Skype, to name a few examples.&lt;br /&gt;
# Both, the developer as well as the build server (Hudson) retrieve the Maven script as well as the libraries from a central repository server. We chose Nexus.&lt;br /&gt;
# Hudson deploys tested artifacts to repository from where developers and users can download it&lt;br /&gt;
&lt;br /&gt;
==Rationale==&lt;br /&gt;
[[File:iso9126.png|thumb|ISO 9126: Quality criteria of software]]&lt;br /&gt;
The rationale for continuous integration and testing is as import as evident:&lt;br /&gt;
* Avoid redundant tasks as&lt;br /&gt;
** Build software (including compile, package etc.)&lt;br /&gt;
** Run unit tests&lt;br /&gt;
** Run system tests including UI-tests&lt;br /&gt;
** Evaluate quality of code and architecture&lt;br /&gt;
* Provide a faster start for new programmers. A one-click install is the ultimate goal. Any unnecessary step will take time, might lead to errors and has the potential to frustrate “newbies”.&lt;br /&gt;
* Bugs which are found early are easy and fast to fix. As longer it takes and as more commits were done as more difficult and tedious the bug fixing will become.&lt;br /&gt;
* (Web-) Protégé is supposed to attract continuously more programmers. At the same time, the quality of the software has to be assured. Especially with respect to maintainability and functionality. But also quality aspects like efficiency and reliability can be partially tested automatically.&lt;br /&gt;
=Description and Rationale for Tools=&lt;br /&gt;
This page is intended to give an overview on the systems and to describe why we selected particularily this set. How to install, operate, and use this tools is described in&lt;br /&gt;
* [[Stanford:AdministratorGuide| administrator guide]]&lt;br /&gt;
* [[Stanford:DeveloperGuide|developer guide]]&lt;br /&gt;
&lt;br /&gt;
==Hudson==&lt;br /&gt;
Hudson is a server application to automatically and continuously build, test and deploy one or more projects. It provides an overview on the build and tests results including code metrics, architecture metrics, JUnit results and much more. &lt;br /&gt;
&lt;br /&gt;
It is obvious that such repetitive tasks should be automated. However, there are several products to facilitate this task. Among those there is CruiseControl We decided to prefer Hudson over CruiseControl for the following reasons:&lt;br /&gt;
&lt;br /&gt;
* Installation is simpler. It is just download the jar file.  E.g. no installation of DB necessary.&lt;br /&gt;
* Administration is simpler: An easy to use web interface gives access to all administrative settings&lt;br /&gt;
* Easy integration with other tools e.g. with Sonar, TestNG and communication services&lt;br /&gt;
* Related to Plug-ins&lt;br /&gt;
* Easier plug-in development &lt;br /&gt;
* More plug-ins available (e.g. twitter, email, Sonar, Selenium) &lt;br /&gt;
* Easier plug-ins administration&lt;br /&gt;
&lt;br /&gt;
Hudson executes the Maven script(s) including builds as well as unit and UI tests, triggers reporting and communication of build and test results. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;Link&amp;gt;Instruction how to install and configure Hudson.&lt;br /&gt;
&lt;br /&gt;
==Nexus==&lt;br /&gt;
[[File:nexus.png|thumb|Nexus the central and shared repository for all developers (and users)]]&lt;br /&gt;
As more libraries a project requires and as more dependencies these libraries have as more complex the setup of a new development environment and of executing a build become. For example WebProtégé has dependencies to Protégé, to the Google Web Toolkit, to Apache libraries, and so on. And even the referenced libraries are interdependent. &lt;br /&gt;
&lt;br /&gt;
Maven is capable of resolving these dependencies. Nexus is a repository manager which allows you to centrally provide these libraries in a versioned and reproducible manner. Nexus also can serve as proxy. So the developers (and the build system) just need to retrieve these files from the repository instead of individually downloading these artifacts redundantly. This not only saves bandwidth, but also reduces the load on “Central” (the central Maven repository).&lt;br /&gt;
&lt;br /&gt;
Nexus is not replacing Maven. Nexus proxies the Maven requests to a central Maven repository. Nexus provides as the feature not only to proxy repositories, but to operate our “own” repository which is the deployment target of all of our projects. Please note that Maven itself uses a repository (the Maven repository).&lt;br /&gt;
&lt;br /&gt;
Further feature of Nexus include &lt;br /&gt;
* a quick and easy search of all artifacts.&lt;br /&gt;
* Developers don’t have to have the entire source. They just can work with libraries from Nexus. This makes collaboration easier.&lt;br /&gt;
* Clear responsibility and maintenance of “official” 3rd party libraries.&lt;br /&gt;
&lt;br /&gt;
An additional list of reasons for using repository managers can be found at http://www.sonatype.com/books/nexus-book/reference/sect-repoman-reasons.html. &lt;br /&gt;
&lt;br /&gt;
A comparison of repository managers (Apache Archiva, Artifactory, and Nexus) can be found at http://docs.codehaus.org/display/MAVENUSER/Maven+Repository+Manager+Feature+Matrix. &lt;br /&gt;
 &lt;br /&gt;
“Standard” developers not necessarily have to deal with Nexus. She just uses Nexus as a repository to retrieve artifacts from. If she requires a new jar-file, this has to be done as described in the How-Tos. However, we recommend to have a local repository as well.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;Link&amp;gt;Instruction how to install and configure Nexus.&lt;br /&gt;
&lt;br /&gt;
==Sonar==&lt;br /&gt;
Sonar is a very powerful platform to report the quality of software products considering aspects as&lt;br /&gt;
* Code metrics as complexity&lt;br /&gt;
* Error/bug patterns&lt;br /&gt;
* Architectural metrics&lt;br /&gt;
* Conformity with coding guidelines&lt;br /&gt;
* Results of tests (Unit tests, UI tests) including errors, failures and code coverage.&lt;br /&gt;
&lt;br /&gt;
Sonar provides both, a comprehensive overview on the quality o projects as well as the option to drill down to single metrics/aspects and even to the single line of source code.&lt;br /&gt;
&lt;br /&gt;
Sonar serves as shell compiling and consistently visualizing the results of numerous tools as Checkstyle, FindBugs, PMD, and TestNG .&lt;br /&gt;
&lt;br /&gt;
&amp;lt;Link&amp;gt;Instruction how to install and configure Maven.&lt;br /&gt;
&lt;br /&gt;
==TestNG==&lt;br /&gt;
We prefer TestNG over JUnit for the following reasons:&lt;br /&gt;
* Better separation of test code and test data&lt;br /&gt;
* Better grouping of tests and re-use of test groups&lt;br /&gt;
* Better support for parallel (multi-threaded) testing &lt;br /&gt;
* TestNG automatically produces test reports without having the need to use other tasks as JUnitReport.&lt;br /&gt;
&lt;br /&gt;
==Maven==&lt;br /&gt;
Maven is used by&lt;br /&gt;
* Developers to initially create his workspace (initial build)&lt;br /&gt;
* To define the build and test process which is executed and scheduled by Hudson.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;Link&amp;gt;Instruction how to install and configure Maven.&lt;br /&gt;
&lt;br /&gt;
# validate&lt;br /&gt;
# generate-sources&lt;br /&gt;
# process-sources&lt;br /&gt;
# generate-resources&lt;br /&gt;
# process-resources&lt;br /&gt;
# compile&lt;br /&gt;
# process-classes&lt;br /&gt;
# generate-test-sources&lt;br /&gt;
# process-test-sources&lt;br /&gt;
# generate-test-resources&lt;br /&gt;
# process-test-resources&lt;br /&gt;
# test-compile&lt;br /&gt;
# test&lt;br /&gt;
# prepare-package (maven 2.1+)&lt;br /&gt;
# package&lt;br /&gt;
# pre-integration-test&lt;br /&gt;
# integration-test&lt;br /&gt;
# post-integration-test&lt;br /&gt;
# verify&lt;br /&gt;
# install&lt;br /&gt;
# deploy&lt;br /&gt;
&lt;br /&gt;
==Firefox ==&lt;br /&gt;
We prefer Firefox over other browsers for two major reasons:&lt;br /&gt;
* Firefox is available on LINUX, too. LINUX will be our server OS.&lt;br /&gt;
* There is a Selenium Plugin available for Firefox.&lt;br /&gt;
&lt;br /&gt;
Having said this, it is nevertheless worth mentioning that the web applications have to be tested on other browsers as well. This requires no plugin. The plugin is only required for automated UI tests.&lt;br /&gt;
&lt;br /&gt;
==Selenium Server (Selenium Remote Control)==&lt;br /&gt;
[[File:selenium-server.png|thumb|Selenium Server Architecure. Picture taken form http://seleniumhq.org/projects/remote-control]]&lt;br /&gt;
Selenium remote control is a server which allows developers test web applications (even with AJAX) using Java code (e.g. JUnit, TestNG) or any other language. &lt;br /&gt;
&lt;br /&gt;
Selenium RC automatically launches the browser, simulates the user actions and kills the browser afterwards. Thereby Selenium RC facilitates the complete test automation ($rarr; regression testing) of rich web applications.&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;Link&amp;gt;Instruction how to install and configure Selenium.&lt;br /&gt;
&lt;br /&gt;
==Selenium Plugin (optional)==&lt;br /&gt;
The Selenium IDE is an optional Firefox plugin which helps developers to record actions in the browser and generate Java code. However, the capture &amp;amp; replay functionality is very limited. Therefore Selenium tests will be written as regular Java respectively TestNG code.&lt;br /&gt;
[[Category:QualityAssurance]]&lt;/div&gt;</summary>
		<author><name>Johner</name></author>	</entry>

	<entry>
		<id>https://protegewiki.stanford.edu/index.php?title=Category:QualityAssurance&amp;diff=9289</id>
		<title>Category:QualityAssurance</title>
		<link rel="alternate" type="text/html" href="https://protegewiki.stanford.edu/index.php?title=Category:QualityAssurance&amp;diff=9289"/>
				<updated>2010-12-16T19:45:34Z</updated>
		
		<summary type="html">&lt;p&gt;Johner: Created page with 'This is the QualityAssurance category.'&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is the QualityAssurance category.&lt;/div&gt;</summary>
		<author><name>Johner</name></author>	</entry>

	<entry>
		<id>https://protegewiki.stanford.edu/index.php?title=File:Selenium-server.png&amp;diff=9288</id>
		<title>File:Selenium-server.png</title>
		<link rel="alternate" type="text/html" href="https://protegewiki.stanford.edu/index.php?title=File:Selenium-server.png&amp;diff=9288"/>
				<updated>2010-12-16T19:40:06Z</updated>
		
		<summary type="html">&lt;p&gt;Johner: Selenium server architecture (picture taken from Selenium website)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Selenium server architecture (picture taken from Selenium website)&lt;/div&gt;</summary>
		<author><name>Johner</name></author>	</entry>

	<entry>
		<id>https://protegewiki.stanford.edu/index.php?title=File:Nexus-upload-3.png&amp;diff=9287</id>
		<title>File:Nexus-upload-3.png</title>
		<link rel="alternate" type="text/html" href="https://protegewiki.stanford.edu/index.php?title=File:Nexus-upload-3.png&amp;diff=9287"/>
				<updated>2010-12-16T19:39:39Z</updated>
		
		<summary type="html">&lt;p&gt;Johner: Upload an artifact to Nexus (part 3)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Upload an artifact to Nexus (part 3)&lt;/div&gt;</summary>
		<author><name>Johner</name></author>	</entry>

	<entry>
		<id>https://protegewiki.stanford.edu/index.php?title=File:Nexus-upload-2.png&amp;diff=9286</id>
		<title>File:Nexus-upload-2.png</title>
		<link rel="alternate" type="text/html" href="https://protegewiki.stanford.edu/index.php?title=File:Nexus-upload-2.png&amp;diff=9286"/>
				<updated>2010-12-16T19:39:26Z</updated>
		
		<summary type="html">&lt;p&gt;Johner: Upload an artifact to Nexus (part 2)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Upload an artifact to Nexus (part 2)&lt;/div&gt;</summary>
		<author><name>Johner</name></author>	</entry>

	<entry>
		<id>https://protegewiki.stanford.edu/index.php?title=File:Nexus-upload-1.png&amp;diff=9285</id>
		<title>File:Nexus-upload-1.png</title>
		<link rel="alternate" type="text/html" href="https://protegewiki.stanford.edu/index.php?title=File:Nexus-upload-1.png&amp;diff=9285"/>
				<updated>2010-12-16T19:39:08Z</updated>
		
		<summary type="html">&lt;p&gt;Johner: Upload an artifact to Nexus (part 1)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Upload an artifact to Nexus (part 1)&lt;/div&gt;</summary>
		<author><name>Johner</name></author>	</entry>

	<entry>
		<id>https://protegewiki.stanford.edu/index.php?title=File:Nexus-get-dependency.png&amp;diff=9284</id>
		<title>File:Nexus-get-dependency.png</title>
		<link rel="alternate" type="text/html" href="https://protegewiki.stanford.edu/index.php?title=File:Nexus-get-dependency.png&amp;diff=9284"/>
				<updated>2010-12-16T19:38:47Z</updated>
		
		<summary type="html">&lt;p&gt;Johner: Nexus provides the GAV parameters (group id, artifact id and version) as XML snippet which can be copied to the pom.xml (&amp;lt;dependency/&amp;gt;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Nexus provides the GAV parameters (group id, artifact id and version) as XML snippet which can be copied to the pom.xml (&amp;lt;dependency/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Johner</name></author>	</entry>

	<entry>
		<id>https://protegewiki.stanford.edu/index.php?title=File:Nexus.png&amp;diff=9283</id>
		<title>File:Nexus.png</title>
		<link rel="alternate" type="text/html" href="https://protegewiki.stanford.edu/index.php?title=File:Nexus.png&amp;diff=9283"/>
				<updated>2010-12-16T19:38:22Z</updated>
		
		<summary type="html">&lt;p&gt;Johner: Nexus is the central repository for all artifacts e.g. jars&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Nexus is the central repository for all artifacts e.g. jars&lt;/div&gt;</summary>
		<author><name>Johner</name></author>	</entry>

	<entry>
		<id>https://protegewiki.stanford.edu/index.php?title=File:Mavenprotege.png&amp;diff=9282</id>
		<title>File:Mavenprotege.png</title>
		<link rel="alternate" type="text/html" href="https://protegewiki.stanford.edu/index.php?title=File:Mavenprotege.png&amp;diff=9282"/>
				<updated>2010-12-16T19:38:01Z</updated>
		
		<summary type="html">&lt;p&gt;Johner: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Johner</name></author>	</entry>

	<entry>
		<id>https://protegewiki.stanford.edu/index.php?title=File:Iso9126.png&amp;diff=9281</id>
		<title>File:Iso9126.png</title>
		<link rel="alternate" type="text/html" href="https://protegewiki.stanford.edu/index.php?title=File:Iso9126.png&amp;diff=9281"/>
				<updated>2010-12-16T19:37:47Z</updated>
		
		<summary type="html">&lt;p&gt;Johner: Software quality aspects according to ISO 9126&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Software quality aspects according to ISO 9126&lt;/div&gt;</summary>
		<author><name>Johner</name></author>	</entry>

	<entry>
		<id>https://protegewiki.stanford.edu/index.php?title=File:Infrastructure.png&amp;diff=9280</id>
		<title>File:Infrastructure.png</title>
		<link rel="alternate" type="text/html" href="https://protegewiki.stanford.edu/index.php?title=File:Infrastructure.png&amp;diff=9280"/>
				<updated>2010-12-16T19:37:24Z</updated>
		
		<summary type="html">&lt;p&gt;Johner: Infrastructure with all servers and sketch of information flow&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Infrastructure with all servers and sketch of information flow&lt;/div&gt;</summary>
		<author><name>Johner</name></author>	</entry>

	<entry>
		<id>https://protegewiki.stanford.edu/index.php?title=File:Import-Project.flv&amp;diff=9279</id>
		<title>File:Import-Project.flv</title>
		<link rel="alternate" type="text/html" href="https://protegewiki.stanford.edu/index.php?title=File:Import-Project.flv&amp;diff=9279"/>
				<updated>2010-12-16T19:36:53Z</updated>
		
		<summary type="html">&lt;p&gt;Johner: Import Project vom SVN and convert it to MVN structure&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Import Project vom SVN and convert it to MVN structure&lt;/div&gt;</summary>
		<author><name>Johner</name></author>	</entry>

	<entry>
		<id>https://protegewiki.stanford.edu/index.php?title=File:Hudson-configure-svn.png&amp;diff=9278</id>
		<title>File:Hudson-configure-svn.png</title>
		<link rel="alternate" type="text/html" href="https://protegewiki.stanford.edu/index.php?title=File:Hudson-configure-svn.png&amp;diff=9278"/>
				<updated>2010-12-16T19:36:30Z</updated>
		
		<summary type="html">&lt;p&gt;Johner: Point Hudson to the SVN repository&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Point Hudson to the SVN repository&lt;/div&gt;</summary>
		<author><name>Johner</name></author>	</entry>

	<entry>
		<id>https://protegewiki.stanford.edu/index.php?title=File:Hudson-configure.png&amp;diff=9277</id>
		<title>File:Hudson-configure.png</title>
		<link rel="alternate" type="text/html" href="https://protegewiki.stanford.edu/index.php?title=File:Hudson-configure.png&amp;diff=9277"/>
				<updated>2010-12-16T19:36:07Z</updated>
		
		<summary type="html">&lt;p&gt;Johner: Configure Hudson&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Configure Hudson&lt;/div&gt;</summary>
		<author><name>Johner</name></author>	</entry>

	<entry>
		<id>https://protegewiki.stanford.edu/index.php?title=File:Hudson-add-sonar.png&amp;diff=9276</id>
		<title>File:Hudson-add-sonar.png</title>
		<link rel="alternate" type="text/html" href="https://protegewiki.stanford.edu/index.php?title=File:Hudson-add-sonar.png&amp;diff=9276"/>
				<updated>2010-12-16T19:35:47Z</updated>
		
		<summary type="html">&lt;p&gt;Johner: Add plugins (e.g. Sonar) to Hudson&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Add plugins (e.g. Sonar) to Hudson&lt;/div&gt;</summary>
		<author><name>Johner</name></author>	</entry>

	<entry>
		<id>https://protegewiki.stanford.edu/index.php?title=File:Eclipse-jdk.png&amp;diff=9275</id>
		<title>File:Eclipse-jdk.png</title>
		<link rel="alternate" type="text/html" href="https://protegewiki.stanford.edu/index.php?title=File:Eclipse-jdk.png&amp;diff=9275"/>
				<updated>2010-12-16T19:35:17Z</updated>
		
		<summary type="html">&lt;p&gt;Johner: Select jdk (instead of jre) to compile and build projects&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Select jdk (instead of jre) to compile and build projects&lt;/div&gt;</summary>
		<author><name>Johner</name></author>	</entry>

	<entry>
		<id>https://protegewiki.stanford.edu/index.php?title=File:Eclipse-import-project.png&amp;diff=9274</id>
		<title>File:Eclipse-import-project.png</title>
		<link rel="alternate" type="text/html" href="https://protegewiki.stanford.edu/index.php?title=File:Eclipse-import-project.png&amp;diff=9274"/>
				<updated>2010-12-16T19:34:57Z</updated>
		
		<summary type="html">&lt;p&gt;Johner: Import existing project into Eclipse workspace&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Import existing project into Eclipse workspace&lt;/div&gt;</summary>
		<author><name>Johner</name></author>	</entry>

	<entry>
		<id>https://protegewiki.stanford.edu/index.php?title=File:Eclipse-gwt-2.png&amp;diff=9273</id>
		<title>File:Eclipse-gwt-2.png</title>
		<link rel="alternate" type="text/html" href="https://protegewiki.stanford.edu/index.php?title=File:Eclipse-gwt-2.png&amp;diff=9273"/>
				<updated>2010-12-16T19:34:37Z</updated>
		
		<summary type="html">&lt;p&gt;Johner: Define webapp folder for GWT projec&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Define webapp folder for GWT projec&lt;/div&gt;</summary>
		<author><name>Johner</name></author>	</entry>

	<entry>
		<id>https://protegewiki.stanford.edu/index.php?title=File:Eclipse-gwt.png&amp;diff=9272</id>
		<title>File:Eclipse-gwt.png</title>
		<link rel="alternate" type="text/html" href="https://protegewiki.stanford.edu/index.php?title=File:Eclipse-gwt.png&amp;diff=9272"/>
				<updated>2010-12-16T19:34:18Z</updated>
		
		<summary type="html">&lt;p&gt;Johner: Make Eclipse project to become a GWT project&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Make Eclipse project to become a GWT project&lt;/div&gt;</summary>
		<author><name>Johner</name></author>	</entry>

	<entry>
		<id>https://protegewiki.stanford.edu/index.php?title=File:Eclipse-checkout-maven.png&amp;diff=9271</id>
		<title>File:Eclipse-checkout-maven.png</title>
		<link rel="alternate" type="text/html" href="https://protegewiki.stanford.edu/index.php?title=File:Eclipse-checkout-maven.png&amp;diff=9271"/>
				<updated>2010-12-16T19:33:51Z</updated>
		
		<summary type="html">&lt;p&gt;Johner: How to check out a project from SVN to Eclipse&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;How to check out a project from SVN to Eclipse&lt;/div&gt;</summary>
		<author><name>Johner</name></author>	</entry>

	<entry>
		<id>https://protegewiki.stanford.edu/index.php?title=File:Infrastructure-2.png&amp;diff=9270</id>
		<title>File:Infrastructure-2.png</title>
		<link rel="alternate" type="text/html" href="https://protegewiki.stanford.edu/index.php?title=File:Infrastructure-2.png&amp;diff=9270"/>
				<updated>2010-12-16T19:33:12Z</updated>
		
		<summary type="html">&lt;p&gt;Johner: The entire system landscape&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The entire system landscape&lt;/div&gt;</summary>
		<author><name>Johner</name></author>	</entry>

	<entry>
		<id>https://protegewiki.stanford.edu/index.php?title=ProtegeQAGuide&amp;diff=9269</id>
		<title>ProtegeQAGuide</title>
		<link rel="alternate" type="text/html" href="https://protegewiki.stanford.edu/index.php?title=ProtegeQAGuide&amp;diff=9269"/>
				<updated>2010-12-16T19:26:23Z</updated>
		
		<summary type="html">&lt;p&gt;Johner: Created page with 'This is the start page on how to (automatically) build and test all applications/projects related to Protégé.  =Guidance Documents= [[File:infrastructure-2.png|thumb|Infrastruc…'&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is the start page on how to (automatically) build and test all applications/projects related to Protégé.&lt;br /&gt;
&lt;br /&gt;
=Guidance Documents=&lt;br /&gt;
[[File:infrastructure-2.png|thumb|Infrastructure with all servers and information flow]]&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
| On the &amp;lt;span style=&amp;quot;font-variant:small-caps;font-size:1.3em;font-weight:bold&amp;quot;&amp;gt;[[Stanford:OverviewPage|Overview Page]]&amp;lt;/span&amp;gt;&lt;br /&gt;
you find &lt;br /&gt;
* some background information describing the rationale for caring about automated builds and testing and for establishing a corresponding infrastructure. &lt;br /&gt;
* an overview chart displaying the entire infrastructure landscape. &lt;br /&gt;
* a short description of all the relevant tools and the rationale for chosing the selected ones&lt;br /&gt;
&lt;br /&gt;
| The &amp;lt;span style=&amp;quot;font-variant:small-caps;font-size:1.3em;font-weight:bold&amp;quot;&amp;gt;[[Stanford:AdministratorGuide|Administrator Guide]]&amp;lt;/span&amp;gt; (&amp;amp;rarr; Alex) &lt;br /&gt;
describes how to install and operate all the servers, among those:&lt;br /&gt;
* Nexus repository: http://bmir-hudson1.stanford.edu/nexus&lt;br /&gt;
* Hudson Build Sever (build statistics, administration of jobs): http://bmir-hudson1.stanford.edu &lt;br /&gt;
* Sonar Server (code and architecture metrics, coverage reports and more): http://bmir-hudson1.stanford.edu/sonar (use link from Hudson to Sonar reports instead)&lt;br /&gt;
* Tomcat Server (automated UI testing, not of general interest): http://bmir-hudson1.stanford.edu:8080&lt;br /&gt;
* SVN-Repository: http://smi-protege.stanford.edu/repos/protege/&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| The &amp;lt;span style=&amp;quot;font-variant:small-caps;font-size:1.3em;font-weight:bold&amp;quot;&amp;gt;[[Stanford:DeveloperGuide|Developer Guide]]&amp;lt;/span&amp;gt; (&amp;amp;rarr; external and Stanford internal)&lt;br /&gt;
is the main page for developers. On these pages developers get answers to questions like&lt;br /&gt;
* How do I initially set up my tools to work with one or more of the Protégé projects? &lt;br /&gt;
* &amp;lt;strong&amp;gt;New:&amp;lt;/strong&amp;gt; Please watch video tutorial.&lt;br /&gt;
* How do I write test cases?&lt;br /&gt;
* How do I get the lastest downloads?&lt;br /&gt;
&lt;br /&gt;
| The &amp;lt;span style=&amp;quot;font-variant:small-caps;font-size:1.3em;font-weight:bold&amp;quot;&amp;gt;[[Stanford:QaGuide|QA &amp;amp; Project Manager Guide]]&amp;lt;/span&amp;gt; (&amp;amp;rarr; Tania, Jennifer, Tim &amp;amp;amp; other)&lt;br /&gt;
is the address for everybody interested in the success and quality of builds and code. It gives explanations like&lt;br /&gt;
* How to write/adjust the pom.xml?&lt;br /&gt;
* What do these metrics tell me?&lt;br /&gt;
* What do I have to do in order to add artifacts (e.g. jar-files) to my repository&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=Contact and further Information=&lt;br /&gt;
The selection, installation and testing of the infrastructure as well as the initial transistion from traditional ANT-based to Maven based projects was done by [mailto://c.faigle@gmx.net Christian Faigle] and [mailto://mail@johner.org Christian Johner]. Please contact either for questions related to&lt;br /&gt;
* Selection of tools&lt;br /&gt;
* Administration of tools&lt;br /&gt;
* Converting projects to MAVEN&lt;br /&gt;
* Interpretation and adaptation of reports&lt;br /&gt;
&lt;br /&gt;
This page originally was written by [mailto://mail@johner.org Christian Johner].&lt;br /&gt;
&lt;br /&gt;
The [[Stanford:ToDoPage|Todos]] (for Christian, Alex)&lt;/div&gt;</summary>
		<author><name>Johner</name></author>	</entry>

	<entry>
		<id>https://protegewiki.stanford.edu/index.php?title=Main_Page&amp;diff=9268</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://protegewiki.stanford.edu/index.php?title=Main_Page&amp;diff=9268"/>
				<updated>2010-12-16T19:26:10Z</updated>
		
		<summary type="html">&lt;p&gt;Johner: /* Protege Developers */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
&amp;lt;div style=&amp;quot;background:#F0E6CA; border:1px solid #AE5B08; padding:10px 15px 10px 20px; margin:2em 0 0 0;&amp;quot;&amp;gt;&lt;br /&gt;
=== Welcome to the Protege Wiki! ===&lt;br /&gt;
&lt;br /&gt;
Protege is a free, open-source platform that provides a growing user community with a suite of tools to construct domain models and knowledge-based applications with ontologies.  Please see the [http://protege.stanford.edu/overview/index.html overview section] of the [http://protege.stanford.edu/ Protege website] for a more detailed description of what the Protege platform offers.&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;display:block; float:left; width:75%;&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Upcoming Events ==&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;'''[http://protege.stanford.edu/shortcourse/protege-owl/201103/ Protege-OWL Short Course]''', March 23-25, 2011, Stanford University.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Protege Users ==&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;padding-bottom:5px; list-style:circle;&amp;quot;&amp;gt;[http://protege.stanford.edu Protege Website]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;padding-bottom:5px; list-style:circle;&amp;quot;&amp;gt;Browse the [[Protege Plugin Library]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;padding-bottom:5px; list-style:circle;&amp;quot;&amp;gt;Browse the [[Protege Ontology Library]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;padding-bottom:5px; list-style:circle;&amp;quot;&amp;gt;&amp;lt;strong&amp;gt;[[ProtegeUserDocs|General Documentation]]&amp;lt;/strong&amp;gt; - this page is a collection of links to documentation that is applicable to all versions of Protege, including guidelines for developing ontologies, information about scalability and tuning in Protege, etc.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;padding-bottom:5px; list-style:circle;&amp;quot;&amp;gt;&amp;lt;strong&amp;gt;[[Protege3UserDocs|Protege 3 Documentation]]&amp;lt;/strong&amp;gt; - this page is a collection of links to documentation that is specific to the 3.x series such as Getting Started guides, User's Guides, etc.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;padding-bottom:5px; list-style:circle;&amp;quot;&amp;gt;&amp;lt;strong&amp;gt;[[Protege4UserDocs|Protege 4 Documentation]]&amp;lt;/strong&amp;gt; - this page is a collection of links to documentation that is specific to the 4.x series.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;list-style:circle;&amp;quot;&amp;gt;&amp;lt;strong&amp;gt;[[WebProtege|WebProtege Documentation]]&amp;lt;/strong&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Protege Developers ==&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;padding-bottom:5px; list-style:circle;&amp;quot;&amp;gt;&amp;lt;strong&amp;gt;[[ProtegeDevDocsGeneral|General Developer Documentation]]&amp;lt;/strong&amp;gt; - this page is a collection of links to developer documentation that is applicable to all versions of Protege, such as how to connect to our Subversion repository, etc.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;padding-bottom:5px; list-style:circle;&amp;quot;&amp;gt;&amp;lt;strong&amp;gt;[[Protege3DevDocs|Protege 3 Developer Documentation]]&amp;lt;/strong&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;padding-bottom:5px; list-style:circle;&amp;quot;&amp;gt;&amp;lt;strong&amp;gt;[[Protege4DevDocs|Protege 4 Developer Documentation]]&amp;lt;/strong&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;padding-bottom:5px; list-style:circle;&amp;quot;&amp;gt;&amp;lt;strong&amp;gt;[[WebProtegeDevelopersGuide|WebProtege Developer's Guide]]&amp;lt;/strong&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;padding-bottom:5px; list-style:circle;&amp;quot;&amp;gt;&amp;lt;strong&amp;gt;[[ProtegeQAGuide|Protege Guide to Quality Assurance]]&amp;lt;/strong&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Wiki Help ==&lt;br /&gt;
If you are new to using a Wiki, please see the [[Help:Contents|Help page]] page for useful links to User's Guides, etc.  &lt;br /&gt;
&lt;br /&gt;
The [[Help:Contents|Help page]] also has suggestions for where to find help with using the Protege application.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;display:block; float:right; width:25%;&amp;quot;&amp;gt;&lt;br /&gt;
[[image:Protege-OWL.jpg|none|thumb|right|protege-owl editor]]&lt;br /&gt;
[[image:Protege-Frames.jpg|none|thumb|right|protege-frames editor]]&lt;br /&gt;
[[image:Webprotege.png|none|thumb|right|[[WebProtege|web-protege editor]] ]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;/div&gt;</summary>
		<author><name>Johner</name></author>	</entry>

	<entry>
		<id>https://protegewiki.stanford.edu/index.php?title=Stanford:QaGuide&amp;diff=9248</id>
		<title>Stanford:QaGuide</title>
		<link rel="alternate" type="text/html" href="https://protegewiki.stanford.edu/index.php?title=Stanford:QaGuide&amp;diff=9248"/>
				<updated>2010-12-16T19:22:59Z</updated>
		
		<summary type="html">&lt;p&gt;Johner: 20 revisions:&amp;amp;#32;Import from CF Pages (2)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=How-to for architects, test and project managers=&lt;br /&gt;
==Target audience and scope==&lt;br /&gt;
In this section you find how tos which are related to convert projects from ANT to Maven, to write pom.xml files etc.&lt;br /&gt;
==Comprehensive example==&lt;br /&gt;
There is a project that shows everything related to build and testing:&lt;br /&gt;
* how to write a pom.xml&lt;br /&gt;
* how to write and integrate unit tests (JUnit and TestNG)&lt;br /&gt;
* how to write and integrate integration tests (selenium)&lt;br /&gt;
&lt;br /&gt;
Please visit https://bmir-gforge.stanford.edu/svn/hudson-test/Hudson-Test.&lt;br /&gt;
&lt;br /&gt;
=How to create a new or convert an existing project =&lt;br /&gt;
This steps steps have to be done once per project)&lt;br /&gt;
==Establish or change to Maven directory structure==&lt;br /&gt;
The following is copied from http://maven.apache.org/guides/introduction/introduction-to-the-standard-directory-layout.html. It documents the directory layout expected by Maven and the directory layout created by Maven. Please try to conform to this structure as much as possible; however, if you can't these settings can be overridden via the project descriptor.&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
!Path &lt;br /&gt;
!Description &lt;br /&gt;
|-&lt;br /&gt;
|'''src/main/java''' &lt;br /&gt;
| Application/Library sources &lt;br /&gt;
|-&lt;br /&gt;
|'''src/main/resources''' &lt;br /&gt;
| Application/Library resources &lt;br /&gt;
|-&lt;br /&gt;
|src/main/filters &lt;br /&gt;
| Resource filter files &lt;br /&gt;
|-&lt;br /&gt;
|src/main/assembly &lt;br /&gt;
| Assembly descriptors &lt;br /&gt;
|-&lt;br /&gt;
|src/main/config &lt;br /&gt;
| Configuration files &lt;br /&gt;
|-&lt;br /&gt;
|'''src/main/webapp''' &lt;br /&gt;
| Web application sources &lt;br /&gt;
|-&lt;br /&gt;
|'''src/test/java''' &lt;br /&gt;
| Test sources &lt;br /&gt;
|-&lt;br /&gt;
|'''src/test/resources''' &lt;br /&gt;
| Test resources &lt;br /&gt;
|-&lt;br /&gt;
|src/test/filters &lt;br /&gt;
| Test resource fiter files &lt;br /&gt;
|-&lt;br /&gt;
|src/site &lt;br /&gt;
| Site &lt;br /&gt;
|-&lt;br /&gt;
|LICENSE.txt &lt;br /&gt;
| Project's license &lt;br /&gt;
|-&lt;br /&gt;
|NOTICE.txt &lt;br /&gt;
| Notices and attributions required by libraries that the project depends on &lt;br /&gt;
|-&lt;br /&gt;
|README.txt &lt;br /&gt;
| Project's readme &lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In the table the most relevant paths are marked bold.&lt;br /&gt;
&lt;br /&gt;
Additionally there are at the top level &lt;br /&gt;
* pom.xml &lt;br /&gt;
* other optional files as properties, maven.xml or build.xml (if using Ant). &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In order to get to the new file structure:&lt;br /&gt;
* Add folder inside /src: &amp;lt;tt&amp;gt;/src/main/java and /src/test/java&amp;lt;/tt&amp;gt;&lt;br /&gt;
* Move &amp;lt;tt&amp;gt;/src/edu&amp;lt;/tt&amp;gt; respectively &amp;lt;tt&amp;gt;/test/edu&amp;lt;/tt&amp;gt; folders into new folders.&lt;br /&gt;
* Delete folder test-lib&lt;br /&gt;
* Rename “war” to “webapp” and move folder under /src. (here I ran into problems. Really the best way?)&lt;br /&gt;
* Add folder &amp;lt;tt&amp;gt;/src/main/resources/config&amp;lt;/tt&amp;gt;. Add to this folder &amp;lt;tt&amp;gt;configuration.properties&amp;lt;/tt&amp;gt; file.&lt;br /&gt;
* Add under &amp;lt;tt&amp;gt;src/test/java&amp;lt;/tt&amp;gt; following folders: &amp;lt;tt&amp;gt;/client/&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;/selenium&amp;lt;/tt&amp;gt;??&lt;br /&gt;
* Delete files in root folder with exception of src. Delete e.g. /etc/, &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To move files/directories you can use Tortoise as described in http://stackoverflow.com/questions/62570/how-do-i-move-a-file-or-folder-from-one-folder-to-another-in-tortoisesvn. &lt;br /&gt;
&lt;br /&gt;
'''Hint:''' In the developer guide there is a description how to import a project from SVN and immediatelly update the src-folder to the expected structure.&lt;br /&gt;
&lt;br /&gt;
==How to upload required artifacts (typicall jar-files) to Nexus repository==&lt;br /&gt;
There are multiple ways of adding resources to the repository&lt;br /&gt;
# Direct copy ('''not recommended''')&lt;br /&gt;
#* Copy resources directly to Nexus subfolder e.g. to &amp;lt;tt&amp;gt;/var/nexus/sonatype-work/nexus/storage/thirdparty/edu/stanford/bmir/core/icd&amp;lt;/tt&amp;gt;.&lt;br /&gt;
#* You need to put the file the right directory and give it the name indicating the version number, e.g. &amp;lt;tt&amp;gt;/edu/Stanford/bmir/core/protégé-1.0.jar&amp;lt;/tt&amp;gt;&lt;br /&gt;
#* Goto nexus and right click on third party repository: reindex respectively rebuild metadata&lt;br /&gt;
# Uploaded file automatically in due course of a build process (this is '''recommended''' for &amp;quot;own&amp;quot; code as Snapshots and Releases).&lt;br /&gt;
#* There is nothing to do besides adding the &amp;lt;distributionManagement&amp;gt; tag to the pom.xml and use the deploy plugin. The PC specific &amp;lt;tt&amp;gt;settings.xml&amp;lt;/tt&amp;gt; has to point to the repository as described in the adminstrators guide in section TODO&lt;br /&gt;
# Uploaded file using the Nexus interface ('''recommended only for third party artifacts'''). This option is described in the following:&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
| [[Image:nexus-upload-1.png|thumb|upright|alt=Screenshot how to upload jars to Nexus (step 1)|upload an artifact to Nexus (part 1): Select repository]]&lt;br /&gt;
| [[Image:nexus-upload-2.png|thumb|upright|alt=Screenshot how to upload jars to Nexus (step 2)|upload an artifact to Nexus (part 2): Define GAV parameters]]&lt;br /&gt;
| [[Image:nexus-upload-3.png|thumb|upright|alt=Screenshot how to upload jars to Nexus (step 3)|upload an artifact to Nexus (part 3): Reindexing]]&lt;br /&gt;
| [[Image:nexus-get-dependency.png|thumb|upright|alt=Screenshot how copy the dependency snippet for pom.xml|copy the dependency snippet for pom.xml]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
	 &lt;br /&gt;
For each artifact (jar) you can later copy the dependency information for Maven (into the pom.xml). The code snipped look like:&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;dependency&amp;gt;&lt;br /&gt;
    &amp;lt;groupId&amp;gt;edu.stanford.bmir.core&amp;lt;/groupId&amp;gt;&lt;br /&gt;
    &amp;lt;artifact&amp;gt;protege&amp;lt;/artifact&amp;gt;&lt;br /&gt;
    &amp;lt;version&amp;gt;1.0&amp;lt;/version&amp;gt;&lt;br /&gt;
  &amp;lt;/dependency&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
TODO: define naming convention for groupId. Currently discussed are the following&lt;br /&gt;
* protege3&lt;br /&gt;
* protege4&lt;br /&gt;
* webprotege&lt;br /&gt;
* owl&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Further reading&lt;br /&gt;
* http://www.sonatype.com/books/nexus-book/reference/maven-sect-single-group.html &lt;br /&gt;
* http://www.sonatype.com/books/nexus-book/reference/maven-sect-single-group.html &lt;br /&gt;
*	http://stackoverflow.com/questions/1584763/how-do-i-deploy-to-nexus-hosted-by-secureci&lt;br /&gt;
&lt;br /&gt;
==How to write the Maven script (pom.xml)==&lt;br /&gt;
In our case the pom.xml typically will have the following structure:&lt;br /&gt;
* Some general information e.g.&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;modelVersion&amp;gt;4.0.0&amp;lt;/modelVersion&amp;gt;&lt;br /&gt;
  &amp;lt;groupId&amp;gt;edu.stanford.smi.protegex&amp;lt;/groupId&amp;gt;&lt;br /&gt;
  &amp;lt;artifactId&amp;gt;dlquery&amp;lt;/artifactId&amp;gt;&lt;br /&gt;
  &amp;lt;packaging&amp;gt;jar&amp;lt;/packaging&amp;gt;&lt;br /&gt;
  &amp;lt;name&amp;gt;protege-plugin-dlquery&amp;lt;/name&amp;gt;&lt;br /&gt;
  &amp;lt;version&amp;gt;0.0.3-SNAPSHOT&amp;lt;/version&amp;gt;&lt;br /&gt;
	&lt;br /&gt;
* Properties as the Java version&lt;br /&gt;
* the &amp;lt;tt&amp;gt;&amp;lt;distributionManagement&amp;gt;&amp;lt;/tt&amp;gt; tag which is necessary if artifacts have to deployed to a repository&lt;br /&gt;
* the &amp;lt;tt&amp;gt;&amp;lt;dependency/&amp;gt;&amp;lt;/tt&amp;gt; tags (an example was given above)&lt;br /&gt;
* the build part with its plugins (e.g. to compile, test, deploy)&lt;br /&gt;
* the reporting part with its plugins (e.g. PMD, Findbugs, JDepend)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It is recommended to use an existing &amp;lt;tt&amp;gt;pom.xml&amp;lt;/tt&amp;gt; as template. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Further hints and readings:&lt;br /&gt;
* the version number can be automatically adjusted with a version plugin. The postfix &amp;quot;&amp;lt;tt&amp;gt;SNAPSHOT&amp;lt;/tt&amp;gt;&amp;quot; determines that the artifact won't be uploaded to the release but to the snapshot repository. &lt;br /&gt;
* Both repositories (snapshot and release) are defined in the &amp;lt;tt&amp;gt;&amp;lt;distributionManagement&amp;gt;&amp;lt;/tt&amp;gt; section respectively in the &amp;lt;tt&amp;gt;/maven/conf/settings.xml&amp;lt;/tt&amp;gt; file.&lt;br /&gt;
* If you are deploying to tomcat, e.g. to perform integration tests, make sure that user and password match with tomcat manger credentials.&lt;br /&gt;
* GWT Plugin&lt;br /&gt;
** http://gwt-maven.googlecode.com/svn/docs/maven-googlewebtoolkit2-plugin/setup.html&lt;br /&gt;
** http://www.ducktools.org/2010/03/maven-and-gwt.html&lt;br /&gt;
** http://mojo.codehaus.org/gwt-maven-plugin/examples/compile.html&lt;br /&gt;
** http://zenoconsulting.wikidot.com/blog:16&lt;br /&gt;
* '''Please read the FAQ section with specific questions on how to write a pom.xml'''.&lt;br /&gt;
&lt;br /&gt;
==How to add project to Hudson==&lt;br /&gt;
[[File:hudson-configure-svn.png|thumb|Projects can be added from the Hudson administration interface]]&lt;br /&gt;
* Go to Hudson page (e.g. http://bmir-hudson1.stanford.edu). &lt;br /&gt;
* Add new job. Select name (e.g. WebProtégé”) and type of project (“Build a maven2 project”).&lt;br /&gt;
* Select in section “Source Code Management” the option “Subversion” and add SVN server URL (e.g. http://smi-protege.stanford.edu/repos/protege/web-protege/branches/who-maven/). Keep “Use update” checked. No local module directory. (no password needed?)&lt;br /&gt;
* Determine build interval respectively trigger. Currently we use “Build whenever a SNAPSHOT dependency is built”.&lt;br /&gt;
* Optionally enable email notification.&lt;br /&gt;
* Activate Sonar in “Post-Build-Activities” (Sonar needs to be installed first)&lt;br /&gt;
  &lt;br /&gt;
=FAQs=&lt;br /&gt;
==Related to reporting==&lt;br /&gt;
===My code coverage statistics aren’t updated. What can I do?===&lt;br /&gt;
Please change version in pom.xml to next snapshot respectively release number. Don’t forget the configuration.properties file.&lt;br /&gt;
&lt;br /&gt;
===I do not get code coverage statistics for my integration tests. What can I do?===&lt;br /&gt;
Currently nothing, this is the way maven handles the build process.&lt;br /&gt;
&lt;br /&gt;
==My build fails since the sonar plugin was not found! What can I do?==&lt;br /&gt;
Your Hudson build fails. In the console output you find this stacktrace:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  org.apache.maven.lifecycle.LifecycleExecutionException: The plugin 'org.codehaus.mojo:sonar-maven-plugin' does not exist or no valid version could be found&lt;br /&gt;
	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.verifyPlugin(DefaultLifecycleExecutor.java:1569)&lt;br /&gt;
	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.getMojoDescriptor(DefaultLifecycleExecutor.java:1851)&lt;br /&gt;
	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.segmentTaskListByAggregationNeeds(DefaultLifecycleExecutor.java:462)&lt;br /&gt;
	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:175)&lt;br /&gt;
	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Then you most probably ran into a Maven bug which is [http://docs.codehaus.org/display/SONAR/Frequently+Asked+Questions#FrequentlyAskedQuestions-Theplugin%27org.apache.maven.plugins%3Amavensonarplugin%27doesnotexistornovalidversioncouldbefound|described here].&lt;br /&gt;
&lt;br /&gt;
What can you do? As the plugin update is not working as it is supposed to do, please remove the following two directories:&lt;br /&gt;
# Maven local repository: &amp;lt;tt&amp;gt;/usr/local/data/hudson/.m2/repository/org/codehaus/mojo/sonar-maven-plugin&amp;lt;/tt&amp;gt;&lt;br /&gt;
# Nexus repository: &amp;lt;tt&amp;gt;/usr/local/data/sonatype-work/nexus/storage/central/org/codehaus/mojo/sonar-maven-plugin&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then run the build again. Now the repositories are updated and your build should run successfully.&lt;br /&gt;
&lt;br /&gt;
If this fails do addtionally the following:&lt;br /&gt;
# ssh to bmir-hudson1.standford.edu&lt;br /&gt;
# Switch user: &amp;lt;tt&amp;gt;sudo su - hudson&amp;lt;/tt&amp;gt;&lt;br /&gt;
# if Maven path is not yet set: &lt;br /&gt;
#* &amp;lt;tt&amp;gt;export M2_HOME=/usr/local/apache-maven-2.2.1&amp;lt;/tt&amp;gt;&lt;br /&gt;
#* &amp;lt;tt&amp;gt;export PATH=$PATH:$HOME/bin:$JAVA_HOME/bin:$M2_HOME/bin&amp;lt;/tt&amp;gt;&lt;br /&gt;
# Run one project from command line&lt;br /&gt;
#* switch to one project &amp;lt;tt&amp;gt;cd /usr/local/data/hudson/jobs/Example-Project/workspace&amp;lt;/tt&amp;gt;&lt;br /&gt;
#* &amp;lt;tt&amp;gt;mvn -U sonar:sonar&amp;lt;/tt&amp;gt; The -U forces the update. Now the maven plugin should be downloaded&lt;br /&gt;
&lt;br /&gt;
==Related to pom.xml==&lt;br /&gt;
===How can copy output to a specific directory?===&lt;br /&gt;
Remark: In the perfect world you are deploying your artifacts to a local or a remote repository. You are not supposed to work with specific target directories. Nevertheless there may be occasions where it is necessary to do so:&lt;br /&gt;
&lt;br /&gt;
====Step 1: Use Resource Plugin====&lt;br /&gt;
Add copy plugin to your pom.xml (in build section). Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;!--  Copy the stuff to the desired place --&amp;gt;&lt;br /&gt;
  &amp;lt;plugin&amp;gt;&lt;br /&gt;
    &amp;lt;artifactId&amp;gt;maven-resources-plugin&amp;lt;/artifactId&amp;gt;&lt;br /&gt;
    &amp;lt;version&amp;gt;2.4.3&amp;lt;/version&amp;gt;&lt;br /&gt;
    &amp;lt;executions&amp;gt;&lt;br /&gt;
      &amp;lt;execution&amp;gt;&lt;br /&gt;
        &amp;lt;id&amp;gt;copy-resources&amp;lt;/id&amp;gt;&lt;br /&gt;
        &amp;lt;!-- here the phase you need --&amp;gt;&lt;br /&gt;
        &amp;lt;phase&amp;gt;test&amp;lt;/phase&amp;gt;&lt;br /&gt;
        &amp;lt;goals&amp;gt;&lt;br /&gt;
          &amp;lt;goal&amp;gt;copy-resources&amp;lt;/goal&amp;gt;&lt;br /&gt;
        &amp;lt;/goals&amp;gt;&lt;br /&gt;
        &amp;lt;configuration&amp;gt;&lt;br /&gt;
          &amp;lt;outputDirectory&amp;gt;${outputdir}&amp;lt;/outputDirectory&amp;gt;&lt;br /&gt;
          &amp;lt;resources&amp;gt;&lt;br /&gt;
            &amp;lt;resource&amp;gt;&lt;br /&gt;
              &amp;lt;directory&amp;gt;src&amp;lt;/directory&amp;gt;&lt;br /&gt;
              &amp;lt;filtering&amp;gt;true&amp;lt;/filtering&amp;gt;&lt;br /&gt;
            &amp;lt;/resource&amp;gt;&lt;br /&gt;
          &amp;lt;/resources&amp;gt;&lt;br /&gt;
        &amp;lt;/configuration&amp;gt;&lt;br /&gt;
      &amp;lt;/execution&amp;gt;&lt;br /&gt;
    &amp;lt;/executions&amp;gt;&lt;br /&gt;
  &amp;lt;/plugin&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Step 2: Parametrize output directory====&lt;br /&gt;
Set the variable (outputdir) either in the properties-section of the pom.xml:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;properties&amp;gt;&lt;br /&gt;
    &amp;lt;maven.compiler.source&amp;gt;1.6&amp;lt;/maven.compiler.source&amp;gt;&lt;br /&gt;
    &amp;lt;maven.compiler.target&amp;gt;1.6&amp;lt;/maven.compiler.target&amp;gt;&lt;br /&gt;
    &amp;lt;outputdir&amp;gt;testoutput/testdirectory&amp;lt;/outputdir&amp;gt;&lt;br /&gt;
  &amp;lt;/properties&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Or in an external properties file. This requires the Maven properties plugin:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;plugin&amp;gt;&lt;br /&gt;
    &amp;lt;groupId&amp;gt;org.codehaus.mojo&amp;lt;/groupId&amp;gt;&lt;br /&gt;
    &amp;lt;artifactId&amp;gt;properties-maven-plugin&amp;lt;/artifactId&amp;gt;&lt;br /&gt;
    &amp;lt;version&amp;gt;1.0-alpha-1&amp;lt;/version&amp;gt;&lt;br /&gt;
    &amp;lt;executions&amp;gt;&lt;br /&gt;
      &amp;lt;execution&amp;gt;&lt;br /&gt;
        &amp;lt;phase&amp;gt;initialize&amp;lt;/phase&amp;gt;&lt;br /&gt;
        &amp;lt;goals&amp;gt;&lt;br /&gt;
          &amp;lt;goal&amp;gt;read-project-properties&amp;lt;/goal&amp;gt;&lt;br /&gt;
        &amp;lt;/goals&amp;gt;&lt;br /&gt;
        &amp;lt;configuration&amp;gt;&lt;br /&gt;
          &amp;lt;files&amp;gt;&lt;br /&gt;
            &amp;lt;file&amp;gt;src/main/resources/example.properties&amp;lt;/file&amp;gt;&lt;br /&gt;
          &amp;lt;/files&amp;gt;&lt;br /&gt;
        &amp;lt;/configuration&amp;gt;&lt;br /&gt;
      &amp;lt;/execution&amp;gt;&lt;br /&gt;
    &amp;lt;/executions&amp;gt;&lt;br /&gt;
  &amp;lt;/plugin&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this (latter) case there is a src/main/resources/example.properties with an entry&lt;br /&gt;
&lt;br /&gt;
  outputdir = testoutput2/testdirectory&lt;br /&gt;
&lt;br /&gt;
Further reading:&lt;br /&gt;
&lt;br /&gt;
* “Copy-plugin”: http://maven.apache.org/plugins/maven-resources-plugin/examples/copy-resources.html &lt;br /&gt;
* Version plugin: http://mojo.codehaus.org/properties-maven-plugin/plugin-info.html (not to be mixed up with similar plugin http://haroon.sis.utoronto.ca/zarar/properties-maven-plugin/usage.html)&lt;br /&gt;
&lt;br /&gt;
===How can I set the version number in the manifest of OSGI bundles?===&lt;br /&gt;
&lt;br /&gt;
Further reading&lt;br /&gt;
* http://felix.apache.org/site/apache-felix-maven-osgi-plugin.html&lt;br /&gt;
* http://felix.apache.org/site/apache-felix-maven-bundle-plugin-bnd.html &lt;br /&gt;
&lt;br /&gt;
===How can I set the version number of the build number===&lt;br /&gt;
====Do it the default way====&lt;br /&gt;
The easiest way is to do nothing. Maven automatically increases the version number for snapshot releases. You even would have to turn it off explicitly in the pom.xml:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;distributionManagement&amp;gt;&lt;br /&gt;
		&amp;lt;repository&amp;gt;&lt;br /&gt;
			&amp;lt;id&amp;gt;releases&amp;lt;/id&amp;gt;&lt;br /&gt;
			&amp;lt;url&amp;gt;${nexus.path}/bmir-release&amp;lt;/url&amp;gt;&lt;br /&gt;
		&amp;lt;/repository&amp;gt;&lt;br /&gt;
&lt;br /&gt;
		&amp;lt;snapshotRepository&amp;gt;&lt;br /&gt;
			&amp;lt;id&amp;gt;snapshots&amp;lt;/id&amp;gt;&lt;br /&gt;
			&amp;lt;name&amp;gt;Internal Snapshots&amp;lt;/name&amp;gt;&lt;br /&gt;
			&amp;lt;url&amp;gt;${nexus.path}/snapshots&amp;lt;/url&amp;gt;&lt;br /&gt;
			&amp;lt;uniqueVersion&amp;gt;false&amp;lt;/uniqueVersion&amp;gt; &amp;lt;!-- This is the important line--&amp;gt;&lt;br /&gt;
		&amp;lt;/snapshotRepository&amp;gt;&lt;br /&gt;
	&amp;lt;/distributionManagement&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Do it explicitly====&lt;br /&gt;
Another way to determine the build number is by using the Maven build number plugin. This is quite forward:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;build&amp;gt;&lt;br /&gt;
    &amp;lt;!-- The final name uses the build namber plugin. You can either us the repository id,&lt;br /&gt;
    an incremental number or a timestamp. Or combinations of those --&amp;gt;&lt;br /&gt;
    &amp;lt;finalName&amp;gt;${project.artifactId}-${project.version}-r${buildNumber}&amp;lt;/finalName&amp;gt;&lt;br /&gt;
	 	&lt;br /&gt;
    &amp;lt;plugins&amp;gt;&lt;br /&gt;
      &amp;lt;!-- This plugin is needed to autoincrement the version number --&amp;gt;&lt;br /&gt;
      &amp;lt;plugin&amp;gt;&lt;br /&gt;
        &amp;lt;groupId&amp;gt;org.codehaus.mojo&amp;lt;/groupId&amp;gt;&lt;br /&gt;
        &amp;lt;artifactId&amp;gt;buildnumber-maven-plugin&amp;lt;/artifactId&amp;gt;&lt;br /&gt;
        &amp;lt;version&amp;gt;1.0-beta-3&amp;lt;/version&amp;gt;&lt;br /&gt;
        &amp;lt;executions&amp;gt;&lt;br /&gt;
          &amp;lt;execution&amp;gt;&lt;br /&gt;
            &amp;lt;phase&amp;gt;validate&amp;lt;/phase&amp;gt;&lt;br /&gt;
            &amp;lt;goals&amp;gt;&lt;br /&gt;
              &amp;lt;goal&amp;gt;create&amp;lt;/goal&amp;gt;&lt;br /&gt;
            &amp;lt;/goals&amp;gt;&lt;br /&gt;
          &amp;lt;/execution&amp;gt;&lt;br /&gt;
        &amp;lt;/executions&amp;gt;&lt;br /&gt;
        &amp;lt;configuration&amp;gt;&lt;br /&gt;
          &amp;lt;!-- the &amp;quot;0&amp;quot; refers to item[0] which is the timestamp --&amp;gt;&lt;br /&gt;
          &amp;lt;format&amp;gt;{0,date,yyyy-MM-dd-HH-mm-ss}&amp;lt;/format&amp;gt;&lt;br /&gt;
          &amp;lt;items&amp;gt;&lt;br /&gt;
            &amp;lt;item&amp;gt;timestamp&amp;lt;/item&amp;gt;&lt;br /&gt;
          &amp;lt;/items&amp;gt;&lt;br /&gt;
        &amp;lt;/configuration&amp;gt;		&lt;br /&gt;
      &amp;lt;/plugin&amp;gt;&lt;br /&gt;
&lt;br /&gt;
      &amp;lt;!-- and now all the other plugins --&amp;gt;&lt;br /&gt;
    &amp;lt;/plugins&amp;gt;&lt;br /&gt;
  &amp;lt;/build&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The resulting file name could be sth. like &amp;lt;tt&amp;gt;dlquery-0.0.3-r2010-11-15-10-36-20.jar&amp;lt;/tt&amp;gt;. The &amp;lt;tt&amp;gt;dlquery&amp;lt;/tt&amp;gt; is the artifact id, &amp;lt;tt&amp;gt;0.0.3&amp;lt;/tt&amp;gt; the version, both read from the pom.xml (and not generated by the version plugin).&lt;br /&gt;
&lt;br /&gt;
The plugin also provides you the option to include this version in manifest files (jar, war).&lt;br /&gt;
&lt;br /&gt;
Additional ways to determine the build number:&lt;br /&gt;
* The plugin supports also to retrieve the version number from the current repository revision.&lt;br /&gt;
* You also can include the branch (${scmBranch}) into the version number.&lt;br /&gt;
* The plugin supports also autoincrement.&lt;br /&gt;
* You could use a property file which you can access in the &amp;lt;finalName&amp;gt; tag.&lt;br /&gt;
&lt;br /&gt;
Further reading&lt;br /&gt;
* http://mojo.codehaus.org/buildnumber-maven-plugin/usage.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===How and where to I decide if I want to make a snapshot release or a &amp;quot;real&amp;quot; release?===&lt;br /&gt;
Maven picks up your decision from the version. If your ends with &amp;lt;tt&amp;gt;-SNAPSHOT&amp;lt;/tt&amp;gt; then it is a snapshot release, otherweise are productive release.&lt;br /&gt;
&lt;br /&gt;
Example for a snapshot release:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;project xmlns=&amp;quot;http://maven.apache.org/POM/4.0.0&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;modelVersion&amp;gt;4.0.0&amp;lt;/modelVersion&amp;gt;&lt;br /&gt;
	&amp;lt;groupId&amp;gt;protege4&amp;lt;/groupId&amp;gt;&lt;br /&gt;
	&amp;lt;artifactId&amp;gt;xmlcatalog&amp;lt;/artifactId&amp;gt;&lt;br /&gt;
	&amp;lt;packaging&amp;gt;jar&amp;lt;/packaging&amp;gt;&lt;br /&gt;
	&amp;lt;name&amp;gt;xmlcatalog&amp;lt;/name&amp;gt;&lt;br /&gt;
	&amp;lt;version&amp;gt;1.0.0-SNAPSHOT&amp;lt;/version&amp;gt;&lt;br /&gt;
	...&lt;br /&gt;
  &amp;lt;/project&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===&amp;quot;I get a return error 400&amp;quot; or &amp;quot;I the deploy of artifacts to Nexus fails. What can I do?&amp;quot;===&lt;br /&gt;
There are two typical errors:&lt;br /&gt;
# the Maven setting.xml file (either locally or on Hudson) does not contain the right credentials.&lt;br /&gt;
# you are trying to deploy to a release repository. Per default it is not allowed to &amp;quot;overwrite&amp;quot; artifacts in a release repository. It is possible in Snapshot repositories. What type a repository has, you can find out by selecting the repository in Nexus (login first). The configuration tab will tell you.&lt;br /&gt;
&lt;br /&gt;
===What are the repositories I'm supposed to deploy to?===&lt;br /&gt;
We decided to work with two repositories only:&lt;br /&gt;
# BMIR-Release&lt;br /&gt;
# Snapshot&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===How do I assemple a complex project with dependencies?===&lt;br /&gt;
Please use the assembly plugin.&lt;br /&gt;
&lt;br /&gt;
Further reading:&lt;br /&gt;
* http://maven.apache.org/plugins/maven-assembly-plugin/index.html&lt;br /&gt;
* http://maven.apache.org/plugins/maven-dependency-plugin/ (includes the unpacking of artifacts into a directory)&lt;/div&gt;</summary>
		<author><name>Johner</name></author>	</entry>

	<entry>
		<id>https://protegewiki.stanford.edu/index.php?title=Stanford:ToDoPage&amp;diff=9267</id>
		<title>Stanford:ToDoPage</title>
		<link rel="alternate" type="text/html" href="https://protegewiki.stanford.edu/index.php?title=Stanford:ToDoPage&amp;diff=9267"/>
				<updated>2010-12-16T19:22:59Z</updated>
		
		<summary type="html">&lt;p&gt;Johner: 18 revisions:&amp;amp;#32;Import from CF Pages (2)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Christian=&lt;br /&gt;
==open==&lt;br /&gt;
* WebProtege: distinguish SNAPSHOT and release in terms of getting latest or defined dependencies.&lt;br /&gt;
==Pending==&lt;br /&gt;
* Pending (until further instructions): Copy plugin: instruction,with Tim: properties are overwritten, before war is actually is build&lt;br /&gt;
* Not really a task: http://icatdev.stanford.edu&lt;br /&gt;
* Pending (until further instructions): Copy plugin: instruction,with Tim: properties are overwritten, before war is actually is build&lt;br /&gt;
* Can not be reproduced: Tania's machine (/usr/locasl/icat-files/src/icat-maven): Maven runs out of diskspace, increase memory for Maven. /usr/locasl/icat-files/src/icat-maven (Alex: user access right). User right problem? &lt;br /&gt;
==done==&lt;br /&gt;
* Christian, please add this line to your ~/.bashrc: umask u=rwx,g=rwx,o=rx. thanks Alex&lt;br /&gt;
* SVN checkout problem in project project.editor.application: files are not check-out plugin.xml, version.properties. Update of svn-externals and Hudson solved the issued.&lt;br /&gt;
* pom.xml: Make configurable: GWT-compile only of certain modules and of the html file. (e.g. webprotege.html). Relevant web pages added to QaGuide. &lt;br /&gt;
* pom.xml: reduce size of war. the lib folder is cleaned, the svn is updated. Now only the libs defined in pom.xml are part of the war. Can be further reduced with &amp;lt;provided&amp;gt;true&amp;gt;&amp;lt;/provided&amp;gt;&lt;br /&gt;
* pom.xml: folder webprotege (generated by GWT with ugly files): all *.rpc files have to be copied one level up (same level as webprotege), http://maven.apache.org/plugins/maven-resources-plugin/examples/copy-resources.html&lt;br /&gt;
* Complete UI scripting for iCAT and finish automatic build and testing of WebProtege: Build 168: Strike!&lt;br /&gt;
&lt;br /&gt;
=Alex=&lt;br /&gt;
==open==&lt;br /&gt;
nothing&lt;br /&gt;
==status unclear==&lt;br /&gt;
# Synchronize times on different servers (especially SVN and bmir-husdson1), e.g. by using a time server/service (http://time.stanford.edu?).&lt;br /&gt;
==done==&lt;br /&gt;
# Setup X-Server and care about &amp;quot;export DISPLAY=localhost:0.0&amp;quot;&lt;br /&gt;
# have all servers running as service: Hudson, Sonar, Nexus, Tomcat (and have it restarted on a daily basis), Selenium&lt;br /&gt;
# Add plugins to MediaWiki:  &lt;br /&gt;
#* Add Syntaxhighlighter plugin to MediaWiki: http://www.mediawiki.org/wiki/Extension:SyntaxHighlight_GeSHi&lt;br /&gt;
#* Add Video-Plugin to MediaWiki: http://paulgu.com/wiki/FLV_Player&lt;br /&gt;
#* Give Christian Access to upload images and videos either per FTP or file upload&lt;/div&gt;</summary>
		<author><name>Johner</name></author>	</entry>

	<entry>
		<id>https://protegewiki.stanford.edu/index.php?title=Stanford:OverviewPage&amp;diff=9227</id>
		<title>Stanford:OverviewPage</title>
		<link rel="alternate" type="text/html" href="https://protegewiki.stanford.edu/index.php?title=Stanford:OverviewPage&amp;diff=9227"/>
				<updated>2010-12-16T19:22:55Z</updated>
		
		<summary type="html">&lt;p&gt;Johner: 10 revisions:&amp;amp;#32;Import from CF Pages (2)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Overview=&lt;br /&gt;
==Infrastructure==&lt;br /&gt;
[[File:infrastructure-2.png|thumb|Infrastructure with all servers and information flow]]&lt;br /&gt;
&lt;br /&gt;
The workflow is supposed to work as follows (the numbers refer to the numbers in figure XY):&lt;br /&gt;
# The developer works on his machine where he/she writes code and tests. He works with the usual set of tools as Eclipse and GWT as well as Selenium, JUnit respectively TestNG for testing.&lt;br /&gt;
# After development code including test code is checked in to a version control system as SVN.&lt;br /&gt;
# This or a schedulder triggers a build on the integration server. We chose Hudson for continuous integration. On this server the usual steps are described in a Maven script: &lt;br /&gt;
## Retrieve code (including test code)&lt;br /&gt;
## Retrieve libraries&lt;br /&gt;
## Compile code (including test code)&lt;br /&gt;
## Run Unit-Tests via TestNG&lt;br /&gt;
## Deploy artifacts to test environment and/or other servers&lt;br /&gt;
## Run UI- and System-Tests on test enviroment via TestNG and Selenium&lt;br /&gt;
## Generate reports&lt;br /&gt;
# The war file is deployed to Tomcat (optional step)&lt;br /&gt;
# The UI- and System-Tests are executed via TestNG scripts using Selenium. (optional step)&lt;br /&gt;
# The reporting (e.g. error reports, compile errors, code and architecture metrics) which is triggered by Hudson is done via Sonar which also performs an analysis of code and architecture.&lt;br /&gt;
# Hudson is capable to communicate the results by the means of RSS, Twitter, Mail or Skype, to name a few examples.&lt;br /&gt;
# Both, the developer as well as the build server (Hudson) retrieve the Maven script as well as the libraries from a central repository server. We chose Nexus.&lt;br /&gt;
# Hudson deploys tested artifacts to repository from where developers and users can download it&lt;br /&gt;
&lt;br /&gt;
==Rationale==&lt;br /&gt;
[[File:iso9126.png|thumb|ISO 9126: Quality criteria of software]]&lt;br /&gt;
The rationale for continuous integration and testing is as import as evident:&lt;br /&gt;
* Avoid redundant tasks as&lt;br /&gt;
** Build software (including compile, package etc.)&lt;br /&gt;
** Run unit tests&lt;br /&gt;
** Run system tests including UI-tests&lt;br /&gt;
** Evaluate quality of code and architecture&lt;br /&gt;
* Provide a faster start for new programmers. A one-click install is the ultimate goal. Any unnecessary step will take time, might lead to errors and has the potential to frustrate “newbies”.&lt;br /&gt;
* Bugs which are found early are easy and fast to fix. As longer it takes and as more commits were done as more difficult and tedious the bug fixing will become.&lt;br /&gt;
* (Web-) Protégé is supposed to attract continuously more programmers. At the same time, the quality of the software has to be assured. Especially with respect to maintainability and functionality. But also quality aspects like efficiency and reliability can be partially tested automatically.&lt;br /&gt;
=Description and Rationale for Tools=&lt;br /&gt;
This page is intended to give an overview on the systems and to describe why we selected particularily this set. How to install, operate, and use this tools is described in&lt;br /&gt;
* [[Stanford:AdministratorGuide| administrator guide]]&lt;br /&gt;
* [[Stanford:DeveloperGuide|developer guide]]&lt;br /&gt;
&lt;br /&gt;
==Hudson==&lt;br /&gt;
Hudson is a server application to automatically and continuously build, test and deploy one or more projects. It provides an overview on the build and tests results including code metrics, architecture metrics, JUnit results and much more. &lt;br /&gt;
&lt;br /&gt;
It is obvious that such repetitive tasks should be automated. However, there are several products to facilitate this task. Among those there is CruiseControl We decided to prefer Hudson over CruiseControl for the following reasons:&lt;br /&gt;
&lt;br /&gt;
* Installation is simpler. It is just download the jar file.  E.g. no installation of DB necessary.&lt;br /&gt;
* Administration is simpler: An easy to use web interface gives access to all administrative settings&lt;br /&gt;
* Easy integration with other tools e.g. with Sonar, TestNG and communication services&lt;br /&gt;
* Related to Plug-ins&lt;br /&gt;
* Easier plug-in development &lt;br /&gt;
* More plug-ins available (e.g. twitter, email, Sonar, Selenium) &lt;br /&gt;
* Easier plug-ins administration&lt;br /&gt;
&lt;br /&gt;
Hudson executes the Maven script(s) including builds as well as unit and UI tests, triggers reporting and communication of build and test results. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;Link&amp;gt;Instruction how to install and configure Hudson.&lt;br /&gt;
&lt;br /&gt;
==Nexus==&lt;br /&gt;
[[File:nexus.png|thumb|Nexus the central and shared repository for all developers (and users)]]&lt;br /&gt;
As more libraries a project requires and as more dependencies these libraries have as more complex the setup of a new development environment and of executing a build become. For example WebProtégé has dependencies to Protégé, to the Google Web Toolkit, to Apache libraries, and so on. And even the referenced libraries are interdependent. &lt;br /&gt;
&lt;br /&gt;
Maven is capable of resolving these dependencies. Nexus is a repository manager which allows you to centrally provide these libraries in a versioned and reproducible manner. Nexus also can serve as proxy. So the developers (and the build system) just need to retrieve these files from the repository instead of individually downloading these artifacts redundantly. This not only saves bandwidth, but also reduces the load on “Central” (the central Maven repository).&lt;br /&gt;
&lt;br /&gt;
Nexus is not replacing Maven. Nexus proxies the Maven requests to a central Maven repository. Nexus provides as the feature not only to proxy repositories, but to operate our “own” repository which is the deployment target of all of our projects. Please note that Maven itself uses a repository (the Maven repository).&lt;br /&gt;
&lt;br /&gt;
Further feature of Nexus include &lt;br /&gt;
* a quick and easy search of all artifacts.&lt;br /&gt;
* Developers don’t have to have the entire source. They just can work with libraries from Nexus. This makes collaboration easier.&lt;br /&gt;
* Clear responsibility and maintenance of “official” 3rd party libraries.&lt;br /&gt;
&lt;br /&gt;
An additional list of reasons for using repository managers can be found at http://www.sonatype.com/books/nexus-book/reference/sect-repoman-reasons.html. &lt;br /&gt;
&lt;br /&gt;
A comparison of repository managers (Apache Archiva, Artifactory, and Nexus) can be found at http://docs.codehaus.org/display/MAVENUSER/Maven+Repository+Manager+Feature+Matrix. &lt;br /&gt;
 &lt;br /&gt;
“Standard” developers not necessarily have to deal with Nexus. She just uses Nexus as a repository to retrieve artifacts from. If she requires a new jar-file, this has to be done as described in the How-Tos. However, we recommend to have a local repository as well.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;Link&amp;gt;Instruction how to install and configure Nexus.&lt;br /&gt;
&lt;br /&gt;
==Sonar==&lt;br /&gt;
Sonar is a very powerful platform to report the quality of software products considering aspects as&lt;br /&gt;
* Code metrics as complexity&lt;br /&gt;
* Error/bug patterns&lt;br /&gt;
* Architectural metrics&lt;br /&gt;
* Conformity with coding guidelines&lt;br /&gt;
* Results of tests (Unit tests, UI tests) including errors, failures and code coverage.&lt;br /&gt;
&lt;br /&gt;
Sonar provides both, a comprehensive overview on the quality o projects as well as the option to drill down to single metrics/aspects and even to the single line of source code.&lt;br /&gt;
&lt;br /&gt;
Sonar serves as shell compiling and consistently visualizing the results of numerous tools as Checkstyle, FindBugs, PMD, and TestNG .&lt;br /&gt;
&lt;br /&gt;
&amp;lt;Link&amp;gt;Instruction how to install and configure Maven.&lt;br /&gt;
&lt;br /&gt;
==TestNG==&lt;br /&gt;
We prefer TestNG over JUnit for the following reasons:&lt;br /&gt;
* Better separation of test code and test data&lt;br /&gt;
* Better grouping of tests and re-use of test groups&lt;br /&gt;
* Better support for parallel (multi-threaded) testing &lt;br /&gt;
* TestNG automatically produces test reports without having the need to use other tasks as JUnitReport.&lt;br /&gt;
&lt;br /&gt;
==Maven==&lt;br /&gt;
Maven is used by&lt;br /&gt;
* Developers to initially create his workspace (initial build)&lt;br /&gt;
* To define the build and test process which is executed and scheduled by Hudson.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;Link&amp;gt;Instruction how to install and configure Maven.&lt;br /&gt;
&lt;br /&gt;
# validate&lt;br /&gt;
# generate-sources&lt;br /&gt;
# process-sources&lt;br /&gt;
# generate-resources&lt;br /&gt;
# process-resources&lt;br /&gt;
# compile&lt;br /&gt;
# process-classes&lt;br /&gt;
# generate-test-sources&lt;br /&gt;
# process-test-sources&lt;br /&gt;
# generate-test-resources&lt;br /&gt;
# process-test-resources&lt;br /&gt;
# test-compile&lt;br /&gt;
# test&lt;br /&gt;
# prepare-package (maven 2.1+)&lt;br /&gt;
# package&lt;br /&gt;
# pre-integration-test&lt;br /&gt;
# integration-test&lt;br /&gt;
# post-integration-test&lt;br /&gt;
# verify&lt;br /&gt;
# install&lt;br /&gt;
# deploy&lt;br /&gt;
&lt;br /&gt;
==Firefox ==&lt;br /&gt;
We prefer Firefox over other browsers for two major reasons:&lt;br /&gt;
* Firefox is available on LINUX, too. LINUX will be our server OS.&lt;br /&gt;
* There is a Selenium Plugin available for Firefox.&lt;br /&gt;
&lt;br /&gt;
Having said this, it is nevertheless worth mentioning that the web applications have to be tested on other browsers as well. This requires no plugin. The plugin is only required for automated UI tests.&lt;br /&gt;
&lt;br /&gt;
==Selenium Server (Selenium Remote Control)==&lt;br /&gt;
[[File:selenium-server.png|thumb|Selenium Server Architecure. Picture taken form http://seleniumhq.org/projects/remote-control]]&lt;br /&gt;
Selenium remote control is a server which allows developers test web applications (even with AJAX) using Java code (e.g. JUnit, TestNG) or any other language. &lt;br /&gt;
&lt;br /&gt;
Selenium RC automatically launches the browser, simulates the user actions and kills the browser afterwards. Thereby Selenium RC facilitates the complete test automation ($rarr; regression testing) of rich web applications.&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;Link&amp;gt;Instruction how to install and configure Selenium.&lt;br /&gt;
&lt;br /&gt;
==Selenium Plugin (optional)==&lt;br /&gt;
The Selenium IDE is an optional Firefox plugin which helps developers to record actions in the browser and generate Java code. However, the capture &amp;amp; replay functionality is very limited. Therefore Selenium tests will be written as regular Java respectively TestNG code.&lt;/div&gt;</summary>
		<author><name>Johner</name></author>	</entry>

	<entry>
		<id>https://protegewiki.stanford.edu/index.php?title=Main_Page&amp;diff=9206</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://protegewiki.stanford.edu/index.php?title=Main_Page&amp;diff=9206"/>
				<updated>2010-12-16T19:22:54Z</updated>
		
		<summary type="html">&lt;p&gt;Johner: 38 revisions:&amp;amp;#32;Import from CF Pages (2)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
&amp;lt;div style=&amp;quot;background:#F0E6CA; border:1px solid #AE5B08; padding:10px 15px 10px 20px; margin:2em 0 0 0;&amp;quot;&amp;gt;&lt;br /&gt;
=== Welcome to the Protege Wiki! ===&lt;br /&gt;
&lt;br /&gt;
Protege is a free, open-source platform that provides a growing user community with a suite of tools to construct domain models and knowledge-based applications with ontologies.  Please see the [http://protege.stanford.edu/overview/index.html overview section] of the [http://protege.stanford.edu/ Protege website] for a more detailed description of what the Protege platform offers.&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;display:block; float:left; width:75%;&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Upcoming Events ==&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;'''[http://protege.stanford.edu/shortcourse/protege-owl/201103/ Protege-OWL Short Course]''', March 23-25, 2011, Stanford University.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Protege Users ==&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;padding-bottom:5px; list-style:circle;&amp;quot;&amp;gt;[http://protege.stanford.edu Protege Website]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;padding-bottom:5px; list-style:circle;&amp;quot;&amp;gt;Browse the [[Protege Plugin Library]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;padding-bottom:5px; list-style:circle;&amp;quot;&amp;gt;Browse the [[Protege Ontology Library]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;padding-bottom:5px; list-style:circle;&amp;quot;&amp;gt;&amp;lt;strong&amp;gt;[[ProtegeUserDocs|General Documentation]]&amp;lt;/strong&amp;gt; - this page is a collection of links to documentation that is applicable to all versions of Protege, including guidelines for developing ontologies, information about scalability and tuning in Protege, etc.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;padding-bottom:5px; list-style:circle;&amp;quot;&amp;gt;&amp;lt;strong&amp;gt;[[Protege3UserDocs|Protege 3 Documentation]]&amp;lt;/strong&amp;gt; - this page is a collection of links to documentation that is specific to the 3.x series such as Getting Started guides, User's Guides, etc.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;padding-bottom:5px; list-style:circle;&amp;quot;&amp;gt;&amp;lt;strong&amp;gt;[[Protege4UserDocs|Protege 4 Documentation]]&amp;lt;/strong&amp;gt; - this page is a collection of links to documentation that is specific to the 4.x series.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;list-style:circle;&amp;quot;&amp;gt;&amp;lt;strong&amp;gt;[[WebProtege|WebProtege Documentation]]&amp;lt;/strong&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Protege Developers ==&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;padding-bottom:5px; list-style:circle;&amp;quot;&amp;gt;&amp;lt;strong&amp;gt;[[ProtegeDevDocsGeneral|General Developer Documentation]]&amp;lt;/strong&amp;gt; - this page is a collection of links to developer documentation that is applicable to all versions of Protege, such as how to connect to our Subversion repository, etc.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;padding-bottom:5px; list-style:circle;&amp;quot;&amp;gt;&amp;lt;strong&amp;gt;[[Protege3DevDocs|Protege 3 Developer Documentation]]&amp;lt;/strong&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;padding-bottom:5px; list-style:circle;&amp;quot;&amp;gt;&amp;lt;strong&amp;gt;[[Protege4DevDocs|Protege 4 Developer Documentation]]&amp;lt;/strong&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;padding-bottom:5px; list-style:circle;&amp;quot;&amp;gt;&amp;lt;strong&amp;gt;[[WebProtegeDevelopersGuide|WebProtege Developer's Guide]]&amp;lt;/strong&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Wiki Help ==&lt;br /&gt;
If you are new to using a Wiki, please see the [[Help:Contents|Help page]] page for useful links to User's Guides, etc.  &lt;br /&gt;
&lt;br /&gt;
The [[Help:Contents|Help page]] also has suggestions for where to find help with using the Protege application.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;display:block; float:right; width:25%;&amp;quot;&amp;gt;&lt;br /&gt;
[[image:Protege-OWL.jpg|none|thumb|right|protege-owl editor]]&lt;br /&gt;
[[image:Protege-Frames.jpg|none|thumb|right|protege-frames editor]]&lt;br /&gt;
[[image:Webprotege.png|none|thumb|right|[[WebProtege|web-protege editor]] ]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;/div&gt;</summary>
		<author><name>Johner</name></author>	</entry>

	<entry>
		<id>https://protegewiki.stanford.edu/index.php?title=Stanford:AdministratorGuide&amp;diff=9216</id>
		<title>Stanford:AdministratorGuide</title>
		<link rel="alternate" type="text/html" href="https://protegewiki.stanford.edu/index.php?title=Stanford:AdministratorGuide&amp;diff=9216"/>
				<updated>2010-12-16T19:22:54Z</updated>
		
		<summary type="html">&lt;p&gt;Johner: 9 revisions:&amp;amp;#32;Import from CF Pages (2)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Installation and configuration of central server infrastructure =&lt;br /&gt;
[[File:infrastructure-2.png|thumb|Infrastructure with all servers and information flow]]&lt;br /&gt;
It is recommended to install the tools in the proposed sequence, since we have the following dependencies:&lt;br /&gt;
* Hudson uses Maven&lt;br /&gt;
* Hudson includes the Sonar plugin and triggers Sonar&lt;br /&gt;
* Maven retrieves libraries from Nexus&lt;br /&gt;
* Hudson executes the Maven script&lt;br /&gt;
* Maven includes profiles from Sonar and Nexus.&lt;br /&gt;
&lt;br /&gt;
We assume that SVN is already installed and that the projects exist in SVN.&lt;br /&gt;
&lt;br /&gt;
=JAVA=&lt;br /&gt;
* Download and install java. &lt;br /&gt;
* Set environment setting JAVA_HOME pointing to the java folder (e.g. on Windows “C:\Program Files\Java\jdk1.6.0_21\bin”).&lt;br /&gt;
&lt;br /&gt;
=Nexus=&lt;br /&gt;
==Initial Installation and configuration (one time)==&lt;br /&gt;
Download file (OS dependent) from http:////nexus.sonatype.org/downloads (e.g. “nexus-oss-webapp-1.8.0-bundle.zip”). Extract files to final directory. &lt;br /&gt;
OS dependent&lt;br /&gt;
* Windows: Open command line with bin folder as current directory (e.g. “C:\nexus\nexus-oss-webapp-1.8.0\bin\jsw\windows-x86-32”). Run Installnexus and Startnexus from command line. Windows Users (Vista, Windows 7) need to execute cmd.exe as Administrator (go to “All Programs”, “Accessories”, “Command Prompt”, right mouse click on “Run as Administrator”.&lt;br /&gt;
* Linux: Create folder /var/nexus/. Copy downloaded filder into this folder. Open command line with bin folder as current (e.g. /var/nexus/nexus-oss-webapp-1.8.0/bin/jsw/linux-x86-32). Run sudo ./nexus start&lt;br /&gt;
&lt;br /&gt;
Alternatively you can install Nexus as service as described in http://www.sonatype.com/books/nexus-book/reference/ch03s06.html. &lt;br /&gt;
&lt;br /&gt;
Test Nexus: http://localhost:8081/nexus/index.html. Login to Nexus with user name and password “admin” respectively XXX (/var/nexus/nexus-oss-webapp-1.8.0/conf/users.txt). Optionally make SMTP settings.&lt;br /&gt;
&lt;br /&gt;
==How to change the password==&lt;br /&gt;
If the NEXUS password is changed (TODO: has to be done soon), this has to happen in two places:&lt;br /&gt;
1.	Change it in Nexus itself using the administration/security interface&lt;br /&gt;
2.	Change it in the settings.xml in maven/conf/ directory. &lt;br /&gt;
&lt;br /&gt;
TODO: Change password.&lt;br /&gt;
==Setting up repositories==&lt;br /&gt;
===Option 1: Upload files individually===&lt;br /&gt;
Nexus comes with a predefined set of repositories. Now add the artifacts as described in the project manager's guide. TODO add link.&lt;br /&gt;
&lt;br /&gt;
===Option 2: Optionally import external repositories===&lt;br /&gt;
After install there is a “storage” folder  (e.g. “C:\nexus\sonatype-work\nexus\storage”).&lt;br /&gt;
&lt;br /&gt;
Copy Sonar folder to storage and overwrite folder “thirdparty”. In thirdparty there are the Stanford libs. Please refer to the appendix to get an overview.&lt;br /&gt;
&lt;br /&gt;
Current problem: the jars in the official repositories have not distinct versions. So it is not possible to point to a specific version. We are talking about the jars mentioned in the WebProtege developer guide (http://protegewiki.stanford.edu/wiki/WebProtegeDevelopersGuide) section “Fix project compilation errors”. &lt;br /&gt;
&lt;br /&gt;
=Sonar=&lt;br /&gt;
Just download zip file sonar-2.2 from http://www.sonarsource.org/. Unpack it to our tools folder (e.g. to /var/sonar/sonar-2.2).&lt;br /&gt;
&lt;br /&gt;
Start sonar from bin folder (e.g. /var/sonar/sonar-2.2/bin/linux-x86-32 folder:&lt;br /&gt;
* Windows  StartSonar&lt;br /&gt;
* Linux: sonar.sh (don’t forget to make this file and wrapper to be executable (set permissions)&lt;br /&gt;
&lt;br /&gt;
Test Sonar via http://localhost:9000. The default admin user name and password are admin/admin, however, there is no need to login.&lt;br /&gt;
&lt;br /&gt;
Optionally install Sonar as LINUX service. Command line /var/sonar/sonar-2.2.3/sudo cp bin/linux-x86-64/sonar.sh /etc/init.d/sonar&lt;br /&gt;
&lt;br /&gt;
The default password is changed. The current one can be found in /var/sonar/sonar-2.3/conf/users.txt. Or ask christian.johner@johner-institut.de.&lt;br /&gt;
&lt;br /&gt;
=Maven=&lt;br /&gt;
==Installation==&lt;br /&gt;
Download Maven from http://maven.apache.org/download.html und chose apache-maven-2.2.1.&lt;br /&gt;
&lt;br /&gt;
Add system environment variables:&lt;br /&gt;
* M2_HOME pointing to new directory apache-maven-2.2.1&lt;br /&gt;
* JAVA_HOME (if not already set)&lt;br /&gt;
&lt;br /&gt;
Add to Path ;%M2_HOME%\bin&lt;br /&gt;
&lt;br /&gt;
==Configuration==&lt;br /&gt;
Change file “apache-maven-2.2.1/conf/settings.xml”&lt;br /&gt;
* Add mirror (http://localhost:8081/nexus/content/groups/public) &lt;br /&gt;
  &amp;lt;mirrors&amp;gt;&lt;br /&gt;
    &amp;lt;mirror&amp;gt;&lt;br /&gt;
      &amp;lt;!--This sends everything else to /public --&amp;gt;&lt;br /&gt;
      &amp;lt;id&amp;gt;nexus&amp;lt;/id&amp;gt;&lt;br /&gt;
      &amp;lt;mirrorOf&amp;gt;*&amp;lt;/mirrorOf&amp;gt;&lt;br /&gt;
      &amp;lt;url&amp;gt;http://localhost:8081/nexus/content/groups/public&amp;lt;/url&amp;gt;&lt;br /&gt;
    &amp;lt;/mirror&amp;gt;&lt;br /&gt;
  &amp;lt;/mirrors&amp;gt;&lt;br /&gt;
* Add profiles for sonar and nexus&lt;br /&gt;
  &amp;lt;profiles&amp;gt;&lt;br /&gt;
    &amp;lt;profile&amp;gt;&lt;br /&gt;
      &amp;lt;id&amp;gt;nexus&amp;lt;/id&amp;gt;&lt;br /&gt;
      &amp;lt;!--Enable snapshots for the built in central repo to direct --&amp;gt;&lt;br /&gt;
      &amp;lt;!--all requests to nexus via the mirror --&amp;gt;&lt;br /&gt;
      &amp;lt;repositories&amp;gt;&lt;br /&gt;
        &amp;lt;repository&amp;gt;&lt;br /&gt;
          &amp;lt;id&amp;gt;central&amp;lt;/id&amp;gt;&lt;br /&gt;
          &amp;lt;url&amp;gt;http://central&amp;lt;/url&amp;gt;&lt;br /&gt;
          &amp;lt;releases&amp;gt;&amp;lt;enabled&amp;gt;true&amp;lt;/enabled&amp;gt;&amp;lt;/releases&amp;gt;&lt;br /&gt;
          &amp;lt;snapshots&amp;gt;&amp;lt;enabled&amp;gt;true&amp;lt;/enabled&amp;gt;&amp;lt;/snapshots&amp;gt;&lt;br /&gt;
        &amp;lt;/repository&amp;gt;&lt;br /&gt;
      &amp;lt;/repositories&amp;gt;&lt;br /&gt;
     &amp;lt;pluginRepositories&amp;gt;&lt;br /&gt;
        &amp;lt;pluginRepository&amp;gt;&lt;br /&gt;
          &amp;lt;id&amp;gt;central&amp;lt;/id&amp;gt;&lt;br /&gt;
          &amp;lt;url&amp;gt;http://central&amp;lt;/url&amp;gt;&lt;br /&gt;
          &amp;lt;releases&amp;gt;&amp;lt;enabled&amp;gt;true&amp;lt;/enabled&amp;gt;&amp;lt;/releases&amp;gt;&lt;br /&gt;
          &amp;lt;snapshots&amp;gt;&amp;lt;enabled&amp;gt;true&amp;lt;/enabled&amp;gt;&amp;lt;/snapshots&amp;gt;&lt;br /&gt;
        &amp;lt;/pluginRepository&amp;gt;&lt;br /&gt;
      &amp;lt;/pluginRepositories&amp;gt;&lt;br /&gt;
    &amp;lt;/profile&amp;gt;&lt;br /&gt;
        &amp;lt;profile&amp;gt;&lt;br /&gt;
            &amp;lt;id&amp;gt;sonar&amp;lt;/id&amp;gt;&lt;br /&gt;
            &amp;lt;activation&amp;gt;&lt;br /&gt;
                &amp;lt;activeByDefault&amp;gt;true&amp;lt;/activeByDefault&amp;gt;&lt;br /&gt;
            &amp;lt;/activation&amp;gt;&lt;br /&gt;
            &amp;lt;properties&amp;gt;&lt;br /&gt;
            &amp;lt;/properties&amp;gt;&lt;br /&gt;
        &amp;lt;/profile&amp;gt;&lt;br /&gt;
  &amp;lt;/profiles&amp;gt;&lt;br /&gt;
  &amp;lt;activeProfiles&amp;gt;&lt;br /&gt;
    &amp;lt;!--make the profile active all the time --&amp;gt;&lt;br /&gt;
    &amp;lt;activeProfile&amp;gt;nexus&amp;lt;/activeProfile&amp;gt;&lt;br /&gt;
  &amp;lt;/activeProfiles&amp;gt;&lt;br /&gt;
* Add servers&lt;br /&gt;
  &amp;lt;servers&amp;gt;&lt;br /&gt;
    &amp;lt;server&amp;gt;&lt;br /&gt;
      &amp;lt;id&amp;gt;snapshots&amp;lt;/id&amp;gt;&lt;br /&gt;
      &amp;lt;username&amp;gt;admin&amp;lt;/username&amp;gt;&lt;br /&gt;
      &amp;lt;password&amp;gt;admin123&amp;lt;/password&amp;gt;&lt;br /&gt;
    &amp;lt;/server&amp;gt;&lt;br /&gt;
    &amp;lt;!-- Distribution directory --&amp;gt;&lt;br /&gt;
    &amp;lt;server&amp;gt;&lt;br /&gt;
      &amp;lt;id&amp;gt;releases&amp;lt;/id&amp;gt;&lt;br /&gt;
      &amp;lt;username&amp;gt;admin&amp;lt;/username&amp;gt;&lt;br /&gt;
      &amp;lt;password&amp;gt;admin123&amp;lt;/password&amp;gt;&lt;br /&gt;
    &amp;lt;/server&amp;gt;&lt;br /&gt;
  &amp;lt;/servers&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Hint:''' the passwords shown in the code above have been the default passwords. They do not match the actual password. The actual password can be found in the Maven directory /conf/settings.xml on bmir-hudson.standford.edu.&lt;br /&gt;
&lt;br /&gt;
A complete settings.xml file can be downloaded from [[Stanford:SettingsXmlExample|here]].&lt;br /&gt;
&lt;br /&gt;
=Hudson=&lt;br /&gt;
==Install (one time) and start Hudson==&lt;br /&gt;
Windows&lt;br /&gt;
* Download war-file from www.hudson-ci.org. Just click on “latest and greatest”.&lt;br /&gt;
* Start server with java –jar hudson.war. Runs on http://localhost:8080 &lt;br /&gt;
&lt;br /&gt;
Linux&lt;br /&gt;
* Follow steps as described in http://hudson-ci.org/redhat/ (to use YUM) which are &lt;br /&gt;
* sudo rpm --import http://hudson-ci.org/redhat/hudson-ci.org.key&lt;br /&gt;
* wget -O /tmp/hudson.rpm http://hudson-ci.org/latest/redhat/hudson.rpm&lt;br /&gt;
* sudo rpm --install /tmp/hudson.rpm&lt;br /&gt;
* Start: sudo /etc/rc.d/init.d/hudson start&lt;br /&gt;
&lt;br /&gt;
==Initial Configuration (one time)==&lt;br /&gt;
[[File:hudson-add-sonar.png|thumb|Sonar can be added as plugin]]&lt;br /&gt;
Add plugins&lt;br /&gt;
* Go to “Manage Hudson” &amp;amp;rarr; “Manage Plugins”. &lt;br /&gt;
* Go to available plugins and install “Hudson Sonar Plugin”.&lt;br /&gt;
* Optionally add additional plugins. E.g. for Twitter, Trigger, e.g. jabber. Build reports is not needed as we use Sonar.&lt;br /&gt;
&lt;br /&gt;
[[File:hudson-configure.png|thumb|Paths to Maven and JDK to be defined in the configuration settings]]&lt;br /&gt;
Go back to “Manage Hudson” and select “Configure System” and make the following changes/settings&lt;br /&gt;
* Jdk: set name (e.g. “Java 1.6”) and path to Java (e.g. “C:\Program Files\Java\jdk1.6.0_21”). Hudson does not read the system variable JAVA_HOME.&lt;br /&gt;
* Maven: Add Maven (not ANT) and set name (e.g. “Maven 2”) and path to Maven (e.g. “C:\Tools\apache-maven-2.2.1” respectively ). Hudson does not read the system variable MAVEN_HOME.&lt;br /&gt;
* “Add Sonar”. Just add a name (e.g. “Sonar”). Set location e.g. to http://bmir-hudson1:9000.&lt;br /&gt;
* Optionally set e-mail notifications&lt;br /&gt;
&lt;br /&gt;
==Add projects==&lt;br /&gt;
Please refer to the project manager section. TODO add link.&lt;br /&gt;
&lt;br /&gt;
==Add Users==&lt;br /&gt;
Go to Hudson &amp;gt; Manage Server &amp;gt; Configure System and add an user by entering a name in text field &amp;quot;User/group to add&amp;quot;. Ignore the warning symbol, it will disappear as soon the user has registered himself. Give user rights by checking checkboxes. Click save.&lt;br /&gt;
&lt;br /&gt;
=Selenium Server (Selenium Remote Control)=&lt;br /&gt;
Set up a central Selenium Server. &lt;br /&gt;
* Download Selenium RC from http://seleniumhq.org/download/. &lt;br /&gt;
* Unzip file. We only need selenium-server-1.0.3 subfolder.&lt;br /&gt;
* Start server with java –jar selenium-server.jar &lt;br /&gt;
* Make sure that the display is set, e.g. export DISPLAY=…  (case sensitive, only WLAN IP worked?!?)&lt;br /&gt;
&lt;br /&gt;
There is already a file /etc/init.d/start-selenium-server.sh.&lt;br /&gt;
 [johner@bmir-hudson1 ~]$ export DISPLAY=10.39.35.249:0.0&lt;br /&gt;
 [johner@bmir-hudson1 ~]$ xhost&lt;br /&gt;
  access control disabled, clients can connect from any host&lt;br /&gt;
  INET:DN0a2723f9.SUNet&lt;br /&gt;
  LOCAL:&lt;br /&gt;
  INET:bmir-hudson1.stanford.edu&lt;br /&gt;
 [johner@bmir-hudson1 ~]$ java -jar /var/selenium/selenium-server.jar&lt;br /&gt;
&lt;br /&gt;
Note: the display settings have to be done before selenium is started!&lt;br /&gt;
&lt;br /&gt;
Either there is a XServer running on the test machine or a client machine (or server itself) needs running X-Server, e.g. run xming –ac. XMing is available for Windows.&lt;br /&gt;
&lt;br /&gt;
=Tomcat=&lt;br /&gt;
Standard out of the box: Either use yum or just download and extract apache-tomcat. Change in server-xml port to 8082 in order to avoid conflicts with Hudson.&lt;br /&gt;
&lt;br /&gt;
old:&lt;br /&gt;
  sudo /opt/tomcat/bin/startup.sh&lt;br /&gt;
  user name and password currently are currently set to admin/protégé.&lt;br /&gt;
&lt;br /&gt;
Change by Alex: /usr/local/tomcat6   it should start with /sbin/service tomact6 start&lt;br /&gt;
Password can be found in /etc/tomcat6/tomcat-users.xml&lt;/div&gt;</summary>
		<author><name>Johner</name></author>	</entry>

	<entry>
		<id>https://protegewiki.stanford.edu/index.php?title=Stanford:DeveloperGuide&amp;diff=9161</id>
		<title>Stanford:DeveloperGuide</title>
		<link rel="alternate" type="text/html" href="https://protegewiki.stanford.edu/index.php?title=Stanford:DeveloperGuide&amp;diff=9161"/>
				<updated>2010-12-16T19:21:37Z</updated>
		
		<summary type="html">&lt;p&gt;Johner: 28 revisions:&amp;amp;#32;Import from CF Pages&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=In a nutshell=&lt;br /&gt;
You work as you typically work just using Eclipse to develop and test. There are only a few things you need to consider:&lt;br /&gt;
* The initial setup of your Eclipse project is done with Maven.&lt;br /&gt;
* Prefer TestNG over JUnit in order to write unit tests.&lt;br /&gt;
* We encourage you to write UI tests using the Selenium framework.&lt;br /&gt;
* We encourage you to deploy your artifacts not just to the file system (local Maven repository) but also to the central Nexus repository, at least if you have the privileges to do so.&lt;br /&gt;
&lt;br /&gt;
And don’t forget to update and commit to/from on a daily basis.&lt;br /&gt;
&lt;br /&gt;
=How to start from scratch=&lt;br /&gt;
==Downloads and Installs==&lt;br /&gt;
[[Image:eclipse-jdk.png|thumb|Use the JDK instead of the JRE]]&lt;br /&gt;
===JAVA===&lt;br /&gt;
* Download and install java. &lt;br /&gt;
* Set environment setting &amp;lt;tt&amp;gt;JAVA_HOME&amp;lt;/tt&amp;gt; pointing to the java folder, e.g. &amp;lt;tt&amp;gt;C:\Program Files\Java\jdk1.6.0_21\bin&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===Maven===&lt;br /&gt;
* Download Maven from http://maven.apache.org/download.html und chose apache-maven-2.2.1.&lt;br /&gt;
* Add system environment variable M2_HOME pointing to new directory apache-maven-2.2.1&lt;br /&gt;
* Add to Path &amp;lt;tt&amp;gt;;%M2_HOME%\bin&amp;lt;/tt&amp;gt;&lt;br /&gt;
* Modify &amp;lt;tt&amp;gt;/conf/settings.xml&amp;lt;/tt&amp;gt;: Path to Nexus and you operating system. There is an [[Stanford:SettingsXmlExample|example page for a settings file]].&lt;br /&gt;
&lt;br /&gt;
===Eclipse===&lt;br /&gt;
* Download, extract and start eclipse&lt;br /&gt;
* Install subclipse plugin (update site is http://subclipse.tigris.org/update_1.6.x). Check all options, otherwise the SCM handler of Maven will be missing.&lt;br /&gt;
* Install GWT plusing (update site is http://dl.google.com/eclipse/plugin/3.6) with Helios 3.6, otherwise 3.5&lt;br /&gt;
* Install m2eclipse plugin (Update site is http://m2eclipse.sonatype.org/sites/m2e) &lt;br /&gt;
* Optional: Install m2eclipse extra plugin (Update site is http://m2eclipse.sonatype.org/sites/m2e-extras). Select Maven SCM handler for Subclipse and Maven SCM integration.&lt;br /&gt;
* Let Eclipse know the location of your installed JDK (nor JRE!) &lt;br /&gt;
* Start Eclipse with JDK (not JRE!) as described in http://help.eclipse.org/help33/index.jsp?topic=/org.eclipse.platform.doc.user/tasks/running_eclipse.htm. Example: &lt;br /&gt;
   &amp;quot;C:\Program Files\eclipse-jee-helios-SR1-win32\eclipse\eclipse.exe&amp;quot; -vm &amp;quot;C:\Programme\Java\jdk1.6.0_21\bin\javaw.exe&amp;quot; &lt;br /&gt;
&lt;br /&gt;
===Firefox &amp;amp; GWT plugin (only for GWT UI testing)===&lt;br /&gt;
After download and install of Firefox we recommend adding a new profile. Rationale: Selenium typically initiates a new Firefox profile which is missing the GWT Firefox plugin. Therefore we generate a new one:&lt;br /&gt;
* Open command window and go to Firefox directory &lt;br /&gt;
* Execute firefox -P. Plugin manager shows up.&lt;br /&gt;
* Add new profile and chose a directory, e.g. one Protégé related. &lt;br /&gt;
* Start Firefox and start eclipse. Open page http://127.0.0.1:8888/WebProtege.html?gwt.codesvr=127.0.0.1:9997. This prompts you to install the GWT plugin.&lt;br /&gt;
* Save the profile&lt;br /&gt;
&lt;br /&gt;
===Selenium (only for GWT UI testing)===&lt;br /&gt;
Please refer to chapter in section administration. TODO add link.&lt;br /&gt;
&lt;br /&gt;
Start server with &amp;lt;tt&amp;gt;java –jar selenium-server.jar -firefoxProfileTemplate &amp;lt;Path2Profile&amp;gt;&amp;lt;/tt&amp;gt;. &amp;lt;Path2Profile&amp;gt; is the folder you were choosing when creating the new profile. &lt;br /&gt;
&lt;br /&gt;
Example: &lt;br /&gt;
&lt;br /&gt;
  C:\Users\DrCJ\selenium-server-1.0.3&amp;gt;java -jar selenium-server.jar  -firefoxProfileTemplate c:\Users\DrCJ\firefoxprofile&lt;br /&gt;
&lt;br /&gt;
==Start working with a project e.g. with Protégé==&lt;br /&gt;
===Option 1: import project using Subclipse (preferred)===&lt;br /&gt;
Pretty straight forward&lt;br /&gt;
* Import project from repository using Subclipse.&lt;br /&gt;
**	File  &amp;gt; Import &amp;gt; SVN &amp;gt; SVN Projects. Import desired project and branch.&lt;br /&gt;
**	Use “Create Project wizard”, use “Next” instead of “Finish” button and add a new source folder “src/main/java” and remove “src” from build path. &lt;br /&gt;
**	Copy imported files from src to “src/main/java” folder. There will be problems, since libraries are missing. Do not tweak build path, this will be done automatically in the next step.&lt;br /&gt;
* Execute mvn eclipse:eclipse from command line&lt;br /&gt;
* Refresh project (F5)&lt;br /&gt;
&lt;br /&gt;
To update classpath (e.g. if there is a new jar (as defined in the pom.xml)) just repeat these steps.&lt;br /&gt;
&lt;br /&gt;
If there are still libraries missing (which are obviously defined in your pom.xml), please consult with your project manager or upload the artifacts to the respository as described in the project manager guide.&lt;br /&gt;
&lt;br /&gt;
[[Media:Import-Project.flv|import project using Subclipse (video tutorial)]]&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
| [[Image:eclipse-checkout-maven.png|thumb|upright|alt=Maven can be used to check out the project|Maven can be used to check out the project]]&lt;br /&gt;
| [[Image:eclipse-import-project.png|thumb|upright|alt=Or use SVN to download. Then call mvn eclipse:eclipse and import project|Or use SVN to download. Then call mvn eclipse:eclipse and import project]]&lt;br /&gt;
| [[Image:eclipse-gwt.png|thumb|upright|alt=make project to become a GWT project|make project to become a GWT project]]&lt;br /&gt;
| [[Image:eclipse-gwt-2.png|thumb|upright|alt=Set the webapp folder for the GWT compiled code|Set the webapp folder for the GWT compiled code]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Option 2: import project from command line (using a SVN client)===&lt;br /&gt;
* Download project  from repository with Tortoise or other (command line based) SVN client&lt;br /&gt;
* Execute mvn eclipse:eclipse from command line&lt;br /&gt;
* Refresh project (F5)&lt;br /&gt;
&lt;br /&gt;
To update classpath (e.g. if there is a new pom.xml) just repeat these steps.&lt;br /&gt;
&lt;br /&gt;
===Option 3: using the m2eclipse plugin===&lt;br /&gt;
Chose “Project” from the “File” menu, select Maven and then “Checkout maven Projects from SCM”.&lt;br /&gt;
 &lt;br /&gt;
===Configure GWT plugin===&lt;br /&gt;
* Select Project Properties and check under Google “Use Google App Engine”&lt;br /&gt;
* In project properties set plugin as active and change WAR directory to be /src/main/webapp (there is no longer a /war directory!)&lt;br /&gt;
&lt;br /&gt;
=Questions that may arise during development=&lt;br /&gt;
==How do I work with multiple projects in parallel==&lt;br /&gt;
To given an example: We work with projects A and B where B depends on A. (An example would be A = Protégé, B = WebProtégé.) &lt;br /&gt;
&lt;br /&gt;
Assuming you would like to make a change to project A which is required to continue working with project B:&lt;br /&gt;
&lt;br /&gt;
# Make the change in project A&lt;br /&gt;
# Go to the command line in project A's directory (e.g. in &amp;lt;tt&amp;gt;/home/&amp;lt;USER_NAME&amp;gt;/workspace/projectA&amp;lt;/tt&amp;gt;) and enter &amp;lt;tt&amp;gt;mvn install&amp;lt;/tt&amp;gt; [1], [2]. This will update your local Maven repository (M2_REPO) which typically is located in &amp;lt;tt&amp;gt;/home/.m2/repository&amp;lt;/tt&amp;gt; respectively in &amp;lt;tt&amp;gt;c:\user\&amp;lt;username&amp;gt;\.m2\repository&amp;lt;/tt&amp;gt;. [1]&lt;br /&gt;
# Go to the command line of project B and enter &amp;lt;tt&amp;gt;mvn eclipse:eclipse&amp;lt;/tt&amp;gt; [2]. This will update the classpath and (re)load the artifact of project A.&lt;br /&gt;
# Continue developing in project B.&lt;br /&gt;
&lt;br /&gt;
Actually there are two variants:&lt;br /&gt;
# Variant 1: you do not change the version number of the artifact of project A. In this case you do not have to modify the version number in project A's pom.xml. This is an advantage, another advantage is that you do not need to update the dependency section in the pom.xml of project B.&lt;br /&gt;
# Variant 2: you change the version number of the artifact of project A in the project A' pom.xml. This requires that you update the version in the dependency section in project B's pom.xml. The advantage of this variant is that you easily can switch back to the old version of project A's artifact, you even can have multiple versions in your repository.&lt;br /&gt;
&lt;br /&gt;
The dependency section in the pom.xml the text above is refering to looks like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;dependency&amp;gt;&lt;br /&gt;
    &amp;lt;groupId&amp;gt;protege&amp;lt;/groupId&amp;gt;&lt;br /&gt;
    &amp;lt;artifactId&amp;gt;protege-core&amp;lt;/artifactId&amp;gt;&lt;br /&gt;
    &amp;lt;version&amp;gt;3.4.2&amp;lt;/version&amp;gt;&lt;br /&gt;
  &amp;lt;/dependency&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[1]: If you want to skip the unit tests use &amp;lt;tt&amp;gt;mvn install -DskipTests=true&amp;lt;/tt&amp;gt; instead.&lt;br /&gt;
&lt;br /&gt;
[2]: Alternatively you can use the m2eclipse plugin.&lt;br /&gt;
&lt;br /&gt;
==How do I deploy my artifacts to the (central) Nexus repository==&lt;br /&gt;
First you have to have write privileges to BMIR's Nexus repository (http://bmir-hudson1.stanford.edu/nexus). Typically these privileges are only granted to a closed group of developers. Both, these privileges (-&amp;gt; credentials) and the path to the repository have to be entered to your Maven settings file (&amp;lt;tt&amp;gt;&amp;lt;MAVEN_INSTALL_DIR&amp;gt;/conf/settings.xml&amp;lt;/tt&amp;gt;). There is a [[Stanford:SettingsXmlExample|complete example of this file]] available. &lt;br /&gt;
&lt;br /&gt;
As soon you execute &amp;lt;tt&amp;gt;mvn deploy&amp;lt;/tt&amp;gt; the Nexus repository is updated. Please keep in mind that your artifact either is stored in the snapshot or in the release repository dependent on the version number in your pom.xml: If the version number ends with &amp;lt;tt&amp;gt;SNAPSHOT&amp;lt;/tt&amp;gt; the snapshot directory is addressed, otherwise the release repository.&lt;br /&gt;
&lt;br /&gt;
Keep in mind that...&lt;br /&gt;
* the SNAPSHOT repository allows the redeployment of an artifact (with the same version number), the release repository doesn't,&lt;br /&gt;
* a deployment (&amp;lt;tt&amp;gt;mvn deploy&amp;lt;/tt&amp;gt;) to the SNAPSHOT repository will autoincrement the version number of your artifact (if not explicitly turned off in the pom.xml), a deployment to the release repository won't.&lt;br /&gt;
* there is no autoincrement of the version number during install  (&amp;lt;tt&amp;gt;mvn install&amp;lt;/tt&amp;gt;),&lt;br /&gt;
* there is no need to install a local Nexus repository on your machine.&lt;br /&gt;
&lt;br /&gt;
==How to update classpath==&lt;br /&gt;
Just get latest pom.xml and execute mvn eclipse:eclipse. This will update (not overwrite) your classpath. Press refresh in Eclipse. There is not even a restart necessary.&lt;br /&gt;
&lt;br /&gt;
=How to write unit test case (TestNG, JUnit) and UI test cases (FEST, QFS)=&lt;br /&gt;
This section is about standard unit tests, i.e. not about writing UI tests/integrations tests using Selenium.&lt;br /&gt;
==How to re-use existing JUnit test cases==&lt;br /&gt;
===Option 1: Convert JUnit test cases to TestNG test cases===&lt;br /&gt;
You either can do that programmatically as described in http://testng.org/doc/migrating.html or you do that manually. TestNG tests look pretty much the same then JUnit tests. What has to be done typically includes:&lt;br /&gt;
* Change &amp;lt;tt&amp;gt;import to org.testng.annotations.*;&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;import static org.testng.Assert.*;&amp;lt;/tt&amp;gt;&lt;br /&gt;
* Add annotation &amp;lt;tt&amp;gt;@BeforeClass&amp;lt;/tt&amp;gt; to setup-method.&lt;br /&gt;
* Add annotation &amp;lt;tt&amp;gt;@Test&amp;lt;/tt&amp;gt; to your test methods&lt;br /&gt;
&lt;br /&gt;
===Option 2: Keep JUnit tests cases as they are and run it from TestNG===&lt;br /&gt;
In the &amp;lt;tt&amp;gt;/src/test/resources/unit-tests.xml&amp;lt;/tt&amp;gt; there is a section with &amp;lt;tt&amp;gt;junit=true&amp;lt;/tt&amp;gt;. Just add your tests there.&lt;br /&gt;
&lt;br /&gt;
Example (mind second set of tests)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;!DOCTYPE suite SYSTEM &amp;quot;http://testng.org/testng-1.0.dtd&amp;quot; &amp;gt;&lt;br /&gt;
  &amp;lt;suite name=&amp;quot;ProtegeTestSuite&amp;quot; verbose=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;test name=&amp;quot;TestNG-Tests&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;classes&amp;gt;&lt;br /&gt;
        &amp;lt;class name=&amp;quot;edu.stanford.bmir.protege.web.server.WatchedEntitiesCacheTest&amp;quot;&amp;gt;&amp;lt;/class&amp;gt;&lt;br /&gt;
        &amp;lt;class name=&amp;quot;client.TestUnitProtege&amp;quot;&amp;gt;&amp;lt;/class&amp;gt;&lt;br /&gt;
      &amp;lt;/classes&amp;gt;&lt;br /&gt;
    &amp;lt;/test&amp;gt;&lt;br /&gt;
    &amp;lt;test name=&amp;quot;JUnit-Tests (Example)&amp;quot; junit=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;classes&amp;gt;&lt;br /&gt;
        &amp;lt;class name=&amp;quot;client.JUnitExample&amp;quot;&amp;gt;&amp;lt;/class&amp;gt;&lt;br /&gt;
      &amp;lt;/classes&amp;gt;&lt;br /&gt;
    &amp;lt;/test&amp;gt;&lt;br /&gt;
  &amp;lt;/suite&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There are (theoretically) two options how to include JUnit tests cases to the continuous integration. &lt;br /&gt;
# Make sure that your test classes are in the designated folder /src/test/java and that they are following the naming convention *Test.java&lt;br /&gt;
# Specify the classes in the xml file in /src/test/resources&lt;br /&gt;
We decided to go for the latter option. All types of specification as test parameters, grouping of tests and running tests in parallel have to be defined in theses TestNG-XML-files (and not(!) in the pom.xml). In the pom.xml we deliberatly disabled the automatic execution of JUnit tests in the line &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;plugin&amp;gt;  &lt;br /&gt;
    &amp;lt;groupId&amp;gt;org.apache.maven.plugins&amp;lt;/groupId&amp;gt;&lt;br /&gt;
    &amp;lt;artifactId&amp;gt;maven-surefire-plugin&amp;lt;/artifactId&amp;gt;&lt;br /&gt;
    &amp;lt;configuration&amp;gt;&lt;br /&gt;
      &amp;lt;skip&amp;gt;true&amp;lt;/skip&amp;gt;&lt;br /&gt;
    &amp;lt;/configuration&amp;gt;&lt;br /&gt;
    ...&lt;br /&gt;
  &amp;lt;/plugin&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Write new TestNG test cases==&lt;br /&gt;
The vest resource to start is http://www.testng.org. Nevertheless the following lines might be helpful:&lt;br /&gt;
&lt;br /&gt;
It is recommended to use the TestNG plugin for Eclipse since it adds all libraries to your classpath. Then writing a new test case is straight forward:&lt;br /&gt;
* write a standard Java class. Even there is no naming convention required it is recommended to call the class XXXTest, whereas XXX stands for the class under test.&lt;br /&gt;
* Write some test methods. Even there is no naming convention required it is recommended to call the method testXXX, whereas XXX stands for the method to be tested. However the test methods require the annotation @Test.&lt;br /&gt;
* Optionally have methods which have to be executed one before the test class is executed respectively which are executed before each test method. Add annotations @BeforeClass, @AfterClass, @BeforeMethod, respectively @AfterMetehod&lt;br /&gt;
* Fix imports&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
  import junit.framework.Assert;&lt;br /&gt;
  import org.testng.annotations.AfterClass;&lt;br /&gt;
  import org.testng.annotations.BeforeClass;&lt;br /&gt;
  import org.testng.annotations.Parameters;&lt;br /&gt;
  import org.testng.annotations.Test;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Optional enhancements&lt;br /&gt;
** Add dependencies between methods e.g. &amp;lt;tt&amp;gt;@Test (dependsOnMethods = {&amp;quot;openICDTree&amp;quot;})&amp;lt;/tt&amp;gt; where openICDTree is the name of the other method.&lt;br /&gt;
** Move test parameters from test code to the configuration file, e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;test name=&amp;quot;Navigation 1&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;parameter name=&amp;quot;username&amp;quot;  value=&amp;quot;protege&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;parameter name=&amp;quot;username&amp;quot;  value=&amp;quot;secret&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;classes&amp;gt;&lt;br /&gt;
      &amp;lt;class name=&amp;quot;selenium.TestICat&amp;quot;&amp;gt;&amp;lt;/class&amp;gt;&lt;br /&gt;
    &amp;lt;/classes&amp;gt;&lt;br /&gt;
  &amp;lt;/test&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Refer to these parameters in the Java code&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
  @Test&lt;br /&gt;
  @Parameters({ &amp;quot;username&amp;quot;, &amp;quot;password&amp;quot; })&lt;br /&gt;
  public void login(String username, String password) throws InterruptedException {...}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Add new test case to the test-configuration xml as shown above.&lt;br /&gt;
&lt;br /&gt;
==How to write UI test cases (web) with Selenium==&lt;br /&gt;
===General===&lt;br /&gt;
The UI tests use the Selenium test framework. You either can write the tests from scratch or use the Selenium IDE, a Firefox Plugin to record actions and to generate Java Code (TestNG classes).&lt;br /&gt;
&lt;br /&gt;
The biggest challenge with writing UI tests is the identification of UI components since one can not relay on the id of the component. These ids are generated by GWT dynamically. &lt;br /&gt;
&lt;br /&gt;
===Example Code===&lt;br /&gt;
s. example.&lt;br /&gt;
===How to locate UI elements===&lt;br /&gt;
s. example.&lt;br /&gt;
===Resources===&lt;br /&gt;
* How to locate elements&lt;br /&gt;
** General: http://seleniumhq.org/docs/04_selenese_commands.html#locating-elements&lt;br /&gt;
** Usefull X-Path patterns: http://seleniumhq.org/docs/appendix_locating_techniques.html#useful-xpath-patterns&lt;br /&gt;
** X-Path in general: http://www.w3schools.com/xpath/xpath_examples.asp&lt;br /&gt;
** Calendars, Comboboxes, Popup etc: http://www.ibm.com/developerworks/opensource/library/os-webautoselenium/index.html?cmp=dw&amp;amp;cpb=dwope&amp;amp;ct=dwnew&amp;amp;cr=dwnen&amp;amp;ccy=zz&amp;amp;csr=120910&lt;br /&gt;
&lt;br /&gt;
==Comprehensive example==&lt;br /&gt;
There is a project that shows everything related to build and testing:&lt;br /&gt;
* how to write a pom.xml&lt;br /&gt;
* how to write and integrate unit tests (JUnit and TestNG)&lt;br /&gt;
* how to write and integrate integration tests (selenium)&lt;br /&gt;
&lt;br /&gt;
Please visit https://bmir-gforge.stanford.edu/svn/hudson-test/Hudson-Test.&lt;br /&gt;
==How to write UI test cases (Swing) using FEST==&lt;br /&gt;
The tutorial on how to write FEST tests will be written upon decision for/against FEST. So far please refer to the official documentation: http://docs.codehaus.org/display/FEST/Getting+Started&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;Example-Project&amp;quot; (Hudson) also contains a demo application using FEST: https://bmir-gforge.stanford.edu/svn/hudson-test/Hudson-Test&lt;br /&gt;
&lt;br /&gt;
==How to write UI test cases (Swing) using QF-Test==&lt;br /&gt;
The tutorial on how to write QFS tests will be written upon decision for/against QFS. So far please refer to the official documentation: &lt;br /&gt;
http://www.qfs.de (tutorials in English available).&lt;br /&gt;
&lt;br /&gt;
=Other questions=&lt;br /&gt;
==How to switch to ICD11 with all data (database)==&lt;br /&gt;
Follow instructions given in http://groups.google.com/group/icat-users/web/accessing-the-icat-content-programmatically?hl=en&amp;amp;_done=%2Fgroup%2Ficat-users%3Fhl%3Den%26&amp;amp;hl=en &lt;br /&gt;
&lt;br /&gt;
On Windows the import command might be slightly different than described in the website. Use instead&lt;br /&gt;
  mysql --user=protege --password=protege &amp;lt; c:\protege_2010-11-01_04h02m.Monday.sql&lt;br /&gt;
&lt;br /&gt;
In summary you need to&lt;br /&gt;
* import database (and check that protege DB acutally exists afterwards)&lt;br /&gt;
* add user&lt;br /&gt;
* grant rights to the user&lt;br /&gt;
&lt;br /&gt;
In order to do so, make use of the follwing commands:&lt;br /&gt;
  mysql -u root&lt;br /&gt;
  mysql&amp;gt; -u root connect to localhost;&lt;br /&gt;
  mysql&amp;gt; show databases;&lt;br /&gt;
  mysql&amp;gt; use protege;&lt;br /&gt;
  mysql&amp;gt; show tables;&lt;br /&gt;
  mysql&amp;gt; CREATE USER protege IDENTIFIED BY 'protege';&lt;br /&gt;
  mysql&amp;gt; GRANT SELECT, INSERT, UPDATE, DELETE on *.* to 'protege'@'localhost';&lt;br /&gt;
&lt;br /&gt;
More useful commands: http://www.pantz.org/software/mysql/mysqlcommands.html&lt;/div&gt;</summary>
		<author><name>Johner</name></author>	</entry>

	<entry>
		<id>https://protegewiki.stanford.edu/index.php?title=Stanford:SettingsXmlExample&amp;diff=9164</id>
		<title>Stanford:SettingsXmlExample</title>
		<link rel="alternate" type="text/html" href="https://protegewiki.stanford.edu/index.php?title=Stanford:SettingsXmlExample&amp;diff=9164"/>
				<updated>2010-12-16T19:21:37Z</updated>
		
		<summary type="html">&lt;p&gt;Johner: 2 revisions:&amp;amp;#32;Import from CF Pages&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The following is an example for a settings.xml file. This file is specific for a developer's machine and has to be located in &amp;lt;tt&amp;gt;&amp;lt;&amp;lt;Maven-Install-Dir&amp;gt;/conf&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
Licensed to the Apache Software Foundation (ASF) under one&lt;br /&gt;
or more contributor license agreements.  See the NOTICE file&lt;br /&gt;
distributed with this work for additional information&lt;br /&gt;
regarding copyright ownership.  The ASF licenses this file&lt;br /&gt;
to you under the Apache License, Version 2.0 (the&lt;br /&gt;
&amp;quot;License&amp;quot;); you may not use this file except in compliance&lt;br /&gt;
with the License.  You may obtain a copy of the License at&lt;br /&gt;
&lt;br /&gt;
    http://www.apache.org/licenses/LICENSE-2.0&lt;br /&gt;
&lt;br /&gt;
Unless required by applicable law or agreed to in writing,&lt;br /&gt;
software distributed under the License is distributed on an&lt;br /&gt;
&amp;quot;AS IS&amp;quot; BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY&lt;br /&gt;
KIND, either express or implied.  See the License for the&lt;br /&gt;
specific language governing permissions and limitations&lt;br /&gt;
under the License.&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
 | This is the configuration file for Maven. It can be specified at two levels:&lt;br /&gt;
 |&lt;br /&gt;
 |  1. User Level. This settings.xml file provides configuration for a single user,&lt;br /&gt;
 |                 and is normally provided in ${user.home}/.m2/settings.xml.&lt;br /&gt;
 |&lt;br /&gt;
 |                 NOTE: This location can be overridden with the CLI option:&lt;br /&gt;
 |&lt;br /&gt;
 |                 -s /path/to/user/settings.xml&lt;br /&gt;
 |&lt;br /&gt;
 |  2. Global Level. This settings.xml file provides configuration for all Maven&lt;br /&gt;
 |                 users on a machine (assuming they're all using the same Maven&lt;br /&gt;
 |                 installation). It's normally provided in&lt;br /&gt;
 |                 ${maven.home}/conf/settings.xml.&lt;br /&gt;
 |&lt;br /&gt;
 |                 NOTE: This location can be overridden with the CLI option:&lt;br /&gt;
 |&lt;br /&gt;
 |                 -gs /path/to/global/settings.xml&lt;br /&gt;
 |&lt;br /&gt;
 | The sections in this sample file are intended to give you a running start at&lt;br /&gt;
 | getting the most out of your Maven installation. Where appropriate, the default&lt;br /&gt;
 | values (values used when the setting is not specified) are provided.&lt;br /&gt;
 |&lt;br /&gt;
 |--&amp;gt;&lt;br /&gt;
&amp;lt;settings xmlns=&amp;quot;http://maven.apache.org/SETTINGS/1.0.0&amp;quot;&lt;br /&gt;
          xmlns:xsi=&amp;quot;http://www.w3.org/2001/XMLSchema-instance&amp;quot;&lt;br /&gt;
          xsi:schemaLocation=&amp;quot;http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd&amp;quot;&amp;gt;&lt;br /&gt;
  &lt;br /&gt;
  &amp;lt;!-- localRepository&lt;br /&gt;
   | The path to the local repository maven will use to store artifacts.&lt;br /&gt;
   |&lt;br /&gt;
   | Default: ~/.m2/repository&lt;br /&gt;
  &amp;lt;localRepository&amp;gt;/path/to/local/repo&amp;lt;/localRepository&amp;gt;&lt;br /&gt;
  --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;!-- interactiveMode&lt;br /&gt;
   | This will determine whether maven prompts you when it needs input. If set to false,&lt;br /&gt;
   | maven will use a sensible default value, perhaps based on some other setting, for&lt;br /&gt;
   | the parameter in question.&lt;br /&gt;
   |&lt;br /&gt;
   | Default: true&lt;br /&gt;
  &amp;lt;interactiveMode&amp;gt;true&amp;lt;/interactiveMode&amp;gt;&lt;br /&gt;
  --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;!-- offline&lt;br /&gt;
   | Determines whether maven should attempt to connect to the network when executing a build.&lt;br /&gt;
   | This will have an effect on artifact downloads, artifact deployment, and others.&lt;br /&gt;
   |&lt;br /&gt;
   | Default: false&lt;br /&gt;
  &amp;lt;offline&amp;gt;false&amp;lt;/offline&amp;gt;&lt;br /&gt;
  --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;!-- pluginGroups&lt;br /&gt;
   | This is a list of additional group identifiers that will be searched when resolving plugins by their prefix, i.e.&lt;br /&gt;
   | when invoking a command line like &amp;quot;mvn prefix:goal&amp;quot;. Maven will automatically add the group identifiers&lt;br /&gt;
   | &amp;quot;org.apache.maven.plugins&amp;quot; and &amp;quot;org.codehaus.mojo&amp;quot; if these are not already contained in the list.&lt;br /&gt;
   |--&amp;gt;&lt;br /&gt;
  &amp;lt;pluginGroups&amp;gt;&lt;br /&gt;
    &amp;lt;!-- pluginGroup&lt;br /&gt;
     | Specifies a further group identifier to use for plugin lookup.&lt;br /&gt;
    &amp;lt;pluginGroup&amp;gt;com.your.plugins&amp;lt;/pluginGroup&amp;gt;&lt;br /&gt;
    --&amp;gt;&lt;br /&gt;
  &amp;lt;/pluginGroups&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;!-- proxies&lt;br /&gt;
   | This is a list of proxies which can be used on this machine to connect to the network.&lt;br /&gt;
   | Unless otherwise specified (by system property or command-line switch), the first proxy&lt;br /&gt;
   | specification in this list marked as active will be used.&lt;br /&gt;
   |--&amp;gt;&lt;br /&gt;
  &amp;lt;proxies&amp;gt;&lt;br /&gt;
    &amp;lt;!-- proxy&lt;br /&gt;
     | Specification for one proxy, to be used in connecting to the network.&lt;br /&gt;
     |&lt;br /&gt;
    &amp;lt;proxy&amp;gt;&lt;br /&gt;
      &amp;lt;id&amp;gt;optional&amp;lt;/id&amp;gt;&lt;br /&gt;
      &amp;lt;active&amp;gt;true&amp;lt;/active&amp;gt;&lt;br /&gt;
      &amp;lt;protocol&amp;gt;http&amp;lt;/protocol&amp;gt;&lt;br /&gt;
      &amp;lt;username&amp;gt;proxyuser&amp;lt;/username&amp;gt;&lt;br /&gt;
      &amp;lt;password&amp;gt;proxypass&amp;lt;/password&amp;gt;&lt;br /&gt;
      &amp;lt;host&amp;gt;proxy.host.net&amp;lt;/host&amp;gt;&lt;br /&gt;
      &amp;lt;port&amp;gt;80&amp;lt;/port&amp;gt;&lt;br /&gt;
      &amp;lt;nonProxyHosts&amp;gt;local.net|some.host.com&amp;lt;/nonProxyHosts&amp;gt;&lt;br /&gt;
    &amp;lt;/proxy&amp;gt;&lt;br /&gt;
    --&amp;gt;&lt;br /&gt;
  &amp;lt;/proxies&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;!-- servers&lt;br /&gt;
   | This is a list of authentication profiles, keyed by the server-id used within the system.&lt;br /&gt;
   | Authentication profiles can be used whenever maven must make a connection to a remote server.&lt;br /&gt;
   |--&amp;gt;&lt;br /&gt;
  &amp;lt;servers&amp;gt;&lt;br /&gt;
    &amp;lt;!-- If poms are executed on a developer's machine the local repositories will&lt;br /&gt;
    be used, if it is executed on the BMIR the BMIR repositories. Please check pom.xmls --&amp;gt;&lt;br /&gt;
    &amp;lt;!-- Snapshot repository --&amp;gt;&lt;br /&gt;
    &amp;lt;server&amp;gt;&lt;br /&gt;
      &amp;lt;id&amp;gt;snapshots&amp;lt;/id&amp;gt;&lt;br /&gt;
      &amp;lt;username&amp;gt;USER&amp;lt;/username&amp;gt;&lt;br /&gt;
      &amp;lt;password&amp;gt;SECRET_PASSWORD&amp;lt;/password&amp;gt;&lt;br /&gt;
    &amp;lt;/server&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;!-- Distribution directory --&amp;gt;&lt;br /&gt;
    &amp;lt;server&amp;gt;&lt;br /&gt;
      &amp;lt;id&amp;gt;releases&amp;lt;/id&amp;gt;&lt;br /&gt;
      &amp;lt;username&amp;gt;USER&amp;lt;/username&amp;gt;&lt;br /&gt;
      &amp;lt;password&amp;gt;SECRET_PASSWORD&amp;lt;/password&amp;gt;&lt;br /&gt;
    &amp;lt;/server&amp;gt;&lt;br /&gt;
  &amp;lt;/servers&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;!-- mirrors&lt;br /&gt;
   | This is a list of mirrors to be used in downloading artifacts from remote repositories.&lt;br /&gt;
   |&lt;br /&gt;
   | It works like this: a POM may declare a repository to use in resolving certain artifacts.&lt;br /&gt;
   | However, this repository may have problems with heavy traffic at times, so people have mirrored&lt;br /&gt;
   | it to several places.&lt;br /&gt;
   |&lt;br /&gt;
   | That repository definition will have a unique id, so we can create a mirror reference for that&lt;br /&gt;
   | repository, to be used as an alternate download site. The mirror site will be the preferred&lt;br /&gt;
   | server for that repository.&lt;br /&gt;
   |--&amp;gt;&lt;br /&gt;
  &amp;lt;mirrors&amp;gt;&lt;br /&gt;
    &amp;lt;mirror&amp;gt;&lt;br /&gt;
      &amp;lt;!--This sends everything else to /public --&amp;gt;&lt;br /&gt;
      &amp;lt;id&amp;gt;nexus&amp;lt;/id&amp;gt;&lt;br /&gt;
      &amp;lt;mirrorOf&amp;gt;*&amp;lt;/mirrorOf&amp;gt;&lt;br /&gt;
      &amp;lt;url&amp;gt;http://bmir-hudson1/nexus/content/groups/public&amp;lt;/url&amp;gt;&lt;br /&gt;
    &amp;lt;/mirror&amp;gt;&lt;br /&gt;
  &amp;lt;/mirrors&amp;gt;&lt;br /&gt;
  &amp;lt;profiles&amp;gt;&lt;br /&gt;
    &amp;lt;profile&amp;gt;&lt;br /&gt;
      &amp;lt;id&amp;gt;nexus&amp;lt;/id&amp;gt;&lt;br /&gt;
      &amp;lt;properties&amp;gt;&lt;br /&gt;
      		&amp;lt;!--options for os.family: windows, mac, linux, etc.&lt;br /&gt;
      			see: http://maven.apache.org/plugins/maven-enforcer-plugin/rules/requireOS.html&lt;br /&gt;
      		--&amp;gt;&lt;br /&gt;
      	&amp;lt;os.family&amp;gt;windows&amp;lt;/os.family&amp;gt;&lt;br /&gt;
      	&amp;lt;nexus.path&amp;gt;http://bmir-hudson1/nexus/content/repositories&amp;lt;/nexus.path&amp;gt;&lt;br /&gt;
      &amp;lt;/properties&amp;gt;&lt;br /&gt;
      &amp;lt;!--Enable snapshots for the built in central repo to direct --&amp;gt;&lt;br /&gt;
      &amp;lt;!--all requests to nexus via the mirror --&amp;gt;&lt;br /&gt;
      &amp;lt;repositories&amp;gt;&lt;br /&gt;
        &amp;lt;repository&amp;gt;&lt;br /&gt;
          &amp;lt;id&amp;gt;central&amp;lt;/id&amp;gt;&lt;br /&gt;
          &amp;lt;url&amp;gt;http://central&amp;lt;/url&amp;gt;&lt;br /&gt;
          &amp;lt;releases&amp;gt;&amp;lt;enabled&amp;gt;true&amp;lt;/enabled&amp;gt;&amp;lt;/releases&amp;gt;&lt;br /&gt;
          &amp;lt;snapshots&amp;gt;&amp;lt;enabled&amp;gt;true&amp;lt;/enabled&amp;gt;&amp;lt;/snapshots&amp;gt;&lt;br /&gt;
        &amp;lt;/repository&amp;gt;&lt;br /&gt;
      &amp;lt;/repositories&amp;gt;&lt;br /&gt;
     &amp;lt;pluginRepositories&amp;gt;&lt;br /&gt;
        &amp;lt;pluginRepository&amp;gt;&lt;br /&gt;
          &amp;lt;id&amp;gt;central&amp;lt;/id&amp;gt;&lt;br /&gt;
          &amp;lt;url&amp;gt;http://central&amp;lt;/url&amp;gt;&lt;br /&gt;
          &amp;lt;releases&amp;gt;&amp;lt;enabled&amp;gt;true&amp;lt;/enabled&amp;gt;&amp;lt;/releases&amp;gt;&lt;br /&gt;
          &amp;lt;snapshots&amp;gt;&amp;lt;enabled&amp;gt;true&amp;lt;/enabled&amp;gt;&amp;lt;/snapshots&amp;gt;&lt;br /&gt;
        &amp;lt;/pluginRepository&amp;gt;&lt;br /&gt;
      &amp;lt;/pluginRepositories&amp;gt;&lt;br /&gt;
    &amp;lt;/profile&amp;gt;&lt;br /&gt;
        &amp;lt;profile&amp;gt;&lt;br /&gt;
            &amp;lt;id&amp;gt;sonar&amp;lt;/id&amp;gt;&lt;br /&gt;
            &amp;lt;activation&amp;gt;&lt;br /&gt;
                &amp;lt;activeByDefault&amp;gt;true&amp;lt;/activeByDefault&amp;gt;&lt;br /&gt;
            &amp;lt;/activation&amp;gt;&lt;br /&gt;
            &amp;lt;properties&amp;gt;&lt;br /&gt;
            &amp;lt;/properties&amp;gt;&lt;br /&gt;
        &amp;lt;/profile&amp;gt;&lt;br /&gt;
  &amp;lt;/profiles&amp;gt;&lt;br /&gt;
  &amp;lt;activeProfiles&amp;gt;&lt;br /&gt;
    &amp;lt;!--make the profile active all the time --&amp;gt;&lt;br /&gt;
    &amp;lt;activeProfile&amp;gt;nexus&amp;lt;/activeProfile&amp;gt;&lt;br /&gt;
  &amp;lt;/activeProfiles&amp;gt;&lt;br /&gt;
&amp;lt;/settings&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You just can replace the existing settings.xml with this file/content.&lt;/div&gt;</summary>
		<author><name>Johner</name></author>	</entry>

	<entry>
		<id>https://protegewiki.stanford.edu/index.php?title=Stanford:Tools&amp;diff=9167</id>
		<title>Stanford:Tools</title>
		<link rel="alternate" type="text/html" href="https://protegewiki.stanford.edu/index.php?title=Stanford:Tools&amp;diff=9167"/>
				<updated>2010-12-16T19:21:37Z</updated>
		
		<summary type="html">&lt;p&gt;Johner: 2 revisions:&amp;amp;#32;Import from CF Pages&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Description and Rationale for Tools=&lt;br /&gt;
This page is intended to give an overview on the systems and to describe why we selected particularily this set. How to install, operate, and use this tools is described in&lt;br /&gt;
* [[Stanford:AdministratorGuide| administrator guide]]&lt;br /&gt;
* [[Stanford:DeveloperGuide|developer guide]]&lt;br /&gt;
&lt;br /&gt;
=Hudson=&lt;br /&gt;
Hudson is a server application to automatically and continuously build, test and deploy one or more projects. It provides an overview on the build and tests results including code metrics, architecture metrics, JUnit results and much more. &lt;br /&gt;
&lt;br /&gt;
It is obvious that such repetitive tasks should be automated. However, there are several products to facilitate this task. Among those there is CruiseControl We decided to prefer Hudson over CruiseControl for the following reasons:&lt;br /&gt;
&lt;br /&gt;
* Installation is simpler. It is just download the jar file.  E.g. no installation of DB necessary.&lt;br /&gt;
* Administration is simpler: An easy to use web interface gives access to all administrative settings&lt;br /&gt;
* Easy integration with other tools e.g. with Sonar, TestNG and communication services&lt;br /&gt;
* Related to Plug-ins&lt;br /&gt;
* Easier plug-in development &lt;br /&gt;
* More plug-ins available (e.g. twitter, email, Sonar, Selenium) &lt;br /&gt;
* Easier plug-ins administration&lt;br /&gt;
&lt;br /&gt;
Hudson executes the Maven script(s) including builds as well as unit and UI tests, triggers reporting and communication of build and test results. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;Link&amp;gt;Instruction how to install and configure Hudson.&lt;br /&gt;
&lt;br /&gt;
=Nexus=&lt;br /&gt;
[[File:nexus.png|thumb|Nexus the central and shared repository for all developers (and users)]]&lt;br /&gt;
As more libraries a project requires and as more dependencies these libraries have as more complex the setup of a new development environment and of executing a build become. For example WebProtégé has dependencies to Protégé, to the Google Web Toolkit, to Apache libraries, and so on. And even the referenced libraries are interdependent. &lt;br /&gt;
&lt;br /&gt;
Maven is capable of resolving these dependencies. Nexus is a repository manager which allows you to centrally provide these libraries in a versioned and reproducible manner. Nexus also can serve as proxy. So the developers (and the build system) just need to retrieve these files from the repository instead of individually downloading these artifacts redundantly. This not only saves bandwidth, but also reduces the load on “Central” (the central Maven repository).&lt;br /&gt;
&lt;br /&gt;
Nexus is not replacing Maven. Nexus proxies the Maven requests to a central Maven repository. Nexus provides as the feature not only to proxy repositories, but to operate our “own” repository which is the deployment target of all of our projects. Please note that Maven itself uses a repository (the Maven repository).&lt;br /&gt;
&lt;br /&gt;
Further feature of Nexus include &lt;br /&gt;
* a quick and easy search of all artifacts.&lt;br /&gt;
* Developers don’t have to have the entire source. They just can work with libraries from Nexus. This makes collaboration easier.&lt;br /&gt;
* Clear responsibility and maintenance of “official” 3rd party libraries.&lt;br /&gt;
&lt;br /&gt;
An additional list of reasons for using repository managers can be found at http://www.sonatype.com/books/nexus-book/reference/sect-repoman-reasons.html. &lt;br /&gt;
&lt;br /&gt;
A comparison of repository managers (Apache Archiva, Artifactory, and Nexus) can be found at http://docs.codehaus.org/display/MAVENUSER/Maven+Repository+Manager+Feature+Matrix. &lt;br /&gt;
 &lt;br /&gt;
“Standard” developers not necessarily have to deal with Nexus. She just uses Nexus as a repository to retrieve artifacts from. If she requires a new jar-file, this has to be done as described in the How-Tos. However, we recommend to have a local repository as well.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;Link&amp;gt;Instruction how to install and configure Nexus.&lt;br /&gt;
&lt;br /&gt;
=Sonar=&lt;br /&gt;
Sonar is a very powerful platform to report the quality of software products considering aspects as&lt;br /&gt;
* Code metrics as complexity&lt;br /&gt;
* Error/bug patterns&lt;br /&gt;
* Architectural metrics&lt;br /&gt;
* Conformity with coding guidelines&lt;br /&gt;
* Results of tests (Unit tests, UI tests) including errors, failures and code coverage.&lt;br /&gt;
&lt;br /&gt;
Sonar provides both, a comprehensive overview on the quality o projects as well as the option to drill down to single metrics/aspects and even to the single line of source code.&lt;br /&gt;
&lt;br /&gt;
Sonar serves as shell compiling and consistently visualizing the results of numerous tools as Checkstyle, FindBugs, PMD, and TestNG .&lt;br /&gt;
&lt;br /&gt;
&amp;lt;Link&amp;gt;Instruction how to install and configure Maven.&lt;br /&gt;
&lt;br /&gt;
=TestNG=&lt;br /&gt;
We prefer TestNG over JUnit for the following reasons:&lt;br /&gt;
* Better separation of test code and test data&lt;br /&gt;
* Better grouping of tests and re-use of test groups&lt;br /&gt;
* Better support for parallel (multi-threaded) testing &lt;br /&gt;
* TestNG automatically produces test reports without having the need to use other tasks as JUnitReport.&lt;br /&gt;
&lt;br /&gt;
=Maven=&lt;br /&gt;
Maven is used by&lt;br /&gt;
* Developers to initially create his workspace (initial build)&lt;br /&gt;
* To define the build and test process which is executed and scheduled by Hudson.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;Link&amp;gt;Instruction how to install and configure Maven.&lt;br /&gt;
&lt;br /&gt;
# validate&lt;br /&gt;
# generate-sources&lt;br /&gt;
# process-sources&lt;br /&gt;
# generate-resources&lt;br /&gt;
# process-resources&lt;br /&gt;
# compile&lt;br /&gt;
# process-classes&lt;br /&gt;
# generate-test-sources&lt;br /&gt;
# process-test-sources&lt;br /&gt;
# generate-test-resources&lt;br /&gt;
# process-test-resources&lt;br /&gt;
# test-compile&lt;br /&gt;
# test&lt;br /&gt;
# prepare-package (maven 2.1+)&lt;br /&gt;
# package&lt;br /&gt;
# pre-integration-test&lt;br /&gt;
# integration-test&lt;br /&gt;
# post-integration-test&lt;br /&gt;
# verify&lt;br /&gt;
# install&lt;br /&gt;
# deploy&lt;br /&gt;
&lt;br /&gt;
=Firefox =&lt;br /&gt;
We prefer Firefox over other browsers for two major reasons:&lt;br /&gt;
* Firefox is available on LINUX, too. LINUX will be our server OS.&lt;br /&gt;
* There is a Selenium Plugin available for Firefox.&lt;br /&gt;
&lt;br /&gt;
Having said this, it is nevertheless worth mentioning that the web applications have to be tested on other browsers as well. This requires no plugin. The plugin is only required for automated UI tests.&lt;br /&gt;
&lt;br /&gt;
=Selenium Server (Selenium Remote Control)=&lt;br /&gt;
[[File:selenium-server.png|thumb|Selenium Server Architecure. Picture taken form http://seleniumhq.org/projects/remote-control]]&lt;br /&gt;
Selenium remote control is a server which allows developers test web applications (even with AJAX) using Java code (e.g. JUnit, TestNG) or any other language. &lt;br /&gt;
&lt;br /&gt;
Selenium RC automatically launches the browser, simulates the user actions and kills the browser afterwards. Thereby Selenium RC facilitates the complete test automation ($rarr; regression testing) of rich web applications.&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;Link&amp;gt;Instruction how to install and configure Selenium.&lt;br /&gt;
&lt;br /&gt;
=Selenium Plugin (optional)=&lt;br /&gt;
The Selenium IDE is an optional Firefox plugin which helps developers to record actions in the browser and generate Java code. However, the capture &amp;amp; replay functionality is very limited. Therefore Selenium tests will be written as regular Java respectively TestNG code.&lt;/div&gt;</summary>
		<author><name>Johner</name></author>	</entry>

	</feed>