Hi,

I guess you could use the enforcer plugin:
http://maven.apache.org/plugins/maven-enforcer-plugin/

I think the bannedDependencies rule could be added to project A (for
C-1.0.0). Haven't tried it though.

/Anders

On Mon, Jul 6, 2009 at 15:27, Paolo.Mosna<[email protected]> wrote:
>
> Dear folks, I'm using Maven (and maven-ant-task) to check project
> dependencies.
> I have a project A-1.0.0 which depends by an artifact B-1.0.0 and C-1.0.1.
> At the same time artifact B-1.0.0 depends by artifact C-1.0.0.
>
> Artifacts C-1.0.0 and C-1.0.1 are not interchangeable, so or I use version
> 1.0.0 or version 1.0.1.
> I cannot use them altogether.
>
> Here is the pom.xml for project A-1.0.0:
> <project>
>        <modelVersion>4.0.0</modelVersion>
>        <groupId>A</groupId>
>        <artifactId>A</artifactId>
>        <name>hsfdk</name>
>        <version>1.0.0</version>
>
>  <dependencies>
>    <dependency>
>      <groupId>C</groupId>
>      <artifactId>C</artifactId>
>      <version>1.0.1</version>
>      <type>dll</type>
>      <scope>compile</scope>
>      <optional>false</optional>
>    </dependency>
>    <dependency>
>      <groupId>B</groupId>
>      <artifactId>B</artifactId>
>      <version>1.0.0</version>
>      <type>ocx</type>
>      <scope>runtime</scope>
>      <optional>false</optional>
>    </dependency>
>  </dependencies>
>
> </project>
>
> Follow pom.xml for artifact B-1.0.0
>
> <project>
>        <modelVersion>4.0.0</modelVersion>
>        <groupId>B</groupId>
>        <artifactId>B</artifactId>
>        <name>B</name>
>        <version>1.0.0</version>
>
>  <dependencies>
>    <dependency>
>      <groupId>C</groupId>
>      <artifactId>C</artifactId>
>      <version>1.0.0</version>
>      <type>dll</type>
>      <scope>runtime</scope>
>      <optional>false</optional>
>    </dependency>
>  </dependencies>
>
> </project>
>
>
> Is there a way to intercept the dependency problem I have in this case?
> I did try with dependency plug-in but I get the following output:
> $ mvn dependency:analyze-dep-mgt
> [INFO] Scanning for projects...
> [INFO] Searching repository for plugin with prefix: 'dependency'.
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Building hsfdk
> [INFO]    task-segment: [dependency:analyze-dep-mgt]
> [INFO]
> ------------------------------------------------------------------------
> [INFO] [dependency:analyze-dep-mgt {execution: default-cli}]
> [INFO] Found Resolved Dependency / DependencyManagement mismatches:
> [INFO]    Nothing in DepMgt.
> [INFO]
> ------------------------------------------------------------------------
> [INFO] BUILD SUCCESSFUL
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Total time: 4 seconds
> [INFO] Finished at: Mon Jul 06 15:24:56 CEST 2009
> [INFO] Final Memory: 8M/18M
> [INFO]
> ------------------------------------------------------------------------
>
> which doesn't show any problem with artifact dependency.
>
> Any help is welcome...
>
> Thanks in advance.
> Paolo.
> --
> View this message in context: 
> http://www.nabble.com/Maven-dependency-check-tp24355410p24355410.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> 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]

Reply via email to