ObjectWeb Consortium
Print

Advanced Search - Powered by Google

  Consortium     Activities     Projects     Forge     Events 

Fractal


Project Links
· Home
· Documentation
· Download
· License
· What's New

Developers' Corner
· Workplan
· OW2 GitLab Fractal

About
· Team
· Users
· Partners
· Mailing List Archive

Maven

Overview

Maven is being used by many Fractal projects, expecially in order to have:

  • a uniform build system and source tree structure among all the projects;
  • a more sophisticated dependency resolution mechanism, allowing also transitive dependency to be resolved

Installing Maven

Follow the steps indicated on the Download Maven page.

Depend on Fractal modules in your pom.xml

If you have just to write a 3rd party application which must depend on one or more Fractal modules, you have to configure the following things in your pom.xml.

<project>
<!-- ....... -->

    <repositories>
		<repository>
			<id>objectweb-release</id>

			<name>ObjectWeb Maven Repository</name>
			<url>http://maven.objectweb.org/maven2</url>
			<releases>
				<enabled>true</enabled>

			</releases>
			<snapshots>
				<enabled>false</enabled>
			</snapshots>
		</repository>

		<repository>
			<id>objectweb-snapshot</id>
			<name>ObjectWeb Maven Repository</name>
			<url>http://maven.objectweb.org/maven2-snapshot</url>

			<releases>
				<enabled>false</enabled>
			</releases>
			<snapshots>
				<enabled>true</enabled>

				<updatePolicy>daily</updatePolicy>
			</snapshots>
		</repository>
	</repositories>
    
    <pluginRepositories>

        <pluginRepository>
            <id>objectweb-release</id>
            <name>ObjectWeb Maven Repository</name>
            <url>http://maven.objectweb.org/maven2</url>

            <releases>
                <enabled>true</enabled>
            </releases>
            <snapshots>
                <enabled>false</enabled>

            </snapshots>
        </pluginRepository>
        <pluginRepository>
            <id>objectweb-snapshot</id>
            <name>ObjectWeb Maven Repository</name>

            <url>http://maven.objectweb.org/maven2-snapshot</url>
            <releases>
                <enabled>false</enabled>
            </releases>
            <snapshots>

                <enabled>true</enabled>
                <updatePolicy>daily</updatePolicy>
            </snapshots>
        </pluginRepository>
    </pluginRepositories>

<!-- ........ -->
</project>

In fact, Fractal modules are hosted on ObjectWeb Maven2 Repository and ObjectWeb Maven2 Snapshot Repository .

Develop Fractal projects with Maven

If you have to check out a single Fractal module (i.e. "julia") or start a brand new Fractal module, you need to put this (once and forever) in your .m2/settings.xml:

<settings>
  <!-- ........ -->

 <profiles>
   <profile>
    <id>objectweb</id>
    <repositories>
        <repository>
            <id>objectweb-release</id>
            <name>ObjectWeb Maven Repository</name>
            <url>http://maven.objectweb.org/maven2</url>
            <releases>
                <enabled>true</enabled>
            </releases>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </repository>
        <repository>
            <id>objectweb-snapshot</id>
            <name>ObjectWeb Maven Repository</name>
            <url>http://maven.objectweb.org/maven2-snapshot</url>
            <releases>
                <enabled>false</enabled>
            </releases>
            <snapshots>
                <enabled>true</enabled>
                <updatePolicy>daily</updatePolicy>
            </snapshots>
        </repository>
    </repositories>

    <pluginRepositories>
        <pluginRepository>
            <id>objectweb-release</id>
            <name>ObjectWeb Maven Repository</name>
            <url>http://maven.objectweb.org/maven2</url>
            <releases>
                <enabled>true</enabled>
            </releases>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </pluginRepository>
        <pluginRepository>
            <id>objectweb-snapshot</id>
            <name>ObjectWeb Maven Repository</name>
            <url>http://maven.objectweb.org/maven2-snapshot</url>
            <releases>
                <enabled>false</enabled>
            </releases>
            <snapshots>
                <enabled>true</enabled>
                <updatePolicy>daily</updatePolicy>
            </snapshots>
        </pluginRepository>
    </pluginRepositories>
  </profile>
</profiles>

  <!--
     To make the "objectweb" profile used by default when you utilize Maven to
     build a project
  -->
  <activeProfiles>
    <activeProfile>objectweb</activeProfile>
  </activeProfiles>

 <!-- ........ -->
</settings>

IDEs configuration

A Maven project can be configured to work on your IDE.

  • Eclipse:
    • One way is to use the "Eclipse plugin for Maven", which is an Eclipse plugin to integrate Maven into the IDE. See http://m2eclipse.codehaus.org/
      Basically it configures the build path of the project according to the dependencies declared in the pom.xml and the location of the repository in Window->Preferences->Maven2->Local Repository Folder (on Linux use $HOME/.m2/repository). For this plugin to work, at least once Maven must have been called from the command line (to generate the repository folder?).
    • Another way is to use the "Maven plugin for Eclipse".
      Basically it generates the static configuration of your Eclipse .project and .classpath files according to the dependencies of your Maven module.

Mailing list

Questions, comments, ideas, etc. related to Fractal can be posted on the Fractal mailing list.


Copyright © 1999-2009, OW2 Consortium | contact | webmaster | Last modified at 2012-12-03 09:57 PM