Skip to content

Commit

Permalink
480272 Update to newer jdt ecj version
Browse files Browse the repository at this point in the history
  • Loading branch information
janbartel committed Oct 21, 2015
1 parent c156f65 commit 781a380
Show file tree
Hide file tree
Showing 7 changed files with 35 additions and 17 deletions.
4 changes: 2 additions & 2 deletions apache-jsp/pom.xml
Expand Up @@ -88,8 +88,8 @@

<!-- Eclipse Java Compiler (for JSP Compilation) -->
<dependency>
<groupId>org.eclipse.jetty.orbit</groupId>
<artifactId>org.eclipse.jdt.core</artifactId>
<groupId>org.eclipse.jdt.core.compiler</groupId>
<artifactId>ecj</artifactId>
</dependency>
</dependencies>
</project>
4 changes: 2 additions & 2 deletions jetty-distribution/pom.xml
Expand Up @@ -441,8 +441,8 @@
<goal>copy-dependencies</goal>
</goals>
<configuration>
<includeGroupIds>org.eclipse.jetty,org.eclipse.jetty.toolchain,org.mortbay.jasper,org.eclipse.jetty.orbit</includeGroupIds>
<includeArtifactIds>apache-jsp,apache-el,org.eclipse.jdt.core</includeArtifactIds>
<includeGroupIds>org.eclipse.jetty,org.eclipse.jetty.toolchain,org.mortbay.jasper,org.eclipse.jetty.orbit,org.eclipse.jdt.core.compiler</includeGroupIds>
<includeArtifactIds>apache-jsp,apache-el,ecj</includeArtifactIds>
<includeTypes>jar</includeTypes>
<prependGroupId>true</prependGroupId>
<outputDirectory>${assembly-directory}/lib/apache-jsp</outputDirectory>
Expand Down
Expand Up @@ -250,6 +250,19 @@ protected TldScanner newTldScanner(JspCServletContext context, boolean namespace
private String tldJarNamePatterns;


/**
* Source version - if not set defaults to jsp default (currently 1.7)
* @parameter
*/
private String sourceVersion;


/**
* Target version - if not set defaults to jsp default (currently 1.7)
* @parameter
*/
private String targetVersion;

/**
*
* The JspC instance being used to compile the jsps.
Expand Down Expand Up @@ -280,7 +293,11 @@ public void execute() throws MojoExecutionException, MojoFailureException
getLog().info("webXml="+webXml);
getLog().info("insertionMarker="+ (insertionMarker == null || insertionMarker.equals("") ? END_OF_WEBAPP : insertionMarker));
getLog().info("keepSources=" + keepSources);
getLog().info("mergeFragment=" + mergeFragment);
getLog().info("mergeFragment=" + mergeFragment);
if (sourceVersion != null)
getLog().info("sourceVersion="+sourceVersion);
if (targetVersion != null)
getLog().info("targetVersion="+targetVersion);
}
try
{
Expand Down Expand Up @@ -343,6 +360,10 @@ public void compile() throws Exception
jspc.setClassLoader(fakeWebAppClassLoader);
jspc.setScanAllDirectories(scanAllDirectories);
jspc.setCompile(true);
if (sourceVersion != null)
jspc.setCompilerSourceVM(sourceVersion);
if (targetVersion != null)
jspc.setCompilerTargetVM(targetVersion);

// JspC#setExtensions() does not exist, so
// always set concrete list of files that will be processed.
Expand Down
1 change: 1 addition & 0 deletions jetty-osgi/jetty-osgi-boot-jsp/pom.xml
Expand Up @@ -80,6 +80,7 @@
<Fragment-Host>org.eclipse.jetty.osgi.boot</Fragment-Host>
<Export-Package>!org.eclipse.jetty.osgi.boot.*</Export-Package>
<Import-Package>org.eclipse.jdt.*;resolution:=optional,
org.eclipse.jdt.core.compiler.*;resolution:=optional,
com.sun.el;resolution:=optional,
com.sun.el.lang;resolution:=optional,
com.sun.el.parser;resolution:=optional,
Expand Down
Expand Up @@ -144,7 +144,7 @@ public static List<Option> jspDependencies()
res.add(mavenBundle().groupId("org.mortbay.jasper").artifactId("apache-jsp").versionAsInProject());
res.add(mavenBundle().groupId("org.eclipse.jetty").artifactId("apache-jsp").versionAsInProject());
res.add(mavenBundle().groupId("org.glassfish.web").artifactId("javax.servlet.jsp.jstl").versionAsInProject());
res.add(mavenBundle().groupId("org.eclipse.jetty.orbit").artifactId("org.eclipse.jdt.core").versionAsInProject());
res.add(mavenBundle().groupId("org.eclipse.jdt.core.compiler").artifactId("ecj").versionAsInProject());
res.add(mavenBundle().groupId("org.eclipse.jetty.osgi").artifactId("jetty-osgi-boot-jsp").versionAsInProject().noStart());
return res;
}
Expand Down
12 changes: 3 additions & 9 deletions pom.xml
Expand Up @@ -594,15 +594,9 @@
</dependency>

<dependency>
<groupId>org.eclipse.jetty.orbit</groupId>
<artifactId>org.eclipse.jdt.core</artifactId>
<version>3.8.2.v20130121</version>
<exclusions>
<exclusion>
<groupId>org.eclipse.jetty.orbit</groupId>
<artifactId>javax.servlet</artifactId>
</exclusion>
</exclusions>
<groupId>org.eclipse.jdt.core.compiler</groupId>
<artifactId>ecj</artifactId>
<version>4.4.2</version>
</dependency>

<!-- JSTL Impl -->
Expand Down
6 changes: 4 additions & 2 deletions tests/test-webapps/test-jetty-webapp/pom.xml
Expand Up @@ -243,8 +243,10 @@
</goals>
<!-- example configuration
<configuration>
<includes>**/*.foo</includes>
<excludes>**/*.fff</excludes>
<includes>**/*.foo</includes>
<excludes>**/*.fff</excludes>
<sourceVersion>1.8</sourceVersion>
<targetVersion>1.8</targetVersion>
</configuration>
-->
</execution>
Expand Down

0 comments on commit 781a380

Please sign in to comment.