Skip to content

Commit

Permalink
Switch from Plexus to JSR330 annotations (#239)
Browse files Browse the repository at this point in the history
This closes #206
  • Loading branch information
cziegeler committed Jul 26, 2024
1 parent b5e0ea2 commit 59a4f1c
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
5 changes: 4 additions & 1 deletion aemanalyser-maven-plugin/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,13 @@ Most of the analysers are based on the [Apache Sling Feature Model Analyser fram

## Installation

This is a plugin to Apache Maven. It can be enabled by referencing its coordinates in a `pom.xml`:
This is a plugin to Apache Maven. It can be enabled by referencing its coordinates in a `pom.xml` and enabling the extensions contained in the plugin:

<plugin>
<groupId>com.adobe.aem</groupId>
<artifactId>aemanalyser-maven-plugin</artifactId>
<version>... version ...</version>
<extensions>true</extensions>
</plugin>

Example:
Expand All @@ -30,6 +31,7 @@ Example:
<groupId>com.adobe.aem</groupId>
<artifactId>aemanalyser-maven-plugin</artifactId>
<version>1.1.12</version> <!-- Make sure to use the latest release -->
<extensions>true</extensions>
</plugin>

As this plugin is available in Maven Central, no additional configuration is needed to bring it into your Maven project.
Expand All @@ -47,6 +49,7 @@ Enable the plugin by listing it in the `build->plugins` section of the module.
<groupId>com.adobe.aem</groupId>
<artifactId>aemanalyser-maven-plugin</artifactId>
<version>1.1.12</version> <!-- Make sure to use the latest release -->
<extensions>true</extensions>
<executions>
<execution>
<id>aem-analyser</id>
Expand Down
2 changes: 1 addition & 1 deletion aemanalyser-maven-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ governing permissions and limitations under the License.
<plugin>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-component-metadata</artifactId>
<version>2.1.1</version>
<version>2.2.0</version>
<executions>
<execution>
<id>generate-metadata</id>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@
import java.util.ArrayList;
import java.util.List;

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

import org.apache.maven.AbstractMavenLifecycleParticipant;
import org.apache.maven.MavenExecutionException;
import org.apache.maven.execution.MavenSession;
Expand All @@ -33,8 +37,6 @@
import org.apache.maven.project.MavenProject;
import org.apache.sling.feature.Artifact;
import org.apache.sling.feature.ArtifactId;
import org.codehaus.plexus.component.annotations.Component;
import org.codehaus.plexus.component.annotations.Requirement;
import org.codehaus.plexus.logging.Logger;
import org.codehaus.plexus.util.xml.pull.XmlPullParserException;

Expand All @@ -47,7 +49,8 @@
/**
* Maven lifecycle participant which adds the artifacts of the model to the dependencies.
*/
@Component(role = AbstractMavenLifecycleParticipant.class, hint = "aemappparticipant")
@Named("aemappparticipant")
@Singleton
public class DependencyLifecycleParticipant extends AbstractMavenLifecycleParticipant {

/**
Expand All @@ -59,7 +62,7 @@ public class DependencyLifecycleParticipant extends AbstractMavenLifecyclePartic

private static final String KEY_PROJECT_SERIALIZED = KEY_PROJECT.concat("-ser");

@Requirement
@Inject
private Logger logger;

@Override
Expand Down

0 comments on commit 59a4f1c

Please sign in to comment.