This is not possible to build the project because the docking-frames-core pom.xml requires docking-frames-core-j6 and the latter project should have a dependency with the first one.
Adding a dependency to docking-frames-core in the pom.xml of docking-frames-core-j6 will result in a circular reference.
One suggestion to fix that issue is to use a profile with automatic activation related to JDK. It requires to modify the pom.xml of docking-frames-core (see patch below, doesn’t manage to make an attachment) and move the source directory “docking-frames-core-j6/src” to “docking-frames-core/src-j6”. Then docking-frames-core-j6 can be removed.
diff --git a/docking-frames-core/pom.xml b/docking-frames-core/pom.xml
index 505c39b..e54b17b 100644
--- a/docking-frames-core/pom.xml
+++ b/docking-frames-core/pom.xml
@@ -1,53 +1,63 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.dockingframes</groupId>
<artifactId>docking-frames-base</artifactId>
- <version>1.1.2-SNAPSHOT</version>
+ <version>1.1.2-SNAPSHOT</version>
</parent>
<artifactId>docking-frames-core</artifactId>
<packaging>jar</packaging>
-
- <dependencies>
- <dependency>
- <groupId>org.dockingframes</groupId>
- <artifactId>docking-frames-core-j6</artifactId>
- <type>jar</type>
- <version>${project.version}</version>
- <scope>compile</scope>
- </dependency>
- </dependencies>
<name>${project.artifactId}</name>
<description>${project.name} is a core library</description>
- <build>
- <sourceDirectory>
- src/
- </sourceDirectory>
- <resources>
- <resource>
- <directory>
- src/
- </directory>
- <includes>
- <include>
- data/**/*.properties
- </include>
- <include>
- data/**/*.png
- </include>
- <include>
- data/**/*.ini
- </include>
- <include>
- data/**/*.svg
- </include>
- </includes>
- </resource>
- </resources>
- </build>
+ <build>
+ <sourceDirectory>src/</sourceDirectory>
+ <resources>
+ <resource>
+ <directory>src/</directory>
+ <includes>
+ <include>data/**/*.properties</include>
+ <include>data/**/*.png</include>
+ <include>data/**/*.ini</include>
+ <include>data/**/*.svg</include>
+ </includes>
+ </resource>
+ </resources>
+ </build>
+
+ <profiles>
+ <profile>
+ <activation>
+ <!-- This profile is activated when jdk >= 1.6 -->
+ <jdk>[1.6,)</jdk>
+ </activation>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>build-helper-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>add-source</id>
+ <phase>generate-sources</phase>
+ <goals>
+ <goal>add-source</goal>
+ </goals>
+ <configuration>
+ <sources>
+ <source>src-j6</source>
+ </sources>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
</project>