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 br...@apache.org on 2005/03/30 07:34:50 UTC
cvs commit: maven-components/maven-artifact/src/main/java/org/apache/maven/artifact/metadata SnapshotArtifactMetadata.java
brett 2005/03/29 21:34:50
Modified: maven-artifact/src/main/java/org/apache/maven/artifact/metadata
SnapshotArtifactMetadata.java
Log:
make sure local repository directory exists
Revision Changes Path
1.10 +5 -2 maven-components/maven-artifact/src/main/java/org/apache/maven/artifact/metadata/SnapshotArtifactMetadata.java
Index: SnapshotArtifactMetadata.java
===================================================================
RCS file: /home/cvs/maven-components/maven-artifact/src/main/java/org/apache/maven/artifact/metadata/SnapshotArtifactMetadata.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- SnapshotArtifactMetadata.java 30 Mar 2005 03:30:08 -0000 1.9
+++ SnapshotArtifactMetadata.java 30 Mar 2005 05:34:50 -0000 1.10
@@ -82,8 +82,11 @@
timestamp = getUtcDateFormatter().format( new Date() );
}
String path = getLocalRepositoryLocation( localRepository ).getPath();
+ File file = new File( path );
+ // TODO: this should be centralised before the resolution of the artifact
+ file.getParentFile().mkdirs();
FileUtils.fileWrite( path, constructVersion() );
- lastModified = new File( path ).lastModified();
+ lastModified = file.lastModified();
}
catch ( IOException e )
{