test_class.declarator: MAIN_ARTIFACT = new File("bin.jar")
test_class.modifier: private static final
test_class.original_string: private static final File MAIN_ARTIFACT = new File("bin.jar");
test_class.type: File
test_class.var_name: MAIN_ARTIFACT
test_class.declarator: SOURCE_ARTIFACT = new File("source.jar")
test_class.modifier: private static final
test_class.original_string: private static final File SOURCE_ARTIFACT = new File("source.jar");
test_class.type: File
test_class.var_name: SOURCE_ARTIFACT
test_class.declarator: OTHER_ARTIFACT = new File("some/other.xml")
test_class.modifier: private static final
test_class.original_string: private static final File OTHER_ARTIFACT = new File("some/other.xml");
test_class.type: File
test_class.var_name: OTHER_ARTIFACT
test_class.declarator: testFile
test_class.original_string: File testFile;
test_class.type: File
test_class.var_name: testFile
test_class.file: tycho-p2/tycho-p2-plugin/src/test/java/org/eclipse/tycho/plugins/p2/P2MetadataMojoTest.java
test_class.identifier: P2MetadataMojoTest
test_case.body: @Test
      public void testWriteArtifactLocations() throws Exception {
          Map<String, File> artifactLocations = new HashMap<>();
          artifactLocations.put(null, MAIN_ARTIFACT);
          artifactLocations.put("source", SOURCE_ARTIFACT);
          artifactLocations.put("other-classifier", OTHER_ARTIFACT);
  
          P2MetadataMojo.writeArtifactLocations(testFile, artifactLocations);
  
          Properties result = loadProperties(testFile);
          assertEquals(3, result.size());
          assertEquals(MAIN_ARTIFACT.getCanonicalFile(), getFileEntry("artifact.main", result));
          assertEquals(SOURCE_ARTIFACT.getCanonicalFile(), getFileEntry("artifact.attached.source", result));
          assertEquals(OTHER_ARTIFACT.getCanonicalFile(), getFileEntry("artifact.attached.other-classifier", result));
      }
test_case.class_method_signature: P2MetadataMojoTest.testWriteArtifactLocations()
test_case.full_signature: @Test public void testWriteArtifactLocations()
test_case.identifier: testWriteArtifactLocations
test_case.invocations: put put put writeArtifactLocations loadProperties assertEquals size assertEquals getCanonicalFile getFileEntry assertEquals getCanonicalFile getFileEntry assertEquals getCanonicalFile getFileEntry
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testWriteArtifactLocations()
focal_class.declarator: LOCK = new Object()
focal_class.modifier: private static final
focal_class.original_string: private static final Object LOCK = new Object();
focal_class.type: Object
focal_class.var_name: LOCK
focal_class.declarator: project
focal_class.modifier: @Parameter(property = "project")
      protected
focal_class.original_string: @Parameter(property = "project")
      protected MavenProject project;
focal_class.type: MavenProject
focal_class.var_name: project
focal_class.declarator: execution
focal_class.modifier: @Parameter(property = "mojoExecution", readonly = true)
      protected
focal_class.original_string: @Parameter(property = "mojoExecution", readonly = true)
      protected MojoExecution execution;
focal_class.type: MojoExecution
focal_class.var_name: execution
focal_class.declarator: attachP2Metadata
focal_class.modifier: @Parameter(defaultValue = "true")
      protected
focal_class.original_string: @Parameter(defaultValue = "true")
      protected boolean attachP2Metadata;
focal_class.type: boolean
focal_class.var_name: attachP2Metadata
focal_class.declarator: projectHelper
focal_class.modifier: @Component
      protected
focal_class.original_string: @Component
      protected MavenProjectHelper projectHelper;
focal_class.type: MavenProjectHelper
focal_class.var_name: projectHelper
focal_class.declarator: equinox
focal_class.modifier: @Component
      private
focal_class.original_string: @Component
      private EquinoxServiceFactory equinox;
focal_class.type: EquinoxServiceFactory
focal_class.var_name: equinox
focal_class.declarator: supportedProjectTypes = Arrays.asList("eclipse-plugin", "eclipse-test-plugin",
              "eclipse-feature", "p2-installable-unit")
focal_class.modifier: @Parameter
      private
focal_class.original_string: @Parameter
      private List<String> supportedProjectTypes = Arrays.asList("eclipse-plugin", "eclipse-test-plugin",
              "eclipse-feature", "p2-installable-unit");
focal_class.type: List<String>
focal_class.var_name: supportedProjectTypes
focal_class.declarator: baselineRepositories
focal_class.modifier: @Parameter
      private
focal_class.original_string: @Parameter
      private List<Repository> baselineRepositories;
focal_class.type: List<Repository>
focal_class.var_name: baselineRepositories
focal_class.declarator: baselineMode
focal_class.modifier: @Parameter(property = "tycho.baseline", defaultValue = "warn")
      private
focal_class.original_string: @Parameter(property = "tycho.baseline", defaultValue = "warn")
      private BaselineMode baselineMode;
focal_class.type: BaselineMode
focal_class.var_name: baselineMode
focal_class.declarator: baselineReplace
focal_class.modifier: @Parameter(property = "tycho.baseline.replace", defaultValue = "all")
      private
