Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

update to find proper license. cleaned up license file.

  • Loading branch information...
commit c0911eaf5f5267ccf8b389c3d9ae7017ebaa8e81 1 parent a5b7314
@cwensel authored ohrite committed
Showing with 77 additions and 54 deletions.
  1. +28 −8 LICENSE.txt
  2. +2 −4 build.xml
  3. +47 −42 src/java/multitool/Main.java
View
36 LICENSE.txt
@@ -1,10 +1,30 @@
-Concurrent Public Domain License
-Copyright (c) 2009-2011 Concurrent, Inc. (http://concurrentinc.com)
+Binary License: GNU General Public License
-This work has been released into the public domain
-by the copyright holder. This applies worldwide.
+ Copyright (c) 2007-2010 Concurrent, Inc. All Rights Reserved. (http://concurrentinc.com)
-In case this is not legally possible:
-The copyright holder grants any entity the right
-to use this work for any purpose, without any
-conditions, unless such conditions are required by law.
+ Multitool is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Multitool is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Multitool. If not, see <http://www.gnu.org/licenses/>.
+
+Source License: Public Domain License
+
+ This work has been released into the public domain
+ by the copyright holder. This applies worldwide.
+
+ In case this is not legally possible:
+ The copyright holder grants any entity the right
+ to use this work for any purpose, without any
+ conditions, unless such conditions are required by law.
+
+Third-party Licenses:
+
+ All third-party licenses are included in the 'lib' folder and subfolders.
View
6 build.xml
@@ -87,6 +87,8 @@
</fileset>
</copy>
+ <move file="${build.classes}/LICENSE.txt" tofile="${build.classes}/MULTITOOL-LICENSE.txt"/>
+
</target>
<target name="compile-test">
@@ -103,10 +105,6 @@
<fileset dir="${src.test}">
<exclude name="**/*.java"/>
</fileset>
-
- <fileset dir="${basedir}">
- <include name="LICENSE.txt"/>
- </fileset>
</copy>
</target>
View
89 src/java/multitool/Main.java
@@ -21,11 +21,10 @@
package multitool;
+import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
-import java.io.BufferedReader;
import java.io.InputStreamReader;
-import java.util.Calendar;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.LinkedList;
@@ -149,8 +148,6 @@ private static void printUsage()
{
System.out.println( "multitool [param] [param] ..." );
printCascadingVersion();
-
- System.out.println( "" );
printLicense();
System.out.println( "" );
@@ -166,14 +163,23 @@ private static void printLicense()
{
try
{
- InputStream stream = Main.class.getResourceAsStream( "/LICENSE.txt" );
+ InputStream stream = Main.class.getResourceAsStream( "/MULTITOOL-LICENSE.txt" );
BufferedReader reader = new BufferedReader( new InputStreamReader( stream ) );
- String line = null;
- System.out.print( "Licensed under " );
+ System.out.print( "This distribution is licensed under the " );
+
+ String line = reader.readLine();
+
+ while( line != null )
+ {
+ if( line.matches( "^Binary License:.*$" ) )
+ {
+ System.out.println( line.replace( "^[^:]*:\\s*(.*)$", "$1" ) );
+ break;
+ }
- while ( ( line = reader.readLine() ) != null && line.length() > 0 )
- System.out.println( line );
+ line = reader.readLine();
+ }
reader.close();
}
@@ -184,39 +190,38 @@ private static void printLicense()
}
private static void printCascadingVersion()
- {
- try
- {
- Properties versionProperties = new Properties();
-
- InputStream stream = Cascade.class.getClassLoader().getResourceAsStream( "cascading/version.properties" );
- versionProperties.load( stream );
-
- stream = Cascade.class.getClassLoader().getResourceAsStream( "cascading/build.number.properties" );
- versionProperties.load( stream );
-
- String releaseMajor = versionProperties.getProperty( "cascading.release.major" );
- String releaseMinor = versionProperties.getProperty( "cascading.release.minor", null );
- String releaseBuild = versionProperties.getProperty( "build.number", null );
- String hadoopVersion = versionProperties.getProperty( "cascading.hadoop.compatible.version" );
- String releaseFull = null;
-
- if( releaseMinor == null )
- releaseFull = releaseMajor;
- else
- if( releaseBuild == null )
- releaseFull = String.format( "%s.%s", releaseMajor, releaseMinor );
- else
- releaseFull = String.format( "%s.%s%s", releaseMajor, releaseMinor, releaseBuild );
-
-
- System.out.println( String.format( "Built against Cascading %s on %s", releaseFull, hadoopVersion ) );
- }
- catch( IOException exception )
- {
- System.out.println( "Unknown Cascading Version" );
- }
- }
+ {
+ try
+ {
+ Properties versionProperties = new Properties();
+
+ InputStream stream = Cascade.class.getClassLoader().getResourceAsStream( "cascading/version.properties" );
+ versionProperties.load( stream );
+
+ stream = Cascade.class.getClassLoader().getResourceAsStream( "cascading/build.number.properties" );
+ versionProperties.load( stream );
+
+ String releaseMajor = versionProperties.getProperty( "cascading.release.major" );
+ String releaseMinor = versionProperties.getProperty( "cascading.release.minor", null );
+ String releaseBuild = versionProperties.getProperty( "build.number", null );
+ String hadoopVersion = versionProperties.getProperty( "cascading.hadoop.compatible.version" );
+ String releaseFull = null;
+
+ if( releaseMinor == null )
+ releaseFull = releaseMajor;
+ else if( releaseBuild == null )
+ releaseFull = String.format( "%s.%s", releaseMajor, releaseMinor );
+ else
+ releaseFull = String.format( "%s.%s%s", releaseMajor, releaseMinor, releaseBuild );
+
+
+ System.out.println( String.format( "Built against Cascading %s on %s", releaseFull, hadoopVersion ) );
+ }
+ catch( IOException exception )
+ {
+ System.out.println( "Unknown Cascading Version" );
+ }
+ }
private static void printFactoryUsage( Factory[] factories )
{
Please sign in to comment.
Something went wrong with that request. Please try again.