test_class.file: tycho-core/src/test/java/org/eclipse/tycho/core/maven/TychoMavenLifecycleParticipantTest.java
test_class.identifier: TychoMavenLifecycleParticipantTest
test_case.body: @Test
      public void validateConsistentTychoVersionWithNullAsVersion() throws MavenExecutionException {
          TychoMavenLifecycleParticipant tycho = new TychoMavenLifecycleParticipant(new SilentLog());
          MavenProject project = createProject();
          addTychoPlugin(project, "tycho-packaging-plugin", null);
          addTychoPlugin(project, "tycho-versions-plugin", "0.23.0");
  
          tycho.validateConsistentTychoVersion(Arrays.asList(project));
      }
test_case.class_method_signature: TychoMavenLifecycleParticipantTest.validateConsistentTychoVersionWithNullAsVersion()
test_case.full_signature: @Test public void validateConsistentTychoVersionWithNullAsVersion()
test_case.identifier: validateConsistentTychoVersionWithNullAsVersion
test_case.invocations: createProject addTychoPlugin addTychoPlugin validateConsistentTychoVersion asList
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void validateConsistentTychoVersionWithNullAsVersion()
focal_class.declarator: TYCHO_GROUPID = "org.eclipse.tycho"
focal_class.modifier: private static final
focal_class.original_string: private static final String TYCHO_GROUPID = "org.eclipse.tycho";
focal_class.type: String
focal_class.var_name: TYCHO_GROUPID
focal_class.declarator: TYCHO_PLUGIN_IDS = new HashSet<>(Arrays.asList("tycho-maven-plugin",
              "tycho-p2-director-plugin", "tycho-p2-plugin", "tycho-p2-publisher-plugin", "tycho-p2-repository-plugin",
              "tycho-packaging-plugin", "tycho-pomgenerator-plugin", "tycho-source-plugin", "tycho-surefire-plugin",
              "tycho-versions-plugin", "tycho-compiler-plugin"))
focal_class.modifier: private static final
focal_class.original_string: private static final Set<String> TYCHO_PLUGIN_IDS = new HashSet<>(Arrays.asList("tycho-maven-plugin",
              "tycho-p2-director-plugin", "tycho-p2-plugin", "tycho-p2-publisher-plugin", "tycho-p2-repository-plugin",
              "tycho-packaging-plugin", "tycho-pomgenerator-plugin", "tycho-source-plugin", "tycho-surefire-plugin",
              "tycho-versions-plugin", "tycho-compiler-plugin"));
focal_class.type: Set<String>
focal_class.var_name: TYCHO_PLUGIN_IDS
focal_class.declarator: P2_USER_AGENT_KEY = "p2.userAgent"
focal_class.modifier: private static final
focal_class.original_string: private static final String P2_USER_AGENT_KEY = "p2.userAgent";
focal_class.type: String
focal_class.var_name: P2_USER_AGENT_KEY
focal_class.declarator: P2_USER_AGENT_VALUE = "tycho/"
focal_class.modifier: private static final
focal_class.original_string: private static final String P2_USER_AGENT_VALUE = "tycho/";
focal_class.type: String
focal_class.var_name: P2_USER_AGENT_VALUE
focal_class.declarator: bundleReader
focal_class.modifier: @Requirement
      private
focal_class.original_string: @Requirement
      private BundleReader bundleReader;
focal_class.type: BundleReader
focal_class.var_name: bundleReader
focal_class.declarator: resolver
focal_class.modifier: @Requirement
      private
focal_class.original_string: @Requirement
      private TychoResolver resolver;
focal_class.type: TychoResolver
focal_class.var_name: resolver
focal_class.declarator: plexus
focal_class.modifier: @Requirement
      private
focal_class.original_string: @Requirement
      private PlexusContainer plexus;
focal_class.type: PlexusContainer
focal_class.var_name: plexus
focal_class.declarator: log
focal_class.modifier: @Requirement
      private
focal_class.original_string: @Requirement
      private Logger log;
