If you have a maven project you compile using maven, you don't use javac On Tue, Feb 5, 2019, 14:25 Dennis Putnam <d...@bellsouth.net wrote:
> 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"?> > <classpath> > <classpathentry including="**/*.java" kind="src" > output="target/classes" path="src"> > <attributes> > <attribute name="optional" value="true"/> > <attribute name="maven.pomderived" value="true"/> > </attributes> > </classpathentry> > <classpathentry kind="con" > > path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"> > <attributes> > <attribute name="maven.pomderived" value="true"/> > </attributes> > </classpathentry> > <classpathentry kind="con" > path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER"> > <attributes> > <attribute name="maven.pomderived" value="true"/> > </attributes> > </classpathentry> > <classpathentry kind="output" path="target/classes"/> > </classpath> > > 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 > >