Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch from Plexus to JSR330 annotations #239

Merged
merged 1 commit into from
Jul 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should get rid of all plexus components dependencies

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there is still the components.xml

<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
Loading