maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dennis Putnam <>
Subject Re: Confusion with Dependency Paths
Date Tue, 05 Feb 2019 13:24:48 GMT
Hi Bernd and Marco,

After further thought I'm not sure how these changes will help with the
path problem when compiling. It seems to me that the more likely culprit
is .classpath. I know even less about that than pom.xml. Just in case,
here is my .classpath (again generated by Eclipse.

<?xml version="1.0" encoding="UTF-8"?>
        <classpathentry including="**/*.java" kind="src"
output="target/classes" path="src">
                        <attribute name="optional" value="true"/>
                        <attribute name="maven.pomderived" value="true"/>
        <classpathentry kind="con"
                        <attribute name="maven.pomderived" value="true"/>
        <classpathentry kind="con"
                        <attribute name="maven.pomderived" value="true"/>
        <classpathentry kind="output" path="target/classes"/>

I don't understand how Eclipse is able to compile this successfully and
javac cannot. Shouldn't the files be the same for both? There must be
some difference between what Eclipse is using and what is winding up in
my git working tree that is used for javac. However, pom.xml and
.classpath in both working trees are the same. What I don't see in
either file is the path to the Maven dependencies that show up in the
Eclipse dependencies window (see attached). I think that is the crux of
the problem but I don't know how that get factored into the compile step
with javac.

Thanks again for your patience and help.

On 2/4/2019 3:44 PM, Bernd Eckenfels wrote:
> Hello,
> to add to this, after moving the source to src/main/java/* and Fixing the POM (removing
the source path and potentialla the resource plugin) you can use eclipse alt+f5 t refresh
from the pom, this will configure the ecplise Project layout (.classpath) to detect the same
source Folders so it can work in combination with Maven.
> Gruss
> Bernd

View raw message