Skip to content

Commit

Permalink
change licence from lgpl 2.1 to asl 2
Browse files Browse the repository at this point in the history
  • Loading branch information
galan committed May 6, 2015
1 parent bb9d722 commit 2f2e2d0
Show file tree
Hide file tree
Showing 19 changed files with 3,414 additions and 473 deletions.
20 changes: 20 additions & 0 deletions .classpath
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,25 @@
<attribute name="owner.project.facets" value="jst.java"/>
</attributes>
</classpathentry>
<classpathentry kind="lib" path="lib/contrib/apache-log4j-1.2.15.zip"/>
<classpathentry kind="lib" path="lib/contrib/custom_rhino.jar"/>
<classpathentry kind="lib" path="lib/contrib/jakarta-taglibs-standard-1.1.2.zip"/>
<classpathentry kind="lib" path="lib/contrib/logging-log4j-1.2.14.zip"/>
<classpathentry kind="lib" path="lib/contrib/rhino1_6R6.zip"/>
<classpathentry kind="lib" path="lib/contrib/rhino1_6R7.zip"/>
<classpathentry kind="lib" path="lib/contrib/yuicompressor-2.2.5.zip"/>
<classpathentry kind="lib" path="lib/contrib/yuicompressor-2.3.5.zip"/>
<classpathentry kind="lib" path="lib/contrib/yuicompressor-2.3.6.zip"/>
<classpathentry kind="lib" path="lib/contrib/yuicompressor-2.4.1.zip"/>
<classpathentry kind="lib" path="lib/support/ant-junit-1.6.5.jar"/>
<classpathentry kind="lib" path="lib/support/checkstyle-all-4.3.jar"/>
<classpathentry kind="lib" path="lib/support/ehcache-1.5.0.jar"/>
<classpathentry kind="lib" path="lib/support/j2ee-1.3.1.jar"/>
<classpathentry kind="lib" path="lib/support/jstl.jar"/>
<classpathentry kind="lib" path="lib/support/junit-3.8.1.jar"/>
<classpathentry kind="lib" path="lib/support/log4j-1.2.15.jar"/>
<classpathentry kind="lib" path="lib/support/standard.jar"/>
<classpathentry kind="lib" path="lib/web/jawr-1.4.jar"/>
<classpathentry kind="lib" path="lib/web/yuicompressor-2.3.5.jar"/>
<classpathentry kind="output" path="target/classes"/>
</classpath>
6 changes: 6 additions & 0 deletions .project
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,14 @@
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.maven.ide.eclipse.maven2Nature</nature>
<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
Expand Down
2 changes: 1 addition & 1 deletion .settings/org.eclipse.core.resources.prefs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#Tue Jun 24 20:41:30 CEST 2008
eclipse.preferences.version=1
encoding//packtag-testsite/src/main/webapp/charsetTestAccent.jsp=UTF-8
encoding//packtag-testsite/src/main/webapp/js/charsetTestAccent.js=UTF-8
encoding/<project>=UTF-8
17 changes: 16 additions & 1 deletion .settings/org.eclipse.jdt.core.prefs
Original file line number Diff line number Diff line change
@@ -1,9 +1,22 @@
#Fri Mar 28 01:00:52 CET 2008
eclipse.preferences.version=1
org.eclipse.jdt.core.builder.cleanOutputFolder=ignore
org.eclipse.jdt.core.builder.duplicateResourceTask=warning
org.eclipse.jdt.core.builder.invalidClasspath=abort
org.eclipse.jdt.core.builder.recreateModifiedClassFileInOutputFolder=ignore
org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch
org.eclipse.jdt.core.circularClasspath=error
org.eclipse.jdt.core.classpath.exclusionPatterns=enabled
org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled
org.eclipse.jdt.core.classpath.outputOverlappingAnotherSource=error
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.4
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=1.4
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.maxProblemPerUnit=100
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
org.eclipse.jdt.core.compiler.source=1.4
Expand Down Expand Up @@ -263,3 +276,5 @@ org.eclipse.jdt.core.formatter.tabulation.char=tab
org.eclipse.jdt.core.formatter.tabulation.size=4
org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
org.eclipse.jdt.core.incompatibleJDKLevel=ignore
org.eclipse.jdt.core.incompleteClasspath=warning
2 changes: 2 additions & 0 deletions .settings/org.eclipse.jdt.launching.prefs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
eclipse.preferences.version=1
org.eclipse.jdt.launching.PREF_STRICTLY_COMPATIBLE_JRE_NOT_AVAILABLE=warning
4 changes: 4 additions & 0 deletions .settings/org.eclipse.m2e.core.prefs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
activeProfiles=
eclipse.preferences.version=1
resolveWorkspaceProjects=true
version=1
634 changes: 176 additions & 458 deletions LICENCE

Large diffs are not rendered by default.

16 changes: 16 additions & 0 deletions github-5.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
2015-02-19 12:34:35,077 ERROR [net.sf.packtag.implementation.JsminPackStrategy] Exception is class net.sf.packtag.implementation.JSMin$UnterminatedRegExpLiteralException
net.sf.packtag.implementation.JSMin$UnterminatedRegExpLiteralException
at net.sf.packtag.implementation.JSMin.action(JSMin.java:226)
at net.sf.packtag.implementation.JSMin.jsmin(JSMin.java:306)
at net.sf.packtag.implementation.JsminPackStrategy.pack(JsminPackStrategy.java:53)
at net.sf.packtag.tag.PackTag.reloadSingleResource(PackTag.java:332)
at net.sf.packtag.tag.PackTag.handleSingleResourceDelegate(PackTag.java:163)
at net.sf.packtag.tag.PackTag.handleSingleResource(PackTag.java:135)
at net.sf.packtag.tag.PackTag.handleCombinedResource(PackTag.java:227)
at net.sf.packtag.tag.PackTag.doEndTag(PackTag.java:103)
at org.apache.jsp.github_002d5_jsp._jspx_meth_pack_005fscript_005f0(github_002d5_jsp.java:142)
at org.apache.jsp.github_002d5_jsp._jspService(github_002d5_jsp.java:86)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)

