Maven Compile failed for lambda or method references

Hi, all:

The Maven plugin in pom.xml can fail your compile with messages like this:

lambda expressions are not supported in -source 1.5 and/or method references are not supported in -source 1.5.

This happens even if your environment is purely JDK 8 (Eclipse, Maven etc).

It turns out the default plugin source is 1.5! So it would fail the compile right off the bat.

An easy fix is to add the source and target to be JDK 8 like this:


<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.3</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>


It works greatly with this source/target explicitly set.

-Tony

Weblogic 12C Maven Plugin Install and Setup

Hi, there:

A good day to try out Weblogic 12c with JDK8. Just can’t wait to try those stream with lambdas!   — Wait, where do I get the maven plugin for WLS 12c???

Oracle doesn’t host the maven plugins in central place. But both the pom and jar files are in a folder comes with the server. Run this mvn to install the plugin, assuming the server is in c:\bea12c.

cd c:\bea12c\oracle_common\plugins\maven\com\oracle\maven\oracle-maven-sync\12.1.3>

mvn install:install-file -DpomFile=oracle-maven-sync-12.1.3.pom -Dfile=oracle-maven-sync-12.1.3.jar

The pom.xml has the something like the following …

<plugin>
<groupId>com.oracle.weblogic</groupId>
<artifactId>weblogic-maven-plugin</artifactId>
<version>12.1.3-0-0</version>
<configuration>
<adminurl>t3://localhost:7001</adminurl>
<user>weblogic</user>
<password>weblogic</password>
<targets>myserver</targets>
<upload>true</upload>
<action>deploy</action>
<remote>false</remote>
<verbose>true</verbose>
<source>${basedir}/target/myapp.war</source>
<name>myapp.war</name>
</configuration>

Cheers!

-Tony

Why my set-http-request-header doesn’t work???

Hi, there:

 

I spent a couple of days with datapower again on this seemingly simple task. I had to add a new custom header to HTTP request in a MPGW to register a value for later use. But the standard 

 

<dp:set-http-request-header name=”header-name”value=”’header-value’” />

 

Simply did not work at all. Interestingly, another <dp:remove-http-request-header name=’BLAH’/> 


worked fine. :((

It finally turned out that I had missed:

 

extension-element-prefixes=“dp regexp” 


attribute in the stylesheet root tag. That made the difference! I am not totally sure about the whole process as why the DP namespace wasn’t enough for the setter. But I put in this now and will report reasons when I have them.

 

Cheers!


Tony