我的仓库中有一个Maven Web项目.
我是一个Maven noob,但我仍然理解有这样一个事实,即我们需要配置插件才能运行特定于插件的命令.
事实:
我在本地机器上的端口9000上运行了一个声纳服务器.
我没有在我的POM.xml中添加任何声纳特定插件
参考:
http://www.sonarsource.org/we-had-a-dream-mvn-sonarsonar/
观察:
但是当我从命令行运行mvn sonar:sonar我的项目时,它工作正常.
事实很重要的是我没有在我的POM.xml中配置声纳插件即使那时Maven正在拾取并理解"声纳:声纳"目标/命令?
问题/好奇心:
我不想要声纳本身的工作知识.我想知道为什么mvn sonar:sonar在没有在我的pom.xml中配置声纳插件的情况下工作
为什么以及如何?
我jq用来改造我的JSON.
JSON字符串:
{"channel": "youtube", "profile_type": "video", "member_key": "hello"}
通缉输出:
{"channel" : "profile_type.youtube"}
我的命令:
__PRE__
我知道下面的命令连接字符串.但它的工作原理与上述不同:
__PRE__
如何使用ONLY jq实现我的结果?
我已经插入了需要依赖
testCompile 'org.mockito:mockito-core:1.10.19'
Run Code Online (Sandbox Code Playgroud)
然后我把我的测试代码放到/src/test/java/目录中
然后我尝试启动这样的测试
import org.junit.Test;
import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.MatcherAssert.assertThat;
public class PresenterActivityAcceptNotAcceptTest {
@Test
public void emailValidator_CorrectEmailSimple_ReturnsTrue() {
boolean dd = true;
assertThat(dd, is(true));
}
Run Code Online (Sandbox Code Playgroud)
它工作正常,但如果我添加任何与Mocklib相关的女巫
例如 @RunWith
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.runners.MockitoJUnitRunner;
import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.MatcherAssert.assertThat;
@RunWith(MockitoJUnitRunner.class)
public class PresenterActivityAcceptNotAcceptTest {
@Test
public void emailValidator_CorrectEmailSimple_ReturnsTrue() {
boolean dd = true;
assertThat(dd, is(true));
}
Run Code Online (Sandbox Code Playgroud)
我有这样的错误
Error:Execution failed for task ':Application:compileDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for …Run Code Online (Sandbox Code Playgroud)