首页 \ 问答 \ Maven中的“反应堆”是什么?(What is the “reactor” in Maven?)

Maven中的“反应堆”是什么?(What is the “reactor” in Maven?)

我一直在阅读有关Maven反应堆,并被其术语用法所困惑。 我读过一个多模块是一个反应堆,你可以操纵maven反应堆,反应堆是一个插件。 反应堆究竟是什么?


I've been reading about Maven reactor and am confused by its terminology usage. I've read the a multi-module is a reactor, that you can manipulate the maven reactor and that the reactor is a plugin. What exactly is the reactor?


原文:https://stackoverflow.com/questions/2050241
更新时间:2023-08-22 14:08

最满意答案

好吧,让我们首先使用缩进来让函数定义更加清晰

let f x y =
     if y/=0
         then f (x+1) (y-1)
         else x
in f 3 5

所以f首先被调用参数35y是5(即不是0),则执行该分支,该分支使用参数44调用f。 由于y仍然不等于0,我们再次进入then分支并用参数53调用f。 这继续下去,直到我们最终以x = 8y = 0调用f。 然后我们进入条件的else分支,它只返回x ,即8。

下面是可以减少表达式f 3 5一种方式:

f 3 5 -- y /= 0, so we go into the then branch
=> f (3 + 1) (5 - 1)
=> f 4 4 -- then branch again
=> f (4 + 1) (4 - 1)
=> f 5 3
=> f (5 + 1) (3 - 1)
=> f 6 2
=> f (6 + 1) (2 - 1)
=> f 7 1
=> f (7 + 1) (1 - 1)
=> f 8 0 -- this time we go into the else branch
=> 8

Ok, so let's first make the function definition a bit more clear by using indentation

let f x y =
     if y/=0
         then f (x+1) (y-1)
         else x
in f 3 5

So f is called with arguments 3 and 5 at first. y being 5 (i.e. not 0), the then branch is executed, which calls f with arguments 4 and 4. Since y is still not equal to 0, we go into the then branch again and call f with arguments 5 and 3. This goes on until we finally call f with x = 8 and y = 0. We then go into the conditional's else branch, which just returns x, i.e. 8.

Here is one way the expression f 3 5 could be reduced:

f 3 5 -- y /= 0, so we go into the then branch
=> f (3 + 1) (5 - 1)
=> f 4 4 -- then branch again
=> f (4 + 1) (4 - 1)
=> f 5 3
=> f (5 + 1) (3 - 1)
=> f 6 2
=> f (6 + 1) (2 - 1)
=> f 7 1
=> f (7 + 1) (1 - 1)
=> f 8 0 -- this time we go into the else branch
=> 8

相关问答

更多
  • 好吧,让我们首先使用缩进来让函数定义更加清晰 let f x y = if y/=0 then f (x+1) (y-1) else x in f 3 5 所以f首先被调用参数3和5 。 y是5(即不是0),则执行该分支,该分支使用参数4和4调用f。 由于y仍然不等于0,我们再次进入then分支并用参数5和3调用f。 这继续下去,直到我们最终以x = 8和y = 0调用f。 然后我们进入条件的else分支,它只返回x ,即8。 下面是可以减少表达式f 3 5一 ...
  • 是的,但它像地狱般笨拙,例如 ... ... ... Yes, but it's clunky as hell, e.g.
    布尔表达式本身的问题是它们总是为True。 if a == 'b' or 'c'就像if (True|False) or 'c' ,并且因为'c'是真实的 ,所以无论第一个表达式( a == 'b' )如何都是真的。 你想要a == 'b' and a == 'c'…或者更简洁的a in {'b', 'c'…} ,它会检查a是否是该集合的成员。 如果你想循环,使用循环:) while username not in {"cking", "doneal", "mcook"}: print ("Inva ...
  • 您不能在视图中使用IF-ELSE。 这是一个单一的选择声明。 但是你可以使用case表达式。 case when CommisionType = 'P' then EmployeeFirstName end You can't have IF-ELSE in a view. It is a single select statement. But you could use a case expression for this. case when CommisionType = 'P' then Emp ...
  • 您可以使用F11调试/步入您的程序。 点击F11一次将“进入”你的程序。 然后,您可以继续按F11,它将运行您的程序并突出显示它逐行执行的代码。 一旦停止,单击“90”组合框项目并继续按F11直到它到达该行: if(comboBox.SelectedItem.ToString() == "90") 此时,将鼠标悬停在“SelectedItem”上,它应该显示存储在该属性中的数据。 我希望这有帮助! You can debug/step into your program using F11. Hittin ...
  • 说明不太相似,这意味着它们没有相同的方法[...]如何解决if-else语句和长代码太多的问题? 一般来说,如果你有“如果这种类型,那么这样做”,那么你就有了多态性(虚函数)的情况。 在这种情况下,每个实体的共同点是您正在尝试更新游戏模拟,并且游戏的每个部分(每个士兵)对更新模拟的含义有不同的概念。 我来到了需要创建一个方法的部分,该方法将检查下一条指令是什么并执行它。 我建议将其拆分为多个抽象级别: 表示模拟本身 从用户那里获取输入(读取文件) 将输入转换为模拟中的操作 您希望获得此类独立性的原因是,如果 ...
  • 这可能是最好的解决方案。 你很容易阅读和看到你在做什么。 根据您的代码,甚至对于一条语句使用三元运算符有时可能会有点多。 这里有大量的替代品。 你可以说许多OOP设计模式本身只是if语句的替代方案,但对于这样的简单案例来说,没有必要去那么远。 That is probably the best solution. It is very easy to read and see exactly what you're doing. Using the ternary operator even for one ...
  • 是的,你可以使用警卫。 但它经常会在Haskell中编译成相同的内部表示。 import Numeric.Container import Numeric.LinearAlgebra mpow :: Field t => (Matrix t) -> Integer -> (Matrix t) mpow x 0 = ident $ cols x mpow x 1 = x mpow x n | (mod n 2) == 0 = multiply (trans x) (mpow x $ n - 1) ...
  • 这两个是等价的: if (condition1) block1 else if (condition2) block2 if (condition1) block1 else { if (condition2) block2 } 我认为他们也编译到同一个程序集,所以应该没有区别。 These two are equivalent: if (condition1) block1 else if (condition2) block2 if (condition1) block1 els ...
  • 对于警卫或案件陈述来说,这看起来是个不错的选择。 你可以做点什么 myAction :: Monad m => Int -> Int -> Int -> m () myAction x y z | x == 1 = doX | y == 1 = doY | z == 1 = doZ | otherwise = doSomethingElse 或者您可以使用MultiWayIf扩展: myAction :: Monad m => m () myAction = do ...

相关文章

更多

最新问答

更多
  • 获取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的基本操作命令。。。