>In the development of Profile2 I have come to the point where I need the one version of Profile2 to build in all 4 of the current flavours of Sakai: 2.4, 2.5, 2.6 and trunk.
<dependencies>
<!-- EXTERNAL DEPENDENCIES -->
<dependency>
<groupId>org.apache.wicket</groupId>
<artifactId>wicket</artifactId>
</dependency>
<dependency>
<groupId>org.apache.wicket</groupId>
<artifactId>wicket-extensions</artifactId>
</dependency>
<dependency>
<groupId>org.apache.wicket</groupId>
<artifactId>wicket-spring</artifactId>
</dependency>
<!-- GENERIC SAKAI DEPENDENCIES -->
<dependency>
<groupId>org.sakaiproject</groupId>
<artifactId>sakai-common-edu-person-api</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.sakaiproject</groupId>
<artifactId>sakai-common-manager-api</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.sakaiproject</groupId>
<artifactId>sakai-common-type-api</artifactId>
<scope>provided</scope>
</dependency>
</dependencies>
<profiles>
<profile>
<id>pre-K1</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<!-- SAKAI 2.5.X SPECIFIC DEPENDENCIES -->
<dependencies>
<dependency>
<groupId>org.sakaiproject</groupId>
<artifactId>sakai-tool-api</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.sakaiproject</groupId>
<artifactId>sakai-user-api</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.sakaiproject</groupId>
<artifactId>sakai-authz-api</artifactId>
<scope>provided</scope>
</dependency>
....
</dependencies>
</profile>
<profile>
<id>K1</id>
<!-- SAKAI 2.6+ SPECIFIC DEPENDENCIES -->
<dependencies>
<dependency>
<groupId>org.sakaiproject.kernel</groupId>
<artifactId>sakai-kernel-api</artifactId>
</dependency>
<dependency>
<groupId>org.sakaiproject.kernel</groupId>
<artifactId>sakai-component-manager</artifactId>
</dependency>
...
</dependencies>
</profile>
</profiles>
<profiles>
<profile>
<id>pre-K1</id>
<activation>
<property>
<name>sakai.version</name>
<value>[2.5.0,2.5.4)</value>
</property>
</activation>
<dependencies />
</profile>
<profile>
<id>K1</id>
<activation>
<property>
<name>sakai.version</name>
<value>[2.6.0,2.7)</value>
</property>
</activation>
<dependencies />
</profile>
</profiles>