I haven't used it yet myself, but from my reading of the documentation, I believe it really only brings in the dependencyManagement section of the imported pom. So you will still need to declare struts-core in the project you need to use it, but you can leave off the version (and scope).
The real use case for import scope IMO is where a company does not want to use a single shared corporate parent pom, but they do want to enforce versions on all projects. So you manage versions in the imported pom (one place), force all your projects to import it (can be any pom in the repo), and poof they all get version maintenance for free. Wayne On Thu, Jun 5, 2008 at 2:41 PM, Timothy Reilly <[EMAIL PROTECTED]> wrote: > > I don't think I'm understanding the docs here regarding how to use > import scope: > http://maven.apache.org/guides/introduction/introduction-to-dependency-m > echanism.html#Importing_Dependencies > > Here is what I have - must be incorrect I think... > > parent > + testapp > + testimports (not a module) > > > parent pom: > > <?xml version="1.0" encoding="UTF-8"?> > <project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 > http://maven.apache.org/maven-v4_0_0.xsd" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> > <modelVersion>4.0.0</modelVersion> > <groupId>com.test</groupId> > <artifactId>parent</artifactId> > <packaging>pom</packaging> > <name>parent</name> > <version>0.0.1-SNAPSHOT</version> > <description/> > > <modules> > <module>testapp</module> > </modules> > > </project> > > Testimports 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>com.test.imports</groupId> > <artifactId>testimports</artifactId> > <packaging>pom</packaging> > <name>testimports</name> > <version>0.0.1-SNAPSHOT</version> > <description /> > > <dependencies> > <dependency> > <groupId>org.apache.struts</groupId> > <artifactId>struts-core</artifactId> > <version>1.3.9</version> > <scope>provided</scope> > </dependency> > </dependencies> > </project> > > > <?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"> > <parent> > <artifactId>parent</artifactId> > <groupId>com.test</groupId> > <version>0.0.1-SNAPSHOT</version> > </parent> > <modelVersion>4.0.0</modelVersion> > <groupId>com.test.app</groupId> > <artifactId>testapp</artifactId> > <packaging>jar</packaging> > <name>testapp<name> > <version>0.0.1-SNAPSHOT</version> > <description /> > > <dependencyManagement> > <dependencies> > <dependency> > <groupId>com.test.imports</groupId> > <artifactId>testimports</artifactId> > <type>pom</type> > <version>0.0.1-SNAPSHOT</version> > <scope>import</scope> > </dependency> > </dependencies> > </dependencyManagement> > </project> > > === > Maven version: 2.0.9 > Java version: 1.5.0 > OS name: "windows xp" version: "5.1 build 2600 service pack 2" arch: > "x86" Family: "dos" > ===== > > Any advice appreciated. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
