zoukankan      html  css  js  c++  java
  • Maven 编译jdk配置

    <!-- 形成带第三方jar包的可执行jar包,jar包目录结构如下 application.properties lib META-INF mybatis
        org -->
    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-jar-plugin</artifactId>
                    <version>2.1</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>2.5.1</version>
                    <configuration>
                        <source>1.8</source>
                        <target>1.8</target>
                        <encoding>UTF-8</encoding>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-source-plugin</artifactId>
                    <executions>
                        <execution>
                            <id>attach-sources</id>
                            <goals>
                                <goal>jar</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
            </plugins>
        </pluginManagement>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <goals>
                            <goal>repackage</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
    
    
            <!-- 首先加入pom ${docker.image.prefix} : 这个是你的dockerhub注册上面的名字 gitgeek 这个是我注册的
                ${project.artifactId} : 项目的名称 dockerDirectory : dockerfile的文件路径 -->
            <plugin>
                <groupId>com.spotify</groupId>
                <artifactId>docker-maven-plugin</artifactId>
                <version>0.4.13</version>
                <configuration>
                    <imageName>${docker.image.prefix}/${project.artifactId}</imageName>
                    <dockerDirectory>src/main/docker</dockerDirectory>
                    <!-- docker远程服务器地址 -->
                    <dockerHost>${docker.host}</dockerHost>
                    <resources>
                        <resource>
                            <targetPath>/</targetPath>
                            <directory>${project.build.directory}</directory>
                            <include>${project.build.finalName}.jar</include>
                        </resource>
                    </resources>
                </configuration>
            </plugin>
    
        </plugins>
        <finalName>${project.artifactId}</finalName>
    </build>
  • 相关阅读:
    发邮件(asp.net2.0)(转)
    教师节祝福短信
    量子学习及思考13人机交互很快将面临交互模式的进化2 人工智能
    MongoDB(1) 简单配置
    CreateCompatibleDC
    设置环境变量的作用
    vs2008中调用matlab生成的dll
    resolve the maado15.dll
    错误3:系统找不到指定的路径
    C++关键字volatile
  • 原文地址:https://www.cnblogs.com/fanrenren/p/12848574.html
Copyright © 2011-2022 走看看