zoukankan      html  css  js  c++  java
  • maven包加载

    1) IDEA包加载pom.xml配置

    <build>
        <sourceDirectory>src/main/java</sourceDirectory>
           <testSourceDirectory>src/test/scala</testSourceDirectory>
           <plugins>
               <plugin>
                  <groupId>org.apache.maven.plugins</groupId>
                  <artifactId>maven-assembly-plugin</artifactId>
                  <version>2.6</version>
        <configuration>
             <!--<descriptors>-->
             <!--<descriptor>src/assembly/assembly.xml</descriptor>-->
             <!--</descriptors>-->
        <descriptorRefs>
            <descriptorRef>jar-with-dependencies</descriptorRef>
       </descriptorRefs>
       </configuration>
    <executions>
    <execution>
         <id>make-assembly</id>
        <phase>package</phase>
        <goals>
            <goal>single</goal>
        </goals>
     </execution>
    </executions>
    </plugin>
        <plugin>
             <groupId>org.scala-tools</groupId>
            <artifactId>maven-scala-plugin</artifactId>
    <executions>
    <execution>
        <goals>
           <goal>compile</goal>
          <goal>testCompile</goal>
       </goals>
    </execution>
    </executions>
    <configuration>
         <scalaVersion>${scala.version}</scalaVersion>
         <args>
         <arg>-target:jvm-1.7</arg>
         </args>
    </configuration>
    </plugin>
    </plugins>
    </build>

    2) escplise包加载pom.xml配置

    <build>
    <plugins>
    <plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-shade-plugin</artifactId>
    <version>1.4</version>
    <executions>
    <execution>
    <phase>package</phase>
    <goals>
    <goal>shade</goal>
    </goals>
    <configuration>
    <transformers>
    <transformer
    implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
    <resource>META-INF/spring.handlers</resource>
    </transformer>
    <transformer
    implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
    <resource>META-INF/spring.schemas</resource>
    </transformer>
    </transformers>
    </configuration>
    </execution>
    </executions>
    </plugin>
    </plugins>
    </build>  

    3)java保存

    <build>
    <sourceDirectory>src/main/java</sourceDirectory>
    <testSourceDirectory>src/test/scala</testSourceDirectory>
    <plugins>
    <plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-assembly-plugin</artifactId>
    <version>2.6</version>
    <configuration>
    <archive>
    <manifest>
    <addClasspath>true</addClasspath>
    <!--<classpathPrefix>lib/</classpathPrefix>-->
    <mainClass>org.leocook.result.decoded.ResultDecodedImportHbaseMR1</mainClass>
    </manifest>
    </archive>
    <!--<descriptors>-->
    <!--<descriptor>src/assembly/assembly.xml</descriptor>-->
    <!--</descriptors>-->
    <descriptorRefs>
    <descriptorRef>jar-with-dependencies</descriptorRef>
    </descriptorRefs>
    </configuration>
    <executions>
    <execution>
    <id>make-assembly</id>
    <phase>package</phase>
    <goals>
    <goal>single</goal>
    </goals>
    </execution>
    </executions>
    </plugin>
    <plugin>
    <groupId>org.scala-tools</groupId>
    <artifactId>maven-scala-plugin</artifactId>
    <executions>
    <execution>
    <goals>
    <goal>compile</goal>
    <goal>testCompile</goal>
    </goals>
    </execution>
    </executions>
    <configuration>
    <scalaVersion>${scala.version}</scalaVersion>
    <args>
    <arg>-target:jvm-1.7</arg>
    </args>
    </configuration>
    </plugin>
    </plugins>
    </build>
    我不生产知识 我只是知识的搬运工
  • 相关阅读:
    关于springMVC的一些常用注解
    关于springMVC的一些xml配置
    关于easyUI的一些js方法
    关于easyUI一些标签的使用
    关于easyUI分页
    P3376 模板网络流
    P1343 地震逃生
    网络流最大流
    python函数知识三 函数名的使用、格式化、递归
    python函数知识二 动态参数、函数的注释、名称空间、函数的嵌套、global,nonlocal
  • 原文地址:https://www.cnblogs.com/yyy-blog/p/5668027.html
Copyright © 2011-2022 走看看