org.apache.maven.plugins:即使在eclipse中有一个maven插件,也缺少maven-compiler-plugin

时间:2017-09-27 11:38:47

标签: java eclipse maven

我已经从adhaar site下载了一个示例代码,我已成功导入该代码,dependencies位于pom.xml 当我发现以下错误 -

[INFO] Scanning for projects...
[WARNING] 
[WARNING] Some problems were encountered while building the effective model for in.gov.uidai:uidai-biometric-integration-api:jar:1.6
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @ line 46, column 12
[WARNING] 
[WARNING] Some problems were encountered while building the effective model for in.gov.uidai:uidai-auth-xsd-model:jar:1.6
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @ line 52, column 12
[WARNING] 'build.plugins.plugin.version' for org.codehaus.mojo:jaxb2-maven-plugin is missing. @ line 37, column 12
[WARNING] 
[WARNING] Some problems were encountered while building the effective model for in.gov.uidai:uidai-auth-client:jar:1.6
[WARNING] 'dependencies.dependency.(groupId:artifactId:type:classifier)' must be unique: bouncycastle:bcprov-jdk16:jar -> duplicate declaration of version 140 @ line 67, column 15
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @ line 94, column 12
[WARNING] 
[WARNING] Some problems were encountered while building the effective model for in.gov.uidai:uidai-sample-gui-app:jar:1.6
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @ line 83, column 12
[WARNING] 
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING] 
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING] 
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO] 
[INFO] Biometric Integration API
[INFO] Authentication XSD Model
[INFO] UID Protobuf Model
[INFO] Authentication Client Library
[INFO] Aadhaar Authentication - Sample GUI
[INFO] Aadhaar Authentication Reference Sample Application
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] 
[INFO] Biometric Integration API .......................... SKIPPED
[INFO] Authentication XSD Model ........................... SKIPPED
[INFO] UID Protobuf Model ................................. SKIPPED
[INFO] Authentication Client Library ...................... SKIPPED
[INFO] Aadhaar Authentication - Sample GUI ................ SKIPPED
[INFO] Aadhaar Authentication Reference Sample Application  SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.410 s
[INFO] Finished at: 2017-09-27T17:00:20+05:30
[INFO] Final Memory: 4M/15M
[INFO] ------------------------------------------------------------------------
[ERROR] No goals have been specified for this build. You must specify a valid lifecycle phase or a goal in the format <plugin-prefix>:<goal> or <plugin-group-id>:<plugin-artifact-id>[:<plugin-version>]:<goal>. Available lifecycle phases are: validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resources, test-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy, pre-clean, clean, post-clean, pre-site, site, post-site, site-deploy. -> [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/NoGoalSpecifiedException

这是我的pom.xml

<!-- DISCLAIMER: The sample code or utility or tool described herein is provided 
    on an "as is" basis, without warranty of any kind. UIDAI does not warrant 
    or guarantee the individual success developers may have in implementing the 
    sample code on their environment. UIDAI does not warrant, guarantee or make 
    any representations of any kind with respect to the sample code and does 
    not make any representations or warranties regarding the use, results of 
    use, accuracy, timeliness or completeness of any data or information relating 
    to the sample code. UIDAI disclaims all warranties, express or implied, and 
    in particular, disclaims all warranties of merchantability, fitness for a 
    particular purpose, and warranties related to the code, or any service or 
    software related thereto. UIDAI is not responsible for and shall not be liable 
    directly or indirectly for any direct, indirect damages or costs of any type 
    arising out of use or any action taken by you or others related to the sample 
    code. THIS IS NOT A SUPPORTED SOFTWARE. -->
<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/maven-v4_0_0.xsd">

    <modelVersion>4.0.0</modelVersion>

    <groupId>in.gov.uidai</groupId>
    <artifactId>auth-client-demo-application</artifactId>
    <name>Aadhaar Authentication Reference Sample Application</name>
    <packaging>pom</packaging>
    <version>1.0</version>

    <modules>
        <module>uidai-biometric-integration-api</module>
        <module>uidai-auth-xsd-model</module>
        <module>uidai-auth-proto-model</module>
        <module>uidai-auth-client</module>
        <module>uidai-sample-gui-app</module>
    </modules>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>2.8</version>
                <configuration>
                </configuration>

                <executions>
                    <execution>
                        <id>aggregate</id>
                        <goals>
                            <goal>aggregate</goal>
                        </goals>
                        <phase>site</phase>
                        <configuration>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

        </plugins>
    </build>
</project>

这有什么不对吗? 其他maven项目正在执行。

1 个答案:

答案 0 :(得分:2)

如果实际告诉你:没有为此版本指定目标。检查the maven introduction to learn about build lifecycle。另外,check this SO-Post。您需要通过 mvn [lifecycle] 构建程序,例如 mvn build