Maven2
From ICal4j Wiki
Releases
Whilst earlier releases of iCal4j may be found in the maven central repository, current releases are stored in the modularity repository. To add a dependency on a later release you will need to add the modularity releases repository to your configuration as follows:
<project>
...
<repositories>
...
<repository>
<id>modularity-releases</id>
<name>Modularity Releases Repository</name>
<url>http://m2.modularity.net.au/releases</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
...
<dependencies>
<dependency>
<groupId>net.fortuna.ical4j</groupId>
<artifactId>ical4j</artifactId>
<version>1.0-rc1</version>
</dependency>
...
</dependencies>
...
</project>
Alternatively if you would prefer not to specify repository information in your project descriptor, you can specify it in your settings.xml as follows:
<settings>
...
<profiles>
<profile>
<id>modularity-releases</id>
<repositories>
<repository>
<id>modularity-releases</id>
<name>Modularity Releases</name>
<url>http://m2.modularity.net.au/releases</url>
</repository>
</repositories>
</profile>
...
</profiles>
<activeProfiles>
<activeProfile>modularity-releases</activeProfile>
</activeProfiles>
...
</settings>
Older releases of iCal4j (0.9.x) are hosted in the central maven repository maintained at ibiblio.org. To add a dependency on an older release you should add the following configuration to your maven project definition (POM):
<project>
...
<dependencies>
<dependency>
<groupId>ical4j</groupId>
<artifactId>ical4j</artifactId>
<version>0.9.x</version>
</dependency>
...
</dependencies>
...
</project>
Snapshots
To add a dependency on a snapshot build of iCal4j you need to add both the dependency and a reference to the modularity repository where the iCal4j snapshots are deployed:
<project>
...
<repositories>
...
<repository>
<id>modularity-snapshots</id>
<name>Modularity Snapshot Repository</name>
<url>http://m2.modularity.net.au/snapshots</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
...
<dependencies>
<dependency>
<groupId>net.fortuna.ical4j</groupId>
<artifactId>ical4j</artifactId>
<version>1.0-beta5-SNAPSHOT</version>
</dependency>
...
</dependencies>
...
</project>
Again, if you don't want repository information in your project descriptor, add it to your settings.xml as follows:
<settings>
...
<profiles>
<profile>
<id>modularity-snapshots</id>
<repositories>
<repository>
<id>modularity-snapshots</id>
<name>Modularity Snapshots</name>
<url>http://m2.modularity.net.au/snapshots</url>
</repository>
</repositories>
</profile>
</profiles>
<activeProfiles>
<activeProfile>modularity-snapshots</activeProfile>
</activeProfiles>
...
</settings>
Note that you may not want to always have the snapshots profile enabled, in which case leave off the activeProfiles configuration and explicitly specify when you want to enable this profile. e.g:
% mvn compile -P modularity-snapshots
