Base64.encodeBase64String not found

2019-07-18 11:03发布

问题:

I'm having problems when trying to compile my Jira plugin (executing atlas-run).

The build fails with this error:

cannot find symbol symbol : method encodeBase64String(byte[]) location: class org.apache.commons.codec.binary.Base64

it seems like the build is trying to use commons-codec 1.3 jar instead of 1.4+

from my IDE (jIDEA) I've changed the library path from 1.3 to 1.6.jar (because it wasn't recognizing the encodeBase64String method either).

I also tried adding this dependency to my pom.xml:

<dependency>
            <groupId>commons-codec</groupId>
            <artifactId>commons-codec</artifactId>
            <version>1.6</version>
            <scope>provided</scope>
        </dependency>

But atlas-run stills failing.

Does somebody know how to fix this?

Thanks !!

回答1:

A bit late, but downloading commons-codec-1.10-rep.jar and adding it as a library fixes the problem.