小编Gil*_*art的帖子

如何使用JaCoCo maven插件排除SonarQube代码覆盖率的文件

对于SonarQube 6.0的代码覆盖,JaCoCo maven插件的集成存在很大问题.

我有一个多模块Maven项目让我们说:

master
    |--core
    |--web
    |--process
Run Code Online (Sandbox Code Playgroud)

在主pom.xml中,我设置了一个类似的报告配置文件:

<profile>
        <id>reporting</id>
        <build>
            <plugins>
                <plugin>
                    <groupId>org.jacoco</groupId>
                    <artifactId>jacoco-maven-plugin</artifactId>
                    <executions>
                        <execution>
                            <id>pre-unit-test</id>
                            <!--<phase>test</phase> -->
                            <goals>
                                <goal>prepare-agent</goal>
                            </goals>
                            <configuration>
                                <!-- Sets the path to the file to write the execution data to. -->
                                <destFile>${sonar.jacoco.reportPath}</destFile>
                                <!-- Connection with SureFire plugin -->
                                <propertyName>sonarUnitTestArgLine</propertyName>
                            </configuration>
                        </execution>
                        <execution>
                            <id>post-unit-test</id>
                            <phase>test</phase>
                            <goals>
                                <goal>report</goal>
                            </goals>
                            <configuration>
                                <!-- Sets the path to where the execution data is located. -->
                                <dataFile>${sonar.jacoco.reportPath}</dataFile>
                                <!-- Sets the output directory for the code coverage report. --> …
Run Code Online (Sandbox Code Playgroud)

java maven sonarqube jacoco-maven-plugin

7
推荐指数
1
解决办法
1万
查看次数

Spring数据Neo4j + Kotlin上的日期转换器

我正在从Java切换到Kotlin,这是一个简单的项目,但我正在解决一个转换问题。我在数据库上:

CREATE (:Meeting {on: '2018-10-09', location: "Oracle's offices"})
Run Code Online (Sandbox Code Playgroud)

以及在kotlin中(使用SpringBoot + Spring Data neo4J)

@NodeEntity
data class Meeting(
    @Id @GeneratedValue var id: Long?,
    @DateString("yyyy-MM-dd") var on: LocalDate?,
    var location: String?,
    @Relationship(value = "ON") var topics: List<Topic> = ArrayList(),
    @Relationship(value = "IN", direction = Relationship.INCOMING) var 
participants: List<Person> = ArrayList(),
    @Relationship(value = "ON") var event: Event?
) : Comparable<Meeting> {
    override fun compareTo(other: Meeting): Int {
        return this.on!!.compareTo(other.on)
    }
}
Run Code Online (Sandbox Code Playgroud)

但是当我执行一个简单的MeetingRepository.findAll()时,我遇到了异常

java.time.format.DateTimeParseException: Text '2018-10-09' could not be parsed at index 4
at …
Run Code Online (Sandbox Code Playgroud)

java neo4j kotlin spring-data-neo4j spring-boot

5
推荐指数
1
解决办法
204
查看次数

VueJS + VeeValidator +多个字段

版本:
  • VueJs:2.2.2
  • Vee验证:2.0.0-beta.25

描述:

我想知道是否有办法为多个字段提供唯一的验证器?

通常,地址表单带有1个输入,代表街道,1个代表数字,1个代表城市

我想对所有元素的组合进行验证。

我已经阅读了文档,但找不到能为我提供帮助的示例。

vue.js

4
推荐指数
1
解决办法
2359
查看次数