Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGreg Wilkins2014-04-03 03:27:27 +0000
committerGreg Wilkins2014-04-03 03:27:27 +0000
commit0bbec3826c112d129f4f94046a03559acefe0fdc (patch)
tree0c981e22b5b37bc29a70d3f8a92b1a9ae0a5c020 /jetty-jspc-maven-plugin
parent157a54ec5cf1862d9214a01830c5ff0e3bedbdea (diff)
downloadorg.eclipse.jetty.project-0bbec3826c112d129f4f94046a03559acefe0fdc.tar.gz
org.eclipse.jetty.project-0bbec3826c112d129f4f94046a03559acefe0fdc.tar.xz
org.eclipse.jetty.project-0bbec3826c112d129f4f94046a03559acefe0fdc.zip
430341 use apache jsp/jstl for maven plugins
Diffstat (limited to 'jetty-jspc-maven-plugin')
-rw-r--r--jetty-jspc-maven-plugin/pom.xml12
-rw-r--r--jetty-jspc-maven-plugin/src/main/java/org/eclipse/jetty/jspc/plugin/JspcMojo.java16
2 files changed, 23 insertions, 5 deletions
diff --git a/jetty-jspc-maven-plugin/pom.xml b/jetty-jspc-maven-plugin/pom.xml
index 009fd3a0c0..2f709b2cd5 100644
--- a/jetty-jspc-maven-plugin/pom.xml
+++ b/jetty-jspc-maven-plugin/pom.xml
@@ -73,8 +73,18 @@
</exclusions>
</dependency>
<dependency>
+ <groupId>org.eclipse.jetty</groupId>
+ <artifactId>apache-jsp</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.ant</groupId>
+ <artifactId>ant</artifactId>
+ <version>1.8.4</version>
+ </dependency>
+ <dependency>
<groupId>org.eclipse.jetty</groupId>
- <artifactId>jetty-jsp</artifactId>
+ <artifactId>apache-jstl</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
diff --git a/jetty-jspc-maven-plugin/src/main/java/org/eclipse/jetty/jspc/plugin/JspcMojo.java b/jetty-jspc-maven-plugin/src/main/java/org/eclipse/jetty/jspc/plugin/JspcMojo.java
index 1e6d103dc8..ac3e45f3f5 100644
--- a/jetty-jspc-maven-plugin/src/main/java/org/eclipse/jetty/jspc/plugin/JspcMojo.java
+++ b/jetty-jspc-maven-plugin/src/main/java/org/eclipse/jetty/jspc/plugin/JspcMojo.java
@@ -79,6 +79,7 @@ import org.eclipse.jetty.util.resource.Resource;
public class JspcMojo extends AbstractMojo
{
public static final String END_OF_WEBAPP = "</web-app>";
+ public static final String PRECOMPILED_FLAG = "org.eclipse.jetty.jsp.precompiled";
/**
@@ -207,7 +208,7 @@ public class JspcMojo extends AbstractMojo
/**
* Patterns of jars on the system path that contain tlds. Use | to separate each pattern.
*
- * @parameter default-value=".*taglibs[^/]*\.jar|.*jstl-impl[^/]*\.jar$
+ * @parameter default-value=".*taglibs[^/]*\.jar|.*jstl[^/]*\.jar$
*/
private String tldJarNamePatterns;
@@ -294,9 +295,9 @@ public class JspcMojo extends AbstractMojo
jspc.setWebXmlFragment(webXmlFragment);
jspc.setUriroot(webAppSourceDirectory);
jspc.setOutputDir(generatedClasses);
- jspc.setClassPath(webAppClassPath.toString());
+ jspc.setClassPath(sysClassPath+System.getProperty("path.separator")+webAppClassPath.toString());
jspc.setCompile(true);
- jspc.setSystemClassPath(sysClassPath);
+ //jspc.setSystemClassPath(sysClassPath);
// JspC#setExtensions() does not exist, so
@@ -419,6 +420,10 @@ public class JspcMojo extends AbstractMojo
mergedWebXmlWriter.println(line);
}
}
+
+ //put in a context init-param to flag that the contents have been precompiled
+ mergedWebXmlWriter.println("<context-param><param-name>"+PRECOMPILED_FLAG+"</param-name><param-value>true</param-value></context-param>");
+
// put in the generated fragment
try (BufferedReader fragmentWebXmlReader = new BufferedReader(
@@ -541,13 +546,16 @@ public class JspcMojo extends AbstractMojo
*/
private List<URL> getSystemJarsWithTlds() throws Exception
{
+ getLog().debug("tld pattern=" + tldJarNamePatterns);
final List<URL> list = new ArrayList<URL>();
List<URI> artifactUris = new ArrayList<URI>();
Pattern pattern = Pattern.compile(tldJarNamePatterns);
for (Iterator<Artifact> iter = pluginArtifacts.iterator(); iter.hasNext(); )
{
Artifact pluginArtifact = iter.next();
- artifactUris.add(Resource.newResource(pluginArtifact.getFile()).getURI());
+ Resource res = Resource.newResource(pluginArtifact.getFile());
+ getLog().debug("scan jar: "+res.getURI());
+ artifactUris.add(res.getURI());
}
PatternMatcher matcher = new PatternMatcher()

Back to the top