Examples of PluginModel


Examples of com.github.ferstl.maven.pomenforcers.model.PluginModel

    super(helper);
  }

  @Override
  protected PluginModel transform(Plugin mavenPlugin) {
    return new PluginModel(mavenPlugin.getGroupId(), mavenPlugin.getArtifactId(), mavenPlugin.getVersion());
  }
View Full Code Here

Examples of com.github.ferstl.maven.pomenforcers.model.PluginModel

  @Before
  public void before() {
    when(this.mockMavenProject.getGroupId()).thenReturn("a.b.c");
    when(this.mockMavenProject.getArtifactId()).thenReturn("parent");
    this.projectModel.getManagedPlugins().add(new PluginModel("a.b.c", "a", "1.0"));
  }
View Full Code Here

Examples of com.github.ferstl.maven.pomenforcers.model.PluginModel

    executeRuleAndCheckReport(true);
  }

  private void addPlugin(boolean withVersion, boolean withConfiguration, boolean withDependencies) {
    PluginModel plugin = mock(PluginModel.class);

    when(plugin.getGroupId()).thenReturn("a.b.c");
    when(plugin.getArtifactId()).thenReturn("a");

    if (withVersion) {
      when(plugin.getVersion()).thenReturn("1.0");
    }

    if (withConfiguration) {
      when(plugin.isConfigured()).thenReturn(true);
    }

    if (withDependencies) {
      when(plugin.getDependencies()).thenReturn(
          Arrays.asList(new DependencyModel("x.y.z", "z", "1.0", null, null, null)));
    }

    this.testRule.getProjectModel().getPlugins().add(plugin);
  }
View Full Code Here

Examples of com.github.ferstl.maven.pomenforcers.model.PluginModel

    executeRuleAndCheckReport(false);
  }

  private void addManagedPlugin(String groupId, String artifactId) {
    String defaultVersion = "1.0";
    PluginModel pluginModel = new PluginModel(groupId, artifactId, defaultVersion);
    Plugin mavenPlugin = new Plugin();
    mavenPlugin.setGroupId(groupId);
    mavenPlugin.setArtifactId(artifactId);
    mavenPlugin.setVersion(defaultVersion);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.