Jpress maven run报错 The source must not be a directory

发布于 2021-12-01 14:26:58 字数 508 浏览 753 评论 13

execute goal org.apache.maven.plugins:maven-war-plugin:2.4:war (default-war) on project jpress-web: Error unpacking file [D:Workspaceseclipsejpressjpressjpress-web-fronttargetclasses]to [D:Workspaceseclipsejpressjpressjpress-webtargetwarworkio.jpressjpress-web-front]: The source must not be a directory. -> [Help 1]

错误信息如上,百度各种方式clear了重新install都沧桑过,换jdk为本地的都操作过,maven install完全正常执行,就是debug run的时候报错。



如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(13

彩扇题诗 2021-12-03 06:04:38

太感谢了,果然如此。

反目相谮 2021-12-03 06:04:35

先手动删除下target目录,然后在install

瑾夏年华 2021-12-03 06:04:32

你好,能说下你是怎么解决的吗?遇到一样的问题

乞讨 2021-12-03 06:04:26

请问是怎么解决的,我也刚刚也到这个问题。我对比了你贴出来的pom文件,是一样的。

绝影如岚 2021-12-03 06:04:22

引用来自“梁某某”的评论

<?xml version="1.0"?>
<project
	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
	xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
	<modelVersion>4.0.0</modelVersion>
	<parent>
		<groupId>io.jpress</groupId>
		<artifactId>jpress</artifactId>
		<version>1.0</version>
	</parent>
	<artifactId>jpress-web</artifactId>
	<name>jpress-web</name>
	<url>http://jpress.io</url>
	<packaging>war</packaging>

	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
	</properties>

	<dependencies>

		<dependency>
			<groupId>io.jpress</groupId>
			<artifactId>jpress-web-core</artifactId>
			<version>1.0</version>
			<type>war</type>
			<scope>compile</scope>
		</dependency>

		<dependency>
			<groupId>io.jpress</groupId>
			<artifactId>jpress-web-admin</artifactId>
			<version>1.0</version>
			<type>war</type>
			<scope>compile</scope>
		</dependency>

		<dependency>
			<groupId>io.jpress</groupId>
			<artifactId>jpress-web-front</artifactId>
			<version>1.0</version>
			<type>war</type>
			<scope>compile</scope>
		</dependency>

		<dependency>
			<groupId>io.jpress</groupId>
			<artifactId>jpress-web-template-jblog</artifactId>
			<version>1.0</version>
			<type>war</type>
			<scope>compile</scope>
		</dependency>

		<dependency>
			<groupId>io.jpress</groupId>
			<artifactId>jpress-web-template-the3</artifactId>
			<version>1.0</version>
			<type>war</type>
			<scope>compile</scope>
		</dependency>

	</dependencies>

	<build>
		<finalName>${project.artifactId}-${project.version}</finalName>
		
		<plugins>
			<plugin>
				<artifactId>maven-compiler-plugin</artifactId>
				<configuration>
					<encoding>UTF-8</encoding>
				</configuration>
			</plugin>


			<plugin>
				<groupId>org.apache.tomcat.maven</groupId>
				<artifactId>tomcat6-maven-plugin</artifactId>
				<version>2.2</version>
				<configuration>
					<port>8080</port>
					<path>/jpress</path>
					<uriEncoding>UTF-8</uriEncoding>
					<server>tomcat7</server>
				</configuration>
			</plugin>

			<plugin>
				<groupId>org.apache.tomcat.maven</groupId>
				<artifactId>tomcat7-maven-plugin</artifactId>
				<version>2.2</version>
				<configuration>
					<port>8080</port>
					<path>/jpress</path>
					<uriEncoding>UTF-8</uriEncoding>
					<server>tomcat7</server>
				</configuration>
			</plugin>

			<plugin>
				<groupId>org.mortbay.jetty</groupId>
				<artifactId>maven-jetty-plugin</artifactId>
				<version>6.1.10</version>
			</plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-war-plugin</artifactId>
				<configuration>
					<encoding>utf-8</encoding>
					<packagingExcludes>WEB-INF/web.xml</packagingExcludes>
					<overlays>
						<overlay>
							<groupId>io.jpress</groupId>
							<artifactId>jpress-web-front</artifactId>
						</overlay>
						<overlay>
							<groupId>io.jpress</groupId>
							<artifactId>jpress-web-admin</artifactId>
						</overlay>
						<overlay>
							<groupId>io.jpress</groupId>
							<artifactId>jpress-web-template-jblog</artifactId>
						</overlay>
						<overlay>
							<groupId>io.jpress</groupId>
							<artifactId>jpress-web-template-the3</artifactId>
						</overlay>
					</overlays>
				</configuration>
			</plugin>
		</plugins>
	</build>


</project>

千纸鹤带着心事 2021-12-03 06:03:41

然而并不是,已经解决问题了

少女净妖师 2021-12-03 06:01:56

回复
@梁某某 : 怎么解决的啊?我也遇到这个问题了

策马西风 2021-12-03 05:58:58

回复
@梁某某 : 你好,这个问题你是怎么解决的,遇到相同问题

温柔少女心 2021-12-03 05:54:43

不要激动,jdk版本错了,我昨天就遇到过。

陌上芳菲 2021-12-03 05:51:38
<?xml version="1.0"?>
<project
	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
	xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
	<modelVersion>4.0.0</modelVersion>
	<parent>
		<groupId>io.jpress</groupId>
		<artifactId>jpress</artifactId>
		<version>1.0</version>
	</parent>
	<artifactId>jpress-web</artifactId>
	<name>jpress-web</name>
	<url>http://jpress.io</url>
	<packaging>war</packaging>

	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
	</properties>

	<dependencies>

		<dependency>
			<groupId>io.jpress</groupId>
			<artifactId>jpress-web-core</artifactId>
			<version>1.0</version>
			<type>war</type>
			<scope>compile</scope>
		</dependency>

		<dependency>
			<groupId>io.jpress</groupId>
			<artifactId>jpress-web-admin</artifactId>
			<version>1.0</version>
			<type>war</type>
			<scope>compile</scope>
		</dependency>

		<dependency>
			<groupId>io.jpress</groupId>
			<artifactId>jpress-web-front</artifactId>
			<version>1.0</version>
			<type>war</type>
			<scope>compile</scope>
		</dependency>

		<dependency>
			<groupId>io.jpress</groupId>
			<artifactId>jpress-web-template-jblog</artifactId>
			<version>1.0</version>
			<type>war</type>
			<scope>compile</scope>
		</dependency>

		<dependency>
			<groupId>io.jpress</groupId>
			<artifactId>jpress-web-template-the3</artifactId>
			<version>1.0</version>
			<type>war</type>
			<scope>compile</scope>
		</dependency>

	</dependencies>

	<build>
		<finalName>${project.artifactId}-${project.version}</finalName>
		
		<plugins>
			<plugin>
				<artifactId>maven-compiler-plugin</artifactId>
				<configuration>
					<encoding>UTF-8</encoding>
				</configuration>
			</plugin>


			<plugin>
				<groupId>org.apache.tomcat.maven</groupId>
				<artifactId>tomcat6-maven-plugin</artifactId>
				<version>2.2</version>
				<configuration>
					<port>8080</port>
					<path>/jpress</path>
					<uriEncoding>UTF-8</uriEncoding>
					<server>tomcat7</server>
				</configuration>
			</plugin>

			<plugin>
				<groupId>org.apache.tomcat.maven</groupId>
				<artifactId>tomcat7-maven-plugin</artifactId>
				<version>2.2</version>
				<configuration>
					<port>8080</port>
					<path>/jpress</path>
					<uriEncoding>UTF-8</uriEncoding>
					<server>tomcat7</server>
				</configuration>
			</plugin>

			<plugin>
				<groupId>org.mortbay.jetty</groupId>
				<artifactId>maven-jetty-plugin</artifactId>
				<version>6.1.10</version>
			</plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-war-plugin</artifactId>
				<configuration>
					<encoding>utf-8</encoding>
					<packagingExcludes>WEB-INF/web.xml</packagingExcludes>
					<overlays>
						<overlay>
							<groupId>io.jpress</groupId>
							<artifactId>jpress-web-front</artifactId>
						</overlay>
						<overlay>
							<groupId>io.jpress</groupId>
							<artifactId>jpress-web-admin</artifactId>
						</overlay>
						<overlay>
							<groupId>io.jpress</groupId>
							<artifactId>jpress-web-template-jblog</artifactId>
						</overlay>
						<overlay>
							<groupId>io.jpress</groupId>
							<artifactId>jpress-web-template-the3</artifactId>
						</overlay>
					</overlays>
				</configuration>
			</plugin>
		</plugins>
	</build>


</project>

少女情怀诗 2021-12-03 05:10:20

官方原版,没有做任何修改

半世蒼涼 2021-12-03 02:59:44

下方已经贴出

醉生梦死 2021-12-02 04:37:15

回复
@梁某某 : 你是不是只编译了“jpress-web”这一个啊,我去看了github的代码,你应该在上一层那里运行哦,因为它有一些依赖的,你换到上一层去打包试试呢

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文