Skip to content

Commit

Permalink
Move components to JSR330
Browse files Browse the repository at this point in the history
  • Loading branch information
laeubi authored and akurtakov committed Jan 26, 2024
1 parent 5b0707d commit 8b2aa95
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 11 deletions.
14 changes: 14 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -488,6 +488,20 @@
<artifactId>maven-invoker-plugin</artifactId>
<version>3.6.0</version>
</plugin>
<plugin>
<groupId>org.eclipse.sisu</groupId>
<artifactId>sisu-maven-plugin</artifactId>
<version>0.9.0.M2</version>
<executions>
<execution>
<id>index-project</id>
<goals>
<goal>main-index</goal>
<goal>test-index</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</pluginManagement>
</build>
Expand Down
4 changes: 4 additions & 0 deletions tycho-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,10 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.eclipse.sisu</groupId>
<artifactId>sisu-maven-plugin</artifactId>
</plugin>
</plugins>
</build>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,25 +25,27 @@
import java.util.function.Supplier;
import java.util.stream.Collectors;

import javax.inject.Inject;
import javax.inject.Named;
import javax.inject.Singleton;

import org.apache.maven.execution.MavenSession;
import org.apache.maven.plugin.LegacySupport;
import org.apache.maven.project.MavenProject;
import org.codehaus.plexus.component.annotations.Component;
import org.codehaus.plexus.component.annotations.Requirement;
import org.codehaus.plexus.personality.plexus.lifecycle.phase.Disposable;
import org.eclipse.tycho.BuildProperties;
import org.eclipse.tycho.BuildPropertiesParser;
import org.eclipse.tycho.Interpolator;
import org.eclipse.tycho.ReactorProject;
import org.eclipse.tycho.core.BuildPropertiesImpl;
import org.eclipse.tycho.core.maven.TychoInterpolator;

@Component(role = BuildPropertiesParser.class)
public class BuildPropertiesParserImpl implements BuildPropertiesParser, Disposable {
@Named
@Singleton
public class BuildPropertiesParserImpl implements BuildPropertiesParser {

private final Map<String, BuildPropertiesImpl> cache = new HashMap<>();

@Requirement
@Inject
LegacySupport legacySupport;

@Override
Expand Down Expand Up @@ -92,11 +94,6 @@ private synchronized BuildProperties get(File baseDir, Supplier<Interpolator> in
return buildProperties;
}

@Override
public void dispose() {
cache.clear();
}

protected static Properties readProperties(File propsFile, MavenProject mavenProject) {
Properties properties = new Properties();
if (propsFile.isFile()) {
Expand Down

0 comments on commit 8b2aa95

Please sign in to comment.