You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by darwinjob <d....@medisin.uio.no> on 2009/12/11 16:48:40 UTC
repository inheritance does not work
Hi
As far as I understand (but I'm a newbie:) ), if a repository is defined in
a parent pom file, the children modules should have access to that
repository, right? It does not happen in my case though. Here is the
example.
Parent pom:
<?xml version="1.0" encoding="UTF-8"?>
<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>org.springframework.flex.samples</groupId>
<artifactId>spring-flex-testdrive</artifactId>
<version>1.0.0.RELEASE</version>
<packaging>pom</packaging>
<name>Spring BlazeDS Integration Test Drive Samples</name>
<modules>
<module>spring-blazeds-101</module>
</modules>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-reactor-plugin</artifactId>
<version>1.0</version>
</plugin>
</plugins>
</build>
<repositories>
<repository>
<id>flex-mojos-repository</id>
<url>http://repository.sonatype.org/content/groups/public</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<repository>
<id>ObjectWEB</id>
<url>http://maven.ow2.org/maven2/</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>flex-mojos-repository</id>
<url>http://repository.sonatype.org/content/groups/public</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
</project>
Child module pom:
<?xml version="1.0" encoding="UTF-8"?>
<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>org.springframework.flex.samples</groupId>
<artifactId>spring-flex-testdrive</artifactId>
<version>1.0.0.RELEASE</version>
</parent>
<artifactId>spring-blazeds-101</artifactId>
<packaging>swf</packaging>
<name>Spring BlazeDS Integration 101 Sample</name>
<build>
<finalName>main</finalName>
<sourceDirectory>src/main/flex</sourceDirectory>
<testSourceDirectory>src/test/flex</testSourceDirectory>
<plugins>
<plugin>
<inherited>true</inherited>
<groupId>org.sonatype.flexmojos</groupId>
<artifactId>flexmojos-maven-plugin</artifactId>
<version>3.2.0</version>
<extensions>true</extensions>
<configuration>
<output>${basedir}/../testdrive/src/main/webapp/spring-blazeds-101/${project.build.finalName}.swf</output>
<services>${basedir}/../testdrive/src/main/webapp/WEB-INF/flex/services-config.xml</services>
<contextRoot>/</contextRoot>
<locales>
<locale>en_US</locale>
</locales>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>com.adobe.flex.framework</groupId>
<artifactId>flex-framework</artifactId>
<version>3.2.0.3958</version>
<type>pom</type>
</dependency>
<!-- flexmojos Unit testing support -->
<!--
<dependency> <groupId>org.sonatype.flexmojos</groupId>
<artifactId>flexmojos-unittest-support</artifactId>
<version>3.2.0</version> <type>swc</type> <scope>test</scope>
</dependency>
-->
</dependencies>
</project>
And then I get this error:
url = http://repo1.maven.org/maven2
Downloading:
http://repo1.maven.org/maven2/com/adobe/flex/compiler/3.2.0.3958/compiler-3.2.0.3958.pom
url = http://repo1.maven.org/maven2
Downloading:
http://repo1.maven.org/maven2/org/graniteds/granite-generator/1.1.0/granite-generator-1.1.0.pom
url = http://repo1.maven.org/maven2
Downloading:
http://repo1.maven.org/maven2/com/adobe/flex/compiler/asdoc/3.2.0.3958/asdoc-3.2.0.3958.pom
url = http://repo1.maven.org/maven2
Downloading:
http://repo1.maven.org/maven2/com/adobe/flex/compiler/3.2.0.3958/compiler-3.2.0.3958.pom
url = http://repo1.maven.org/maven2
Downloading:
http://repo1.maven.org/maven2/org/graniteds/granite-generator/1.1.0/granite-generator-1.1.0.jar
url = http://repo1.maven.org/maven2
Downloading:
http://repo1.maven.org/maven2/com/adobe/flex/compiler/asdoc/3.2.0.3958/asdoc-3.2.0.3958-template.zip
[ERROR]
It seems like the child does not know about
http://repository.sonatype.org/content/groups/public repository... If I copy
the repository definition into child pom then everything works fine!
What am I doing wrong?
--
View this message in context: http://old.nabble.com/repository-inheritance-does-not-work-tp26746524p26746524.html
Sent from the Maven - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: repository inheritance does not work
Posted by Brian Fox <br...@infinity.nu>.
Possibly you didn't re-install the parent? It's using a release
version so technically you shouldn't change it. Also you should read
this: http://www.sonatype.com/people/2009/02/why-putting-repositories-in-your-poms-is-a-bad-idea/
On Fri, Dec 11, 2009 at 10:48 AM, darwinjob <d....@medisin.uio.no> wrote:
>
> Hi
> As far as I understand (but I'm a newbie:) ), if a repository is defined in
> a parent pom file, the children modules should have access to that
> repository, right? It does not happen in my case though. Here is the
> example.
>
>
> Parent pom:
> <?xml version="1.0" encoding="UTF-8"?>
> <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>org.springframework.flex.samples</groupId>
> <artifactId>spring-flex-testdrive</artifactId>
> <version>1.0.0.RELEASE</version>
> <packaging>pom</packaging>
>
> <name>Spring BlazeDS Integration Test Drive Samples</name>
>
> <modules>
> <module>spring-blazeds-101</module>
> </modules>
>
> <build>
> <plugins>
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-reactor-plugin</artifactId>
> <version>1.0</version>
> </plugin>
> </plugins>
> </build>
>
> <repositories>
> <repository>
> <id>flex-mojos-repository</id>
> <url>http://repository.sonatype.org/content/groups/public</url>
> <releases>
> <enabled>true</enabled>
> </releases>
> <snapshots>
> <enabled>false</enabled>
> </snapshots>
> </repository>
>
> <repository>
> <id>ObjectWEB</id>
> <url>http://maven.ow2.org/maven2/</url>
> <releases>
> <enabled>true</enabled>
> </releases>
> <snapshots>
> <enabled>false</enabled>
> </snapshots>
> </repository>
>
> </repositories>
>
> <pluginRepositories>
> <pluginRepository>
> <id>flex-mojos-repository</id>
> <url>http://repository.sonatype.org/content/groups/public</url>
> <releases>
> <enabled>true</enabled>
> </releases>
> <snapshots>
> <enabled>false</enabled>
> </snapshots>
> </pluginRepository>
> </pluginRepositories>
>
> </project>
>
> Child module pom:
> <?xml version="1.0" encoding="UTF-8"?>
> <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>org.springframework.flex.samples</groupId>
> <artifactId>spring-flex-testdrive</artifactId>
> <version>1.0.0.RELEASE</version>
> </parent>
>
> <artifactId>spring-blazeds-101</artifactId>
> <packaging>swf</packaging>
>
> <name>Spring BlazeDS Integration 101 Sample</name>
>
> <build>
> <finalName>main</finalName>
> <sourceDirectory>src/main/flex</sourceDirectory>
> <testSourceDirectory>src/test/flex</testSourceDirectory>
> <plugins>
> <plugin>
> <inherited>true</inherited>
> <groupId>org.sonatype.flexmojos</groupId>
> <artifactId>flexmojos-maven-plugin</artifactId>
> <version>3.2.0</version>
> <extensions>true</extensions>
> <configuration>
>
> <output>${basedir}/../testdrive/src/main/webapp/spring-blazeds-101/${project.build.finalName}.swf</output>
>
> <services>${basedir}/../testdrive/src/main/webapp/WEB-INF/flex/services-config.xml</services>
> <contextRoot>/</contextRoot>
> <locales>
> <locale>en_US</locale>
> </locales>
> </configuration>
> </plugin>
> </plugins>
> </build>
>
> <dependencies>
> <dependency>
> <groupId>com.adobe.flex.framework</groupId>
> <artifactId>flex-framework</artifactId>
> <version>3.2.0.3958</version>
> <type>pom</type>
> </dependency>
> <!-- flexmojos Unit testing support -->
> <!--
> <dependency> <groupId>org.sonatype.flexmojos</groupId>
> <artifactId>flexmojos-unittest-support</artifactId>
> <version>3.2.0</version> <type>swc</type> <scope>test</scope>
> </dependency>
> -->
> </dependencies>
>
> </project>
>
> And then I get this error:
> url = http://repo1.maven.org/maven2
> Downloading:
> http://repo1.maven.org/maven2/com/adobe/flex/compiler/3.2.0.3958/compiler-3.2.0.3958.pom
> url = http://repo1.maven.org/maven2
> Downloading:
> http://repo1.maven.org/maven2/org/graniteds/granite-generator/1.1.0/granite-generator-1.1.0.pom
> url = http://repo1.maven.org/maven2
> Downloading:
> http://repo1.maven.org/maven2/com/adobe/flex/compiler/asdoc/3.2.0.3958/asdoc-3.2.0.3958.pom
> url = http://repo1.maven.org/maven2
> Downloading:
> http://repo1.maven.org/maven2/com/adobe/flex/compiler/3.2.0.3958/compiler-3.2.0.3958.pom
> url = http://repo1.maven.org/maven2
> Downloading:
> http://repo1.maven.org/maven2/org/graniteds/granite-generator/1.1.0/granite-generator-1.1.0.jar
> url = http://repo1.maven.org/maven2
> Downloading:
> http://repo1.maven.org/maven2/com/adobe/flex/compiler/asdoc/3.2.0.3958/asdoc-3.2.0.3958-template.zip
> [ERROR]
>
> It seems like the child does not know about
> http://repository.sonatype.org/content/groups/public repository... If I copy
> the repository definition into child pom then everything works fine!
> What am I doing wrong?
>
>
>
>
>
>
>
> --
> View this message in context: http://old.nabble.com/repository-inheritance-does-not-work-tp26746524p26746524.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org