Browse Source

checkstyle - space around operators

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@277410 13f79535-47bb-0310-9956-ffa450edef68
master
Peter Reilly 21 years ago
parent
commit
12edbdc409
2 changed files with 14 additions and 13 deletions
  1. +10
    -9
      src/main/org/apache/tools/ant/taskdefs/repository/Libraries.java
  2. +4
    -4
      src/main/org/apache/tools/ant/taskdefs/repository/MavenRepository.java

+ 10
- 9
src/main/org/apache/tools/ant/taskdefs/repository/Libraries.java View File

@@ -99,13 +99,13 @@ public final class Libraries extends Task {
* where maven stores stuff, and where we save stuff too, unless
* declared otherwise.
*/
public static final String MAVEN_LOCATION=".maven/repository";
public static final String MAVEN_LOCATION = ".maven/repository";

/**
* name of the property which can provide an override of the repository dir
* from {@link #MAVEN_LOCATION}
*/
public static final String REPOSITORY_DIR_PROPERTY="ant.maven.repository.dir";
public static final String REPOSITORY_DIR_PROPERTY = "ant.maven.repository.dir";
/**
* name of the property which can provide an override of the repository URL
*/
@@ -134,8 +134,8 @@ public final class Libraries extends Task {
File mavenDir
= new File(System.getProperty("user.home"), MAVEN_LOCATION);
String propertyDir = getProject().getProperty(REPOSITORY_DIR_PROPERTY);
if(propertyDir!=null) {
mavenDir=getProject().resolveFile(propertyDir);
if (propertyDir != null) {
mavenDir = getProject().resolveFile(propertyDir);
}
return mavenDir;
}
@@ -359,11 +359,12 @@ public final class Libraries extends Task {
*/
public void validate() {
if (destDir == null) {
destDir=locateDefaultDestDirectory();
destDir = locateDefaultDestDirectory();
}
if (repository == null) {
MavenRepository maven=(MavenRepository)getProject().createDataType(MavenRepository.TYPE_NAME);
repository=maven;
MavenRepository maven =
(MavenRepository) getProject().createDataType(MavenRepository.TYPE_NAME);
repository = maven;
}
Iterator it = libraries.iterator();
while (it.hasNext()) {
@@ -433,7 +434,7 @@ public final class Libraries extends Task {

if (isOffline()) {
log("No retrieval, task is \"offline\"");
retrieve=false;
retrieve = false;
}

//see if we need to do a download
@@ -568,7 +569,7 @@ public final class Libraries extends Task {
Library library = (Library) it.next();
if (library.isToFetch()) {
count++;
};
}
}
return count;
}


+ 4
- 4
src/main/org/apache/tools/ant/taskdefs/repository/MavenRepository.java View File

@@ -74,12 +74,12 @@ public class MavenRepository extends HttpRepository {
* @throws BuildException if unhappy
*/
public void validate() {
if(getUrl()==null) {
if (getUrl() == null) {
//we have no URL yet; so use the maven one
if(getProject()!=null) {
String urlProperty=getProject()
if (getProject() != null) {
String urlProperty = getProject()
.getProperty(Libraries.REPOSITORY_URL_PROPERTY);
if(urlProperty!=null) {
if (urlProperty != null) {
setUrl(urlProperty);
} else {
setUrl(MAVEN_URL);


Loading…
Cancel
Save