Tabnine Logo
BillOfMaterials$Mapping.getAdditionalBoms
Code IndexAdd Tabnine to your IDE (free)

How to use
getAdditionalBoms
method
in
io.spring.initializr.metadata.BillOfMaterials$Mapping

Best Java code snippets using io.spring.initializr.metadata.BillOfMaterials$Mapping.getAdditionalBoms (Showing top 3 results out of 315)

origin: spring-io/initializr

@Test
void resolveRangeOverride() {
  BillOfMaterials bom = BillOfMaterials.create("com.example", "bom", "1.0.0");
  bom.getRepositories().add("repo-main");
  bom.getAdditionalBoms().add("bom-main");
  Mapping mapping = Mapping.create("[1.2.0.RELEASE,1.3.0.M1)", "1.1.0", "repo-foo");
  mapping.getAdditionalBoms().add("bom-foo");
  bom.getMappings().add(mapping);
  bom.validate();
  BillOfMaterials resolved = bom.resolve(Version.parse("1.2.3.RELEASE"));
  assertThat(resolved.getGroupId()).isEqualTo("com.example");
  assertThat(resolved.getArtifactId()).isEqualTo("bom");
  assertThat(resolved.getVersion()).isEqualTo("1.1.0");
  assertThat(resolved.getVersionProperty()).isNull();
  assertThat(resolved.getRepositories()).hasSize(1);
  assertThat(resolved.getRepositories().get(0)).isEqualTo("repo-foo");
  assertThat(resolved.getAdditionalBoms()).hasSize(1);
  assertThat(resolved.getAdditionalBoms().get(0)).isEqualTo("bom-foo");
}
origin: spring-io/initializr

for (String b : m.getAdditionalBoms()) {
  if (!boms.containsKey(b)) {
    throw new InvalidInitializrMetadataException(m + " of " + bom
origin: spring-io/initializr

@Test
void invalidBomVersionRangeMappingUnknownAdditionalBom() {
  InitializrMetadata metadata = initializeMetadata();
  BillOfMaterials bom = BillOfMaterials.create("org.acme", "foo-bom");
  bom.getMappings().add(Mapping.create("[1.0.0.RELEASE,1.3.0.M1)", "1.0.0"));
  Mapping mapping = Mapping.create("1.3.0.M2", "1.2.0");
  mapping.getAdditionalBoms().add("bar-bom");
  bom.getMappings().add(mapping);
  metadata.getConfiguration().getEnv().getBoms().put("foo-bom", bom);
  assertThatExceptionOfType(InvalidInitializrMetadataException.class)
      .isThrownBy(metadata::validate)
      .withMessageContaining("invalid additional bom")
      .withMessageContaining("1.3.0.M2").withMessageContaining("bar-bom");
}
io.spring.initializr.metadataBillOfMaterials$MappinggetAdditionalBoms

Popular methods of BillOfMaterials$Mapping

  • create
  • getRepositories
  • <init>
  • determineVersionRangeRequirement
  • getVersion
  • setArtifactId
  • setGroupId

Popular in Java

  • Creating JSON documents from java classes using gson
  • setRequestProperty (URLConnection)
  • getSharedPreferences (Context)
  • runOnUiThread (Activity)
  • IOException (java.io)
    Signals a general, I/O-related error. Error details may be specified when calling the constructor, a
  • Comparator (java.util)
    A Comparator is used to compare two objects to determine their ordering with respect to each other.
  • Timer (java.util)
    Timers schedule one-shot or recurring TimerTask for execution. Prefer java.util.concurrent.Scheduled
  • Notification (javax.management)
  • Base64 (org.apache.commons.codec.binary)
    Provides Base64 encoding and decoding as defined by RFC 2045.This class implements section 6.8. Base
  • Project (org.apache.tools.ant)
    Central representation of an Ant project. This class defines an Ant project with all of its targets,
  • Best plugins for Eclipse
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now