Ярлыки

Показаны сообщения с ярлыком java. Показать все сообщения
Показаны сообщения с ярлыком java. Показать все сообщения

понедельник, 17 марта 2014 г.

Java: Cobertura coverage report

To run Cobertura during package phase, do
 <plugin>  
            <groupId>org.codehaus.mojo</groupId>  
            <artifactId>cobertura-maven-plugin</artifactId>  
            <version>2.5.2</version>  
            <configuration>  
                <formats>  
                    <format>xml</format>  
                </formats>  
            </configuration>  
            <executions>  
                <execution>  
                    <phase>package</phase>  
                    <goals>  
                        <goal>cobertura</goal>  
                    </goals>  
                </execution>  
            </executions>  
   </plugin>         
Heres an example of pom

воскресенье, 19 января 2014 г.

понедельник, 18 марта 2013 г.

create JAR in Eclipse

1. Project import Import files as existing project (File → Import... → Existing Projects into Workspace). 2. Creating JAR Context menu on project folder > Export... > Java/JAR file. Than we change path and name of JAR in field "Select the export destination". 3. Some error Error: "JAR creation failed. See details for additional information". Details: Resource is out of sync with the file system: /projectName/.svn/entries Solution: Context menu on project folder > Refresh

вторник, 2 октября 2012 г.

neo4j: class RelTypeFilterExcluder example


public class RelTypeFilterExcluder implements Predicate<Object> {
Set<String> exclude;

public RelTypeFilterExcluder(Set<String> excludeInput) {
this.exclude = excludeInput;
}

@Override
public boolean accept(Object arg0) {
String typeItem = ((PropertyContainer) arg0).getProperty("type").toString();
if ( this.exclude.contains(typeItem) ) {
return false;
}
return true;
}

}