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>
maven包加载的更多相关文章
- 解决maven无法加载本地lib/下的jar包问题(程序包XXX不存在)
这次一个项目用到maven编译,我在本地开发的时候jar包都是放在WEB-INF/lib目录下,通过 BuildPath将jar包导入,然后用MyEclipse中的:maven package命令打成 ...
- 【转】解决maven无法加载本地lib/下的jar包问题(程序包XXX不存在)
原文链接:https://www.cnblogs.com/adeng/p/7096484.html 这次一个项目用到maven编译,我在本地开发的时候jar包都是放在WEB-INF/lib目录下,通过 ...
- websphere OSGi应用环境下服务调用saaj包加载问题分析报告
websphere OSGi应用环境下服务调用saaj包加载问题分析报告 作者:bingjava 版权声明:本文为博主原创文章,转载请说明出处:http://www.cnblogs.com/bingj ...
- 包加载失败 未能正确加载包“xxx”...
打开vs2008或者2005如果弹出一个警告对话框 包加载失败 未能正确加载包“xxx” ...... 的字样,就可以用以下方法解决. 在cmd下运行带参数的devenv.exe: "d(盘 ...
- vs2008包加载失败
由于安装vs2008sp1后,新建项目报错,解决未遂,于是重装vs2008,装完后又出现包加载失败问题: Microsoft.Data.Entity.Design.Package.MicrosoftD ...
- spring加载过程中jar包加载不了,解决方法
当我们在开发spring项目时,一般会将jar包放到webInf/lib下,这样是myeclipse自动将jar包加载到tomcat中webapps下,但是当我们新建一个lib文件夹的情况下,我们ad ...
- maven 手动加载第三方jar、zip包
使用maven搭建工程时,难免要加载大量的第三方的jar包.zip包比较少用,而maven的官网提供的jar往往不能满足需求,这时需要我们手动加载到我们本地或nexus私服的仓库中. 1.加载jar包 ...
- 分享知识-快乐自己:Maven 无法加载 Oracle 数据库驱动源
由于Oracle授权问题,Maven3不提供Oracle JDBC driver,为了在Maven项目中应用Oracle JDBC driver,必须手动添加到本地仓库. 手动添加到本地仓库需要本地有 ...
- 【转】查看java类是从哪个包加载
Java的类装载器使用的是优先策略,加载类的时候先找到哪个就加载哪个.有时候我们做一个系统,当类库非常庞大的时候,类可能会出现冲突,也就是类路径中存在不同版本的两个相同的类,这往往给调试带来非常大的麻 ...
随机推荐
- 【一天一道LeetCode】#44. Wildcard Matching
一天一道LeetCode系列 (一)题目 Implement wildcard pattern matching with support for '?' and '*'. '?' Matches a ...
- Android 上滑上拉菜单SlidingDrawer 不全屏显示的方法
这里来说一个已经被废弃的SlidingDrawer.. 他可以实现上拉,下拉的菜单. 但是有个问题就是上拉以后,是全屏显示的. 首先 写一个布局: <RelativeLayout xmlns:a ...
- Ubuntu 14 安装Skype 4.3
Ubuntu 14 安装Skype 4.3Step 1: 删除老版本sudo apt-get remove skype skype-bin:i386 skype:i386 sudo apt-get i ...
- mysql语法、特殊符号及正则表达式的使用
http://blog.csdn.net/pipisorry/article/details/46773545 sql语言 结构化的查询语言.(Structured Query Language),是 ...
- Leetcode_75_Sort Colors
本文是在学习中的总结,欢迎转载但请注明出处:http://blog.csdn.net/pistolove/article/details/43302343 Given an array with n ...
- 【matlab编程】matlab随机数函数
Matlab内部函数 a. 基本随机数 Matlab中有两个最基本生成随机数的函数. 1.rand() 生成(0,1)区间上均匀分布的随机变量.基本语法: rand([M,N,P ...]) 生成排列 ...
- 如何将sqlserver的windows验证模式改为SQL Server 和 Windows 混合身份验证模式
今天问同事拷贝了份虚拟机,里面已装好sqlserver2008,可是他装的时候选择的是windows身份验证,我需要将其改成SQL Server 和 Windows 混合身份验证模式,具体步骤如下: ...
- 为多态基类声明virtual析构函数
一个函数的返回值为基类指针,而当指针指向一个派生类对象,接下来派生类对象被这个基类指针删除的时候,就出现了局部销毁的问题.因为C++指出,当派生类经由一个基类指针被删除,而该基类指针带着一个non-v ...
- 《老罗的Android之旅》导读PPT
虽然好几个月没更新博客了,但是老罗一直有在准备可以分享的东西的.除了早前在微博分享Android4.2相关技术之外,这次还特意准备了13个PPT,总结之前所研究过的东西.内容从Android组件设计思 ...
- ftp实现普通账号和vip账号限速
ftp工作流程: ftp回话包含了两个通道,控制通道和数据通道,ftp的工作有两种模式,一种是主动模式,一种是被动模式,以ftpserver为参照物,主动模式,服务器主动连接客户端传输,被动模式,等待 ...