我一直在尝试重命名 tika app 类。由于类路径上的重复类而存在加载冲突。当我尝试运行 maven install -e 时,它会抛出错误,我想使用org.apache.tika类为com.test1.tikapom.xml 文件如下所示 <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.test1.tika</groupId> <artifactId>tika-app</artifactId> <version>0.0.1-SNAPSHOT</version> <packaging>jar</packaging> <name>tika-app</name> <url>http://maven.apache.org</url> <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> </properties> <dependencies> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>3.8.1</version> <scope>test</scope> </dependency> <dependency> <groupId>org.apache.tika</groupId> <artifactId>tika-app</artifactId> <version>1.20</version> </dependency> </dependencies> <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>2.3</version> <configuration> <source>1.6</source> <target>1.6</target> </configuration> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-shade-plugin</artifactId> <version>2.3</version> <configuration> <createSourcesJar>true</createSourcesJar> <relocations> <relocation> <pattern>org.apache.tika.</pattern> <shadedPattern>com.test1.tika.</shadedPattern> </relocation> </relocations> </configuration> <executions>
添加回答
举报
0/150
提交
取消