Giter VIP home page Giter VIP logo

Comments (5)

venusdrogon avatar venusdrogon commented on July 20, 2024

方案0: 将所有的项目合并成一个项目

类似于 feilong taglib

但是 这里不适合 ,内容太杂,维护起来很困难

image

方案1: maven-antrun-plugin

学习 quartz

<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>
	<parent>
		<groupId>com.feilong.platform.spring</groupId>
		<artifactId>parent</artifactId>
		<version>1.10.0-SNAPSHOT</version>
	</parent>

	<artifactId>feilong-spring-all</artifactId>
	<packaging>jar</packaging>

	<build>
		<plugins>
			<plugin>
				<artifactId>maven-antrun-plugin</artifactId>
				<executions>
					<execution>
						<id>packing-all</id>
						<phase>process-sources</phase>
						<configuration>
							<tasks>
								<copy todir="${project.build.directory}/classes">
									<fileset dir="${basedir}/../feilong-spring-aop/target/classes" />
									<fileset dir="${basedir}/../feilong-spring-context/target/classes" />
									<fileset dir="${basedir}/../feilong-spring-core/target/classes" />
									<fileset dir="${basedir}/../feilong-spring-jdbc/target/classes" />
									<fileset dir="${basedir}/../feilong-spring-mobile/target/classes" />
									<fileset dir="${basedir}/../feilong-spring-web/target/classes" />
								</copy>
							</tasks>
						</configuration>
						<goals>
							<goal>run</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
		</plugins>
	</build>
</project>

依赖结果

image

缺点:

  1. source 以及test 貌似没有

image

from feilong-spring.

venusdrogon avatar venusdrogon commented on July 20, 2024

方案2: maven-assembly-plugin

貌似 shiro 支持

image

https://github.com/apache/shiro/blob/master/all/pom.xml

image

image

pom.xml

		<plugins>
			<plugin>
				<artifactId>maven-assembly-plugin</artifactId>
				<executions>
					<execution>
						<id>make-bundles</id>
						<goals>
							<goal>single</goal>
						</goals>
						<phase>package</phase>
						<!---->
						<configuration>
							<descriptors>
								<descriptor>src/main/assembly/assembly.xml</descriptor>
							</descriptors>

							<!-- We _do_ want the assembly output to be the actual artifact produced for this Maven module. -->
							<!-- not append assembly id in release file name -->
							<appendAssemblyId>false</appendAssemblyId>
						</configuration>
					</execution>
				</executions>
			</plugin>
		</plugins>

assembly.xml

<assembly xmlns="http://maven.apache.org/ASSEMBLY/2.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://maven.apache.org/ASSEMBLY/2.0.0 http://maven.apache.org/xsd/assembly-2.0.0.xsd">

	<id>jar</id>
	
	<formats>
		<format>jar</format>
	</formats>
	
	<includeBaseDirectory>false</includeBaseDirectory>
	
	<dependencySets>
		<dependencySet>
			<outputDirectory>/</outputDirectory>
			<useProjectArtifact>false</useProjectArtifact>
			<unpack>true</unpack>
			<useTransitiveDependencies>false</useTransitiveDependencies>
		</dependencySet>
	</dependencySets>

</assembly>

缺点:

依赖 all 还会依赖 all锁依赖的jar

image

image

shiro-all 1.4.0-RC2 写法也不行

image

from feilong-spring.

venusdrogon avatar venusdrogon commented on July 20, 2024

方案3: maven-shade-plugin

shiro-all 1.3.2 支持

image

1.3 系列 使用的 maven-shade-plugin 插件

image

from feilong-spring.

venusdrogon avatar venusdrogon commented on July 20, 2024

image

groovy 貌似支持 sources

shiro-all 1.3.2 支持
image

貌似也支持 sources

from feilong-spring.

venusdrogon avatar venusdrogon commented on July 20, 2024

搞定: https://github.com/venusdrogon/feilong-platform/tree/repository/com/feilong/platform/spring/feilong-spring-all/1.10.0-SNAPSHOT

image

配置方式 中增加了两个属性参数:

image

参考

from feilong-spring.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.