/** * Gets the Maven to invoke, * or null to invoke the default one. */ public MavenInstallation getMaven() { for( MavenInstallation i : getDescriptor().getInstallations() ) { if(mavenName !=null && mavenName.equals(i.getName())) return i; } return null; }
/** * Gets the Maven to invoke, * or null to invoke the default one. */ public MavenInstallation getMaven() { for( MavenInstallation i : getDescriptor().getInstallations() ) { if(mavenName !=null && mavenName.equals(i.getName())) return i; } return null; }
/** * Gets the Maven to invoke. * If null, we pick any random Maven installation. */ public MavenInstallation getMaven() { for( MavenInstallation i : DESCRIPTOR.getMavenDescriptor().getInstallations() ) { if(mavenName==null || i.getName().equals(mavenName)) return i; } return null; }
/** * Gets the Maven to invoke. * If null, we pick any random Maven installation. */ public MavenInstallation getMaven() { MavenInstallation[] installations = getDescriptor().getMavenDescriptor().getInstallations(); for( MavenInstallation i : installations) { if(mavenName==null || i.getName().equals(mavenName)) return i; } if (installations.length==1) return installations[0]; return null; }
@Override public MavenInstallation[] getInstallations() { return Hudson.getInstance().getDescriptorByType(Maven.DescriptorImpl.class).getInstallations(); }
@Override public MavenInstallation[] getInstallations() { return Hudson.getInstance().getDescriptorByType(Maven.DescriptorImpl.class).getInstallations(); }
@Override public MavenInstallation[] getInstallations() { return Jenkins.getInstance().getDescriptorByType(Maven.DescriptorImpl.class).getInstallations(); }
public Maven.MavenInstallation[] getInstallations() { return Jenkins.getInstance().getDescriptorByType(Maven.DescriptorImpl.class).getInstallations(); }
@Override public MavenInstallation[] getInstallations() { return Hudson.getInstance().getDescriptorByType(Maven.DescriptorImpl.class).getInstallations(); }
@Restricted(NoExternalUse.class) // Only for UI calls public ListBoxModel doFillMavenItems() { ListBoxModel r = new ListBoxModel(); r.add("--- Use system default Maven ---",null); for (MavenInstallation installation : getMavenDescriptor().getInstallations()) { r.add(installation.getName()); } return r; }
/** * Gets the Maven to invoke, * or null to invoke the default one. */ public MavenInstallation getMaven() { for( MavenInstallation i : getDescriptor().getInstallations() ) { if(mavenName !=null && mavenName.equals(i.getName())) return i; } return null; }
/** * Gets the Maven to invoke, or null to invoke the default one. */ public MavenInstallation getMaven() { for (MavenInstallation i : getDescriptor().getInstallations()) { if (mavenName != null && mavenName.equals(i.getName())) { return i; } } return null; }
/** * This method is used in UI, so signature and location of this method is important (see SONARPLUGINS-1337). * * @return all configured {@link hudson.tasks.Maven.MavenInstallation} */ public MavenInstallation[] getMavenInstallations() { return Jenkins.getInstance().getDescriptorByType(Maven.DescriptorImpl.class).getInstallations(); }
/** * @return maven installations on this instance */ private static MavenInstallation[] getMavenInstallations() { return Jenkins.getInstance().getDescriptorByType(Maven.DescriptorImpl.class).getInstallations(); }
/** * Gets the Maven to invoke, * or null to invoke the default one. */ public MavenInstallation getMaven() { for( MavenInstallation i : getDescriptor().getInstallations() ) { if(mavenName !=null && mavenName.equals(i.getName())) return i; } return null; }
@Override public MavenInstallation[] getInstallations() { return Hudson.getInstance().getDescriptorByType(Maven.DescriptorImpl.class).getInstallations(); }
/** * Gets the Maven to invoke, * or null to invoke the default one. */ public MavenInstallation getMaven() { for( MavenInstallation i : getDescriptor().getInstallations() ) { if(mavenName !=null && mavenName.equals(i.getName())) return i; } return null; }
@Test @ConfiguredWithCode("MavenConfiguratorTest.yml") public void should_configure_maven_tools_and_global_config() { final Maven.DescriptorImpl descriptor= (Maven.DescriptorImpl) j.jenkins.getDescriptorOrDie(Maven.class); Assert.assertEquals(1, descriptor.getInstallations().length); Assert.assertEquals("/usr/share/maven", descriptor.getInstallations()[0].getHome()); InstallSourceProperty installSourceProperty = descriptor.getInstallations()[0].getProperties().get(InstallSourceProperty.class); Assert.assertEquals("3.5.0", installSourceProperty.installers.get(Maven.MavenInstaller.class).id); final SettingsProvider provider = GlobalMavenConfig.get().getSettingsProvider(); Assert.assertTrue(provider instanceof FilePathSettingsProvider); Assert.assertEquals("/usr/share/maven-settings.xml", ((FilePathSettingsProvider)provider).getPath()); } }
@Override public MavenInstallation[] getInstallations() { return Jenkins.getInstance().getDescriptorByType(Maven.DescriptorImpl.class).getInstallations(); }