focal_class.type: Logger
focal_class.var_name: log
focal_class.file: tycho-core/src/main/java/org/eclipse/tycho/core/maven/TychoMavenLifecycleParticipant.java
focal_class.identifier: TychoMavenLifecycleParticipant
focal_class.class_method_signature: TychoMavenLifecycleParticipant.TychoMavenLifecycleParticipant()
focal_class.full_signature: public  TychoMavenLifecycleParticipant()
focal_class.identifier: TychoMavenLifecycleParticipant
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.signature:  TychoMavenLifecycleParticipant()
focal_class.class_method_signature: TychoMavenLifecycleParticipant.TychoMavenLifecycleParticipant(Logger log)
focal_class.full_signature: protected  TychoMavenLifecycleParticipant(Logger log)
focal_class.identifier: TychoMavenLifecycleParticipant
focal_class.modifiers: protected
focal_class.parameters: (Logger log)
focal_class.signature:  TychoMavenLifecycleParticipant(Logger log)
focal_class.class_method_signature: TychoMavenLifecycleParticipant.afterProjectsRead(MavenSession session)
focal_class.full_signature: @Override public void afterProjectsRead(MavenSession session)
focal_class.identifier: afterProjectsRead
focal_class.modifiers: @Override public
focal_class.parameters: (MavenSession session)
focal_class.return: void
focal_class.signature: void afterProjectsRead(MavenSession session)
focal_class.class_method_signature: TychoMavenLifecycleParticipant.validate(List<MavenProject> projects)
focal_class.full_signature: private void validate(List<MavenProject> projects)
focal_class.identifier: validate
focal_class.modifiers: private
focal_class.parameters: (List<MavenProject> projects)
focal_class.return: void
focal_class.signature: void validate(List<MavenProject> projects)
focal_class.class_method_signature: TychoMavenLifecycleParticipant.validateConsistentTychoVersion(List<MavenProject> projects)
focal_class.full_signature: protected void validateConsistentTychoVersion(List<MavenProject> projects)
focal_class.identifier: validateConsistentTychoVersion
focal_class.modifiers: protected
focal_class.parameters: (List<MavenProject> projects)
focal_class.return: void
focal_class.signature: void validateConsistentTychoVersion(List<MavenProject> projects)
focal_class.class_method_signature: TychoMavenLifecycleParticipant.validateUniqueBaseDirs(List<MavenProject> projects)
focal_class.full_signature: private void validateUniqueBaseDirs(List<MavenProject> projects)
focal_class.identifier: validateUniqueBaseDirs
focal_class.modifiers: private
focal_class.parameters: (List<MavenProject> projects)
focal_class.return: void
focal_class.signature: void validateUniqueBaseDirs(List<MavenProject> projects)
focal_class.class_method_signature: TychoMavenLifecycleParticipant.disableLifecycleParticipation(MavenSession session)
focal_class.full_signature: private boolean disableLifecycleParticipation(MavenSession session)
focal_class.identifier: disableLifecycleParticipation
focal_class.modifiers: private
focal_class.parameters: (MavenSession session)
focal_class.return: boolean
focal_class.signature: boolean disableLifecycleParticipation(MavenSession session)
focal_class.class_method_signature: TychoMavenLifecycleParticipant.configureComponents(MavenSession session)
focal_class.full_signature: private void configureComponents(MavenSession session)
focal_class.identifier: configureComponents
focal_class.modifiers: private
focal_class.parameters: (MavenSession session)
focal_class.return: void
focal_class.signature: void configureComponents(MavenSession session)
focal_class.superclass: extends AbstractMavenLifecycleParticipant
focal_method.body: protected void validateConsistentTychoVersion(List<MavenProject> projects) throws MavenExecutionException {
          Map<String, Set<MavenProject>> versionToProjectsMap = new HashMap<>();
          for (MavenProject project : projects) {
              for (Plugin plugin : project.getBuild().getPlugins()) {
                  if (TYCHO_GROUPID.equals(plugin.getGroupId()) && TYCHO_PLUGIN_IDS.contains(plugin.getArtifactId())) {
                      String version = plugin.getVersion();
                      // Skip checking plug ins that do not have a version
                      if (version == null) {
                          continue;
                      }
                      log.debug(TYCHO_GROUPID + ":" + plugin.getArtifactId() + ":" + version + " configured in "
                              + project);
                      Set<MavenProject> projectSet = versionToProjectsMap.get(version);
                      if (projectSet == null) {
                          projectSet = new LinkedHashSet<>();
                          versionToProjectsMap.put(version, projectSet);
                      }
                      projectSet.add(project);
                  }
              }
          }
          if (versionToProjectsMap.size() > 1) {
              List<String> versions = new ArrayList<>(versionToProjectsMap.keySet());
              Collections.sort(versions);
              log.error("Several versions of tycho plugins are configured " + versions + ":");
              for (String version : versions) {
                  log.error(version + ":");
                  for (MavenProject project : versionToProjectsMap.get(version)) {
                      log.error("\t" + project.toString());
                  }
              }
              throw new MavenExecutionException("All tycho plugins configured in one reactor must use the same version",
                      projects.get(0).getFile());
          }
      }
focal_method.class_method_signature: TychoMavenLifecycleParticipant.validateConsistentTychoVersion(List<MavenProject> projects)
focal_method.full_signature: protected void validateConsistentTychoVersion(List<MavenProject> projects)
focal_method.identifier: validateConsistentTychoVersion
focal_method.invocations: getPlugins getBuild equals getGroupId contains getArtifactId getVersion debug getArtifactId get put add size keySet sort error error get error toString getFile get
focal_method.modifiers: protected
focal_method.parameters: (List<MavenProject> projects)
focal_method.return: void
focal_method.signature: void validateConsistentTychoVersion(List<MavenProject> projects)