http://compressorrater.thruhere.net/

2 changes: 1 addition & 1 deletion packtag-core/pom.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0"?>
Thanks T<?xml version="1.0"?>
<project>
<modelVersion>4.0.0</modelVersion>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
/**
* Project pack:tag >> http://packtag.sf.net
*
*
* This software is published under the terms of the LGPL License version 2.1, a
* copy of which has been included with this distribution in the 'lgpl.txt'
* file.
*
*
* Last author: $Author: danielgalan $ Last modified: $Date: 2007/10/13 20:32:08 $
* Revision: $Revision: 1.4 $
*
*
* $Log: JsminPackStrategy.java,v $ Revision 1.4 2007/10/13 20:32:08 danielgalan
* Updated a minor behavior
*
*
* Revision 1.3 2007/10/13 20:19:41 danielgalan Moved JSMin away from
* Inputstreams to Reader/Writer
*
*
* Revision 1.2 2007/09/23 14:37:31 danielgalan Added charset support
*
*
* Revision 1.1 2007/04/22 19:04:25 danielgalan pack.tag moved from subversion
* to good old CVS
*
*
*/
package net.sf.packtag.implementation;

Expand All @@ -30,15 +30,16 @@

import net.sf.packtag.strategy.PackException;
import net.sf.packtag.strategy.PackStrategy;
import net.sf.packtag.util.SafeLogger;



/**
* Strategy for compressing JavaScript resources with the JSMin algorithm, taken
* from Douglas Crockford: http://www.crockford.com This Strategy does not
* support charsets.
*
* @author Daniel Galán y Martins
*
* @author Daniel Gal�n y Martins
* @version $Revision: 1.4 $
*/
public class JsminPackStrategy implements PackStrategy {
Expand All @@ -53,6 +54,7 @@ public String pack(final InputStream resourceAsStream, final Charset charset, fi
return sw.toString().trim();
}
catch (Exception ex) {
SafeLogger.error(getClass(), "Exception is " + ex.getClass(), ex);
throw new PackException("Could not pack resource", ex);
}
}
Expand Down
52 changes: 52 additions & 0 deletions packtag-core/src/test/java/net/sf/packtag/bugs/Github5.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
/**
* Project pack:tag >> http://packtag.sf.net
*
* This software is published under the terms of the LGPL
* License version 2.1, a copy of which has been included with this
* distribution in the 'lgpl.txt' file.
*
* Creation date: Feb 20, 2015 - 8:38:25 PM
* Last author: $Author: danielgalan $
* Last modified: $Date:$
* Revision: $Revision:$
*
* $Log:$
*/
package net.sf.packtag.bugs;

import java.io.File;
import java.io.FileInputStream;
import java.io.FileReader;
import java.io.StringWriter;
import java.nio.charset.Charset;

import junit.framework.TestCase;
import net.sf.packtag.implementation.JSMin;
import net.sf.packtag.implementation.JsminPackStrategy;



/**
* Test for Github bug #5 - https://github.com/galan/packtag/issues/5
*
* @author daniel
*/
public class Github5 extends TestCase {

public void testBug() throws Exception {
FileReader reader = new FileReader(new File("/home/daniel/Dropbox/dev/git/packtag/packtag-testsite/src/main/webapp/js/moment-2.9.0.min.js"));
StringWriter sw = new StringWriter();
JSMin min = new JSMin(reader, sw);
min.jsmin();
assertEquals(sw.toString().trim().length(), 24183);
}


public void testStrategy() throws Exception {
FileInputStream fis = new FileInputStream(new File("/home/daniel/Dropbox/dev/git/packtag/packtag-testsite/src/main/webapp/js/moment-2.9.0.min.js"));
JsminPackStrategy strategy = new JsminPackStrategy();
String pack = strategy.pack(fis, Charset.forName("UTF-8"), null);
assertEquals(pack.length(), 24183);
}

}
17 changes: 17 additions & 0 deletions packtag-testsite/src/main/webapp/WEB-INF/classes/log4j.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">

<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">

<appender name="console" class="org.apache.log4j.ConsoleAppender">
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%d{ISO8601} %-5p [%c] %m%n" />
</layout>
</appender>

<root>
<priority value="INFO" />
<appender-ref ref="console" />
</root>

</log4j:configuration>
2 changes: 1 addition & 1 deletion packtag-testsite/src/main/webapp/async_defer.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<pack:script src="js/dummy.js" async="true"/>
<pack:script src="js/dummyCompress.js" minify="false" defer="true"/>

<pack:script defer="true">
<pack:script defer="true">
<src>js/dummy.js</src>
<src>js/dummyCompress.js</src>
</pack:script>
Expand Down
28 changes: 28 additions & 0 deletions packtag-testsite/src/main/webapp/github-5.jsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
<%-- <%@ taglib uri="http://www.galan.de/projects/packtag" prefix="pack" %> --%>
<%@ taglib uri="http://packtag.sf.net" prefix="pack" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>github issue #5</title>


<pack:script minify="false">
<src>js/moment-2.9.0.min.js</src>
</pack:script>

</head>

<body>
<a href="https://github.com/galan/packtag/issues/5">github #5</a><br/>
<p id="time">?</p>
<script>
document.getElementById('time').innerHTML = moment("20111031", "YYYYMMDD").fromNow();
</script>

</body>

</html>
Loading

0 comments on commit 2f2e2d0

Please sign in to comment.