@@ -82,7 +82,7 @@ public abstract class AbstractCopyJarsMojo extends AbstractMojo {
8282 * </p>
8383 */
8484 @ Deprecated
85- @ Parameter (property = imagejDirectoryProperty , required = false )
85+ @ Parameter (property = IMAGEJ_DIRECTORY_PROPERTY , required = false )
8686 String imagejDirectory ;
8787
8888 /**
@@ -92,7 +92,7 @@ public abstract class AbstractCopyJarsMojo extends AbstractMojo {
9292 * If it is not a directory, no .jar files are copied.
9393 * </p>
9494 */
95- @ Parameter (property = appDirectoryProperty , required = false )
95+ @ Parameter (property = APP_DIRECTORY_PROPERTY , required = false )
9696 String appDirectory ;
9797
9898 /**
@@ -103,7 +103,7 @@ public abstract class AbstractCopyJarsMojo extends AbstractMojo {
103103 * </p>
104104 */
105105 @ Deprecated
106- @ Parameter (property = imagejSubdirectoryProperty , required = false )
106+ @ Parameter (property = IMAGEJ_SUBDIRECTORY_PROPERTY , required = false )
107107 String imagejSubdirectory ;
108108
109109 /**
@@ -113,7 +113,7 @@ public abstract class AbstractCopyJarsMojo extends AbstractMojo {
113113 * If no property of that name exists, no subdirectory will be used.
114114 * </p>
115115 */
116- @ Parameter (property = appSubdirectoryProperty , required = false )
116+ @ Parameter (property = APP_SUBDIRECTORY_PROPERTY , required = false )
117117 String appSubdirectory ;
118118
119119 /**
@@ -125,7 +125,7 @@ public abstract class AbstractCopyJarsMojo extends AbstractMojo {
125125 * </p>
126126 */
127127 @ Deprecated
128- @ Parameter (property = deleteOtherVersionsProperty )
128+ @ Parameter (property = DELETE_OTHER_VERSIONS_PROPERTY )
129129 boolean deleteOtherVersions ;
130130
131131 /**
@@ -137,7 +137,7 @@ public abstract class AbstractCopyJarsMojo extends AbstractMojo {
137137 * </p>
138138 */
139139 @ Deprecated
140- @ Parameter (property = imagejDeleteOtherVersionsPolicyProperty )
140+ @ Parameter (property = IMAGEJ_DELETE_OTHER_VERSIONS_POLICY_PROPERTY )
141141 OtherVersions imagejDeleteOtherVersionsPolicy ;
142142
143143 /**
@@ -148,14 +148,14 @@ public abstract class AbstractCopyJarsMojo extends AbstractMojo {
148148 * other versions.
149149 * </p>
150150 */
151- @ Parameter (property = deleteOtherVersionsPolicyProperty , defaultValue = "older" )
151+ @ Parameter (property = DELETE_OTHER_VERSIONS_POLICY_PROPERTY , defaultValue = "older" )
152152 OtherVersions deleteOtherVersionsPolicy ;
153153
154154 /**
155155 * If this option is set to <code>true</code>, only the artifact will be
156156 * copied - without its dependencies.
157157 */
158- @ Parameter (property = ignoreDependenciesProperty , defaultValue = "false" )
158+ @ Parameter (property = IGNORE_DEPENDENCIES_PROPERTY , defaultValue = "false" )
159159 boolean ignoreDependencies ;
160160
161161 @ Parameter (defaultValue = "${session}" )
@@ -164,15 +164,15 @@ public abstract class AbstractCopyJarsMojo extends AbstractMojo {
164164 @ Parameter ( defaultValue = "${mojoExecution}" , readonly = true )
165165 MojoExecution mojoExecution ;
166166
167- public static final String imagejDirectoryProperty = "imagej.app.directory" ;
168- public static final String imagejSubdirectoryProperty = "imagej.app.subdirectory" ;
169- public static final String deleteOtherVersionsProperty = "delete.other.versions" ;
170- public static final String imagejDeleteOtherVersionsPolicyProperty = "imagej.deleteOtherVersions" ;
167+ protected static final String IMAGEJ_DIRECTORY_PROPERTY = "imagej.app.directory" ;
168+ protected static final String IMAGEJ_SUBDIRECTORY_PROPERTY = "imagej.app.subdirectory" ;
169+ protected static final String DELETE_OTHER_VERSIONS_PROPERTY = "delete.other.versions" ;
170+ protected static final String IMAGEJ_DELETE_OTHER_VERSIONS_POLICY_PROPERTY = "imagej.deleteOtherVersions" ;
171171
172- public static final String appDirectoryProperty = "scijava.app.directory" ;
173- public static final String appSubdirectoryProperty = "scijava.app.subdirectory" ;
174- public static final String deleteOtherVersionsPolicyProperty = "scijava.deleteOtherVersions" ;
175- public static final String ignoreDependenciesProperty = "scijava.ignoreDependencies" ;
172+ protected static final String APP_DIRECTORY_PROPERTY = "scijava.app.directory" ;
173+ protected static final String APP_SUBDIRECTORY_PROPERTY = "scijava.app.subdirectory" ;
174+ protected static final String DELETE_OTHER_VERSIONS_POLICY_PROPERTY = "scijava.deleteOtherVersions" ;
175+ protected static final String IGNORE_DEPENDENCIES_PROPERTY = "scijava.ignoreDependencies" ;
176176
177177 public enum OtherVersions {
178178 always , older , never
@@ -188,18 +188,18 @@ void handleBackwardCompatibility() {
188188
189189 try {
190190 // If at least one scijava.* property is set, ignore imagej.* properties
191- if (evaluator .evaluate ("${" + appDirectoryProperty + "}" ) == null &&
192- evaluator .evaluate ("${" + appSubdirectoryProperty + "}" ) == null &&
193- evaluator .evaluate ("${" + deleteOtherVersionsPolicyProperty +
191+ if (evaluator .evaluate ("${" + APP_DIRECTORY_PROPERTY + "}" ) == null &&
192+ evaluator .evaluate ("${" + APP_SUBDIRECTORY_PROPERTY + "}" ) == null &&
193+ evaluator .evaluate ("${" + DELETE_OTHER_VERSIONS_POLICY_PROPERTY +
194194 "}" ) == null )
195195 {
196196
197197 // Keep backwards compatibility to delete.other.versions
198- if (evaluator .evaluate ("${" + deleteOtherVersionsProperty +
198+ if (evaluator .evaluate ("${" + DELETE_OTHER_VERSIONS_PROPERTY +
199199 "}" ) != null )
200200 {
201- getLog ().warn ("Property '" + deleteOtherVersionsProperty +
202- "' is deprecated. Use '" + deleteOtherVersionsPolicyProperty +
201+ getLog ().warn ("Property '" + DELETE_OTHER_VERSIONS_PROPERTY +
202+ "' is deprecated. Use '" + DELETE_OTHER_VERSIONS_POLICY_PROPERTY +
203203 "' instead" );
204204 deleteOtherVersionsPolicy = deleteOtherVersions ? OtherVersions .older
205205 : OtherVersions .never ;
@@ -209,16 +209,16 @@ void handleBackwardCompatibility() {
209209 // Use imagejDirectory if it is set (directly or via
210210 // imagej.app.directory)
211211 if (imagejDirectory != null ) {
212- if (evaluator .evaluate ("${" + imagejDirectoryProperty +
212+ if (evaluator .evaluate ("${" + IMAGEJ_DIRECTORY_PROPERTY +
213213 "}" ) == null )
214214 {
215215 getLog ().warn (
216216 "Configuration property 'imagejDirectory' is deprecated." +
217217 "Use 'appDirectory' instead" );
218218 }
219219 else {
220- getLog ().warn ("Property '" + imagejDirectoryProperty +
221- "' is deprecated. Use '" + appDirectoryProperty + "' instead" );
220+ getLog ().warn ("Property '" + IMAGEJ_DIRECTORY_PROPERTY +
221+ "' is deprecated. Use '" + APP_DIRECTORY_PROPERTY + "' instead" );
222222 }
223223 appDirectory = imagejDirectory ;
224224 }
@@ -227,16 +227,16 @@ void handleBackwardCompatibility() {
227227 // Use imagejSubdirectory if it is set (directly or via
228228 // imagej.app.subdirectory)
229229 if (imagejSubdirectory != null ) {
230- if (evaluator .evaluate ("${" + imagejSubdirectoryProperty +
230+ if (evaluator .evaluate ("${" + IMAGEJ_SUBDIRECTORY_PROPERTY +
231231 "}" ) == null )
232232 {
233233 getLog ().warn (
234234 "Configuration property 'imagejSubdirectory' is deprecated." +
235235 "Use 'appSubdirectory' instead" );
236236 }
237237 else {
238- getLog ().warn ("Property '" + imagejSubdirectoryProperty +
239- "' is deprecated. Use '" + appSubdirectoryProperty + "' instead" );
238+ getLog ().warn ("Property '" + IMAGEJ_SUBDIRECTORY_PROPERTY +
239+ "' is deprecated. Use '" + APP_SUBDIRECTORY_PROPERTY + "' instead" );
240240 }
241241 appSubdirectory = imagejSubdirectory ;
242242 }
@@ -246,16 +246,16 @@ void handleBackwardCompatibility() {
246246 // imagej.deleteOtherVersions)
247247 if (imagejDeleteOtherVersionsPolicy != null ) {
248248 if (evaluator .evaluate ("${" +
249- imagejDeleteOtherVersionsPolicyProperty + "}" ) == null )
249+ IMAGEJ_DELETE_OTHER_VERSIONS_POLICY_PROPERTY + "}" ) == null )
250250 {
251251 getLog ().warn (
252252 "Configuration property 'imagejDeleteOtherVersionsPolicy' is deprecated." +
253253 "Use 'deleteOtherVersionsPolicy' instead" );
254254 }
255255 else {
256256 getLog ().warn ("Property '" +
257- imagejDeleteOtherVersionsPolicyProperty +
258- "' is deprecated. Use '" + deleteOtherVersionsPolicyProperty +
257+ IMAGEJ_DELETE_OTHER_VERSIONS_POLICY_PROPERTY +
258+ "' is deprecated. Use '" + DELETE_OTHER_VERSIONS_POLICY_PROPERTY +
259259 "' instead" );
260260 }
261261 deleteOtherVersionsPolicy = imagejDeleteOtherVersionsPolicy ;
0 commit comments