springboot的maven打包和scala项目maven打包

springboot中build配置:

        

                

demo

                        

                       


org.apache.maven.plugins
maven-compiler-plugin

${java.version}
${java.version}



            org.apache.maven.plugins
            maven-surefire-plugin
           
                true
           
     

运行项目如下:

clean compile package

springboot的maven打包和scala项目maven打包_第1张图片


maven项目带有scala的build配置

<build>
    <plugins>
        <plugin>
            <groupId>org.apache.maven.pluginsgroupId>
            <artifactId>maven-eclipse-pluginartifactId>
            <version>2.9version>
            <configuration>
                <projectnatures>
                    <projectnature>org.scala-ide.sdt.core.scalanatureprojectnature>
                    <projectnature>org.eclipse.jdt.core.javanatureprojectnature>
                projectnatures>
                <buildcommands>
                    <buildcommand>org.scala-ide.sdt.core.scalabuilderbuildcommand>
                buildcommands>
                <classpathContainers>
                    <classpathContainer>org.scala-ide.sdt.launching.SCALA_CONTAINERclasspathContainer>
                    <classpathContainer>org.eclipse.jdt.launching.JRE_CONTAINERclasspathContainer>
                classpathContainers>
                <excludes>
                    <exclude>org.scala-lang:scala-libraryexclude>
                    <exclude>org.scala-lang:scala-compilerexclude>
                excludes>
                <sourceIncludes>
                    <sourceInclude>**/*.scalasourceInclude>
                    <sourceInclude>**/*.javasourceInclude>
                sourceIncludes>
            configuration>
        plugin>

        <plugin>
            <groupId>org.scala-toolsgroupId>
            <artifactId>maven-scala-pluginartifactId>
            <version>2.15.2version>
            <executions>
                <execution>
                    <goals>
                        <goal>compilegoal>
                        <goal>testCompilegoal>
                    goals>
                execution>
            executions>
        plugin>

        <plugin>
            <artifactId>maven-assembly-pluginartifactId>
            <configuration>
                
                
                
                
                
                
                <descriptorRefs>
                    <descriptorRef>jar-with-dependenciesdescriptorRef>
                descriptorRefs>
            configuration>
        plugin>
    plugins>
build>

运行maven命令如下:


clean compile assembly:assembly

springboot的maven打包和scala项目maven打包_第2张图片


你可能感兴趣的:(springboot的maven打包和scala项目maven打包)