NutzCN Logo
问答 在父工程配置dependencyManagement,子工程不写version报错
发布于 2295天前 作者 蛋蛋的忧伤 5387 次浏览 复制 上一个帖子 下一个帖子
标签:

nutzboot-parent里配置了

<dependencyManagement>
                         <dependency>
				<groupId>org.freemarker</groupId>
				<artifactId>freemarker</artifactId>
				<version>2.3.26-incubating</version>
			</dependency>
</dependencyManagement>

在nutzboot-starter-freemarker里的dependencies内引用:

 <dependencies>
        <dependency>
            <groupId>org.freemarker</groupId>
            <artifactId>freemarker</artifactId>
        </dependency>
    </dependencies>

然后执行clean报错:

[WARNING] 
[WARNING] Some problems were encountered while building the effective settings
[WARNING] Unrecognised tag: 'repositories' (position: START_TAG seen ...</mirrors>\r\n\t\r\n\t<repositories>... @18:16)  @ E:\dev\apache-maven-3.5.2\conf\settings.xml, line 18, column 16
[WARNING] Unrecognised tag: 'repositories' (position: START_TAG seen ...</mirrors>\r\n\t\r\n\t<repositories>... @18:16)  @ E:\dev\apache-maven-3.5.2\conf\settings.xml, line 18, column 16
[WARNING] 
[INFO] Scanning for projects...
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[ERROR] 'dependencies.dependency.version' for org.freemarker:freemarker:jar is missing. @ org.nutz:nutzboot-starter-freemarker:[unknown-version], E:\idea_workspace\nutzboot\nutzboot-starter\nutzboot-starter-freemarker\pom.xml, line 58, column 21
 @ 
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]   
[ERROR]   The project org.nutz:nutzboot-starter-freemarker:2.1.1 (E:\idea_workspace\nutzboot\nutzboot-starter\nutzboot-starter-freemarker\pom.xml) has 1 error
[ERROR]     'dependencies.dependency.version' for org.freemarker:freemarker:jar is missing. @ org.nutz:nutzboot-starter-freemarker:[unknown-version], E:\idea_workspace\nutzboot\nutzboot-starter\nutzboot-starter-freemarker\pom.xml, line 58, column 21
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException

纳闷了,按道理来讲应该可以直接用的呀

8 回复

nutzboot-parent:

<dependencyManagement>
		<dependencies>
                           .................
			<dependency>
				<groupId>org.freemarker</groupId>
				<artifactId>freemarker</artifactId>
				<version>2.3.26-incubating</version>
			</dependency>
		</dependencies>
	</dependencyManagement>

这样写的,应该没写错

在根目录执行才可以吧

根目录也不行
Image

蛋蛋最帅(ฅ>ω<*ฅ)

nutzboot-starter-freemarker加parent没

肯定加了的
nutzboot-starter-freemarker -> nutzboot-starter -->nutzboot-parent

客户端不能上传gif...

点nutzboot-starter里的nutzboot-parent找到了nutzboot-parent.2.1.1.pom,很奇怪为啥是这个,因为nutzboot-parent的pom里的版本号是2.2-SNAPSHOT,找的nutzboot-parent.2.1.1.pom里的确没有我刚才声明的freemarker的包

我重新把代码clone一遍吧。。。。

添加回复
请先登陆
回到顶部