首页 \ 问答 \ Maven reactor:使用Spring boot starter pom的pom(Maven reactor: pom using Spring boot starter pom)

Maven reactor:使用Spring boot starter pom的pom(Maven reactor: pom using Spring boot starter pom)

我有一个包含多个模块的项目。 其中一些使用弹簧靴,另一些是没有任何弹簧依赖性的普通瓶。 所以我为每个模块设置了父pom.xml。 麻烦与春季启动项目。

我已经在每个spring引导项目中将弹簧引导依赖关系设置为scope=import 。 它是否正确? 或者我应该将它移入我的父母POM中?

我遇到的问题1.当我从顶层文件夹运行mvn包时,它不重新包装弹簧引导罐。 我的春季启动项目列出了其他的春季启动依赖项。 以弹簧启动器作为父母,他们不需要版本标签。 现在他们做到了。 我已经将其定义为我的父pom中的属性并添加了版本标签,但想知道这是否更好。

谢谢阅读。

更新对注释#1的响应:我的父POM中有spring-boot-maven-plugin ,如下所示

<build>
    <plugins>
        <plugin>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-maven-plugin</artifactId>
            <version>1.1.9.RELEASE</version>
        </plugin>
    </plugins>
    <pluginManagement>
 ....
 </build>

我也尝试运行mvn spring-boot:repackage在我的spring启动项目中手动mvn spring-boot:repackage - 但是出现错误:repackage failed: Source must refer to an existing file -> [Help 1]


I have a project with multiple modules. Some of these use spring boot, others are plain jars without any spring dependency. So I have a parent pom.xml setup with each module. Trouble is with the spring boot projects.

I've setup spring boot dependencies as scope=import as listed here in each spring boot project. Is this correct? Or should I move it into my parent POM?

Issues I'm running into 1. When I run mvn package from the top folder, it isn't repackaging the spring boot jars. 2. My spring boot projects were listing other spring boot dependencies. with spring boot starter as parent, they didn't need a version tag. Now they do. I've defined that as a property in my parent pom and added the version tag but want to know if that's better.

Thanks for reading.

Update response to comment #1: I have the spring-boot-maven-plugin in my parent POM as follows

<build>
    <plugins>
        <plugin>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-maven-plugin</artifactId>
            <version>1.1.9.RELEASE</version>
        </plugin>
    </plugins>
    <pluginManagement>
 ....
 </build>

I've also tried running mvn spring-boot:repackage manually inside my spring boot project- but that errors out with :repackage failed: Source must refer to an existing file -> [Help 1]


原文:https://stackoverflow.com/questions/27192385
更新时间:2023-02-05 09:02

最满意答案

你总是可以自己找到它。 如果您使用交互式Lisp系统,测试仅需几秒钟即可完成:

CL-USER 1 > (every (lambda (x) (equal "a" x)) "a")
NIL

以上返回NIL。

现在使用Common Lisp函数DESCRIBE来获取描述的数据。

CL-USER 2 > (every (lambda (x)
                     (describe x)
                     (describe "a")
                     (equal "a" x))
                   "a")

#\a is a CHARACTER
Name                "Latin-Small-Letter-A"
Code                97
Bits                0
Font                0
Function-Key-P      NIL

所以x的值是一个字符。 字符#\a

"a" is a SIMPLE-BASE-STRING
0      #\a
NIL

“a”的类型是SIMPLE-BASE-STRING (在LispWorks中)。

如果你看EQUAL的定义,那么你可以看到一个字符和一个字符串永远不会相等,因为它们是不同的类型。

