Hi, I'm getting a build error when my project depends on a POM that uses inheritance. Given three POM files:
* C depends on B. * B inherits from A. * I can build A and B * C fails to build because of its dependency on B. The full source-code and build output is included below for your review. Here is A's POM: <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/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>com.foo</groupId> <artifactId>A</artifactId> <packaging>pom</packaging> <version>1.0-SNAPSHOT</version> <name>A</name> <repositories> <repository> <id>foo releases</id> <name>libs-releases-local</name> <layout>default</layout> <url>http://foo.net/artifactory/libs-releases-local</url> </repository> </repositories> <dependencies> <dependency> <groupId>org.eclipse.swt</groupId> <artifactId>swt</artifactId> <classifier>${swt.classifier}</classifier> <version>3.6.1</version> </dependency> </dependencies> <profiles> <profile> <id>windows-x86</id> <properties> <swt.classifier>win32-x86</swt.classifier> </properties> </profile> </profiles> </project> Here is B's POM: <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/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> <parent> <groupId>com.foo</groupId> <artifactId>A</artifactId> <version>1.0-SNAPSHOT</version> <relativePath>../A</relativePath> </parent> <artifactId>B</artifactId> <packaging>jar</packaging> <name>B</name> <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin</artifactId> <configuration> <classifier>${swt.classifier}</classifier> </configuration> </plugin> </plugins> </build> <profiles> <profile> <id>windows-x86</id> <properties> <swt.classifier>win32-x86</swt.classifier> </properties> </profile> </profiles> </project> Here is C's POM: <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/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>com.amayagaming</groupId> <artifactId>C</artifactId> <packaging>jar</packaging> <version>1.0-SNAPSHOT</version> <name>C</name> <dependencies> <dependency> <groupId>${project.groupId}</groupId> <artifactId>B</artifactId> <version>${project.version}</version> <classifier>win32-x86</classifier> </dependency> </dependencies> </project> Here is the build output from C: ------------------------------------------------------------------------ Building C task-segment: [install] ------------------------------------------------------------------------ [compiler:compile] Nothing to compile - all classes are up to date Downloading: http://foo.net/artifactory/libs-releases-local/org/eclipse/swt/swt/3.6.1/swt-3.6.1-${swt.classifier}.jar [WARNING] Unable to get resource 'org.eclipse.swt:swt:jar:${swt.classifier}:3.6.1' from repository foo releases (http://foo.net/artifactory/libs-releases-local): Error transferring file: foo.net Downloading: http://repo1.maven.org/maven2/org/eclipse/swt/swt/3.6.1/swt-3.6.1-${swt.classifier}.jar Unable to find resource 'org.eclipse.swt:swt:jar:${swt.classifier}:3.6.1' in repository central (http://repo1.maven.org/maven2) ------------------------------------------------------------------------ [ERROR]BUILD ERROR ------------------------------------------------------------------------ Failed to resolve artifact. Missing: ---------- 1) org.eclipse.swt:swt:jar:${swt.classifier}:3.6.1 Please help! Thanks, Gili -- View this message in context: http://maven.40175.n5.nabble.com/POM-inheritance-breaks-build-tp3263869p3264491.html Sent from the Maven - Users mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org