@@ -0,0 +1,3075 @@
+/*%0A * JBoss, Home of Professional Open Source%0A * Copyright 2010, Red Hat Middleware LLC, and individual contributors%0A * by the @authors tag. See the copyright.txt in the distribution for a%0A * full listing of individual contributors.%0A *%0A * Licensed under the Apache License, Version 2.0 (the %22License%22);%0A * you may not use this file except in compliance with the License.%0A * You may obtain a copy of the License at%0A * http://www.apache.org/licenses/LICENSE-2.0%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A */%0Apackage org.jboss.shrinkwrap.api;%0A%0A/**%0A * Indicates that a default name cannot be generated for%0A * a given type because no extension mapping has been configured%0A * via %7B@link Configuration#getExtensionMapping()%7D.  %0A * %0A * @author %3Ca href=%22mailto:andrew.rubinger@jboss.org%22%3EALR%3C/a%3E%0A * @version $Revision: $%0A */%0Apublic class UnknownExtensionTypeException extends RuntimeException%0A%7B%0A%0A   //-------------------------------------------------------------------------------------%7C%7C%0A   // Class Members ----------------------------------------------------------------------%7C%7C%0A   //-------------------------------------------------------------------------------------%7C%7C%0A%0A   /**%0A    * serialVersionUID%0A    */%0A   private static final long serialVersionUID = 1L;%0A%0A   //-------------------------------------------------------------------------------------%7C%7C%0A   // Constructor ------------------------------------------------------------------------%7C%7C%0A   //-------------------------------------------------------------------------------------%7C%7C%0A%0A   /**%0A    * Creates a new instance with message indicating the missing type%0A    */%0A   private %3CT extends Assignable%3E UnknownExtensionTypeException(final Class%3CT%3E type)%0A   %7B%0A      super(%0A            %22The current configuration has no mapping for type %22%0A                  + type.getCanonicalName()%0A                  + %22, unable to determine extension. Either add a mapping via Configuration.getExtensionMapping or manually assign a name.%22);%0A   %7D%0A%0A   //-------------------------------------------------------------------------------------%7C%7C%0A   // Factory ----------------------------------------------------------------------------%7C%7C%0A   //-------------------------------------------------------------------------------------%7C%7C%0A%0A   /**%0A    * Creates a new %7B@link UnknownExtensionTypeException%7D for the specified type%0A    * %0A    * @throws IllegalArgumentException If the type is not specified%0A    */%0A   static %3CT extends Assignable%3E UnknownExtensionTypeException newInstance(final Class%3CT%3E type)%0A         throws IllegalArgumentException%0A   %7B%0A      // Precondition checks%0A      if (type == null)%0A      %7B%0A         throw new IllegalArgumentException(%22type must be specified%22);%0A      %7D%0A%0A      // Create new%0A      return new UnknownExtensionTypeException(type);%0A   %7D%0A%7D%0A

Make archive name optional in ShrinkWrap.create and ArchiveFactory.create. Original patch by Ken Gullaksen with some adjustments by ALR: Added UnknownExtensionTypeException Made JavaDoc more explicit Removed impl-base test class to get the extension names; the test should define these on its own so we do not pass the test if the API accidentally changes extension mappings