io.github.pmckeown.dependencytrack.ObjectMapperFactory Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of dependency-track-maven-plugin Show documentation
Show all versions of dependency-track-maven-plugin Show documentation
Maven plugin to integrate with a Dependency Track server to submit dependency manifests and gather project metrics.
package io.github.pmckeown.dependencytrack;
import com.fasterxml.jackson.databind.DeserializationFeature;
import com.fasterxml.jackson.databind.ObjectMapper;
/**
* Utility class to build {@link ObjectMapper} instances to be passed to Unirest
*
* @author Paul McKeown
*/
public class ObjectMapperFactory {
private ObjectMapperFactory() {
// Use factory method
}
/**
* Get an {@link ObjectMapper} instance that is configured to
* @return a preconfigured ObjectMapper
*/
public static ObjectMapper relaxedObjectMapper() {
ObjectMapper objectMapper = new ObjectMapper();
objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
return objectMapper;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy