Differences between revisions 8 and 9
|Deletions are marked like this.||Additions are marked like this.|
|Line 57:||Line 57:|
|* The OSS Sonatype Snapshot repository at https://oss.sonatype.org/content/repositories/snapshots/ that is provided to the ArgoUML project by Sonatype. Linus Tolke is the only developer that has access to upload snapshots and that is done from the [http://argouml-jenkins1.dyndns.org:8080/ Jenkins Continuous Integration server].||* The OSS Sonatype Snapshot repository at https://oss.sonatype.org/content/repositories/snapshots/ that is provided to the ArgoUML project by Sonatype. Linus Tolke is the only developer that has access to upload snapshots and that is done from the [http://argouml-jenkins1.no-ip.biz:8080/ Jenkins Continuous Integration server].|
Preparations before it is possible to work with ArgoUML using Maven:
- Install Maven.
Configure the argouml profile with the two argouml repositories in your settings.xml file. Like this
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd"> <profiles> <profile> <id>ArgoUML repositories</id> <activation> <activeByDefault>true</activeByDefault> </activation> <repositories> <repository> <id>argouml-snapshots</id> <snapshots> <enabled>true</enabled> <checksumPolicy>fail</checksumPolicy> </snapshots> <releases> <enabled>false</enabled> </releases> <url>https://oss.sonatype.org/content/repositories/snapshots</url> </repository> <repository> <id>argouml-released</id> <snapshots> <enabled>false</enabled> </snapshots> <releases> <enabled>true</enabled> <checksumPolicy>fail</checksumPolicy> </releases> <url>http://argouml-downloads.tigris.org/maven2</url> </repository> </repositories> </profile> </profiles> </settings>
If you would want to work from within Eclipse, you should know that there is a conflict between the .project and .classpath files currently in the repository and the pom.xml file that controls all dependencies when running maven. Until a decision is made to move entirely to maven, you will have to avoid checking in the changes to the .project and .classpath files that are caused by Eclipse recalculating the dependencies based on the contents of the pom.xml file.
How the system is set up and works
The Continuous Integration server builds snapshots when a developer commits to the repository. If the build is successful a snapshot is uploaded automatically to the Sonatype OSS Repository Hosting. These have version number like 0.2-SNAPSHOT.
All core projects have the same version number, specified in the argouml-core pom (at trunk/pom.xml) and referring to the same version number. Non-core projects, such as argouml-actionscript3, must specify the version number of the used argouml core jars explicitly.
All projects, core argouml projects and non-core projects alike, use the parentpom (at trunk/tools/maven/parentpom.xml) to define the version and configuration of tools used to compile, run unit, and static tests throughout the entire argouml project. It also defines the directory layout.
For the build to work, there are two argouml-specific repositories used. There is also the Maven infrastructure repositories:
The ArgoUML Maven2 repository at http://argouml-downloads.tigris.org/maven2. This is used for non-snapshot files such as parentpom, the tools jar, and libraries used. This is the same repository where released argouml artifacts are stored and the libraries used are the ones that are part of the release and used by java web start.
The OSS Sonatype Snapshot repository at https://oss.sonatype.org/content/repositories/snapshots/ that is provided to the ArgoUML project by Sonatype. Linus Tolke is the only developer that has access to upload snapshots and that is done from the Jenkins Continuous Integration server.
- The Maven Central is the repository that is at the center the Maven world.
For those new to maven
Maven relies heavily on access to repositories throughout the internet. When issueing maven commands, most of the tools and jars are downloaded and stored locally (in the home directory of the user). On subsequent invocations these stored copies are checked for updates and used.
When you type the first mvn command mvn compile, after having installed maven and checked out a part of the argouml project, the following things happens:
the checked out pom.xml file is read. That file references the parentpom or the argouml-core pom.
- If it references the argouml-core pom it is a snapshot version and the specified argouml-core pom is downloaded from the OSS Sonatype Snapshot repository.
- The parentpom is downloaded from the ArgoUML Maven2 repository. It is specified from the file or from argouml-core is not a snapshot version.
- The parentpom references the sonatype oss-parent pom that is downloaded from the Maven Central.
Then the rest of the maven world is downloaded, with some tool versions specified by the parentpom and some by the Super POM (Maven's default pom).
When you issue your subsequent commands mvn test or mvn site more maven tools are downloaded.
When a new version is released all snapshot versions will be updated to the next version number, also the pom.xml in the project you have checked out. After you have gotten an update of the pom.xml of the project you are working with, the next mvn command will download the updated version of all snapshot files.
If the parentpom or tools is updated to a newer version, the new version needs to be put into the ArgoUML Maven2 repository.
During 2011 the first experiments with Maven were done. This was first done to improve the tool set-up in the continuous integration server and later as a possibility to improve the build environment for any user.