FELIX-3778 Create an all-in-one bundle again including the org.json,
    Commons IO, and Commons FileUpload libraries incl. exports.

git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@1416227 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/webconsole/pom.xml b/webconsole/pom.xml
index ee94278..ab01f6f 100644
--- a/webconsole/pom.xml
+++ b/webconsole/pom.xml
@@ -36,6 +36,11 @@
         http://felix.apache.org/site/apache-felix-web-console.html for more
         information on this bundle.
     </description>
+    
+    <properties>
+        <org.json.version>20070829</org.json.version>
+        <org.json.version.osgi>0.0.0.${org.json.version}</org.json.version.osgi>
+    </properties>
 
     <scm>
         <connection>scm:svn:http://svn.apache.org/repos/asf/felix/trunk/webconsole</connection>
@@ -127,7 +132,8 @@
                             org.apache.felix.webconsole.i18n;version=1.0.0;provide:=true
                         </Export-Package>
                         <Import-Package>
-                            org.osgi.service.metatype;resolution:=optional,
+                            org.json.*;version=0,
+							org.osgi.service.metatype;resolution:=optional,
                             javax.servlet.*;version=2.4,
                             org.apache.commons.io; version="[1.4,3)",
                             *
@@ -190,6 +196,91 @@
         </plugins>
     </build>
 
+   <profiles>
+       <!--
+           The "all-in-one-bundle" profile builds a bundle including certain
+           3rd party libraries and classes, namely: Commons IO, Commons
+           FileUpload, JSON, and the OSGi ServiceTracker.
+           The "all-in-one-bundle" can be used in deployments where these
+           dependencies need not be deployed separately.
+       -->
+       <profile>
+           <id>all-in-one-bundle</id>
+           <activation><activeByDefault>true</activeByDefault></activation>
+           <build>
+               <plugins>
+                   <plugin>
+                       <groupId>org.apache.felix</groupId>
+                       <artifactId>maven-bundle-plugin</artifactId>
+                       <executions>
+                           <execution>
+                               <id>all-in-one-bundle</id>
+                               <goals>
+                                   <goal>bundle</goal>
+                               </goals>
+                               <configuration>
+                                   <classifier>all</classifier>
+                                   <instructions>
+                                       <Bundle-Name>
+                                           ${project.name} (All In One)
+                                       </Bundle-Name>
+                                       <Bundle-SymbolicName>
+                                           ${project.artifactId}.all
+                                       </Bundle-SymbolicName>
+                                       <Include-Resource>
+                                           {maven-resources},META-INF=src/main/all-resources
+                                       </Include-Resource>
+                                       <Export-Package>
+                                            org.apache.commons.fileupload,
+                                            org.apache.commons.fileupload.disk,
+                                            org.apache.commons.fileupload.servlet,
+                                            org.apache.commons.fileupload.util,
+                                            org.apache.commons.io,
+                                            org.apache.commons.io.filefilter,
+                                            org.apache.commons.io.output,
+                                            org.json;version=${org.json.version.osgi}
+                                       </Export-Package>
+                                       <Embed-Dependency>
+                                           <!-- Import/Export-Package parsing -->
+                                           org.apache.felix.utils;inline=org/apache/felix/utils/manifest/**,
+                                           org.apache.felix.framework;inline=org/apache/felix/framework/util/VersionRange**,
+                                            
+                                           <!-- ServiceTracker -->
+                                           org.osgi.compendium;
+                                              inline=org/osgi/util/tracker/*,
+                                       </Embed-Dependency>
+                                       
+                                       <_removeheaders>
+                                           Embed-Dependency,Private-Package,Include-Resource
+                                       </_removeheaders>
+                                   </instructions>
+                               </configuration>
+                           </execution>
+                       </executions>
+                   </plugin>
+                   <!--
+                  <plugin>
+                    <groupId>org.apache.maven.plugins</groupId>
+                    <artifactId>maven-remote-resources-plugin</artifactId>
+                    <executions>
+                      <execution>
+                        <goals>
+                          <goal>process</goal>
+                        </goals>
+                        <configuration>
+                          <resourceBundles>
+                            <resourceBundle>org.apache:apache-jar-resource-bundle:1.4</resourceBundle>
+                          </resourceBundles>
+                        </configuration>
+                      </execution>
+                    </executions>
+                  </plugin>
+                  -->
+               </plugins>
+            </build>
+        </profile>
+    </profiles>
+
     <dependencies>
         <dependency>
             <groupId>javax.servlet</groupId>
@@ -228,9 +319,10 @@
         <dependency>
             <groupId>org.json</groupId>
             <artifactId>json</artifactId>
-            <version>20070829</version>
+            <version>${org.json.version}</version>
             <scope>provided</scope>
         </dependency>
+        
         <dependency>
             <groupId>org.apache.felix</groupId>
             <artifactId>org.apache.felix.shell</artifactId>
diff --git a/webconsole/src/main/appended-resources/META-INF/LICENSE b/webconsole/src/main/appended-resources/META-INF/LICENSE
index 3a8c166..6953ce1 100644
--- a/webconsole/src/main/appended-resources/META-INF/LICENSE
+++ b/webconsole/src/main/appended-resources/META-INF/LICENSE
@@ -398,3 +398,28 @@
 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 THE SOFTWARE.
+
+
+For the org.json classes (applies if org.json classes are embedded):
+
+Copyright (c) 2002 JSON.org
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+The Software shall be used for Good, not Evil.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
\ No newline at end of file