With maven, add a dependency to pom and download it?

ab11

This is a really simple question, but I searched for a resolution and nothing is working for me. I added the below to my pom.xml, but can't import org.apache.commons.csv.CSVParser in my class. When I run mvn install, I get the below output.

<dependencies> 
      ....

    <dependency>
        <groupId>org.apache.commons</groupId>
        <artifactId>commons-csv</artifactId>
        <version>1.1.1-SNAPSHOT</version>
    </dependency>

    ....
 </dependencies>

D:\java\my_project>mvn install    
[INFO] Scanning for projects...    
[INFO] Building my_project 1.0-SNAPSHOT

[WARNING] The POM for org.apache.commons:commons-csv:jar:1.1.1-SNAPSHOT is missing, no dependency information available

[INFO] BUILD FAILURE    

[INFO] Total time: 0.644 s    
[INFO] Finished at: 2015-07-21T08:46:47-04:00    
[INFO] Final Memory: 8M/245M    

[ERROR] Failed to execute goal on project my_project: Could not resolve depen dencies for project com.myproject:artifact:jar:1.0-SNAPSHOT: Could not find artifact org.apache.commons:commons-csv:jar:1.1.1-SNAPSHOT -> [Help 1]  
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.    
[ERROR] Re-run Maven using the -X switch to enable full debug logging.   
[ERROR] For more information about the errors and possible solutions, please read the following articles:    
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException nException
Astrogat

Why are you using the snapshot? The snapshot version is a alpha/beta version, which might be unstable. It's also not uploaded to the standard Maven repo, so you would need to do some extra work to use it. If you use 1.1 it should work.

<dependency>
    <groupId>org.apache.commons</groupId>
    <artifactId>commons-csv</artifactId>
    <version>1.1</version>
</dependency>

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Unable to add Maven Dependency in pom.xml for ojdbc14

From Dev

Maven pulling in dependency that is not specified in POM

From Dev

Maven dependency tree and pom dependencies

From Dev

How to add\install to maven dependency of newly created\third party jar in pom.xml

From Dev

Add a module dependency in Maven

From Dev

Maven dependency version notation in pom files

From Dev

maven plugin dependency scope in pom.xml

From Dev

JDBC Maven Dependency in pom.xml

From Dev

Nexus / Maven - The POM for ... is missing, no dependency information available

From Dev

Dependency version in maven pom.xml

From Dev

Dependency version in maven pom.xml

From Dev

How to exclude the parent pom dependency inside inherited child dependency for Maven?

From Dev

how to add jar dependency in maven?

From Dev

Dynamically add a new maven dependency?

From Dev

Java, IntelliJ, download dependency with Maven (and LanguagetTool)

From Dev

New maven dependency version pulling pom, not jar into private nexus repo?

From Dev

Maven: Show dependency tree for specific artifact without adding it to pom

From Dev

maven- not downloading new added dependency in pom.xml file

From Dev

"The POM for ... is missing, no dependency information available" even though it exists in Maven Repository

From Dev

Is there a way to create maven dependency in pom file from a local jar

From Dev

How to resolve the path to an artifact in a maven pom without being a project dependency?

From Dev

Maven pom.xml missing dependency error: artifacts could not be resolved

From Dev

add build tasks to maven pom project

From Dev

Trying to add plugin in pom.xml in maven

From Dev

Maven: Command line to download the dependencies described in the pom.xml

From Dev

Add feed4j dependency in pom.xml

From Dev

Add Maven nature to existing Eclipse project that has pom but no Maven submenu

From Dev

Can I resolve one Maven dependency from one repo and another dependency from second repo in same POM?

From Dev

Can I resolve one Maven dependency from one repo and another dependency from second repo in same POM?

Related Related

  1. 1

    Unable to add Maven Dependency in pom.xml for ojdbc14

  2. 2

    Maven pulling in dependency that is not specified in POM

  3. 3

    Maven dependency tree and pom dependencies

  4. 4

    How to add\install to maven dependency of newly created\third party jar in pom.xml

  5. 5

    Add a module dependency in Maven

  6. 6

    Maven dependency version notation in pom files

  7. 7

    maven plugin dependency scope in pom.xml

  8. 8

    JDBC Maven Dependency in pom.xml

  9. 9

    Nexus / Maven - The POM for ... is missing, no dependency information available

  10. 10

    Dependency version in maven pom.xml

  11. 11

    Dependency version in maven pom.xml

  12. 12

    How to exclude the parent pom dependency inside inherited child dependency for Maven?

  13. 13

    how to add jar dependency in maven?

  14. 14

    Dynamically add a new maven dependency?

  15. 15

    Java, IntelliJ, download dependency with Maven (and LanguagetTool)

  16. 16

    New maven dependency version pulling pom, not jar into private nexus repo?

  17. 17

    Maven: Show dependency tree for specific artifact without adding it to pom

  18. 18

    maven- not downloading new added dependency in pom.xml file

  19. 19

    "The POM for ... is missing, no dependency information available" even though it exists in Maven Repository

  20. 20

    Is there a way to create maven dependency in pom file from a local jar

  21. 21

    How to resolve the path to an artifact in a maven pom without being a project dependency?

  22. 22

    Maven pom.xml missing dependency error: artifacts could not be resolved

  23. 23

    add build tasks to maven pom project

  24. 24

    Trying to add plugin in pom.xml in maven

  25. 25

    Maven: Command line to download the dependencies described in the pom.xml

  26. 26

    Add feed4j dependency in pom.xml

  27. 27

    Add Maven nature to existing Eclipse project that has pom but no Maven submenu

  28. 28

    Can I resolve one Maven dependency from one repo and another dependency from second repo in same POM?

  29. 29

    Can I resolve one Maven dependency from one repo and another dependency from second repo in same POM?

HotTag

Archive