protected NodeTuple representJavaBeanProperty(Object javaBean, Property property, Object propertyValue, Tag customTag) { if (property != null && property.getName().equals("pomFile")) { // "pomFile" is not a part of POM http://maven.apache.org/xsd/maven-4.0.0.xsd return null; } if (propertyValue == null) return null; if (propertyValue instanceof Map) { Map map = (Map) propertyValue; if (map.isEmpty()) return null; } if (propertyValue instanceof List) { List map = (List) propertyValue; if (map.isEmpty()) return null; } if (javaBean instanceof Dependency) { //skip optional if it is false if (skipBoolean(property, "optional", propertyValue, false)) return null; //skip type if it is jar if (skipString(property, "type", propertyValue, "jar")) return null; } if (javaBean instanceof Plugin) { //skip extensions if it is false if (skipBoolean(property, "extensions", propertyValue, false)) return null; //skip inherited if it is true if (skipBoolean(property, "inherited", propertyValue, true)) return null; } return super.representJavaBeanProperty(javaBean, property, propertyValue, customTag); }
protected NodeTuple representJavaBeanProperty(Object javaBean, Property property, Object propertyValue, Tag customTag) { if (property != null && property.getName().equals("pomFile")) { // "pomFile" is not a part of POM http://maven.apache.org/xsd/maven-4.0.0.xsd return null; } if (propertyValue == null) return null; if (propertyValue instanceof Map) { Map map = (Map) propertyValue; if (map.isEmpty()) return null; } if (propertyValue instanceof List) { List map = (List) propertyValue; if (map.isEmpty()) return null; } if (javaBean instanceof Dependency) { //skip optional if it is false if (skipBoolean(property, "optional", propertyValue, false)) return null; //skip type if it is jar if (skipString(property, "type", propertyValue, "jar")) return null; } if (javaBean instanceof Plugin) { //skip extensions if it is false if (skipBoolean(property, "extensions", propertyValue, false)) return null; //skip inherited if it is true if (skipBoolean(property, "inherited", propertyValue, true)) return null; } return super.representJavaBeanProperty(javaBean, property, propertyValue, customTag); }