You are viewing a plain text version of this content. The canonical link for it is here.
Posted to m2-dev@maven.apache.org by mi...@apache.org on 2004/06/20 20:14:57 UTC
cvs commit: maven-components/maven-core/src/main/java/org/apache/maven/artifact/deployer DefaultArtifactDeployer.java
michal 2004/06/20 11:14:57
Modified: maven-core/src/main/java/org/apache/maven/artifact/deployer
DefaultArtifactDeployer.java
Log:
improved error handling - still far away of being perfect
Revision Changes Path
1.2 +29 -1 maven-components/maven-core/src/main/java/org/apache/maven/artifact/deployer/DefaultArtifactDeployer.java
Index: DefaultArtifactDeployer.java
===================================================================
RCS file: /home/cvs/maven-components/maven-core/src/main/java/org/apache/maven/artifact/deployer/DefaultArtifactDeployer.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- DefaultArtifactDeployer.java 20 Jun 2004 13:24:53 -0000 1.1
+++ DefaultArtifactDeployer.java 20 Jun 2004 18:14:57 -0000 1.2
@@ -40,9 +40,37 @@
{
DistributionManagement distributionManagement = project.getDistributionManagement();
+ if ( distributionManagement == null )
+ {
+
+ String msg = "distributionManagment element is missing in the POM: "
+ + project.getId();
+
+ throw new Exception( msg );
+
+ }
+
+
String host = distributionManagement.getHost();
+ if ( host == null )
+ {
+ String msg = "host element is missing in the POM: "
+ + project.getId();
+
+ }
+
+
String directory = distributionManagement.getDirectory();
+
+ if ( directory == null )
+ {
+ String msg = "directory element is missing in the POM: "
+ + project.getId();
+
+ }
+
+
String protocol = PathUtils.protocol( host );