Differences between revisions 14 and 15
Revision 14 as of 2008-04-28 14:50:30
Size: 5672
Editor: rrdhcp62-233
Comment:
Revision 15 as of 2008-04-28 15:01:29
Size: 6339
Editor: rrdhcp62-233
Comment:
Deletions are marked like this. Additions are marked like this.
Line 92: Line 92:

If running mvn install fails due to failed unit tests, you have two options:

 * Fix the errors! or
 * Force maven to skip the unit tests: mvn -Dmaven.test.skip=true install Doing this skips all the unit tests, but enables you to fully build and run cytoscape.

=== Help! When running cytoscape.sh, I see a long list of constraint violations. What do I do? ===

When you run cytoscape.sh, you may see an endless stream of lines like this:

DEBUG: Constraint violation for 3.0 detected; module can see cytoscape.util.intr from [21.0] and cytoscape.util.intr from [2.0]

To fix this problem, download and install the svn bundleplugin described above.

TableOfContents([2])

Maven

Download & Install

Make sure you get Maven 2.x (not 1.x).

http://maven.apache.org/download.html

Installation instructions (from the site linked above):

Windows 2000/XP

Unzip maven-2.0.7-bin.zip to the directory you wish to install Maven 2.0.7. These instructions assume you chose C:\Program Files\Apache Software Foundation\maven-2.0.7 Add the bin directory to your path, by opening up the system properties (WinKey + Pause), selecting the "Advanced" tab, and the "Environment Variables" button, then editing the PATH variable in the user variables. eg. "C:\Program Files\Apache Software Foundation\maven-2.0.7\bin";%PATH% In the same dialog, make sure that JAVA_HOME is set to the location of your JDK, eg. C:\Program Files\Java\jdk1.5.0_02 Run mvn --version to verify that it is correctly installed.

Unix-based Operating Systems (Linux, Solaris and Mac OS X)

Extract the distribution archive to the directory you wish to install Maven 2.0.7. These instructions assume you chose /usr/local/maven-2.0.7 . The directory maven-2.0.7 will be created from the archive. Add the bin directory to your path, eg. export PATH=/usr/local/maven-2.0.7/bin:$PATH Make sure that JAVA_HOME is set to the location of your JDK, eg. export JAVA_HOME=/usr/java/jdk1.5.0_02 Run mvn --version to verify that it is correctly installed.

Maven Plugins for IDE's

Eclipse

There are two plugins available, use either url for a "New Remote Site" in eclipse "Help->Software Updates": * http://m2eclipse.codehaus.org * http://m2eclipse.sonatype.org/update With a good [http://java.dzone.com/blogs/mrjohnsmart/2008/03/19/new-maveneclipse-integration-p article] on how to use it.

  1. If your maven repository is not in your user home directory under .m2 you need to tell Eclipse where it is (and it's worth double checking it's set it up right either way. See [http://maven.apache.org/guides/mini/guide-ide-eclipse.html#Maven%202%20repository here] for instructions.

    • This can be done by setting up M2_REPO classpath variavle. Select Window → Preferences... → Java → Build Path → Classpath Variables and add new variable M2_REPO and set the path to your .m2/repository directory.

    attachment:m2repo.png
  2. Right-click on your project, choose Maven2 and 'enable' to use the plugin on a per-project basis. This will set up your local Maven repository (under the /<users.home>/.m2 directory) as a library in Eclipse.

Note: If you have more than one pom file in a project you must have a parent pom in order for the maven plugin to recognize all of the poms. You can create a basic pom then add it as a parent to all of the other pom files (you do not have to add them as modules to your parent, it's just a little simpler sometimes).

  1. You can run maven commands by right-clicking on any pom file (assuming you've correctly parented them) and choosing the commands to run. Generally to run a full compile and all tests I run "clean package". If you run into problems running within Eclipse you can run the same commands from command line, often you will get easier to understand errors that way as well.

In your eclipse project you should see a library now called "Maven Dependencies" or something similar. If you expand it all of your libraries listed as dependencies in the pom files should be listed.

Cytoscape, Eclipse & Maven

Each time you update run "maven install" from your top level cytoscape directory. This installs the poms for the corelib modules and any other dependencies within the project to your local repository. If you don't do this Eclipse will continue to mark the parts of your code that it can't find with red and it will be unable to compile. This is temporary as various layers and modules are being added and moved around.

If you continue to have problems with updates not being recognized go to your .m2/repository directory. Delete the directory org/cytoscape and re-run "maven install". If version numbers are not updated in pom files or if versions are not marked as "SNAPSHOT" then the latest updates may not correctly install, removing this directory forces a fresh install regardless.

IntelliJ

The newest version of IDEA comes ready to use maven, but here are the plugins if you need to load them:

IntelliJ plugins:

This is easier to use than maven+eclipse but it also requires that if you have multiple poms a parent is set up.

NetBeans

NetBeans 5.0+:

Building and Running Cytoscape

Once you have Maven installed, and have downloaded the Cytoscape 3 source, you can build and run cytoscape.

First, download and install the latest maven bundle plugin code. This is a temporary step, until the latest bundle plugin code stabilizes:

Then, build and run Cytoscape:

  • cd to the cytoscape 3 root directory
  • mvn clean install
  • ./makeFelix.sh
  • cd cytoscape
  • ./cytoscape.sh

If running mvn install fails due to failed unit tests, you have two options:

  • Fix the errors! or
  • Force maven to skip the unit tests: mvn -Dmaven.test.skip=true install Doing this skips all the unit tests, but enables you to fully build and run cytoscape.

Help! When running cytoscape.sh, I see a long list of constraint violations. What do I do?

When you run cytoscape.sh, you may see an endless stream of lines like this:

DEBUG: Constraint violation for 3.0 detected; module can see cytoscape.util.intr from [21.0] and cytoscape.util.intr from [2.0]

To fix this problem, download and install the svn bundleplugin described above.

MavenInfo (last edited 2009-02-12 01:03:27 by localhost)

Funding for Cytoscape is provided by a federal grant from the U.S. National Institute of General Medical Sciences (NIGMS) of the Na tional Institutes of Health (NIH) under award number GM070743-01. Corporate funding is provided through a contract from Unilever PLC.

MoinMoin Appliance - Powered by TurnKey Linux