-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
128 changed files
with
6,737 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<fileset-config file-format-version="1.2.0" simple-config="true"> | ||
<fileset name="Alle" enabled="true" check-config-name="Sun Checks" local="false"> | ||
<file-match-pattern match-pattern="." include-pattern="true"/> | ||
</fileset> | ||
</fileset-config> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<classpath> | ||
<classpathentry kind="src" output="target/classes" path="packtag-core/src/main/java"/> | ||
<classpathentry kind="src" output="target/test-classes" path="packtag-core/src/test/java"> | ||
<attributes> | ||
<attribute name="maven.type" value="test"/> | ||
</attributes> | ||
</classpathentry> | ||
<classpathentry excluding="**" kind="src" output="packtag-core/src/main/resources" path="packtag-core/src/main/resources"/> | ||
<classpathentry excluding="**" kind="src" output="packtag-core/src/test/resources" path="packtag-core/src/test/resources"/> | ||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> | ||
<classpathentry kind="con" path="org.eclipse.jst.server.core.container/org.eclipse.jst.server.tomcat.runtimeTarget/Apache Tomcat v5.5"/> | ||
<classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.web.container"/> | ||
<classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER/modules"> | ||
<attributes> | ||
<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/> | ||
</attributes> | ||
</classpathentry> | ||
<classpathentry kind="output" path="target/classes"/> | ||
</classpath> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<projectDescription> | ||
<name>packtag</name> | ||
<comment></comment> | ||
<projects> | ||
</projects> | ||
<buildSpec> | ||
<buildCommand> | ||
<name>org.eclipse.jdt.core.javabuilder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
<buildCommand> | ||
<name>org.eclipse.wst.common.project.facet.core.builder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
<buildCommand> | ||
<name>org.eclipse.wst.validation.validationbuilder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
<buildCommand> | ||
<name>org.maven.ide.eclipse.maven2Builder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
</buildSpec> | ||
<natures> | ||
<nature>org.eclipse.jdt.core.javanature</nature> | ||
<nature>org.maven.ide.eclipse.maven2Nature</nature> | ||
<nature>org.eclipse.wst.common.project.facet.core.nature</nature> | ||
<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature> | ||
<nature>org.eclipse.jem.workbench.JavaEMFNature</nature> | ||
</natures> | ||
</projectDescription> |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
pack:tag | ||
A JSP Taglib for delivering minified, combined and gzip-compressed resources (JavaScript and CSS). | ||
|
||
To enable pack:tag in your application do the following: | ||
- Copy the packtag.jar to your /WEB-INF/lib directory | ||
- Add the <servlet> and <servlet-mapping> from the web.xml to your /WEB-INF/web.xml | ||
|
||
To customize pack:tag copy the packtag.properties file to your /WEB-INF directory and edit it. | ||
|
||
For detailed instructions look here: | ||
http://www.galan.de/projects/packtag |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,181 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
|
||
<project name="packtag" default="build"> | ||
|
||
<property name="application.version" value="3.3"/> | ||
<property name="application.name" value="packtag"/> | ||
<property name="application.jar" value="${application.name}-${application.version}.jar"/> | ||
<property name="application.company" value="n/a"/> | ||
|
||
<property name="dir.working" location="."/> | ||
<property name="dir.dist" location="${dir.working}/dist"/> | ||
|
||
<property name="dir.lib" location="${dir.working}/lib"/> | ||
<property name="dir.lib.support" location="${dir.lib}/support"/> | ||
<property name="dir.lib.web" location="${dir.lib}/web"/> | ||
|
||
<property name="dir.classes" location="${dir.working}/classes"/> | ||
|
||
<property name="dir.main.src" location="${dir.working}/packtag-core/src/main/java"/> | ||
<property name="dir.main.resources" location="${dir.working}/packtag-core/src/main/resources"/> | ||
<property name="dir.webapp" location="${dir.working}/packtag-testsite/src/main/webapp"/> | ||
|
||
<property name="dir.dist.docs" location="${dir.dist}/javadocs"/> | ||
<property name="dir.dist.files" location="${dir.dist}/files"/> | ||
<property name="dir.dist.meta-inf" location="${dir.dist}/META-INF"/> | ||
|
||
<property name="file.tld" location="${dir.main.resources}/META-INF/packtag.tld"/> | ||
<property name="file.web.xml" location="${dir.webapp}/WEB-INF/web.xml"/> | ||
<property name="file.licence" location="${dir.working}/LICENSE.txt"/> | ||
<property name="file.readme" location="${dir.working}/README.txt"/> | ||
<property name="file.properties.packtag" location="${dir.webapp}/WEB-INF/packtag.properties"/> | ||
<property name="file.properties.packtag.user" location="${dir.webapp}/WEB-INF/packtag.user.properties"/> | ||
<property name="file.release" location="${dir.dist}/${application.name}-${application.version}.zip"/> | ||
<property name="file.releases" location="${dir.working}/releases.txt"/> | ||
|
||
|
||
|
||
<path id="classpath.packtag"> | ||
<fileset dir="${dir.lib.support}"> | ||
<include name="*.jar"/> | ||
</fileset> | ||
<fileset dir="${dir.lib.web}"> | ||
<include name="*.jar"/> | ||
</fileset> | ||
</path> | ||
|
||
|
||
|
||
<taskdef name="junit" classname="org.apache.tools.ant.taskdefs.optional.junit.JUnitTask"> | ||
<classpath> | ||
<pathelement location="${dir.lib.support}/ant-junit-1.6.5.jar"/> | ||
<pathelement location="${dir.lib.support}/junit-3.8.1.jar"/> | ||
</classpath> | ||
</taskdef> | ||
|
||
|
||
|
||
<target name="build" depends="clean, compile, tests" description="builds the sources"> | ||
</target> | ||
|
||
|
||
|
||
<target name="clean" description="deletes the builded sources and "> | ||
<delete dir="${dir.classes}"/> | ||
<mkdir dir="${dir.classes}"/> | ||
<delete dir="${dir.dist}"/> | ||
<mkdir dir="${dir.dist}"/> | ||
</target> | ||
|
||
|
||
|
||
<target name="compile" depends="clean, copy-resources"> | ||
<javac srcdir="${dir.main.src}" | ||
destdir="${dir.classes}" | ||
classpathref="classpath.packtag" | ||
source="1.4" | ||
target="1.4" | ||
debug="on" | ||
fork="yes" | ||
encoding="ISO-8859-1" | ||
debuglevel="lines,vars,source" | ||
deprecation="on"/> | ||
</target> | ||
|
||
|
||
|
||
<target name="copy-resources"> | ||
<copy todir="${dir.classes}"> | ||
<fileset dir="${dir.main.resources}"> | ||
<include name="**/*.properties"/> | ||
<include name="**/*.tld"/> | ||
<include name="**/*.gif"/> | ||
<include name="**/*.jpg"/> | ||
<include name="**/*.jar"/> | ||
<include name="**/*.png"/> | ||
<include name="**/*.licence"/> | ||
<include name="**/*.txt"/> | ||
<include name="**/*.css"/> | ||
<include name="**/*.js"/> | ||
<include name="**/*.xml"/> | ||
</fileset> | ||
</copy> | ||
</target> | ||
|
||
|
||
|
||
<target name="release" depends="build-release" description="creates a complete clean distribution"> | ||
<zip destfile="${file.release}" basedir="${dir.dist}"/> | ||
</target> | ||
|
||
|
||
|
||
<target name="build-release" depends="build,build-docs"> | ||
<mkdir dir="${dir.dist.files}"/> | ||
<mkdir dir="${dir.dist.meta-inf}"/> | ||
<jar destfile="${dir.dist.files}/${application.name}-${application.version}.jar" | ||
index="false" | ||
basedir="${dir.classes}" | ||
excludes="net/sf/packtag/test/**/*"> | ||
<fileset dir="${dir.dist}"> | ||
<include name="META-INF/packtag.tld"/> | ||
</fileset> | ||
<manifest> | ||
<attribute name="Manifest-Version" value="1.0"/> | ||
<attribute name="Created-By" value="Daniel Galán y Martins"/> | ||
<attribute name="Implementation-Title" value="${application.name}"/> | ||
<attribute name="Implementation-Version" value="${application.version}"/> | ||
</manifest> | ||
</jar> | ||
<delete dir="${dir.dist.meta-inf}"/> | ||
<copy file="${file.licence}" todir="${dir.dist}"/> | ||
<copy file="${file.properties.packtag}" todir="${dir.dist.files}"/> | ||
<copy file="${file.properties.packtag.user}" todir="${dir.dist.files}"/> | ||
<copy file="${file.web.xml}" todir="${dir.dist.files}"/> | ||
<copy file="${file.readme}" todir="${dir.dist}"/> | ||
<copy file="${file.releases}" todir="${dir.dist}"/> | ||
</target> | ||
|
||
|
||
|
||
<target name="build-docs" depends="clean"> | ||
<mkdir dir="${dir.dist.docs}"/> | ||
<javadoc sourcepath="${dir.main.src}" | ||
destdir="${dir.dist.docs}" | ||
packagenames="net.sf.*" | ||
classpathref="classpath.packtag" | ||
source="1.4" | ||
Private="off" | ||
Protected="on" | ||
Version="on" | ||
Use="on" | ||
Author="on" | ||
Splitindex="on" | ||
link="http://java.sun.com/j2se/1.4.2/docs/api/" | ||
Windowtitle="pack:tag API Documentation" | ||
Doctitle="${application.name}, Version ${application.version}" | ||
header="${application.name}" | ||
footer="${application.company}"> | ||
<link href="http://java.sun.com/j2se/1.4.2/docs/api/"/> | ||
</javadoc> | ||
</target> | ||
|
||
|
||
|
||
<target name="tests"> | ||
<junit printsummary="on" haltonfailure="on" fork="yes" dir="${dir.classes}"> | ||
<jvmarg value="-Dfile.encoding=ISO-8859-1"/> | ||
<classpath> | ||
<path refid="classpath.packtag"/> | ||
<pathelement location="${dir.classes}"/> | ||
</classpath> | ||
<formatter type="xml"/> | ||
<batchtest> | ||
<fileset dir="${dir.classes}"> | ||
<include name="net/sf/packtag/**/*Test.class"/> | ||
</fileset> | ||
</batchtest> | ||
</junit> | ||
</target> | ||
|
||
</project> |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
79 changes: 79 additions & 0 deletions
79
packtag-core/src/main/java/net/sf/packtag/cache/PackCache.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
/** | ||
* 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: 12.04.2007 - 21:46:36 | ||
* Last author: $Author: danielgalan $ | ||
* Last modified: $Date: 2007/11/12 22:57:24 $ | ||
* Revision: $Revision: 1.3 $ | ||
* | ||
* $Log: PackCache.java,v $ | ||
* Revision 1.3 2007/11/12 22:57:24 danielgalan | ||
* renamed sqp to absolutePath and fqp to mappedPath | ||
* | ||
* Revision 1.2 2007/05/02 21:38:37 danielgalan | ||
* alias to name | ||
* | ||
* Revision 1.1 2007/04/22 19:04:21 danielgalan | ||
* pack.tag moved from subversion to good old CVS | ||
* | ||
*/ | ||
package net.sf.packtag.cache; | ||
|
||
/** | ||
* Singleton to the Cache | ||
* | ||
* @author Daniel Galán y Martins | ||
* @version $Revision: 1.3 $ | ||
*/ | ||
public class PackCache { | ||
|
||
private static PackCache instance; | ||
private final ResourceCache resourceCache = new ResourceCache(); | ||
|
||
|
||
private static PackCache getInstance() { | ||
if (instance == null) { | ||
synchronized (PackCache.class) { | ||
if (instance == null) { | ||
instance = new PackCache(); | ||
} | ||
} | ||
} | ||
return instance; | ||
} | ||
|
||
|
||
private ResourceCache getResourceCache() { | ||
return resourceCache; | ||
} | ||
|
||
|
||
public static Resource getResourceByAbsolutePath(final String absolutePath) { | ||
return getInstance().getResourceCache().getResourceByAbsolutePath(absolutePath); | ||
} | ||
|
||
|
||
public static Resource getResourceByMappedPath(final String mappedPath) { | ||
return getInstance().getResourceCache().getResourceByMappedPath(mappedPath); | ||
} | ||
|
||
|
||
public static boolean existResource(final String absolutePath) { | ||
return getInstance().getResourceCache().existResource(absolutePath); | ||
} | ||
|
||
|
||
public static void store(final Resource resource, final boolean clearDependingCombinedResources) { | ||
getInstance().getResourceCache().store(resource, clearDependingCombinedResources); | ||
} | ||
|
||
|
||
public static void clearCache() { | ||
getInstance().getResourceCache().clearCache(); | ||
} | ||
|
||
} |
Oops, something went wrong.