Confusion with Dependency Paths

classic Classic list List threaded Threaded
13 messages Options
Reply | Threaded
Open this post in threaded view
|

Confusion with Dependency Paths

Dennis Putnam
I have a Maven project that was created using Eclipse. The application
is working fine but I am having a problem compiling with 'javac'. I'm
getting the following compile error:

 error: package org.apache.commons.io does not exist

However, the build path contains:

.../repository/commons-io/commons-io/2.5

When I added the dependency I specified:

GroupID: commons-io
Artifact: commons-io
Version: 2.5

That is what is reflected in the pom.xml. I am guessing there is
something wrong with the path but I do not understand where
org.apache.commons-io comes from in the error message. Doesn't that mean
the pom.xml dependency would have to be:

GroupID:org.apache.commons-io
Artifact: commons-io
Version: 2.5

Which it isn't and means a different path then the above and the
explains the error. When I look at the build path in Eclipse the path is
correct. Can someone explain what is going on and how to debug/fix it? TIA.


signature.asc (203 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Confusion with Dependency Paths

Marco Schulz
Hi Dennis

I suppose you use a simple Maven Project configuration. May you added the Dependency manually. Whitout seeing the exact error in the cmd and your pom I guess you added the dependency in the DependencyManagement section. You need to use the Dependencies section.

regards
.marco

Get Outlook for Android<https://aka.ms/ghei36>

________________________________
From: Dennis Putnam <[hidden email]>
Sent: Sunday, February 3, 2019 7:51:20 PM
To: [hidden email]
Subject: Confusion with Dependency Paths

I have a Maven project that was created using Eclipse. The application
is working fine but I am having a problem compiling with 'javac'. I'm
getting the following compile error:

 error: package org.apache.commons.io does not exist

However, the build path contains:

.../repository/commons-io/commons-io/2.5

When I added the dependency I specified:

GroupID: commons-io
Artifact: commons-io
Version: 2.5

That is what is reflected in the pom.xml. I am guessing there is
something wrong with the path but I do not understand where
org.apache.commons-io comes from in the error message. Doesn't that mean
the pom.xml dependency would have to be:

GroupID:org.apache.commons-io
Artifact: commons-io
Version: 2.5

Which it isn't and means a different path then the above and the
explains the error. When I look at the build path in Eclipse the path is
correct. Can someone explain what is going on and how to debug/fix it? TIA.

Reply | Threaded
Open this post in threaded view
|

Re: Confusion with Dependency Paths

Dennis Putnam
Hi Marco,

Thanks for the reply. Here is my pom.xml:

<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/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>KCBSEvents</groupId>
  <artifactId>KCBSEvents</artifactId>
  <version>0.0.1-SNAPSHOT</version>
  <build>
    <sourceDirectory>src</sourceDirectory>
    <resources>
      <resource>
        <directory>src</directory>
        <excludes>
          <exclude>**/*.java</exclude>
        </excludes>
      </resource>
    </resources>
    <plugins>
      <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.7.0</version>
        <configuration>
          <source>1.7</source>
          <target>1.7</target>
        </configuration>
      </plugin>
    </plugins>
  </build>
   <dependencies>
  	<dependency>
  		<groupId>commons-io</groupId>
  		<artifactId>commons-io</artifactId>
  		<version>2.5</version>
  	</dependency>
  	<dependency>
  		<groupId>org.apache.httpcomponents</groupId>
  		<artifactId>httpclient</artifactId>
  		<version>4.5.6</version>
  	</dependency>
  	<dependency>
  		<groupId>org.apache.httpcomponents</groupId>
  		<artifactId>httpcore</artifactId>
  		<version>4.4.10</version>
  	</dependency>
  	<dependency>
  		<groupId>commons-codec</groupId>
  		<artifactId>commons-codec</artifactId>
  		<version>1.10</version>
  	</dependency>
  	<dependency>
  		<groupId>commons-logging</groupId>
  		<artifactId>commons-logging</artifactId>
  		<version>1.2</version>
  	</dependency>
   </dependencies>
</project>

I'm not sure what you mean by the exact error as the part I didn't post was just the source info. FWIW, here is the exact error:

 [javac] /usr/build/src/KCBSEvents/Helpers.java:36: error: package org.apache.commons.io does not exist
    [javac] import org.apache.commons.io.IOUtils;
    [javac]                             ^

I don't think I know what the DependencyManagement section is. I have <dependencies>, isn't that the correct section?

On 2/3/2019 1:59 PM, Marco Schulz wrote:
Hi Dennis

I suppose you use a simple Maven Project configuration. May you added the Dependency manually. Whitout seeing the exact error in the cmd and your pom I guess you added the dependency in the DependencyManagement section. You need to use the Dependencies section.

regards
.marco

Get Outlook for Android<https://aka.ms/ghei36>

________________________________
From: Dennis Putnam [hidden email]
Sent: Sunday, February 3, 2019 7:51:20 PM
To: [hidden email]
Subject: Confusion with Dependency Paths

I have a Maven project that was created using Eclipse. The application
is working fine but I am having a problem compiling with 'javac'. I'm
getting the following compile error:

 error: package org.apache.commons.io does not exist

However, the build path contains:

../repository/commons-io/commons-io/2.5

When I added the dependency I specified:

GroupID: commons-io
Artifact: commons-io
Version: 2.5

That is what is reflected in the pom.xml. I am guessing there is
something wrong with the path but I do not understand where
org.apache.commons-io comes from in the error message. Doesn't that mean
the pom.xml dependency would have to be:

GroupID:org.apache.commons-io
Artifact: commons-io
Version: 2.5

Which it isn't and means a different path then the above and the
explains the error. When I look at the build path in Eclipse the path is
correct. Can someone explain what is going on and how to debug/fix it? TIA.




signature.asc (203 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Confusion with Dependency Paths

Marco Schulz
Hey Dennis

Sorry for the late reply but I was all the day traveling by train and here in Germany the railway companies don't know as well that internet still exist :-)

I checked your pom - you did some semantic mistakes. I am quite sure this file is not generated by eclipse and heavy manually edited.
I attached you a change version. below I explain you a bit the entries.

As first please try to use as beginner the standard maven conventions about directory structures

java files goes to: src/main/java - this passes the compiler
non java files like xml goes to: src/main/resources - maven put everything well together

the output you will find in /target

I hope this helps you.

.regards
.marco

<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/xsd/maven-4.0.0.xsd"><http://maven.apache.org/xsd/maven-4.0.0.xsd>;
    <modelVersion>4.0.0</modelVersion>

    <groupId>KCBSEvents</groupId>
    <artifactId>KCBSEvents</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <!-- project type is missing -->
    <packaging>pom</packaging>

    <build>
        <!-- not a maven standard use the maven project layout - removed-->
        <!-- sourceDirectory>src</sourceDirectory>
        <resources>
            <resource>
                <directory>src</directory>
                <excludes>
                    <exclude>**/*.java</exclude>
                </excludes>
            </resource>
        </resources -->
        <plugins>
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.7.0</version>
                <configuration>
                    <source>1.7</source>
                    <target>1.7</target>
                </configuration>
            </plugin>
        </plugins>
    </build>
    <dependencies>
        <dependency>
            <groupId>commons-io</groupId>
            <artifactId>commons-io</artifactId>
            <version>2.5</version>
        </dependency>
        <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpclient</artifactId>
            <version>4.5.6</version>
        </dependency>
        <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpcore</artifactId>
            <version>4.4.10</version>
        </dependency>
        <dependency>
            <groupId>commons-codec</groupId>
            <artifactId>commons-codec</artifactId>
            <version>1.10</version>
        </dependency>
        <dependency>
            <groupId>commons-logging</groupId>
            <artifactId>commons-logging</artifactId>
            <version>1.2</version>
        </dependency>
    </dependencies>
</project>


On Mon, 2019-02-04 at 08:48 -0500, Dennis Putnam wrote:
Hi Marco,

Thanks for the reply. Here is my pom.xml:


<project xmlns="http://maven.apache.org/POM/4.0.0"<http://maven.apache.org/POM/4.0.0> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"<http://www.w3.org/2001/XMLSchema-instance> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"<http://maven.apache.org/POM/4.0.0http://maven.apache.org/xsd/maven-4.0.0.xsd>>

  <modelVersion>4.0.0</modelVersion>

  <groupId>KCBSEvents</groupId>

  <artifactId>KCBSEvents</artifactId>

  <version>0.0.1-SNAPSHOT</version>

  <build>

    <sourceDirectory>src</sourceDirectory>

    <resources>

      <resource>

        <directory>src</directory>

        <excludes>

          <exclude>**/*.java</exclude>

        </excludes>

      </resource>

    </resources>

    <plugins>

      <plugin>

        <artifactId>maven-compiler-plugin</artifactId>

        <version>3.7.0</version>

        <configuration>

          <source>1.7</source>

          <target>1.7</target>

        </configuration>

      </plugin>

    </plugins>

  </build>

   <dependencies>

        <dependency>

                <groupId>commons-io</groupId>

                <artifactId>commons-io</artifactId>

                <version>2.5</version>

        </dependency>

        <dependency>

                <groupId>org.apache.httpcomponents</groupId>

                <artifactId>httpclient</artifactId>

                <version>4.5.6</version>

        </dependency>

        <dependency>

                <groupId>org.apache.httpcomponents</groupId>

                <artifactId>httpcore</artifactId>

                <version>4.4.10</version>

        </dependency>

        <dependency>

                <groupId>commons-codec</groupId>

                <artifactId>commons-codec</artifactId>

                <version>1.10</version>

        </dependency>

        <dependency>

                <groupId>commons-logging</groupId>

                <artifactId>commons-logging</artifactId>

                <version>1.2</version>

        </dependency>

   </dependencies>

</project>



I'm not sure what you mean by the exact error as the part I didn't post was just the source info. FWIW, here is the exact error:

 [javac] /usr/build/src/KCBSEvents/Helpers.java:36: error: package org.apache.commons.io does not exist
    [javac] import org.apache.commons.io.IOUtils;
    [javac]                             ^


I don't think I know what the DependencyManagement section is. I have <dependencies>, isn't that the correct section?


On 2/3/2019 1:59 PM, Marco Schulz wrote:

Hi Dennis


I suppose you use a simple Maven Project configuration. May you added the Dependency manually. Whitout seeing the exact error in the cmd and your pom I guess you added the dependency in the DependencyManagement section. You need to use the Dependencies section.


regards

.marco


Get Outlook for Android<https://aka.ms/ghei36><https://aka.ms/ghei36>


________________________________

From: Dennis Putnam <[hidden email]><mailto:[hidden email]>

Sent: Sunday, February 3, 2019 7:51:20 PM

To: [hidden email]<mailto:[hidden email]>

Subject: Confusion with Dependency Paths


I have a Maven project that was created using Eclipse. The application

is working fine but I am having a problem compiling with 'javac'. I'm

getting the following compile error:


 error: package org.apache.commons.io does not exist


However, the build path contains:


../repository/commons-io/commons-io/2.5


When I added the dependency I specified:


GroupID: commons-io

Artifact: commons-io

Version: 2.5


That is what is reflected in the pom.xml. I am guessing there is

something wrong with the path but I do not understand where

org.apache.commons-io comes from in the error message. Doesn't that mean

the pom.xml dependency would have to be:


GroupID:org.apache.commons-io

Artifact: commons-io

Version: 2.5


Which it isn't and means a different path then the above and the

explains the error. When I look at the build path in Eclipse the path is

correct. Can someone explain what is going on and how to debug/fix it? TIA.






--

_________________________________________________________________________
 Dipl. Inf. Marco Schulz (MSc)

                  Expert for (WEB) Enterprise Applications
                           - worldwide -
      + Project Manager + Consultant + Writer + Speaker + Trainer +

(Contact)
WhatsApp : 0052 (1) 221 200 61 37
Movil    : 0049 (0) 169 6918445
E-Mail   : [hidden email]<mailto:[hidden email]>
Blog     : http://enRebaja.wordpress.com

Services:
    + Build- & Configuration Management
    + Release Management
    + Business Analysis
    + Software Architecture
    + Process Automation

This message is intended only for the use of the individual or entity to
which it is addressed, and may contain information that is privileged,
confidential and that may not be made public by law or agreement. If you
are not the intended recipient or entity, you are hereby notified that
any further dissemination, distribution or copying of this information is
strictly prohibited.
If you have received this communication in error, please contact us
immediately and delete the message from your system.
Reply | Threaded
Open this post in threaded view
|

Re: Confusion with Dependency Paths

Bernd Eckenfels
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
--
http://bernd.eckenfels.net

Von: Marco Schulz
Gesendet: Montag, 4. Februar 2019 21:40
An: [hidden email]
Betreff: Re: Confusion with Dependency Paths

Hey Dennis

Sorry for the late reply but I was all the day traveling by train and here in Germany the railway companies don't know as well that internet still exist :-)

I checked your pom - you did some semantic mistakes. I am quite sure this file is not generated by eclipse and heavy manually edited.
I attached you a change version. below I explain you a bit the entries.

As first please try to use as beginner the standard maven conventions about directory structures

java files goes to: src/main/java - this passes the compiler
non java files like xml goes to: src/main/resources - maven put everything well together

the output you will find in /target

I hope this helps you.

.regards
.marco

<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/xsd/maven-4.0.0.xsd"><http://maven.apache.org/xsd/maven-4.0.0.xsd>;
    <modelVersion>4.0.0</modelVersion>

    <groupId>KCBSEvents</groupId>
    <artifactId>KCBSEvents</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <!-- project type is missing -->
    <packaging>pom</packaging>

    <build>
        <!-- not a maven standard use the maven project layout - removed-->
        <!-- sourceDirectory>src</sourceDirectory>
        <resources>
            <resource>
                <directory>src</directory>
                <excludes>
                    <exclude>**/*.java</exclude>
                </excludes>
            </resource>
        </resources -->
        <plugins>
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.7.0</version>
                <configuration>
                    <source>1.7</source>
                    <target>1.7</target>
                </configuration>
            </plugin>
        </plugins>
    </build>
    <dependencies>
        <dependency>
            <groupId>commons-io</groupId>
            <artifactId>commons-io</artifactId>
            <version>2.5</version>
        </dependency>
        <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpclient</artifactId>
            <version>4.5.6</version>
        </dependency>
        <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpcore</artifactId>
            <version>4.4.10</version>
        </dependency>
        <dependency>
            <groupId>commons-codec</groupId>
            <artifactId>commons-codec</artifactId>
            <version>1.10</version>
        </dependency>
        <dependency>
            <groupId>commons-logging</groupId>
            <artifactId>commons-logging</artifactId>
            <version>1.2</version>
        </dependency>
    </dependencies>
</project>


On Mon, 2019-02-04 at 08:48 -0500, Dennis Putnam wrote:
Hi Marco,

Thanks for the reply. Here is my pom.xml:


<project xmlns="http://maven.apache.org/POM/4.0.0"<http://maven.apache.org/POM/4.0.0> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"<http://www.w3.org/2001/XMLSchema-instance> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"<http://maven.apache.org/POM/4.0.0http://maven.apache.org/xsd/maven-4.0.0.xsd>>

  <modelVersion>4.0.0</modelVersion>

  <groupId>KCBSEvents</groupId>

  <artifactId>KCBSEvents</artifactId>

  <version>0.0.1-SNAPSHOT</version>

  <build>

    <sourceDirectory>src</sourceDirectory>

    <resources>

      <resource>

        <directory>src</directory>

        <excludes>

          <exclude>**/*.java</exclude>

        </excludes>

      </resource>

    </resources>

    <plugins>

      <plugin>

        <artifactId>maven-compiler-plugin</artifactId>

        <version>3.7.0</version>

        <configuration>

          <source>1.7</source>

          <target>1.7</target>

        </configuration>

      </plugin>

    </plugins>

  </build>

   <dependencies>

        <dependency>

                <groupId>commons-io</groupId>

                <artifactId>commons-io</artifactId>

                <version>2.5</version>

        </dependency>

        <dependency>

                <groupId>org.apache.httpcomponents</groupId>

                <artifactId>httpclient</artifactId>

                <version>4.5.6</version>

        </dependency>

        <dependency>

                <groupId>org.apache.httpcomponents</groupId>

                <artifactId>httpcore</artifactId>

                <version>4.4.10</version>

        </dependency>

        <dependency>

                <groupId>commons-codec</groupId>

                <artifactId>commons-codec</artifactId>

                <version>1.10</version>

        </dependency>

        <dependency>

                <groupId>commons-logging</groupId>

                <artifactId>commons-logging</artifactId>

                <version>1.2</version>

        </dependency>

   </dependencies>

</project>



I'm not sure what you mean by the exact error as the part I didn't post was just the source info. FWIW, here is the exact error:

 [javac] /usr/build/src/KCBSEvents/Helpers.java:36: error: package org.apache.commons.io does not exist
    [javac] import org.apache.commons.io.IOUtils;
    [javac]                             ^


I don't think I know what the DependencyManagement section is. I have <dependencies>, isn't that the correct section?


On 2/3/2019 1:59 PM, Marco Schulz wrote:

Hi Dennis


I suppose you use a simple Maven Project configuration. May you added the Dependency manually. Whitout seeing the exact error in the cmd and your pom I guess you added the dependency in the DependencyManagement section. You need to use the Dependencies section.


regards

.marco


Get Outlook for Android<https://aka.ms/ghei36><https://aka.ms/ghei36>


________________________________

From: Dennis Putnam <[hidden email]><mailto:[hidden email]>

Sent: Sunday, February 3, 2019 7:51:20 PM

To: [hidden email]<mailto:[hidden email]>

Subject: Confusion with Dependency Paths


I have a Maven project that was created using Eclipse. The application

is working fine but I am having a problem compiling with 'javac'. I'm

getting the following compile error:


 error: package org.apache.commons.io does not exist


However, the build path contains:


../repository/commons-io/commons-io/2.5


When I added the dependency I specified:


GroupID: commons-io

Artifact: commons-io

Version: 2.5


That is what is reflected in the pom.xml. I am guessing there is

something wrong with the path but I do not understand where

org.apache.commons-io comes from in the error message. Doesn't that mean

the pom.xml dependency would have to be:


GroupID:org.apache.commons-io

Artifact: commons-io

Version: 2.5


Which it isn't and means a different path then the above and the

explains the error. When I look at the build path in Eclipse the path is

correct. Can someone explain what is going on and how to debug/fix it? TIA.






--

_________________________________________________________________________
 Dipl. Inf. Marco Schulz (MSc)

                  Expert for (WEB) Enterprise Applications
                           - worldwide -
      + Project Manager + Consultant + Writer + Speaker + Trainer +

(Contact)
WhatsApp : 0052 (1) 221 200 61 37
Movil    : 0049 (0) 169 6918445
E-Mail   : [hidden email]<mailto:[hidden email]>
Blog     : http://enRebaja.wordpress.com

Services:
    + Build- & Configuration Management
    + Release Management
    + Business Analysis
    + Software Architecture
    + Process Automation

This message is intended only for the use of the individual or entity to
which it is addressed, and may contain information that is privileged,
confidential and that may not be made public by law or agreement. If you
are not the intended recipient or entity, you are hereby notified that
any further dissemination, distribution or copying of this information is
strictly prohibited.
If you have received this communication in error, please contact us
immediately and delete the message from your system.

Reply | Threaded
Open this post in threaded view
|

Re: Confusion with Dependency Paths

Dennis Putnam
In reply to this post by Marco Schulz
Hi Marco,

No apology necessary. You are helping me and that is appreciated in any
form or time. Indeed that pom file was created by Eclipse. While I
understand XML, I have very little understanding of what is needed in
the pom file so I don't mess with it. I'll give your changes a try and
let you know. Thanks again.

On 2/4/2019 3:40 PM, Marco Schulz wrote:

> Hey Dennis
>
> Sorry for the late reply but I was all the day traveling by train and here in Germany the railway companies don't know as well that internet still exist :-)
>
> I checked your pom - you did some semantic mistakes. I am quite sure this file is not generated by eclipse and heavy manually edited.
> I attached you a change version. below I explain you a bit the entries.
>
> As first please try to use as beginner the standard maven conventions about directory structures
>
> java files goes to: src/main/java - this passes the compiler
> non java files like xml goes to: src/main/resources - maven put everything well together
>
> the output you will find in /target
>
> I hope this helps you.
>
> .regards
> .marco
>
> <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/xsd/maven-4.0.0.xsd"><http://maven.apache.org/xsd/maven-4.0.0.xsd>;
>     <modelVersion>4.0.0</modelVersion>
>
>     <groupId>KCBSEvents</groupId>
>     <artifactId>KCBSEvents</artifactId>
>     <version>0.0.1-SNAPSHOT</version>
>     <!-- project type is missing -->
>     <packaging>pom</packaging>
>
>     <build>
>         <!-- not a maven standard use the maven project layout - removed-->
>         <!-- sourceDirectory>src</sourceDirectory>
>         <resources>
>             <resource>
>                 <directory>src</directory>
>                 <excludes>
>                     <exclude>**/*.java</exclude>
>                 </excludes>
>             </resource>
>         </resources -->
>         <plugins>
>             <plugin>
>                 <artifactId>maven-compiler-plugin</artifactId>
>                 <version>3.7.0</version>
>                 <configuration>
>                     <source>1.7</source>
>                     <target>1.7</target>
>                 </configuration>
>             </plugin>
>         </plugins>
>     </build>
>     <dependencies>
>         <dependency>
>             <groupId>commons-io</groupId>
>             <artifactId>commons-io</artifactId>
>             <version>2.5</version>
>         </dependency>
>         <dependency>
>             <groupId>org.apache.httpcomponents</groupId>
>             <artifactId>httpclient</artifactId>
>             <version>4.5.6</version>
>         </dependency>
>         <dependency>
>             <groupId>org.apache.httpcomponents</groupId>
>             <artifactId>httpcore</artifactId>
>             <version>4.4.10</version>
>         </dependency>
>         <dependency>
>             <groupId>commons-codec</groupId>
>             <artifactId>commons-codec</artifactId>
>             <version>1.10</version>
>         </dependency>
>         <dependency>
>             <groupId>commons-logging</groupId>
>             <artifactId>commons-logging</artifactId>
>             <version>1.2</version>
>         </dependency>
>     </dependencies>
> </project>
>
>
> On Mon, 2019-02-04 at 08:48 -0500, Dennis Putnam wrote:
> Hi Marco,
>
> Thanks for the reply. Here is my pom.xml:
>
>
> <project xmlns="http://maven.apache.org/POM/4.0.0"<http://maven.apache.org/POM/4.0.0> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"<http://www.w3.org/2001/XMLSchema-instance> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"<http://maven.apache.org/POM/4.0.0http://maven.apache.org/xsd/maven-4.0.0.xsd>>
>
>   <modelVersion>4.0.0</modelVersion>
>
>   <groupId>KCBSEvents</groupId>
>
>   <artifactId>KCBSEvents</artifactId>
>
>   <version>0.0.1-SNAPSHOT</version>
>

>   <build>
>
>     <sourceDirectory>src</sourceDirectory>
>
>     <resources>
>
>       <resource>
>
>         <directory>src</directory>
>
>         <excludes>
>
>           <exclude>**/*.java</exclude>
>
>         </excludes>
>
>       </resource>
>
>     </resources>
>
>     <plugins>
>
>       <plugin>
>
>         <artifactId>maven-compiler-plugin</artifactId>
>
>         <version>3.7.0</version>
>
>         <configuration>
>
>           <source>1.7</source>
>
>           <target>1.7</target>
>
>         </configuration>
>
>       </plugin>
>
>     </plugins>
>
>   </build>
>
>    <dependencies>
>
>         <dependency>
>
>                 <groupId>commons-io</groupId>
>
>                 <artifactId>commons-io</artifactId>
>
>                 <version>2.5</version>
>
>         </dependency>
>
>         <dependency>
>
>                 <groupId>org.apache.httpcomponents</groupId>
>
>                 <artifactId>httpclient</artifactId>
>
>                 <version>4.5.6</version>
>
>         </dependency>
>
>         <dependency>
>
>                 <groupId>org.apache.httpcomponents</groupId>
>
>                 <artifactId>httpcore</artifactId>
>
>                 <version>4.4.10</version>
>
>         </dependency>
>
>         <dependency>
>
>                 <groupId>commons-codec</groupId>
>
>                 <artifactId>commons-codec</artifactId>
>
>                 <version>1.10</version>
>
>         </dependency>
>
>         <dependency>
>
>                 <groupId>commons-logging</groupId>
>
>                 <artifactId>commons-logging</artifactId>
>
>                 <version>1.2</version>
>
>         </dependency>
>
>    </dependencies>
>
> </project>
>
>
>
> I'm not sure what you mean by the exact error as the part I didn't post was just the source info. FWIW, here is the exact error:
>
>  [javac] /usr/build/src/KCBSEvents/Helpers.java:36: error: package org.apache.commons.io does not exist
>     [javac] import org.apache.commons.io.IOUtils;
>     [javac]                             ^
>
>
> I don't think I know what the DependencyManagement section is. I have <dependencies>, isn't that the correct section?
>
>
> On 2/3/2019 1:59 PM, Marco Schulz wrote:
>
> Hi Dennis
>
>
> I suppose you use a simple Maven Project configuration. May you added the Dependency manually. Whitout seeing the exact error in the cmd and your pom I guess you added the dependency in the DependencyManagement section. You need to use the Dependencies section.
>
>
> regards
>
> .marco
>
>
> Get Outlook for Android<https://aka.ms/ghei36><https://aka.ms/ghei36>
>
>
> ________________________________
>
> From: Dennis Putnam <[hidden email]><mailto:[hidden email]>
>
> Sent: Sunday, February 3, 2019 7:51:20 PM
>
> To: [hidden email]<mailto:[hidden email]>
>
> Subject: Confusion with Dependency Paths
>
>
> I have a Maven project that was created using Eclipse. The application
>
> is working fine but I am having a problem compiling with 'javac'. I'm
>
> getting the following compile error:
>
>
>  error: package org.apache.commons.io does not exist
>
>
> However, the build path contains:
>
>
> ../repository/commons-io/commons-io/2.5
>
>
> When I added the dependency I specified:
>
>
> GroupID: commons-io
>
> Artifact: commons-io
>
> Version: 2.5
>
>
> That is what is reflected in the pom.xml. I am guessing there is
>
> something wrong with the path but I do not understand where
>
> org.apache.commons-io comes from in the error message. Doesn't that mean
>
> the pom.xml dependency would have to be:
>
>
> GroupID:org.apache.commons-io
>
> Artifact: commons-io
>
> Version: 2.5
>
>
> Which it isn't and means a different path then the above and the
>
> explains the error. When I look at the build path in Eclipse the path is
>
> correct. Can someone explain what is going on and how to debug/fix it? TIA.
>
>
>
>
>
>
> --
>
> _________________________________________________________________________
>  Dipl. Inf. Marco Schulz (MSc)
>
>                   Expert for (WEB) Enterprise Applications
>                            - worldwide -
>       + Project Manager + Consultant + Writer + Speaker + Trainer +
>
> (Contact)
> WhatsApp : 0052 (1) 221 200 61 37
> Movil    : 0049 (0) 169 6918445
> E-Mail   : [hidden email]<mailto:[hidden email]>
> Blog     : http://enRebaja.wordpress.com
>
> Services:
>     + Build- & Configuration Management
>     + Release Management
>     + Business Analysis
>     + Software Architecture
>     + Process Automation
>
> This message is intended only for the use of the individual or entity to
> which it is addressed, and may contain information that is privileged,
> confidential and that may not be made public by law or agreement. If you
> are not the intended recipient or entity, you are hereby notified that
> any further dissemination, distribution or copying of this information is
> strictly prohibited.
> If you have received this communication in error, please contact us
> immediately and delete the message from your system.


signature.asc (203 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Confusion with Dependency Paths

Dennis Putnam
In reply to this post by Bernd Eckenfels
Hi Bernd,

This is problematic. This is also a git project. Moving the directory
structure around may have unintended consequences. I'm not sure what to
do at this point.

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



signature.asc (203 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Confusion with Dependency Paths

Dennis Putnam
In reply to this post by Bernd Eckenfels
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


Screenshot at 2019-02-05 08-19-49.png (124K) Download Attachment
signature.asc (203 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Confusion with Dependency Paths

Mikael Åsberg
If you have a maven project you compile using maven, you don't use javac

On Tue, Feb 5, 2019, 14:25 Dennis Putnam <[hidden email] 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
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Confusion with Dependency Paths

Dennis Putnam
Hi Mikael,

I've been down this road before. This is ultimately compiled using Ant.
I have never been able to get it to work using Maven. It has been
working in the past but I ran into a problem with a git update and since
then I've had this problem. There has to be something that is messed up
with wherever javac gets the path information from for the Maven
dependencies.

On 2/5/2019 8:27 AM, Mikael Åsberg wrote:

> If you have a maven project you compile using maven, you don't use javac
>
> On Tue, Feb 5, 2019, 14:25 Dennis Putnam <[hidden email] 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
>>


signature.asc (203 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Confusion with Dependency Paths

Mikael Åsberg
Well, you need to make up your mind what you want to use...ant or
maven. If you want to use maven you need to structure your project
according to the rules of Maven. I suggest Maven (over ant), which is
supported by all major IDEs. So you specify your dependencies in the
pom file once and for all, and you can build the project in the IDE or
from the command line without additional tinkering.

On Tue, Feb 5, 2019 at 3:14 PM Dennis Putnam <[hidden email]> wrote:

>
> Hi Mikael,
>
> I've been down this road before. This is ultimately compiled using Ant.
> I have never been able to get it to work using Maven. It has been
> working in the past but I ran into a problem with a git update and since
> then I've had this problem. There has to be something that is messed up
> with wherever javac gets the path information from for the Maven
> dependencies.
>
> On 2/5/2019 8:27 AM, Mikael Åsberg wrote:
> > If you have a maven project you compile using maven, you don't use javac
> >
> > On Tue, Feb 5, 2019, 14:25 Dennis Putnam <[hidden email] 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
> >>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Confusion with Dependency Paths

Dennis Putnam
Hi Mikael,

I am using Ant. Others have tried to get me to switch to Maven but as I
said I could never get it to work. The problem is that the project was
not Maven to begin with but I had to change it in Eclipse because the
app needs iTextPDF and Maven was the only way to get it.

On 2/5/2019 9:33 AM, Mikael Åsberg wrote:

> Well, you need to make up your mind what you want to use...ant or
> maven. If you want to use maven you need to structure your project
> according to the rules of Maven. I suggest Maven (over ant), which is
> supported by all major IDEs. So you specify your dependencies in the
> pom file once and for all, and you can build the project in the IDE or
> from the command line without additional tinkering.
>
> On Tue, Feb 5, 2019 at 3:14 PM Dennis Putnam <[hidden email]> wrote:
>> Hi Mikael,
>>
>> I've been down this road before. This is ultimately compiled using Ant.
>> I have never been able to get it to work using Maven. It has been
>> working in the past but I ran into a problem with a git update and since
>> then I've had this problem. There has to be something that is messed up
>> with wherever javac gets the path information from for the Maven
>> dependencies.
>>
>> On 2/5/2019 8:27 AM, Mikael Åsberg wrote:
>>> If you have a maven project you compile using maven, you don't use javac
>>>
>>> On Tue, Feb 5, 2019, 14:25 Dennis Putnam <[hidden email] 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
>>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>


signature.asc (203 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Confusion with Dependency Paths

Mikael Åsberg
Hi Dennis, maybe you should start with something from scratch then so
you learn step by step.

Create a pom manually, don't rely on Eclipse to generate things. You
need to specify a groupId, an artifactId, and a version. It could be
called mavenexample:mavenexample:1.0 (groupId:artifactId:version). You
should also set properties maven.compiler.source and
maven.compiler.target. Set to 1.8 if you are using Java 8. Finally,
set packaging to jar.

Now you have the basics of a pom file. Main sources go in
src/main/java. You could create a folder there called mavenexample and
place a class MavenExample.java inside it. Package name would be
mavenexample. Create a very simple public class. Doesn't have to have
a main method. Maybe with a single method sayHello() which returns
"Hello". It should not need any 3rd party jars to compile. When you
have that you can test to build it using "mvn clean install". Maven
uses the environment variable JAVA_HOME to find the JDK so make sure
that is set.

When it builds successfully it's time to add a dependency. Add
com.google.guava:guava:20.0 as dependency and try to use it in your
MavenExample.java class. When that works you know a lot of the basics.
Or any other dependency you are familiar with.

Finally, write a Junit test. Then you need to depend on the
junit-library. Test sources go into src/test/java. A junit test class
for mavenexample/MavenExample would be
mavenexample/MavenExampleTest.java (but under src/test/java instead of
src/main/java). Test classes typically go into the same package as the
class under test, so package-private things become visible to it.

If you can do the points above, you have understood the basics and
have tools to help you migrate a bigger project. Good luck!

On Tue, Feb 5, 2019 at 5:08 PM Dennis Putnam <[hidden email]> wrote:

>
> Hi Mikael,
>
> I am using Ant. Others have tried to get me to switch to Maven but as I
> said I could never get it to work. The problem is that the project was
> not Maven to begin with but I had to change it in Eclipse because the
> app needs iTextPDF and Maven was the only way to get it.
>
> On 2/5/2019 9:33 AM, Mikael Åsberg wrote:
> > Well, you need to make up your mind what you want to use...ant or
> > maven. If you want to use maven you need to structure your project
> > according to the rules of Maven. I suggest Maven (over ant), which is
> > supported by all major IDEs. So you specify your dependencies in the
> > pom file once and for all, and you can build the project in the IDE or
> > from the command line without additional tinkering.
> >
> > On Tue, Feb 5, 2019 at 3:14 PM Dennis Putnam <[hidden email]> wrote:
> >> Hi Mikael,
> >>
> >> I've been down this road before. This is ultimately compiled using Ant.
> >> I have never been able to get it to work using Maven. It has been
> >> working in the past but I ran into a problem with a git update and since
> >> then I've had this problem. There has to be something that is messed up
> >> with wherever javac gets the path information from for the Maven
> >> dependencies.
> >>
> >> On 2/5/2019 8:27 AM, Mikael Åsberg wrote:
> >>> If you have a maven project you compile using maven, you don't use javac
> >>>
> >>> On Tue, Feb 5, 2019, 14:25 Dennis Putnam <[hidden email] 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
> >>
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [hidden email]
> > For additional commands, e-mail: [hidden email]
> >
> >
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]