Author: brett
Date: Thu Jul 21 06:39:32 2005
New Revision: 220066
URL: http://svn.apache.org/viewcvs?rev=220066&view=rev
Log:
fix problem on first run when no RELEASE data
Modified:
maven/components/trunk/maven-artifact-manager/src/main/java/org/apache/maven/artifact/metadata/AbstractVersionArtifactMetadata.java
Modified:
maven/components/trunk/maven-artifact-manager/src/main/java/org/apache/maven/artifact/metadata/AbstractVersionArtifactMetadata.java
URL:
http://svn.apache.org/viewcvs/maven/components/trunk/maven-artifact-manager/src/main/java/org/apache/maven/artifact/metadata/AbstractVersionArtifactMetadata.java?rev=220066&r1=220065&r2=220066&view=diff
==============================================================================
---
maven/components/trunk/maven-artifact-manager/src/main/java/org/apache/maven/artifact/metadata/AbstractVersionArtifactMetadata.java
(original)
+++
maven/components/trunk/maven-artifact-manager/src/main/java/org/apache/maven/artifact/metadata/AbstractVersionArtifactMetadata.java
Thu Jul 21 06:39:32 2005
@@ -108,18 +108,22 @@
public void storeInLocalRepository( ArtifactRepository localRepository )
throws ArtifactMetadataRetrievalException
{
- try
+ String version = constructVersion();
+ if ( version != null )
{
- 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 = file.lastModified();
- }
- catch ( IOException e )
- {
- throw new ArtifactMetadataRetrievalException( "Unable to retrieve
metadata", e );
+ try
+ {
+ 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, version );
+ lastModified = file.lastModified();
+ }
+ catch ( IOException e )
+ {
+ throw new ArtifactMetadataRetrievalException( "Unable to
retrieve metadata", e );
+ }
}
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]