CL-USER 3 > (equal #\a "a")
NIL

You can always find it out yourself. A test is only a few seconds away if you use an interactive Lisp system:

CL-USER 1 > (every (lambda (x) (equal "a" x)) "a")
NIL

Above returns NIL.

Now use the Common Lisp function DESCRIBE to get the data described.

CL-USER 2 > (every (lambda (x)
                     (describe x)
                     (describe "a")
                     (equal "a" x))
                   "a")

#\a is a CHARACTER
Name                "Latin-Small-Letter-A"
Code                97
Bits                0
Font                0
Function-Key-P      NIL

So the value of x is a character. The character #\a.

"a" is a SIMPLE-BASE-STRING
0      #\a
NIL

The type of "a" is SIMPLE-BASE-STRING (here in LispWorks).

If you look at the definition of EQUAL, then you can see that a character and a string are never equal, because they are of different types.

CL-USER 3 > (equal #\a "a")
NIL

相关问答

更多
  • 从Emacs Lisp开始(因为您似乎已经开始自定义您的emacs) - 它似乎对您更直接有用。 请记住,Emacs Lisp(有很多缓冲区管理的东西,尤其是可能在野外看到的代码中)和Common Lisp(更类似于通用编程语言),所以你采取的路线,期望一些“浪费” Start with Emacs Lisp (given that you seem to have already started customizing your emacs) - it seems to be more immediate ...
  • #'foo是读者的(function foo)的缩写 。 在CL中,有几个不同的名称空间, #'foo或(function foo)将返回(function foo)的功能值 。 您可能想要搜索“Lisp-1 vs Lisp-2” ,检查其他Stackoverflow问题 ,或者阅读旧文章py Pitman和Gabriel以更多地了解多个命名空间的概念(也称为插槽或符号单元)。 之所以在lambda中忽略#'是因为这是一个CL中的宏,因此扩展了这个宏(取自Hyperspec ): (lambda lambd ...
  • clojure.org上有一份关于 Clojure和其他Lisp之间差异的列表 。 我注意到使用Clojure的其他一些东西: 习惯Clojure倾向于不可改变的数据结构。 无论你在Clojure看到SETF都可能需要更换才能充分利用。 (您始终可以选择在Clojure中使用可变的Java数据结构,但大多数人不会。) Clojure的多方法类似于CL(可以说更强大,因为你可以派发除类型之外的其他东西),但是Clojure没有提供成熟的CLOS。 Clojure使用struct来代替,这只是一个奇特的hash ...
  • CL-PPCRE是一个很好的例子,很好的理由。 实际上,任何Edi Weitz的图书馆都可以读出很好的书籍,但CL-PPCRE特别聪明,它是一个有用和令人印象深刻的图书馆。 除此之外,许多CL实现大多写在CL中。 选择通常在CL中实现的CL的一部分,并比较不同的实现如何处理它可能是非常有成效的。 特别地,大型有用宏系统的一些最佳例子是标准中的事情的实现。 Loop是一个有趣的阅读,或者如果你真的有野心,你可以比较一些CLOS的实现。 如果有一些计算领域特别感兴趣,那么可能值得一提的是,所以人们可以根据自己的 ...
  • 我最近没有看过,但至少在过去,CLR全面实施普通的lisp有一些问题,如果这种变化,我会感到有些惊讶。 问题出现了诸如处理浮动的东西,其中.net / clr有一种方法来做,这是a)微妙的错误b)不同意普通lisp的ANSI标准,但c)不允许任何方式。 还有其他类似的问题。 这个东西很有意思,也许不是太重要,但是意味着你不太可能看到CLR上的ANSI CL。 有更大的问题,例如,常见的lisp具有更强大的对象系统,因此您无法在运行时映射1:1到对象(没有MI,一个)。 这是可以的,但留下一个内部/外部的方法 ...
  • 是的我们有! eq适用于所有的价值,并eq运作。 它根本不依赖于数据类型。 这正是你正在寻找的。 它就像Python中的is运算符。 它一定是你正在寻找的? 所有其他人都同意eq ,但是他们往往倾向于完全不同的值,这些值具有不同的相似性水平。 (defparameter *a* "this is a string") (defparameter *b* *a*) (defparameter *c* "this is a string") (defparameter *d* "THIS IS A STRING ...
  • 该引用具有非常丰富的属性,明确指出您的意思是令牌应该是文字数据。 更何况,当你或同事几年后再次访问代码时。 您必须使用() (不带引号)在未评估的表单中声明空列表,例如参数列表或类超类和插槽,其中报价实际上会造成伤害。 实际上,你也可以使用nil ,但为了清晰起见,当声明的东西是一个列表时,你不应该使用nil 。 以下是规范的相关摘录: 1.4.1.4.4无 nil有多种含义。 它是COMMON-LISP包中的一个符号,名称为"NIL" ,它是boolean(和generalized boolean)fal ...
  • Scheme小而干净,Common Lisp功能强大。 Scheme is small and clean, Common Lisp is big and powerful.
  • 你总是可以自己找到它。 如果您使用交互式Lisp系统,测试仅需几秒钟即可完成: CL-USER 1 > (every (lambda (x) (equal "a" x)) "a") NIL 以上返回NIL。 现在使用Common Lisp函数DESCRIBE来获取描述的数据。 CL-USER 2 > (every (lambda (x) (describe x) (describe "a") ...
  • Clojure避免使用这种顺序绑定形式,但同样的功能可以用while或loop表示 - 每种样式的CLHS中的第一个例子: ;; common lisp version (do ((temp-one 1 (1+ temp-one)) (temp-two 0 (1- temp-two))) ((> (- temp-one temp-two) 5) temp-one)) => 4 ;; clojure, while (let [temp-one (atom 1) tem ...

相关文章

更多

最新问答

更多
  • 获取MVC 4使用的DisplayMode后缀(Get the DisplayMode Suffix being used by MVC 4)
  • 如何通过引用返回对象?(How is returning an object by reference possible?)
  • 矩阵如何存储在内存中?(How are matrices stored in memory?)
  • 每个请求的Java新会话?(Java New Session For Each Request?)
  • css:浮动div中重叠的标题h1(css: overlapping headlines h1 in floated divs)
  • 无论图像如何,Caffe预测同一类(Caffe predicts same class regardless of image)
  • xcode语法颜色编码解释?(xcode syntax color coding explained?)
  • 在Access 2010 Runtime中使用Office 2000校对工具(Use Office 2000 proofing tools in Access 2010 Runtime)
  • 从单独的Web主机将图像传输到服务器上(Getting images onto server from separate web host)
  • 从旧版本复制文件并保留它们(旧/新版本)(Copy a file from old revision and keep both of them (old / new revision))
  • 西安哪有PLC可控制编程的培训
  • 在Entity Framework中选择基类(Select base class in Entity Framework)
  • 在Android中出现错误“数据集和渲染器应该不为null,并且应该具有相同数量的系列”(Error “Dataset and renderer should be not null and should have the same number of series” in Android)
  • 电脑二级VF有什么用
  • Datamapper Ruby如何添加Hook方法(Datamapper Ruby How to add Hook Method)
  • 金华英语角.
  • 手机软件如何制作
  • 用于Android webview中图像保存的上下文菜单(Context Menu for Image Saving in an Android webview)
  • 注意:未定义的偏移量:PHP(Notice: Undefined offset: PHP)
  • 如何读R中的大数据集[复制](How to read large dataset in R [duplicate])
  • Unity 5 Heighmap与地形宽度/地形长度的分辨率关系?(Unity 5 Heighmap Resolution relationship to terrain width / terrain length?)
  • 如何通知PipedOutputStream线程写入最后一个字节的PipedInputStream线程?(How to notify PipedInputStream thread that PipedOutputStream thread has written last byte?)
  • python的访问器方法有哪些
  • DeviceNetworkInformation:哪个是哪个?(DeviceNetworkInformation: Which is which?)
  • 在Ruby中对组合进行排序(Sorting a combination in Ruby)
  • 网站开发的流程?
  • 使用Zend Framework 2中的JOIN sql检索数据(Retrieve data using JOIN sql in Zend Framework 2)
  • 条带格式类型格式模式编号无法正常工作(Stripes format type format pattern number not working properly)
  • 透明度错误IE11(Transparency bug IE11)
  • linux的基本操作命令。。。