{maven-compiler-plugin.version}</version> <configuration> <source>${java.jdk.version}</source> <target>${java.jdk.version}</target> <!--<encoding>${project.build.outputEncoding}</encoding>--> <!-- <skipTests>true</skipTests> --><!-- 跳过测试 --> <!--<verbose>true</verbose>--> ...
<modelVersion>4.0.0</modelVersion> <!-- <groupId>org.example</groupId>--> <groupId>cn.itcast.mapreduce</groupId> <artifactId>day03_mapreduce_workcount</artifactId> <version>1.0-SNAPSHOT</version> <packaging>jar</packaging> <properties> <project.build.sourceEncoding> UTF-8 </project.buil...
调试中,在org.apache.maven.plugins.shade.DefaultShader line539 有下面代码: sourceContent = relocator.applyToSourceContent( sourceContent ); 这个relocator会在打包过程中,修改类的包名。这个就是解决这个问题的关键。具体解决思路如下图: 在项目中新增一个模块b-shade,里边什么代码都没有,只有一个dependency b,...
pro.put("password","123456");// 加载驱动类Class.forName("com.mysql.jdbc.Driver");// 建立连接Connectionconn5=DriverManager.getConnection(url5, pro);// 查数据Statementstatement=conn5.createStatement();ResultSetresultSet=statement.executeQuery("SELECT * FROM qsl_datax_source");StringBuilderinsertSql=...
1、在pom.xml文件中添加maven-shade-plugin插件 全部文件: <build> <plugins> <plugin> <artifactId>maven-compiler-plugin</artifactId> <configuration> <source>1.6</source> <target>1.6</target> </configuration> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> ...
<source>1.8</source> <target>1.8</target> </configuration> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-shade-plugin</artifactId> <version>2.4.3</version> <executions> <execution> <phase>package</phase> ...
<X-Compile-Source-JDK>${maven.compile.source}</X-Compile-Source-JDK> <X-Compile-Target-JDK>${maven.compile.target}</X-Compile-Target-JDK> </manifestEntries> </transformer> </transformers> </configuration> </execution> </executions>
//maven.apache.org/xsd/maven-4.0.0.xsd"><modelVersion>4.0.0</modelVersion><groupId>ceshi</groupId><artifactId>ceshi</artifactId><version>1.0-SNAPSHOT</version><properties><maven.compiler.source>1.8</maven.compiler.source><maven.compiler.target>1.8</maven.compiler.target><encoding>UTF-8</...
maven-shade-plugin插件可以配置自动精简那些项目没有用到的依赖的artifact,或者显式的配置精简项目用到的依赖的artifact下面没有用到的classes。 <project>...<build><plugins><plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-shade-plugin</artifactId><version>3.2.1</version><executions...
maven-shade-plugin负责最终的打包操作. 以下所示操作,均在pom.xml文件中进行. 项目基本属性 <groupId>com.test</groupId> <artifactId>app</artifactId> // <version>0.1.0</version> <packaging>jar</packaging> <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> ...