TRINIDAD-2540 - Align Trinidad 2.1.x so it can be editable using Netbeans 8
diff --git a/trinidad-api/pom.xml b/trinidad-api/pom.xml
index 15c8b04..871f473 100644
--- a/trinidad-api/pom.xml
+++ b/trinidad-api/pom.xml
@@ -265,6 +265,7 @@
           <jsfVersion>#{jsf-spec.version}</jsfVersion>
           <!--suppressListenerMethods>true</suppressListenerMethods-->
           <force>true</force>
+          <generatedSourceDirectory>${project.build.directory}/generated-sources/maven-faces-plugin</generatedSourceDirectory>
         </configuration>
         <executions>
           <execution>
diff --git a/trinidad-impl/pom.xml b/trinidad-impl/pom.xml
index f91f461..0a0a950 100644
--- a/trinidad-impl/pom.xml
+++ b/trinidad-impl/pom.xml
@@ -168,6 +168,46 @@
                 </goals>
               </execution>
               -->
+              <!--
+                <execution>
+                  <id>make_trinidad_tr</id>
+                  <configuration>
+                      <xmlFile>META-INF/tr.taglib.xml</xmlFile>
+                      <xmlBaseFile>src/main/conf/META-INF/facelets-taglib-base.xml</xmlBaseFile>
+                      <templateFile>facelets-taglib20.vm</templateFile>
+                      <params>
+                         <shortname>tr</shortname>
+                         <uri>http://myfaces.apache.org/trinidad</uri>
+                      </params>
+                      <modelIds>
+                          <modelId>trinidad-api</modelId>
+                          <modelId>trinidad-impl</modelId>
+                      </modelIds>
+                  </configuration>
+                  <goals>
+                      <goal>make-config</goal>
+                  </goals>
+                </execution>
+                <execution>
+                  <id>make_trinidad_trh</id>
+                  <configuration>
+                      <xmlFile>META-INF/trh.taglib.xml</xmlFile>
+                      <xmlBaseFile>src/main/conf/META-INF/facelets-taglib-base.xml</xmlBaseFile>
+                      <templateFile>facelets-taglib20.vm</templateFile>
+                      <params>
+                         <shortname>trh</shortname>
+                         <uri>http://myfaces.apache.org/trinidad/html</uri>
+                      </params>
+                      <modelIds>
+                          <modelId>trinidad-api</modelId>
+                          <modelId>trinidad-impl</modelId>
+                      </modelIds>
+                  </configuration>
+                  <goals>
+                      <goal>make-config</goal>
+                  </goals>
+                </execution>
+                -->
           </executions>
       </plugin>
           
@@ -327,12 +367,26 @@
         </configuration>
         <executions>
           <execution>
+            <id>generate-config</id>
             <goals>
               <goal>generate-faces-config</goal>
               <goal>generate-jsp-taglibs</goal>
               <goal>generate-facelets-taglibs</goal>
+            </goals>
+            <configuration>
+              <generatedSourceDirectory>${project.build.directory}/generated-sources/maven-faces-plugin</generatedSourceDirectory>
+              <generatedResourcesDirectory>${project.build.directory}/generated-resources/maven-faces-plugin</generatedResourcesDirectory>
+            </configuration>
+          </execution>
+          <execution>
+            <id>generate-renderer-map</id>
+            <goals>
               <goal>generate-renderer-map</goal>
             </goals>
+            <configuration>
+              <generatedSourceDirectory>${project.build.directory}/generated-resources/maven-faces-plugin</generatedSourceDirectory>
+              <generatedResourcesDirectory>${project.build.directory}/generated-resources/maven-faces-plugin</generatedResourcesDirectory>
+            </configuration>
           </execution>
         </executions>
       </plugin>
@@ -346,10 +400,22 @@
         </configuration>
         <executions>
           <execution>
+            <id>generate-locale</id>
             <goals>
               <goal>generate-locale-elements</goal>
+            </goals>
+            <configuration>
+                <targetDirectory>${project.build.directory}/generated-sources/maven-i18n-plugin</targetDirectory>
+            </configuration>
+          </execution>
+          <execution>
+            <id>generate-javascript-locales</id>
+            <goals>
               <goal>generate-javascript-locales</goal>
             </goals>
+            <configuration>
+                <targetDirectory>${project.build.directory}/generated-resources/maven-i18n-plugin</targetDirectory>
+            </configuration>
           </execution>
         </executions>
       </plugin>
diff --git a/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/util/CopyOnWriteArrayMap.java b/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/util/CopyOnWriteArrayMap.java
index 000e58c..1edf4bb 100644
--- a/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/util/CopyOnWriteArrayMap.java
+++ b/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/util/CopyOnWriteArrayMap.java
@@ -101,7 +101,7 @@
   private CopyOnWriteArrayMap(
       EntryFactory<?,K,V> entryFactory, ReentrantLock writeLock, ConcurrentEntry<K,V>[] entries)
   {
-    _entryFactory = entryFactory;
+    _entryFactory = (EntryFactory<ConcurrentEntry<K,V>,K,V>)entryFactory;
     _writeLock = writeLock;
     _entries   = entries;
   }
@@ -524,7 +524,8 @@
   }
 
   private static <K,V> ConcurrentEntry<K,V>[] _insertEntryAt(
-      ConcurrentEntry<K,V>[] entries, K key, V value, int insertIndex, EntryFactory<?,K,V> entryFactory)
+      ConcurrentEntry<K,V>[] entries, K key, V value, int insertIndex, 
+          EntryFactory<ConcurrentEntry<K,V>,K,V> entryFactory)
   {
     ConcurrentEntry<K,V> entry = entryFactory.newEntry(key, value);
 
@@ -1571,7 +1572,7 @@
   @SuppressWarnings("compatibility:4274080938865508278")
   private static final long serialVersionUID = 1;
 
-  private transient final EntryFactory<?,K,V> _entryFactory;
+  private transient final EntryFactory<ConcurrentEntry<K,V>,K,V> _entryFactory;
 
   // lock protecting mutators
   private transient final ReentrantLock _writeLock;