focal_class.original_string: @Parameter(property = "tycho.baseline.replace", defaultValue = "all")
      private BaselineReplace baselineReplace;
focal_class.type: BaselineReplace
focal_class.var_name: baselineReplace
focal_class.declarator: generateDownloadStatsProperty
focal_class.modifier: @Parameter(property = "tycho.generateDownloadStatsProperty", defaultValue = "false")
      private
focal_class.original_string: @Parameter(property = "tycho.generateDownloadStatsProperty", defaultValue = "false")
      private boolean generateDownloadStatsProperty;
focal_class.type: boolean
focal_class.var_name: generateDownloadStatsProperty
focal_class.declarator: baselineValidator
focal_class.modifier: @Component
      private
focal_class.original_string: @Component
      private BaselineValidator baselineValidator;
focal_class.type: BaselineValidator
focal_class.var_name: baselineValidator
focal_class.file: tycho-p2/tycho-p2-plugin/src/main/java/org/eclipse/tycho/plugins/p2/P2MetadataMojo.java
focal_class.identifier: P2MetadataMojo
focal_class.class_method_signature: P2MetadataMojo.execute()
focal_class.full_signature: @Override public void execute()
focal_class.identifier: execute
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void execute()
focal_class.class_method_signature: P2MetadataMojo.getService(Class<T> type)
focal_class.full_signature: private T getService(Class<T> type)
focal_class.identifier: getService
focal_class.modifiers: private
focal_class.parameters: (Class<T> type)
focal_class.return: T
focal_class.signature: T getService(Class<T> type)
focal_class.class_method_signature: P2MetadataMojo.attachP2Metadata()
focal_class.full_signature: protected void attachP2Metadata()
focal_class.identifier: attachP2Metadata
focal_class.modifiers: protected
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void attachP2Metadata()
focal_class.class_method_signature: P2MetadataMojo.hasAttachedArtifact(MavenProject project, String classifier)
focal_class.full_signature: private static boolean hasAttachedArtifact(MavenProject project, String classifier)
focal_class.identifier: hasAttachedArtifact
focal_class.modifiers: private static
focal_class.parameters: (MavenProject project, String classifier)
focal_class.return: boolean
focal_class.signature: boolean hasAttachedArtifact(MavenProject project, String classifier)
focal_class.class_method_signature: P2MetadataMojo.getExtension(File file)
focal_class.full_signature: private static String getExtension(File file)
focal_class.identifier: getExtension
focal_class.modifiers: private static
focal_class.parameters: (File file)
focal_class.return: String
focal_class.signature: String getExtension(File file)
focal_class.class_method_signature: P2MetadataMojo.getAllProjectArtifacts(MavenProject project)
focal_class.full_signature: private static Map<String, File> getAllProjectArtifacts(MavenProject project)
focal_class.identifier: getAllProjectArtifacts
focal_class.modifiers: private static
focal_class.parameters: (MavenProject project)
focal_class.return: Map<String, File>
focal_class.signature: Map<String, File> getAllProjectArtifacts(MavenProject project)
focal_class.class_method_signature: P2MetadataMojo.writeArtifactLocations(File outputFile, Map<String, File> artifactLocations)
focal_class.full_signature: static void writeArtifactLocations(File outputFile, Map<String, File> artifactLocations)
focal_class.identifier: writeArtifactLocations
focal_class.modifiers: static
focal_class.parameters: (File outputFile, Map<String, File> artifactLocations)
focal_class.return: void
focal_class.signature: void writeArtifactLocations(File outputFile, Map<String, File> artifactLocations)
focal_class.class_method_signature: P2MetadataMojo.writeProperties(Properties properties, File outputFile)
focal_class.full_signature: private static void writeProperties(Properties properties, File outputFile)
focal_class.identifier: writeProperties
focal_class.modifiers: private static
focal_class.parameters: (Properties properties, File outputFile)
focal_class.return: void
focal_class.signature: void writeProperties(Properties properties, File outputFile)
focal_class.superclass: extends AbstractMojo
focal_method.body: static void writeArtifactLocations(File outputFile, Map<String, File> artifactLocations)
              throws MojoExecutionException {
          Properties outputProperties = new Properties();
  
          for (Entry<String, File> entry : artifactLocations.entrySet()) {
              if (entry.getKey() == null) {
                  outputProperties.put(KEY_ARTIFACT_MAIN, entry.getValue().getAbsolutePath());
              } else {
                  outputProperties.put(KEY_ARTIFACT_ATTACHED + entry.getKey(), entry.getValue().getAbsolutePath());
              }
          }
  
          writeProperties(outputProperties, outputFile);
      }
focal_method.class_method_signature: P2MetadataMojo.writeArtifactLocations(File outputFile, Map<String, File> artifactLocations)
focal_method.full_signature: static void writeArtifactLocations(File outputFile, Map<String, File> artifactLocations)
focal_method.identifier: writeArtifactLocations
focal_method.invocations: entrySet getKey put getAbsolutePath getValue put getKey getAbsolutePath getValue writeProperties
focal_method.modifiers: static
focal_method.parameters: (File outputFile, Map<String, File> artifactLocations)
focal_method.return: void
focal_method.signature: void writeArtifactLocations(File outputFile, Map<String, File> artifactLocations)