eclipse workspace uses different library version than specified in pom - java

I have an Eclipse workspace with several hierarchically dependent maven projects. Two of these projects (let's call them a and c to preserve the original structure) need a different version of the same library (graphhopper). I wrote the following poms:
a.pom:
<groupId>my.company</groupId>
<artifactId>a</artifactId>
<version>0.2.0</version>
<dependencies>
<dependency>
<groupId>com.graphhopper</groupId>
<artifactId>graphhopper-core</artifactId>
<version>3.0</version>
</dependency>
</dependencies>
b.pom:
<groupId>my.company</groupId>
<artifactId>b</artifactId>
<version>0.2.0</version>
<dependencies>
<dependency>
<groupId>my.company</groupId>
<artifactId>a</artifactId>
<version>0.2.0</version>
</dependency>
</dependencies>
c.pom:
<groupId>my.company</groupId>
<artifactId>c</artifactId>
<version>0.2.0</version>
<dependencies>
<dependency>
<groupId>my.company</groupId>
<artifactId>b</artifactId>
<version>0.2.0</version>
<exclusions>
<exclusion>
<groupId>com.graphhopper</groupId>
<artifactId>graphhopper-core</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.graphhopper</groupId>
<artifactId>graphhopper-core</artifactId>
<version>0.8.2</version>
</dependency>
</dependencies>
This pom works completely fine when building c directly via maven on the command line. The eclipse dependency hierarchy view of c.pom shows me too that c is dependent on graphhopper 0.8.2 and not on graphhopper 3.0.
However, the code view shows errors in project c whenever methods from 0.8.2 are used that don't exist anymore in 3.0. If I press F3 on one of those methods, it shows me 3.0 version of the file instead of the 0.8.2 version (I can still directly access the 0.8.2 version by searching my workspace for the class name, which yields 2 results: the 3.0 version and the 0.8.2 version). Building the project in Eclipse (via Maven->Update Project) also fails with the same errors the code view shows.
My collegues do not experience this problem although from what I can tell our eclipse workspaces have the same configurations. Any ideas what might be the cause of the trouble?

Related

Maven build failed due to JDT dependencies - No versions available for org.osgi.service:org.osgi.service.prefs:jar:[1.1.0,1.2.0)

Today when I tried to install my maven project, I get an error due JDT dependencies and here is the report information:
Cannot resolve No versions available for org.osgi.service:org.osgi.service.prefs:jar:[1.1.0,1.2.0) within specified range.
[ERROR] Failed to execute goal on project redundantcheck:
Could not resolve dependencies for project edu.fudan.selab:redundantcheck:jar:1.0-SNAPSHOT:
Failed to collect dependencies at org.eclipse.jdt:org.eclipse.jdt.core:jar:3.20.0 ->
org.eclipse.platform:org.eclipse.core.resources:jar:3.12.0 ->
org.eclipse.platform:org.eclipse.core.expressions:jar:3.5.100 ->
org.eclipse.platform:org.eclipse.core.runtime:jar:3.12.0 ->
org.eclipse.platform:org.eclipse.equinox.preferences:jar:3.10.0 ->
org.osgi.service:org.osgi.service.prefs:jar:[1.1.0,1.2.0): No versions available for
org.osgi.service:org.osgi.service.prefs:jar:[1.1.0,1.2.0) within specified range -> [Help 1]
I tried to add 1.1.0 org.osgi.service:org.osgi.service.prefs to the project, but still can't solve this problem. To avoid dependency update, I specied almost every version of the dependencies, but still encounter this error today. Here is my pom.xml:
<dependencies>
<dependency>
<groupId>org.eclipse.jdt</groupId>
<artifactId>org.eclipse.jdt.core</artifactId>
<version>3.20.0</version>
</dependency>
<dependency>
<groupId>org.eclipse.platform</groupId>
<artifactId>org.eclipse.core.commands</artifactId>
<version>3.9.800</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.eclipse.platform/org.eclipse.core.contenttype -->
<dependency>
<groupId>org.eclipse.platform</groupId>
<artifactId>org.eclipse.core.contenttype</artifactId>
<version>3.7.900</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.eclipse.platform/org.eclipse.core.filesystem -->
<dependency>
<groupId>org.eclipse.platform</groupId>
<artifactId>org.eclipse.core.filesystem</artifactId>
<version>1.7.700</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.eclipse.platform/org.eclipse.core.jobs -->
<dependency>
<groupId>org.eclipse.platform</groupId>
<artifactId>org.eclipse.core.jobs</artifactId>
<version>3.10.1100</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.eclipse.platform/org.eclipse.core.resources -->
<dependency>
<groupId>org.eclipse.platform</groupId>
<artifactId>org.eclipse.core.resources</artifactId>
<version>3.14.0</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.eclipse.platform/org.eclipse.core.runtime -->
<dependency>
<groupId>org.eclipse.platform</groupId>
<artifactId>org.eclipse.core.runtime</artifactId>
<version>3.20.100</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.eclipse.platform/org.eclipse.equinox.common -->
<dependency>
<groupId>org.eclipse.platform</groupId>
<artifactId>org.eclipse.equinox.common</artifactId>
<version>3.14.100</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.eclipse.platform/org.eclipse.osgi -->
<dependency>
<groupId>org.eclipse.platform</groupId>
<artifactId>org.eclipse.osgi</artifactId>
<version>3.16.200</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.eclipse.platform/org.eclipse.text -->
<dependency>
<groupId>org.eclipse.platform</groupId>
<artifactId>org.eclipse.text</artifactId>
<version>3.11.0</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.6.1</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>fastjson</artifactId>
<version>1.2.75</version>
</dependency>
<dependency>
<groupId>org.eclipse.platform</groupId>
<artifactId>org.eclipse.core.expressions</artifactId>
<version>3.8.0</version>
</dependency>
<dependency>
<groupId>org.eclipse.platform</groupId>
<artifactId>org.eclipse.equinox.app</artifactId>
<version>1.6.0</version>
</dependency>
<dependency>
<groupId>org.eclipse.platform</groupId>
<artifactId>org.eclipse.equinox.preferences</artifactId>
<version>3.9.0</version>
</dependency>
<dependency>
<groupId>org.eclipse.platform</groupId>
<artifactId>org.eclipse.equinox.registry</artifactId>
<version>3.11.0</version>
</dependency>
</dependencies>
Is there anyway to solve this problem?
EDIT: The issue is known by the project team and tracked as eclipse-equinox/equinox.bundles#54 on GitHub.
The dependency:
<groupId>org.eclipse.platform</groupId>
<artifactId>org.eclipse.equinox.preferences</artifactId>
<version>3.10.0</version>
Which is one of your transitive dependency, references this dependency in its dependencies list:
<dependency>
<groupId>org.osgi.service</groupId>
<artifactId>org.osgi.service.prefs</artifactId>
<version>[1.1.0,1.2.0)</version>
</dependency>
Source: org.eclipse.equinox.preferences-3.10.0.pom on maven central.
It is a mistake. As Maven tells you, this does not exist:
Cannot resolve No versions available for org.osgi.service:org.osgi.service.prefs:jar:[1.1.0,1.2.0) within specified range.
It should have been:
<dependency>
<groupId>org.osgi</groupId>
<artifactId>org.osgi.service.prefs</artifactId>
<version>[1.1.0,1.2.0)</version>
</dependency>
Which exists (note the different groupId).
Because you are not fixing the dependencies you are consuming in your project, and because the dependencies are using version ranges, suddenly you got a new version.
By the way as beingnurd has noted, there is now the newer version 3.10.1 of org.eclipse.equinox.preferences where this wrong dependency is fixed (see org.eclipse.equinox.preferences-3.10.1.pom).
If you continue to use always the newest dependency of the compatible range, the problem will be solved for you.
Now if we take a step back:
You are trying to use following JDT version:
<dependency>
<groupId>org.eclipse.jdt</groupId>
<artifactId>org.eclipse.jdt.core</artifactId>
<version>3.20.0</version>
</dependency>
This corresponds to the Eclipse Version 2019-12 (also called 4.14 internally).
Your problem is that the eclipse projects (org.eclipse.jdt.core and all the dependencies) are using version ranges.
If you look at the org.eclipse.jdt.core dependencies declarations:
org.eclipse.platform:org.eclipse.core.resources:[3.12.0,4.0.0)
org.eclipse.platform:org.eclipse.core.runtime:[3.13.0,4.0.0)
org.eclipse.platform:org.eclipse.core.filesystem:[1.7.0,2.0.0)
org.eclipse.platform:org.eclipse.text:[3.6.0,4.0.0)
If you don't do anything, Maven always takes the latest:
Today (June 2022) this would be:
org.eclipse.core.resources: 3.16.100
org.eclipse.core.runtime: 3.24.100
org.eclipse.core.filesystem: 1.9.300
org.eclipse.text: 3.12.0
When the library was published (December 2019) this was:
org.eclipse.core.resources: 3.13.600
org.eclipse.core.runtime: 3.17.0
org.eclipse.core.filesystem: 1.7.600
org.eclipse.text: 3.10.0
And of course this is recursive, you need to do this for all the dependencies.
Letting Maven choose always the latest is problematic:
It prevents you creating reproducible build, because the dependencies picked by maven depends from what is available on maven central on that day.
You need to solve conflicts.
You are potentially the first trying out a combination.
This is why I always use a set of projects that were released together. By the way this is also how the Eclipse project itself is doing it (by using P2 update sites and target platform).
I am publishing Maven BOM files to fix the versions: ECentral project
This is how you can do it:
<repositories>
<repository>
<id>ecentral</id>
<url>https://raw.githubusercontent.com/jmini/ecentral/HEAD/repo</url>
</repository>
</repositories>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>fr.jmini.ecentral</groupId>
<artifactId>eclipse-platform-dependencies</artifactId>
<version>4.14</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>org.eclipse.jdt</groupId>
<artifactId>org.eclipse.jdt.core</artifactId>
<!-- no version needed here, because it is defined in the BOM -->
</dependency>
</dependencies>
Because I ran into this problem today too, but via plugin sub-dependency, my temporary solution is to download the regular org.osgi:org.osgi.service.prefs:jar:1.1.2 and install it in the local repository as org.osgi.service:org.osgi.service.prefs:jar:1.1.2.
You can exclude the dependency like this :
<dependency>
<groupId>org.eclipse.jdt</groupId>
<artifactId>org.eclipse.jdt.core</artifactId>
<version>3.24.0</version>
<exclusions>
<exclusion>
<groupId>org.osgi.service</groupId>
<artifactId>org.osgi.service.prefs</artifactId>
</exclusion>
</exclusions>
so the reason for this failure is dependency
<groupId>org.osgi.service</groupId> <artifactId>org.osgi.service.prefs</artifactId>
but the group org.osgi.service doesn't exists, instead it is only org.osgi
so dependency should look
<groupId>org.osgi</groupId>
<artifactId>org.osgi.service.prefs</artifactId>
I have got the same problem today in our SpringBoot project 1.5.25 with org.hibernate:hibernate-tools:jar:5.0.6.Final
The error message as follow:
# Failed to collect dependencies at org.hibernate:hibernate-tools:jar:5.0.6.Final ->
# org.eclipse.jdt:org.eclipse.jdt.core:jar:3.12.2 ->
# org.eclipse.platform:org.eclipse.core.resources:jar:3.11.1 ->
# org.eclipse.platform:org.eclipse.core.expressions:jar:3.5.100 ->
# org.eclipse.platform:org.eclipse.core.runtime:jar:3.12.0 ->
# org.eclipse.platform:org.eclipse.equinox.preferences:jar:3.10.0 ->
# org.osgi.service:org.osgi.service.prefs:jar:[1.1.0,1.2.0): No versions available for org.osgi.service:org.osgi.service.prefs:jar:[1.1.0,1.2.0) within specified range -> [Help 1]
I use the private nexus, to resolve this problem, i added a proxy maven2 (maven-ecentral) repo pointed to https://raw.githubusercontent.com/jmini/ecentral/HEAD/repo , thanks #Jmini
then added the follow lignes in the pom.xml
<dependencyManagement>
<dependencies>
<dependency>
<groupId>fr.jmini.ecentral</groupId>
<artifactId>eclipse-platform-dependencies</artifactId>
<version>4.14</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<repositories>
<repository>
<id>ecentral</id>
<url>https://nexus.xxxx.xxx/repository/maven-ecentral/</url>
</repository>
</repositories>
Reload your project with IDEA, it should work.
Another solution is using exclusions
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-tools</artifactId>
<version>${hibernate-tools.version}</version>
<!-- exclure the old org.eclipse.platform -->
<exclusions>
<exclusion>
<groupId>org.eclipse.platform</groupId>
<artifactId>org.eclipse.equinox.preferences</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- the 3.10.1 org.eclipse.platform fixed the pb -->
<dependency>
<groupId>org.eclipse.platform</groupId>
<artifactId>org.eclipse.equinox.preferences</artifactId>
<version>3.10.1</version>
</dependency>
Even I have been facing this problem since today, it was working fine till yesterday.
Finally what I found was that pom of org.eclipse.equinox.preferences:3.10.0 group id mentioned as org.osgi.service, but the artifact is located in repo1.maven.org at org/osgi, there is no service folder in it.
I changed dependency group id to org.osgi in the pom of org.eclipse.equinox.preferences and then it worked.
--EDIT--
I can see a new version of 3.10.1 added in repo which has the group id corrected to org.osgi instead of org.osgi.service
I ran into this problem with a maven plugin (net.revelc.code.formatter). We use it from another maven plugin that generates code. Since it is just a formatter for generated code, my solution was to drop the usage of the formatter plugin. Obviously I couldn't use the above solutions, because I don't want to fork the formatter code.

Spring and Hibernate dependencies are not being resolved

I am having this error message for all the imported packages "The import org..... cannot be resolved". and my Spring and Hibernate dependencies are not being resolved. I have tried multiple solutions to fix this error but nothing seams to work, below are the solution I've tried.
Maven => Update Project but same error. Also did => Force Update of Snapshots/Releases
I have also tried to Right-click on the project and choose Properties, and then Maven. Uncheck the box labelled "Resolve dependencies from Workspace projects", hit Apply, and then OK
Deleted my local Maven repo, the .m2 directory and Restarted Eclipse.
https://i.stack.imgur.com/LCUta.png
'''
<modelVersion>4.0.0</modelVersion>
<groupId>com.luv2code.springdemo</groupId>
<artifactId>spring-crm-rest</artifactId>
<version>1.0.0</version>
<packaging>war</packaging>
<properties>
<springframework.version>5.0.6.RELEASE</springframework.version>
<hibernate.version>5.4.1.Final</hibernate.version>
<mysql.connector.version>5.1.45</mysql.connector.version>
<c3po.version>0.9.5.2</c3po.version>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
</properties>
<dependencies>
<!-- Spring -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
<version>${springframework.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-tx</artifactId>
<version>${springframework.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-orm</artifactId>
<version>${springframework.version}</version>
</dependency>
<!-- Add Jackson for JSON converters -->
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.9.5</version>
</dependency>
<!-- Hibernate -->
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
<version>${hibernate.version}</version>
</dependency>
<!-- MySQL -->
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>${mysql.connector.version}</version>
</dependency>
<!-- C3PO -->
<dependency>
<groupId>com.mchange</groupId>
<artifactId>c3p0</artifactId>
<version>${c3po.version}</version>
</dependency>
<!-- Servlet+JSP+JSTL -->
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.1.0</version>
</dependency>
<dependency>
<groupId>javax.servlet.jsp</groupId>
<artifactId>javax.servlet.jsp-api</artifactId>
<version>2.3.1</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>jstl</artifactId>
<version>1.2</version>
</dependency>
<!-- to compensate for java 9 not including jaxb -->
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>2.3.0</version>
</dependency>
</dependencies>
<build>
<finalName>spring-crm-rest</finalName>
<plugins>
<!-- Builds a Web Application Archive (WAR) file from the project output
and its dependencies. -->
<plugin>
<!-- Add Maven coordinates (GAV) for: maven-war-plugin -->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>3.2.0</version>
</plugin>
</plugins>
</build>
'''
You need as first step to run from terminal in your project root directory the mvn clean install command. In this way you will "install the package into the local repository, for use as a dependency". After that for sure you need to refresh your workspace and run a mvn update
A major problem is apparent from the picture you provided, but I'm not sure how you got it into this state.
By default, Maven projects will have a source directory at "src/main/java" and "src/test/java". Your source directory appears to be just "src", so it's finding classes in "main/java/com/..." so it wants the packages to start with "src.main.java.com...".
You appear to have overridden the settings in the .classpath file somehow. If you're using Maven in Eclipse, you should let the m2e plugin determine the classpath.
From what I can see, if you remove the "src" source directory and replace it with "src/main/java", it will more likely be able to compile your code.
Update:
To answer your question in the comment (this is too long for a comment):
Neither. I would suggest copying the project to a location outside of your workspace, if it isn't already outside of the workspace. If the project was already located outside of the workspace, now delete the project, but DO NOT delete the contents. If the project was located inside the workspace, as you've now copied it out, you can delete the project. At this point, go to the location where the project lies outside of the workspace, and delete the ".classpath" file from that location. Now, import the project back into Eclipse. If your project is conventional otherwise, this will "reset" it to a sane organization with respect to m2e.

Maven in Eclipse project: package javax.ws.rs does not exist

In Eclipse, when I go to myProject -> right click -> Run As -> Maven build, I am getting multiple errors in the console outlining that certain packages does not exist, like:
javax.ws.rs does not exist
javax.ws.rs.core does not exist
javax.servlet does not exist
javax.servlet.http doest not exist
Although in my pom.xml, I have provided those dependencies:
<dependency>
<groupId>javax.ws.rs</groupId>
<artifactId>javax.ws.rs-api</artifactId>
<version>2.0.1</version>
</dependency>
<dependency>
<groupId>javax.ws.rs</groupId>
<artifactId>javax.ws.rs</artifactId>
<version>1.0</version>
</dependency>
etc
under
<dependencyManagement><dependecies>
tags (don't have any errors in pom.xml).
I do also have proxy settings configured in settings.xml file, and this file is properly linked.
I've also got these jars included locally to WebContent\WEB-INF\lib folder and added to the classpath (I can run my REST service on tomcat, the error "package does not exist" appears only when I am trying to use Maven build".
The reason I need that I want to generate and deploy a .war file.
How I can solve this? Is there a war to force Maven look in local libraries instead?
If you have:
<dependencyManagement>
<dependencies>
<dependency>
<groupId>javax.ws.rs</groupId>
<artifactId>javax.ws.rs-api</artifactId>
<version>2.0.1</version>
</dependency>
<dependency>
<groupId>javax.ws.rs</groupId>
<artifactId>javax.ws.rs</artifactId>
<version>1.0</version>
</dependency>
</dependencies>
</dependencyManagement>
then you need to have a separate:
<dependencies>
<dependency>
<groupId>javax.ws.rs</groupId>
<artifactId>javax.ws.rs-api</artifactId>
</dependency>
<dependency>
<groupId>javax.ws.rs</groupId>
<artifactId>javax.ws.rs</artifactId>
</dependency>
</dependencies>
section.
Typically you would define dependencyManagement in a parent pom.xml file and then use the second dependencies fragment in child pom.xml files. This ensures that all your modules depend upon the same consistent artifacts.

Cross dependency issue with Google Collection and Google Guava on Shrinkwrap-resolver

I'm dealing with the development of a Java EE project that involves several tools such as jBPM, Hibernate, Resteasy, ect.
In order to manage dependencies, I'm using Maven: my pom.xml is available here.
Now, I'd like to use inside that project QueryDSL 3.4.3 that depends on Google Guava 14.0.1: unfortunately, something imports as dependency Google Collections 1.0 that generates a conflict with Google Guava 14.0.1.
Is it possible to understand where Google Collections is from?
Is there a way to resolve this issue safety? (Now, I'm just removing Google Collections's jar from the deployment folder)
Update
By using the command mvn dependency:tree, I found that Google Collections 1.0 comes from:
<dependency>
<groupId>org.jboss.shrinkwrap.resolver</groupId>
<artifactId>shrinkwrap-resolver-impl-maven</artifactId>
</dependency>
Now, I've just to understand if it will work well also by excluding google-collections.
See also: http://grepcode.com/.../shrinkwrap-resolver-impl-maven/2.1.1/
As said, Google Collection dependency comes from shrinkwrap-resolver-impl-maven.
I resolved that issue by editing the pom.xml as follows:
<!-- ShrinkWrap Maven Resolver for Arquillian Tests -->
<dependency>
<groupId>org.jboss.shrinkwrap.resolver</groupId>
<artifactId>shrinkwrap-resolver-impl-maven</artifactId>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>com.google.collections</groupId>
<artifactId>google-collections</artifactId>
</exclusion>
</exclusions>
</dependency>
Then:
<!-- Arquillian profiles -->
<profiles>
<!-- Arquillian test profile managed by JBoss AS 7 -->
<profile>
<id>arquillian-jbossas-managed</id>
<dependencies>
<dependency>
<groupId>org.jboss.as</groupId>
<artifactId>jboss-as-arquillian-container-managed</artifactId>
<scope>test</scope>
<exclusions>
<exclusion>
<artifactId>google-collections</artifactId>
<groupId>com.google.collections</groupId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
</profile>
</profiles>
Now, it works fine.

Avoiding/Resolving duplicate classes in Maven Project

I have one huge project A and which has dependency project B (which is not in our control).
The problem is when I include B under A project pom.xml, everything is fine and the build is successful.
But in few of the areas, where we are facing runtime exceptions due to duplicated classes.
Project A has it's own JDom dependency version and Project B is using different/Same JDom version. During application run time, it's thowring InvocationTarget exception due to conflicting classes.
How do I ensure, project A uses it's own jdom while project B uses it's own or atleast resolving such conflicts?
You can exclude the (transitive) dependency from your project B which is being imported.
<project>
...
<dependencies>
<dependency>
<groupId>com.example</groupId>
<artifactId>ProjectB</artifactId>
<version>1.0</version>
<scope>compile</scope>
<exclusions>
<exclusion>
<groupId>jdom</groupId>
<artifactId>jdom</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
</project>
The above example will cause your Project B dependency to be pulled in, sans its version of the JDOM library.

Categories

Resources