With GWT 2.4 obfuscation is performed for RequestFactory interfaces.
Is there any way to disable this? Specifically I am looking to get at the names of actual RF method names in the client.
This is not possible.
If you run the "ValidationTool" as an annotation processor, you can get the generated source of the deobfuscator written to a file, where you'll find the mappings between obfuscated names and actual domain classes and methods/properties.
You can disable obfuscation in all module if add "-style PRETTY|DETAILED" in GWT compiler options
<java classname="com.google.gwt.dev.GWTCompiler" classpathref="gwt.classpath" fork="true" failonerror="true">
<jvmarg="-Xmx256M"/>
<arg value="-style" />
<arg value="PRETTY" />
<arg value="-out" />
<arg value="../html" />
<arg value="YourModule"/>
</java>
Related
I am trying to build an Oracle Service Bus proxy deployment archives for OSB PS5 (so I can't use configjar).
Proxies have been built with Oracle Enterprise Pack for Eclipse.
In order to get small archives for each proxy, I want to build different archives with selected resources (Business services, Transformations, etc.) according to each proxy.
Using OEPE, this is done by exporting OSB archive at resource level. I select only needed proxy, tick 'Include dependencies', and that's all. Resulting sbconfig.jar has <imp:property name="projectLevelExport" value="false"/> in 'ExportInfo' and resources only for the proxy selected.
All the examples for exporting with Ant use Eclipse 'com.bea.alsb.core.ConfigExport' application in such way:
<java dir="${osb.home}/lib" classpathref="library.osb"
jar="${eclipse.home}/plugins/org.eclipse.equinox.launcher_1.2.0.v20110502.jar"
fork="true" failonerror="true" maxmemory="768m">
<jvmarg line="-XX:MaxPermSize=256m"/>
<arg line="-data ${workspace.dir}"/>
<arg line="-application com.bea.alsb.core.ConfigExport"/>
<arg line="-configProject ${config.project}"/>
<arg line="-configJar ${config.jar}"/>
<arg line="-exportLevel false"/>
<arg line="-configSubProjects ${config.subprojects}"/>
<arg line="-includeDependencies ${config.includeDependencies}"/>
<sysproperty key="weblogic.home" value="${weblogic.home}"/>
<sysproperty key="osb.home" value="${osb.home}"/>
<sysproperty key="harvester.home" value="${osb.home}/harvester"/>
<sysproperty key="sun.lang.ClassLoader.allowArraySyntax" value="true"/>
<sysproperty key="osgi.bundlefile.limit" value="750"/>
<sysproperty key="middleware.home" value="${fmw.home}"/>
</java>
So it exports resources in Eclipse workspace at project level, including all the proxies and so on.
So is there any way to export proxy with selected resources?
Well, the problem is solved in unusual way. I used configjar.jar from OSB PS6 (simply copied into custom folder) with the other libraries from OSB PS5. Also I used
<java fork="true" classname="com.bea.alsb.tools.configjar.ConfigJar" ...>
instead of configJar task.
We have a project that we compile through Ant, we had some issues people wrote code that's only compilable by eclipse compiler, not through the regular javac, so we changed the compiler by passing in the ecj* jar file when calling ant on the commend-line.
We currently decide to use Project Lombok, it looks good, and it works great on local eclipse IDE's, when it comes to compile on server through a build script, it doesn't encounter in any exception, but at run-time he could not find the getter method etc.
The lomboc.jar file is in our lib folder we specify in build.xml.
Does any body have experience with this scenario?
Thanks
UPDATE
I found a link http://projectlombok.org/setup/ecj.html that explains how to use it with ecj, but i don't understand how i could use it, because we call ant and pass in the ecj jar file in the lib argument.
Finally i figured it out.
I have to use <exec executable="java"> to compile, instead of the javac tag.
Hare is my example:
<exec executable="${env.JAVA_HOME}/bin/java">
<arg value="-javaagent:${lombok_jar}=ECJ"/>
<arg value="-cp"/>
<arg pathref="compile.classpath"/>
<arg value="-jar"/>
<arg value="${ecj_jar}"/>
<arg value="-cp"/>
<arg pathref="compile.classpath"/>
<arg value="-d"/>
<arg value="${classes}"/>
<arg value="${src}"/>
</exec>
In our continuous integration setup, I would like to set up CruisControl.NET to automatically run all our unittests. However, I don't want to have to specify every unittest dll seperately in the configuration.
All the unittest projects are all postfixed with .Test (and all non-unittest projects are not). How can I configure CruiseControl.NET to run all the unittests from these projects (I am using v1.5.7256.1 of CruiseControl.NET)?
My current config attempt:
<nunit>
<path>$(nunit.path)</path>
<assemblies>
<assembly>$(working.dir)\**\*.Test.dll</assembly>
</assemblies>
</nunit>
I'm finding it very difficult to find documentation on this specific nunit element. Most pages I can find talk about using exec, nunit2 or another nunit element or the nunit-console commandline options.
I don't have much experience with managing the build environment and am working on an existing configuration where every assembly was specified separately in the following manner.
<nunit>
<path>$(nunit.path)</path>
<assemblies>
<assembly>$(artifact.dir)\test1.dll</assembly>
<assembly>$(artifact.dir)\test2.dll</assembly>
</assemblies>
</nunit>
Hence my failed attempt using wild cards.
EDIT:
Here is some extra xml of my configuration file to show the context a little bit:
<cruisecontrol xmlns:cb="urn:ccnet.config.builder">
<project name="MyProject">
<!-- whole bunch of other elements -->
<tasks>
<nunit>
<!-- see above -->
</nunit>
</tasks>
</project>
</cruiscontrol>
After Mightmuke's suggestion, I tried replacing the <nunit> element with his suggestion, but got the following exception: Unable to instantiate CruiseControl projects from configuration document. Configuration document is likely missing Xml nodes required for properly populating CruiseControl configuration. Unable to load array item 'property' - Cannot convert from type System.String to ThoughtWorks.CruiseControl.Core.ITask for object with value: ""
Then I tried to move the <property> and <foreach> element outside the element. Then I get the exception: Unused node detected: <property name="nunit.filelist" value="" />
I'm now trying to find out more about the <foreach> element and where I can put that, but somehow I find it hard to find any documentation about it.
EDIT2:
I found the documentation of the nunit task I'm using: http://ccnet.sourceforge.net/CCNET/NUnit%20Task.html
I specifies the element to be of type String[]. I'm not sure what that means... but it seems from the example that it just means that it must contain a list of child elements of the same name in Singular form.
PS: I realize this question is getting a bit out of hand... When the whole thing is solved, I'll try to edit it in such a format so that it might be useful to someone else later.
This is an example configuration if you were to use the nunit console.
<property name="nunit.filelist" value="" />
<foreach item="File" property="testfile" verbose="true">
<in>
<items basedir=".">
<include name="${working.dir}\**\*.Test.dll" />
</items>
</in>
<do>
<property name="nunit.filelist" value="${nunitfile.list + ' ' + testfile}" />
</do>
</foreach>
<exec program="nunit-console-x86.exe" failonerror="true" verbose="true">
<arg value="${nunit.filelist}" />
<arg value="/xml=nunit-results.xml" />
<arg value="/nologo" />
<arg value="/nodots" />
</exec>
This hasn't been tested, and there are likely better ways to skin it, but it will hopefully provide a starting point for you.
Theres about 20 diff ant files, that make up the build. Im not sure how to configure run-jetty-runs eclipse plugin to use this information. Can anyone point me towards a tutorial or some documentation:
<target name="run-jetty" depends="build" description="Runs application in included Jetty container">
<property file="credentials.properties" />
<property name="jetty.port" value="8080" />
<java jar="${jetty.dir}/start.jar" fork="true" dir="${basedir}" maxmemory="512M">
<arg value="${jetty.conf.dir}/jetty.xml" />
<arg value="${jetty.conf.dir}/jetty-jndi.xml" />
<sysproperty key="jetty.port" value="${jetty.port}" />
<jvmarg value="-XX:MaxPermSize=128m" />
<jvmarg value="-Dfile.encoding=UTF-8" />
<jvmarg value="-Djetty.home=${jetty.dir}" />
<jvmarg value="-Djetty.datasource.lanter.username=${jetty.datasource.lanter.username}" />
<jvmarg value="-Djetty.datasource.lanter.password=${jetty.datasource.lanter.password}" />
<jvmarg value="-Djetty.datasource.vs.username=${jetty.datasource.us.username}" />
<jvmarg value="-Djetty.datasource.vs.password=${jetty.datasource.us.password}" />
<jvmarg value="-DSTOP.PORT=${jetty.stop.port}" />
<jvmarg value="-DSTOP.KEY=${jetty.stop.key}" />
</java>
</target>
You have two options:
Start the app using the run-jetty-run plugin; this will give you an entry in the debug menu which means that Jetty (and the app) will be launched in the debugger if you select it.
Use the information in the code block above to create your own run configuration. The classpath should already be correct; you just need to select the correct main class (open META-INF/MANIFEST.MF in start.jar to find that out). Replace all the properties with their values and put each into a new line into the argument text fields of the run configuration.
On the tab "Common", you can set a file name and save the launch config as a file in your project, so everyone working on it will get it.
I use:
<java failonerror="true" classname="com.google.web.bindery.requestfactory.apt.ValidationTool">
<arg path="${path.to.ouput.jar}" />
<arg value="com.my.RequestFactory" />
<classpath>
<path refid="my_classpath" />
</classpath>
</java>
my_classpath has all requestfactory-client.jar, requestfactory-server.jar, requestfactory-apt.jar + my source & the jar produced from it in the path (that's confirmed with just printing it), but I still get:
[java] error: Unable to find RequestFactory built-in type. Is requestfactory-[client|server].jar on the classpath?
What could be wrong here?
For me, this works only, if I specify <javac fork="true" ...
From the official ant documentation on the java task:
If odd things go wrong when you run this task, set fork="true" to use a new JVM.
Without any deep investigation, I would say it's most likely a classloader problem.