From 3929d7d7dfcc553913582dbed1837e6acb63a4d2 Mon Sep 17 00:00:00 2001 From: Olivier Lamy Date: Tue, 6 Sep 2011 07:22:48 +0000 Subject: [PATCH] get RID of plexus.requirement annotation git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1165523 13f79535-47bb-0310-9956-ffa450edef68 --- .../archiva/web/tags/DependencyTree.java | 7 +------ .../web/action/AbstractActionSupport.java | 7 +------ .../action/AbstractRepositoryBasedAction.java | 4 +--- .../web/action/DeleteArtifactAction.java | 12 ------------ .../maven/archiva/web/action/MergeAction.java | 9 ++------- .../web/action/ShowArtifactAction.java | 5 ----- .../archiva/web/action/UploadAction.java | 14 -------------- .../web/action/admin/SystemStatusAction.java | 10 +--------- .../appearance/AbstractAppearanceAction.java | 5 +---- .../AbstractProxyConnectorFormAction.java | 19 +------------------ .../legacy/AddLegacyArtifactPathAction.java | 7 +------ .../DeleteLegacyArtifactPathAction.java | 5 +---- .../reports/ViewAuditLogReportAction.java | 19 +++++++------------ 13 files changed, 17 insertions(+), 106 deletions(-) diff --git a/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/archiva/web/tags/DependencyTree.java b/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/archiva/web/tags/DependencyTree.java index 591d2df8f..5afa4e2f1 100644 --- a/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/archiva/web/tags/DependencyTree.java +++ b/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/archiva/web/tags/DependencyTree.java @@ -48,15 +48,10 @@ public class DependencyTree { private Logger log = LoggerFactory.getLogger( DependencyTree.class ); - /** - * plexus.requirement role-hint="maven2" - */ + @Inject private DependencyTreeBuilder dependencyTreeBuilder; - /** - * plexus.requirement - */ @Inject private UserRepositories userRepositories; diff --git a/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/AbstractActionSupport.java b/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/AbstractActionSupport.java index aced6a79c..78c5f851d 100644 --- a/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/AbstractActionSupport.java +++ b/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/AbstractActionSupport.java @@ -56,15 +56,10 @@ public abstract class AbstractActionSupport protected Logger log = LoggerFactory.getLogger( getClass() ); - /** - * plexus.requirement role="org.apache.archiva.audit.AuditListener" - */ @Inject private List auditListeners = new ArrayList(); - /** - * plexus.requirement - */ + @Inject @Named( value = "repositorySessionFactory" ) protected RepositorySessionFactory repositorySessionFactory; diff --git a/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/AbstractRepositoryBasedAction.java b/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/AbstractRepositoryBasedAction.java index 5bfcc036e..8232d6cf4 100644 --- a/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/AbstractRepositoryBasedAction.java +++ b/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/AbstractRepositoryBasedAction.java @@ -31,9 +31,7 @@ import java.util.List; public class AbstractRepositoryBasedAction extends AbstractActionSupport { - /** - * plexus.requirement - */ + @Inject private UserRepositories userRepositories; diff --git a/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/DeleteArtifactAction.java b/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/DeleteArtifactAction.java index d8e82635e..33c92ce2e 100644 --- a/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/DeleteArtifactAction.java +++ b/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/DeleteArtifactAction.java @@ -103,27 +103,15 @@ public class DeleteArtifactAction */ private List managedRepos; - /** - * plexus.requirement - */ @Inject private UserRepositories userRepositories; - /** - * plexus.requirement role-hint="default" - */ @Inject private ArchivaConfiguration configuration; - /** - * plexus.requirement - */ @Inject private RepositoryContentFactory repositoryFactory; - /** - * plexus.requirement role="org.apache.archiva.repository.events.RepositoryListener" - */ @Inject private List listeners; diff --git a/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/MergeAction.java b/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/MergeAction.java index 510736d6a..0cf024eed 100644 --- a/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/MergeAction.java +++ b/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/MergeAction.java @@ -45,7 +45,7 @@ import javax.inject.Inject; import javax.inject.Named; /** - * plexus.component role="com.opensymphony.xwork2.Action" role-hint="mergeAction" instantiation-strategy="per-lookup" + * */ @Controller( "mergeAction" ) @Scope( "prototype" ) @@ -54,16 +54,11 @@ public class MergeAction implements Validateable, Preparable, Auditable { - /** - * plexus.requirement role="org.apache.archiva.stagerepository.merge.RepositoryMerger" role-hint="maven2" - */ + @Inject @Named( value = "repositoryMerger#maven2" ) private Maven2RepositoryMerger repositoryMerger; - /** - * plexus.requirement - */ @Inject protected ArchivaConfiguration archivaConfiguration; diff --git a/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/ShowArtifactAction.java b/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/ShowArtifactAction.java index 8a67e02a1..53f1bdaef 100644 --- a/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/ShowArtifactAction.java +++ b/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/ShowArtifactAction.java @@ -61,8 +61,6 @@ import javax.inject.Inject; * * TODO change name to ShowVersionedAction to conform to terminology. * - * plexus.component role="com.opensymphony.xwork2.Action" role-hint="showArtifactAction" - * instantiation-strategy="per-lookup" */ @SuppressWarnings( "serial" ) @Controller( "showArtifactAction" ) @@ -73,9 +71,6 @@ public class ShowArtifactAction { /* .\ Not Exposed \._____________________________________________ */ - /** - * plexus.requirement - */ @Inject private RepositoryContentFactory repositoryFactory; diff --git a/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/UploadAction.java b/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/UploadAction.java index d314ad29e..ef7a42a75 100644 --- a/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/UploadAction.java +++ b/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/UploadAction.java @@ -76,8 +76,6 @@ import java.util.TimeZone; /** * Upload an artifact using Jakarta file upload in webwork. If set by the user a pom will also be generated. Metadata * will also be updated if one exists, otherwise it would be created. - *

- * plexus.component role="com.opensymphony.xwork2.Action" role-hint="uploadAction" instantiation-strategy="per-lookup" */ @SuppressWarnings( "serial" ) @Controller( "uploadAction" ) @@ -136,27 +134,15 @@ public class UploadAction */ private List managedRepoIdList; - /** - * plexus.requirement - */ @Inject private UserRepositories userRepositories; - /** - * plexus.requirement role-hint="default" - */ @Inject private ArchivaConfiguration configuration; - /** - * plexus.requirement - */ @Inject private RepositoryContentFactory repositoryFactory; - /** - * lexus.requirement role="org.apache.archiva.scheduler.ArchivaTaskScheduler" role-hint="repository" - */ @Inject @Named( value = "archivaTaskScheduler#repository" ) private ArchivaTaskScheduler scheduler; diff --git a/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/SystemStatusAction.java b/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/SystemStatusAction.java index 4f471edf0..80b46b485 100644 --- a/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/SystemStatusAction.java +++ b/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/SystemStatusAction.java @@ -47,19 +47,11 @@ public class SystemStatusAction extends AbstractActionSupport implements SecureAction { - /** - * plexus.requirement role="org.codehaus.plexus.taskqueue.TaskQueue" - */ + private Map queues; - /** - * plexus.requirement role="org.codehaus.plexus.cache.Cache" - */ private Map caches; - /** - * plexus.requirement - */ @Inject private RepositoryScanner scanner; diff --git a/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/appearance/AbstractAppearanceAction.java b/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/appearance/AbstractAppearanceAction.java index d232be262..4d6b8c28a 100644 --- a/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/appearance/AbstractAppearanceAction.java +++ b/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/appearance/AbstractAppearanceAction.java @@ -36,10 +36,7 @@ public abstract class AbstractAppearanceAction extends AbstractActionSupport implements Preparable { - /** - * Archiva Application Configuration - * plexus.requirement - */ + @Inject protected ArchivaConfiguration configuration; diff --git a/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/connectors/proxy/AbstractProxyConnectorFormAction.java b/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/connectors/proxy/AbstractProxyConnectorFormAction.java index 1e6831196..e5f05fdda 100644 --- a/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/connectors/proxy/AbstractProxyConnectorFormAction.java +++ b/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/connectors/proxy/AbstractProxyConnectorFormAction.java @@ -48,34 +48,17 @@ public abstract class AbstractProxyConnectorFormAction implements Preparable { - /** - * plexus.requirement role="org.apache.maven.archiva.policies.PreDownloadPolicy" - */ + private Map preDownloadPolicyMap; - /** - * plexus.requirement role="org.apache.maven.archiva.policies.PostDownloadPolicy" - */ private Map postDownloadPolicyMap; - /** - * plexus.requirement role="org.apache.maven.archiva.policies.DownloadErrorPolicy" - */ private Map downloadErrorPolicyMap; - /** - * The list of network proxy ids that are available. - */ private List proxyIdOptions; - /** - * The list of managed repository ids that are available. - */ private List managedRepoIdList; - /** - * The list of remove repository ids that are available. - */ private List remoteRepoIdList; /** diff --git a/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/legacy/AddLegacyArtifactPathAction.java b/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/legacy/AddLegacyArtifactPathAction.java index 1907a2399..4b2735adb 100644 --- a/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/legacy/AddLegacyArtifactPathAction.java +++ b/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/legacy/AddLegacyArtifactPathAction.java @@ -49,15 +49,10 @@ public class AddLegacyArtifactPathAction extends AbstractActionSupport implements Preparable, Validateable { - /** - * plexus.requirement - */ + @Inject private ArchivaConfiguration archivaConfiguration; - /** - * plexus.requirement role-hint="legacy" - */ @Inject @Named(value = "managedRepositoryContent#legacy") private ManagedRepositoryContent repositoryContent; diff --git a/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/legacy/DeleteLegacyArtifactPathAction.java b/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/legacy/DeleteLegacyArtifactPathAction.java index c9aab90e3..430a917d8 100644 --- a/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/legacy/DeleteLegacyArtifactPathAction.java +++ b/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/legacy/DeleteLegacyArtifactPathAction.java @@ -35,16 +35,13 @@ import java.util.Iterator; * Delete a LegacyArtifactPath to archiva configuration * * @since 1.1 - * plexus.component role="com.opensymphony.xwork2.Action" role-hint="deleteLegacyArtifactPathAction" instantiation-strategy="per-lookup" */ @Controller( "deleteLegacyArtifactPathAction" ) @Scope( "prototype" ) public class DeleteLegacyArtifactPathAction extends AbstractActionSupport { - /** - * plexus.requirement - */ + @Inject private ArchivaConfiguration archivaConfiguration; diff --git a/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/reports/ViewAuditLogReportAction.java b/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/reports/ViewAuditLogReportAction.java index 059124174..9d2f4f0e2 100644 --- a/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/reports/ViewAuditLogReportAction.java +++ b/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/reports/ViewAuditLogReportAction.java @@ -47,8 +47,7 @@ import java.util.Date; import java.util.List; /** - * plexus.component role="com.opensymphony.xwork2.Action" role-hint="viewAuditLogReport" - * instantiation-strategy="per-lookup" + * */ @Controller( "viewAuditLogReport" ) @Scope( "prototype" ) @@ -58,12 +57,12 @@ public class ViewAuditLogReportAction { protected HttpServletRequest request; - /** - * plexus.requirement - */ @Inject private UserRepositories userRepositories; + @Inject + private AuditManager auditManager; + private String repository; private List repositories; @@ -95,14 +94,10 @@ public class ViewAuditLogReportAction private static final String HEADER_RESULTS = "Results"; private String[] datePatterns = - new String[]{ "MM/dd/yy", "MM/dd/yyyy", "MMMMM/dd/yyyy", "MMMMM/dd/yy", "dd MMMMM yyyy", "dd/MM/yy", - "dd/MM/yyyy", "yyyy/MM/dd", "yyyy-MM-dd", "yyyy-dd-MM", "MM-dd-yyyy", "MM-dd-yy" }; + new String[]{ "MM/dd/yy", "MM/dd/yyyy", "MMMMM/dd/yyyy", "MMMMM/dd/yy", "dd MMMMM yyyy", "dd/MM/yy", + "dd/MM/yyyy", "yyyy/MM/dd", "yyyy-MM-dd", "yyyy-dd-MM", "MM-dd-yyyy", "MM-dd-yy" }; + - /** - * plexus.requirement - */ - @Inject - private AuditManager auditManager; public SecureActionBundle getSecureActionBundle() throws SecureActionException -- 2.39.5