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 <[email protected]><mailto:[email protected]> > > Sent: Sunday, February 3, 2019 7:51:20 PM > > To: [email protected]<mailto:[email protected]> > > 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 : [email protected]<mailto:[email protected]> > 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
Description: OpenPGP digital signature
