how to add org.apache.commons.io.FilenameUtils to maven in intellij?

54,214

Solution 1

If you are asking for how to specify the dependency on Commons-IO in the pom.xml:

    <dependency>
        <groupId>commons-io</groupId>
        <artifactId>commons-io</artifactId>
        <version>2.1</version>
    </dependency>

Solution 2

You need to add commons-io to your dependencies.

Here you can find snippets and choose version you need.

Solution 3

Insert the above dependency in your pom.xml and update the maven project. The maven will download the required jar from the maven central repository.

<dependency>
        <groupId>commons-io</groupId>
        <artifactId>commons-io</artifactId>
        <version>2.1</version>
</dependency>
Share:
54,214
itro
Author by

itro

I do software .

Updated on November 13, 2020

Comments

  • itro
    itro over 3 years

    I should add org.apache.commons.io.FilenameUtils; to intellij 10. how can i add it to maven and use it in the code.I need to be able to use FilenameUtils in my code. i have already this : org.apache.commons in maven.

    import org.apache.commons.io.FilenameUtils;
    
  • itro
    itro over 12 years
    this one exsist in my pom. <dependency> <groupId>org.apache.commons</groupId> <artifactId>commons-parent</artifactId> <version>14</version> </dependency>
  • alhelal
    alhelal over 6 years
    whats wrong in my project? why apache is red colored in import org.apache. ... see this
  • Xenos
    Xenos about 5 years
    Any reason why groupId is artifactId instead of org.apache.commons or so?!