You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by hb...@apache.org on 2016/05/07 13:30:15 UTC
[22/50] [abbrv] maven-aether git commit: Polished code
Polished code
Project: http://git-wip-us.apache.org/repos/asf/maven-aether/repo
Commit: http://git-wip-us.apache.org/repos/asf/maven-aether/commit/abc52937
Tree: http://git-wip-us.apache.org/repos/asf/maven-aether/tree/abc52937
Diff: http://git-wip-us.apache.org/repos/asf/maven-aether/diff/abc52937
Branch: refs/heads/ant-tasks
Commit: abc5293751aa2feb2f545174100cb74808ab9cdd
Parents: 27fa309
Author: Benjamin Bentmann <be...@sonatype.com>
Authored: Sat Apr 19 18:59:48 2014 +0200
Committer: Benjamin Bentmann <be...@sonatype.com>
Committed: Sat Apr 19 18:59:48 2014 +0200
----------------------------------------------------------------------
.../org/eclipse/aether/ant/types/Dependency.java | 6 +++---
.../org/eclipse/aether/ant/types/Exclusion.java | 6 +++---
src/main/java/org/eclipse/aether/ant/types/Pom.java | 16 ++++++++++------
3 files changed, 16 insertions(+), 12 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/maven-aether/blob/abc52937/src/main/java/org/eclipse/aether/ant/types/Dependency.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/eclipse/aether/ant/types/Dependency.java b/src/main/java/org/eclipse/aether/ant/types/Dependency.java
index 202cd09..4343a4a 100644
--- a/src/main/java/org/eclipse/aether/ant/types/Dependency.java
+++ b/src/main/java/org/eclipse/aether/ant/types/Dependency.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010, 2011 Sonatype, Inc.
+ * Copyright (c) 2010, 2014 Sonatype, Inc.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -235,8 +235,8 @@ public class Dependency
Matcher m = p.matcher( coords );
if ( !m.matches() )
{
- throw new BuildException( "Bad dependency coordinates"
- + ", expected format is <groupId>:<artifactId>:<version>[[:<type>[:<classifier>]]:<scope>]" );
+ throw new BuildException( "Bad dependency coordinates '" + coords
+ + "', expected format is <groupId>:<artifactId>:<version>[[:<type>[:<classifier>]]:<scope>]" );
}
groupId = m.group( 1 );
artifactId = m.group( 2 );
http://git-wip-us.apache.org/repos/asf/maven-aether/blob/abc52937/src/main/java/org/eclipse/aether/ant/types/Exclusion.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/eclipse/aether/ant/types/Exclusion.java b/src/main/java/org/eclipse/aether/ant/types/Exclusion.java
index 9072ebf..5ea12d2 100644
--- a/src/main/java/org/eclipse/aether/ant/types/Exclusion.java
+++ b/src/main/java/org/eclipse/aether/ant/types/Exclusion.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010, 2011 Sonatype, Inc.
+ * Copyright (c) 2010, 2014 Sonatype, Inc.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -151,8 +151,8 @@ public class Exclusion
Matcher m = p.matcher( coords );
if ( !m.matches() )
{
- throw new BuildException( "Bad exclusion coordinates"
- + ", expected format is <groupId>[:<artifactId>[:<extension>[:<classifier>]]]" );
+ throw new BuildException( "Bad exclusion coordinates '" + coords
+ + "', expected format is <groupId>[:<artifactId>[:<extension>[:<classifier>]]]" );
}
groupId = m.group( 1 );
artifactId = m.group( 3 );
http://git-wip-us.apache.org/repos/asf/maven-aether/blob/abc52937/src/main/java/org/eclipse/aether/ant/types/Pom.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/eclipse/aether/ant/types/Pom.java b/src/main/java/org/eclipse/aether/ant/types/Pom.java
index ba00255..d53401e 100644
--- a/src/main/java/org/eclipse/aether/ant/types/Pom.java
+++ b/src/main/java/org/eclipse/aether/ant/types/Pom.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010, 2011 Sonatype, Inc.
+ * Copyright (c) 2010, 2014 Sonatype, Inc.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -188,6 +188,15 @@ public class Pom
this.version = version;
}
+ public String getCoords()
+ {
+ if ( isReference() )
+ {
+ return getRef().getCoords();
+ }
+ return coords;
+ }
+
public void setCoords( String coords )
{
checkAttributesAllowed();
@@ -331,9 +340,4 @@ public class Pom
return coords + " (" + super.toString() + ")";
}
- public String getCoords()
- {
- return coords;
- }
-
}