On 4/12/10 9:29 AM, M Muthukumaran wrote: > All, > > > > I have a multi module project where I have only two modules. Every thing > works fine like build, install, etc. However I have problem while > deploying the artifact into my snapshot repository. I'm hosting > artifactory as my organization repository and every thing is perfect > from the repository configuration point of view. I have the profile > which is not active by default but activating through command line. > Please refer the parent POM below, > > > > <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"> > > > > <!-- Note: The model version is a constant. It needs to be same in > > all the POM. > > --> > > <modelVersion>4.0.0</modelVersion> > > > > <groupId>mygroup</groupId> > > <artifactId>myartifact</artifactId> > > <version>${version}</version> > > <packaging>pom</packaging> > > > > <modules> > > <module>module-A</module> > > <module>module-B</module> > > </modules> > > > > <profiles> > > <profile> > > <id>deploy-snapshot</id> > > <activation> > > <activeByDefault>false</activeByDefault> > > </activation> > > <distributionManagement> > > <snapshotRepository> > > <id>my-snapshot</id> > > <name>my-snapshot</name> > > <url>http://.......</url> > > </snapshotRepository> > > </distributionManagement> > > </profile> > > </profiles> > > </project> > > > > The problem is I need to go to each child POM and say my parent > (Inheritance) in order to have a successful artifact deployment into my > repository.
How is this a problem? You would prefer Maven read your mind to determine your snapshot repository? > Is this is known behavior or I'm doing something wrong... I'd say it's a known behavior that Maven builds the effective pom based on information it is provided; not ESP. > I do not want > to do both association and inheritance in my maven scripts. Could some > one please hint me to avoid this? Inheritance is, IMHO, unavoidable in any non-trivial Maven project. BTW, why are you putting the snapshot repository in a profile? Are you using multiple snapshot repositories? That seems odd to me. Justin > > > > I'm get the following problem when I don't have inheritance relationship > defined in the child POM's, > > > > [INFO] > ------------------------------------------------------------------------ > > [ERROR] BUILD ERROR > > [INFO] > ------------------------------------------------------------------------ > > [INFO] Failed to configure plugin parameters for: > org.apache.maven.plugins:maven-deploy-plugin:2.4 > > > > check that the following section of the pom.xml is present and correct: > > > > <distributionManagement> > > <!-- use the following if you're not using a snapshot version. --> > > <repository> > > <id>repo</id> > > <name>Repository Name</name> > > <url>scp://host/path/to/repo</url> > > </repository> > > <!-- use the following if you ARE using a snapshot version. --> > > <snapshotRepository> > > <id>repo</id> > > <name>Repository Name</name> > > <url>scp://host/path/to/repo</url> > > </snapshotRepository> > > </distributionManagement> > > > > Cause: Class 'org.apache.maven.artifact.repository.ArtifactRepository' > cannot be instantiated > > > > Thanks, > > Muthu > > --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org