Suppose that a user has added a catalog file to his mock-repo, then the
ArchetypeCatalogNotFoundException is misleading/confusing. I can imagine
that one would have different Exceptions for those situations.
One solutions could be to clearly explain it in the API what could cause
an ArchetypeCatalogNotFoundException, and give a proper message.
If you don't mind I'll leave that up to you, since you initialized the
project :)
On Wed, 15 May 2013 13:38:13 +0200, Stephen Connolly
<[email protected]> wrote:
When I think about it, for these methods does it not make more sense to
throw ArchetypeCatalogNotFoundException as if the method is not
implemented
then it is certainly not found and that way the invoking code is already
expecting the exception
On 15 May 2013 12:01, <[email protected]> wrote:
**
Revision 18309 <http://fisheye.codehaus.org/changelog/mojo/?cs=18309>
Author rfscholte Date 2013-05-15 06:01:36 -0500 (Wed, 15 May 2013) Log
Message
[MMOCKRM-10] Add stubMethods for all new methods added to the interface
of ArtifactStore to prevent LinkageErrors
Modified Paths
-
trunk/mojo/mrm/mrm-api/src/main/java/org/codehaus/mojo/mrm/api/maven/BaseArtifactStore.java<#13ea7dc15f383df2_trunkmojomrmmrmapisrcmainjavaorgcodehausmojomrmapimavenBaseArtifactStorejava>
Diff
Modified:
trunk/mojo/mrm/mrm-api/src/main/java/org/codehaus/mojo/mrm/api/maven/BaseArtifactStore.java
(18308 => 18309)
---
trunk/mojo/mrm/mrm-api/src/main/java/org/codehaus/mojo/mrm/api/maven/BaseArtifactStore.java 2013-05-15
10:18:53 UTC (rev 18308)
+++
trunk/mojo/mrm/mrm-api/src/main/java/org/codehaus/mojo/mrm/api/maven/BaseArtifactStore.java 2013-05-15
11:01:36 UTC (rev 18309)@@ -3,6 +3,8 @@ import java.io.IOException;
import java.io.InputStream; +import
org.apache.maven.archetype.catalog.ArchetypeCatalog;
+ /** * Base implementation of {@link ArtifactStore}. *@@ -38,4
+40,21 @@ throw new UnsupportedOperationException( "Read-only
artifact store" ); } + /**
+ * {@inheritDoc}
+ */
+ public ArchetypeCatalog getArchetypeCatalog()
+ throws IOException, ArchetypeCatalogNotFoundException
+ {
+ throw new UnsupportedOperationException(
"getArchetypeCatalog() has not been implemented" );
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public long getArchetypeCatalogLastModified()
+ throws IOException, ArchetypeCatalogNotFoundException
+ {
+ throw new UnsupportedOperationException(
"getArchetypeCatalogLastModified() has not been implemented" );
+ } }
------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email
--
Using Opera's revolutionary email client: http://www.opera.com/mail/
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email