source 1.5 中不支持 lambda 表达式, Deployment failed repository element

1、java:[400,90] 错误: -source 1.5 中不支持 lambda 表达式

Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (default-compile) on project

原因是未指定版本,默认用jdk 1.5在编译

<plugins>
    <!-- 指定maven编译的jdk版本,如果不指定,maven3默认用jdk 1.5 maven2默认用jdk1.3 -->
    <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.8.0</version>
        <configuration>
            <source>1.8</source>
            <target>1.8</target>
            <encoding>UTF-8</encoding>
        </configuration>
    </plugin>```


2. [ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.8.2:deploy (default-deploy) on project seashell-xres-irds-sdk: Deployment failed: repository element was not specified in the POM inside distributionManagement element or in -DaltDeploymentRepository=id::layout::url parameter

pom文件没有配置distributionManagement:

发布仓库一般分为Releases版和snapshot版,所以要配置2个仓库地址 

<distributionManagement>

        <repository>

            <id>nexus-releases</id>

            <name>corp nexus-releases</name>

            <url>http://你的nexusIP:8081/nexus/content/repositories/releases/</url>

        </repository>

        <snapshotRepository>

            <id>nexus-snapshot</id>

            <name>corp nexus-snapshot</name>

            <url>http://你的nexusIP:8081/nexus/content/repositories/snapshots/</url>

        </snapshotRepository>

    </distributionManagement>

 

 
posted @   木头左  阅读(288)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 分享4款.NET开源、免费、实用的商城系统
· 全程不用写代码,我用AI程序员写了一个飞机大战
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· 白话解读 Dapr 1.15:你的「微服务管家」又秀新绝活了
· 上周热点回顾(2.24-3.2)
点击右上角即可分享
微信分享提示