]> git.argeo.org Git - gpl/argeo-slc.git/blob - org.argeo.slc.support/src/org/argeo/slc/aether/ConsoleRepositoryListener.java
727c5f35d9ba51492e60c9963763178908e9ca9a
[gpl/argeo-slc.git] / org.argeo.slc.support / src / org / argeo / slc / aether / ConsoleRepositoryListener.java
1 /*
2 * Copyright (C) 2007-2012 Argeo GmbH
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16 package org.argeo.slc.aether;
17
18 import org.apache.commons.logging.Log;
19 import org.apache.commons.logging.LogFactory;
20 import org.eclipse.aether.AbstractRepositoryListener;
21 import org.eclipse.aether.RepositoryEvent;
22
23 public class ConsoleRepositoryListener extends AbstractRepositoryListener {
24
25 private final static Log log = LogFactory
26 .getLog(ConsoleRepositoryListener.class);
27
28 public void artifactDeployed(RepositoryEvent event) {
29 if (log.isDebugEnabled())
30 log.debug("Deployed " + event.getArtifact() + " to "
31 + event.getRepository());
32 }
33
34 public void artifactDeploying(RepositoryEvent event) {
35 if (log.isTraceEnabled())
36 log.trace("Deploying " + event.getArtifact() + " to "
37 + event.getRepository());
38 }
39
40 public void artifactDescriptorInvalid(RepositoryEvent event) {
41 if (log.isDebugEnabled())
42 log.warn("Invalid artifact descriptor for " + event.getArtifact()
43 + ": " + event.getException().getMessage());
44 }
45
46 public void artifactDescriptorMissing(RepositoryEvent event) {
47 if (log.isTraceEnabled())
48 log.warn("Missing artifact descriptor for " + event.getArtifact());
49 }
50
51 public void artifactInstalled(RepositoryEvent event) {
52 if (log.isDebugEnabled())
53 log.debug("Installed " + event.getArtifact() + " to "
54 + event.getFile());
55 }
56
57 public void artifactInstalling(RepositoryEvent event) {
58 if (log.isTraceEnabled())
59 log.trace("Installing " + event.getArtifact() + " to "
60 + event.getFile());
61 }
62
63 public void artifactResolved(RepositoryEvent event) {
64 if (log.isTraceEnabled())
65 log.trace("Resolved artifact " + event.getArtifact() + " from "
66 + event.getRepository());
67 }
68
69 public void artifactDownloading(RepositoryEvent event) {
70 if (log.isTraceEnabled())
71 log.trace("Downloading artifact " + event.getArtifact() + " from "
72 + event.getRepository());
73 }
74
75 public void artifactDownloaded(RepositoryEvent event) {
76 if (log.isDebugEnabled())
77 log.debug("Downloaded artifact " + event.getArtifact() + " from "
78 + event.getRepository());
79 }
80
81 public void artifactResolving(RepositoryEvent event) {
82 if (log.isTraceEnabled())
83 log.trace("Resolving artifact " + event.getArtifact());
84 }
85
86 public void metadataDeployed(RepositoryEvent event) {
87 if (log.isDebugEnabled())
88 log.debug("Deployed " + event.getMetadata() + " to "
89 + event.getRepository());
90 }
91
92 public void metadataDeploying(RepositoryEvent event) {
93 if (log.isTraceEnabled())
94 log.trace("Deploying " + event.getMetadata() + " to "
95 + event.getRepository());
96 }
97
98 public void metadataInstalled(RepositoryEvent event) {
99 if (log.isDebugEnabled())
100 log.debug("Installed " + event.getMetadata() + " to "
101 + event.getFile());
102 }
103
104 public void metadataInstalling(RepositoryEvent event) {
105 if (log.isTraceEnabled())
106 log.trace("Installing " + event.getMetadata() + " to "
107 + event.getFile());
108 }
109
110 public void metadataInvalid(RepositoryEvent event) {
111 if (log.isDebugEnabled())
112 log.debug("Invalid metadata " + event.getMetadata());
113 }
114
115 public void metadataResolved(RepositoryEvent event) {
116 if (log.isTraceEnabled())
117 log.trace("Resolved metadata " + event.getMetadata() + " from "
118 + event.getRepository());
119 }
120
121 public void metadataResolving(RepositoryEvent event) {
122 if (log.isTraceEnabled())
123 log.trace("Resolving metadata " + event.getMetadata() + " from "
124 + event.getRepository());
125 }
126
127 }