基本上,我的Web服务必须可以作为单个OSGi jar包进行部署.因此:
I'm attempting to use the maven-bundle-plugin to accomplish this. I've used Embed-Dependency to get all my compile and runtime dependencies in the bundle, and I've used Embed-Transitive to embed all the transitive dependencies. I then figured out how to use excludeDependencies to exclude Maven dependencies from the BND classpath (they are moved to Private-Package in the Manifest), but for the life of me I can't figure out how to get it to exclude the transitive dependencies. …
这适用于 IntelliJ 2016.2。
我正在清理一些导致 CheckStyle 违规并停止我们的 CI 构建的代码,这似乎是由于 IntelliJ 的代码样式规则而发生的。我可以手动修复这些,但有两个问题:编辑器不加选择地应用这些规则,手动修复很多。如果有人再次运行代码格式化,它会将缩进设置回它想要的方式。
具体来说,多行方法签名的缩进如下所示:
我希望后续行中的参数在前一行开头的右侧缩进 4 个空格,而不是左括号。
有趣的是,按你输入的格式对我来说是正确的,但是当我使用代码格式化程序时,它会像上面那样重新格式化。
我可以通过在首选项中转到制表符和缩进并将“继续缩进”设置为 0 来获得一些方法:
但是这条规则被普遍应用,让其他东西看起来很糟糕,而且它不接受负值。
我已经转到首选项中的“Editor.Code Style.Java.Wrapping 和 Braces.Method 声明参数”,并尝试了那里的几乎所有内容。我有“Chop down if long”,但由于缩进规则,这使得行更长。我没有看到一种方法来指定它应该从哪里开始缩进或它应该缩进多少行。
这一点,再加上观察到方法调用的格式化表现出预期的行为(但更糟糕的是,不是构造函数调用!),让我认为这是一个错误。IntelliJ 的格式化程序似乎是硬编码的,以使用左括号中的继续缩进,而不是方法声明本身。
有什么我错过的或一些可行的解决方法吗?