• maven打包时,依赖包打不进jar包中


    <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    	<modelVersion>4.0.0</modelVersion>
    
    	<groupId>com.dlht</groupId>
    	<artifactId>kylinBuild</artifactId>
    	<version>0.0.1-SNAPSHOT</version>
    	<packaging>jar</packaging>
    
    	<name>kylinBuild</name>
    	<url>http://maven.apache.org</url>
    
    	<properties>
    		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    	</properties>
    
    	<dependencies>
    		<!-- <dependency> <groupId>jdk.tools</groupId> <artifactId>jdk.tools</artifactId> 
    			<version>1.7</version> </dependency> -->
    		<dependency>
    			<groupId>javax.mail</groupId>
    			<artifactId>mail</artifactId>
    			<version>1.4.7</version>
    		</dependency>
    		<dependency>
    			<groupId>log4j</groupId>
    			<artifactId>log4j</artifactId>
    			<version>1.2.17</version>
    		</dependency>
    		<dependency>
    			<groupId>org.slf4j</groupId>
    			<artifactId>slf4j-log4j12</artifactId>
    			<version>1.7.12</version>
    		</dependency>
    		<dependency>
    			<groupId>junit</groupId>
    			<artifactId>junit</artifactId>
    			<version>3.8.1</version>
    			<scope>test</scope>
    		</dependency>
    
    		<dependency>
    			<groupId>org.apache.kylin</groupId>
    			<artifactId>kylin-jdbc</artifactId>
    			<version>1.5.0</version>
    		</dependency>
    		<dependency>
    			<groupId>org.apache.httpcomponents</groupId>
    			<artifactId>httpclient</artifactId>
    			<version>4.4</version>
    		</dependency>
    		<dependency>
    			<groupId>org.apache.kylin</groupId>
    			<artifactId>kylin-cube</artifactId>
    			<version>1.3.0</version>
    		</dependency>
    		<dependency>
    			<groupId>org.apache.hive</groupId>
    			<artifactId>hive-jdbc</artifactId>
    			<version>1.1.0</version>
    			<classifier>standalone</classifier>
    		</dependency>
    		<dependency>
    			<groupId>org.apache.hadoop</groupId>
    			<artifactId>hadoop-common</artifactId>
    			<version>2.5.0</version>
    		</dependency>
    		<dependency>
    			<groupId>mysql</groupId>
    			<artifactId>mysql-connector-java</artifactId>
    			<version>5.1.37</version>
    		</dependency>
    		<dependency>
    			<groupId>net.sf.json-lib</groupId>
    			<artifactId>json-lib</artifactId>
    			<version>2.4</version>
    			<classifier>jdk15</classifier>
    		</dependency>
    	</dependencies>
    	<build>
    		<finalName>cube</finalName>
    		<plugins>
    			<plugin>
    				<groupId>org.apache.maven.plugins</groupId>
    				<artifactId> maven-shade-plugin</artifactId>
    				<version>2.3</version>
    				<configuration>
    					<skipTests>true</skipTests>
    				</configuration>
    				<executions>
    					<execution>
    						<phase>package</phase>
    						<goals>
    							<goal>shade</goal>
    						</goals>
    						<configuration>
    							<transformers>
    								<transformer
    									implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
    									<mainClass>com.dlht.run.Run</mainClass>  <!--这里运行类! -->
    								</transformer>
    							</transformers>
    						</configuration>
    					</execution>
    				</executions>
    			</plugin>
    		</plugins>
    	</build>
    
    </project>
    

      

  • 相关阅读:
    【现在还没补的比赛及题解】
    【刷题中】
    【寒假的待填的坑】
    【python】爬虫实践
    【python】vscode python环境配置
    【spring学习笔记二】Bean
    【spring学习笔记一】Ioc控制反转
    【2018CCPC秦皇岛】
    【2018ICPC沈阳】
    【2018ICPC青岛】
  • 原文地址:https://www.cnblogs.com/hark0623/p/6252920.html
Copyright © 2020-2023  润新知