prestodb / presto

The official home of the Presto distributed SQL query engine for big data
http://prestodb.io
Apache License 2.0
16.07k stars 5.38k forks source link

maven install failed because [Unused declared dependencies found] #13308

Open mahengyang opened 5 years ago

mahengyang commented 5 years ago

OS: MAC maven version: Apache Maven 3.6.1 commit: ecba9cfb52 presto version: 0.220

[INFO] --- maven-dependency-plugin:3.1.1:analyze-only (default) @ presto-accumulo ---
[WARNING] Unused declared dependencies found:
[WARNING]    commons-io:commons-io:jar:2.4:compile

...
[INFO] presto-accumulo .................................... FAILURE [  7.036 s]
...

[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  03:54 min
[INFO] Finished at: 2019-08-29T13:21:30+08:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-dependency-plugin:3.1.1:analyze-only (default) on project presto-accumulo: Dependency problems found -> [Help 1]
[ERROR]
[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]
[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/MojoExecutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <goals> -rf :presto-accumulo

remove commons-io:commons-io:jar:2.4:compile in presto-accumulo, then compile paas, other submodule has the same problem, how to skip analyze-only? I had try add ignore in root pom.xml

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-dependency-plugin</artifactId>
    <version>3.1.1</version>
    <executions>
        <execution>
            <id>analyze</id>
            <goals>
                <goal>analyze-only</goal>
            </goals>
            <configuration>
                <ignoredUnusedDeclaredDependencies>
                    <ignoredUnusedDeclaredDependency>com.fasterxml.*</ignoredUnusedDeclaredDependency>
                    <ignoredUnusedDeclaredDependency>io.airlift.*</ignoredUnusedDeclaredDependency>
                </ignoredUnusedDeclaredDependencies>
            </configuration>
        </execution>
    </executions>
</plugin>

but seems no effact

sudhanshuptl commented 5 years ago

Hey, I have the same issue, does someone have any solution for this ?

mnikogit commented 3 years ago

same problem ~

AbnerSunyh commented 2 years ago

you can set air.check.skip-dependency=true to ignore it.

mvn -Dair.check.skip-dependency=true ...

rguillome commented 2 years ago

same appears today.

after a new mvn clean install disappears...