6
回答
Jpress maven run报错 The source must not be a directory
execute goal org.apache.maven.plugins:maven-war-plugin:2.4:war (default-war) on project jpress-web: Error unpacking file [D:\Workspaces\eclipse\jpress\jpress\jpress-web-front\target\classes]to [D:\Workspaces\eclipse\jpress\jpress\jpress-web\target\war\work\io.jpress\jpress-web-front]: The source must not be a directory. -> [Help 1]

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



举报
梁某某
发帖于2年前 6回/883阅
共有6个答案 最后回答: 2年前
你把你的pom.xml贴出来看看呢
--- 共有 3 条评论 ---
阿信sxq回复 @梁某某 : 你是不是只编译了“jpress-web”这一个啊,我去看了github的代码,你应该在上一层那里运行哦,因为它有一些依赖的,你换到上一层去打包试试呢 2年前 回复
梁某某下方已经贴出 2年前 回复
梁某某官方原版,没有做任何修改 2年前 回复
<?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>



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

<?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>



clear
--- 共有 1 条评论 ---
20150708请问是怎么解决的,我也刚刚也到这个问题。我对比了你贴出来的pom文件,是一样的。 2年前 回复
顶部