Monthly Archives: August 2011

How to precompile JSPs with the WebLogic wlappc Ant task

The following Ant snippet allows you to precompile your JSPs (and more) for WebLogic Server.

<!-- Define some properties -->
<property name="weblogic.server.dir" value="C:/Oracle/Middleware"/>
<property name="weblogic.server.lib.dir" value="${weblogic.server.dir}/wlserver_10.3/server/lib"/>
<property name="pathTo.weblogic.jar" value="${weblogic.server.lib.dir}/weblogic.jar"/>
<property name="war.src.dir" value="${basedir}/build/war"/>
<property name="war.dist.dir" value="${basedir}/dist"/>

<!-- Add the WebLogic appc task definition to the current project -->
<taskdef name="wlappc" classname="weblogic.ant.taskdefs.j2ee.Appc" classpath="${pathTo.weblogic.jar}"/>

<!-- Set up the classpath for the WebLogic appc task -->
<path id="wlappc.classpath">
    ...
</path>

<!-- Compile the source of your WAR file with weblogic.appc -->
<target name="wlCompileWarSrc">
    <wlappc source="${war.src.dir}" classpathref="wlappc.classpath" keepgenerated="true"
            debug="true" linenumbers="true" verbose="true" verbosejavac="true"/>
</target>

<!-- Make the project WAR -->
<target name="war" depends="wlCompileWarSrc">
    ...
</target>

Read more »

How to show which commits Git-SVN will push or merge

My previous post explains how to show which commits Git will push or merge. This is a follow-up explaining how to achieve the same with Git-SVN.

These are the aliases you need in your Git configuration file (e.g. C:cygwinhome<user>.gitconfig or <project>/.git/config). The explanation is below.

[alias]
    # -M                 Detect and report renames for each commit.
    # --name-status      Show only names and status of changed files.
    # --abbrev-commit    Instead of showing the full 40-byte hexadecimal commit object name, show only a partial prefix.
    l = log -M --name-status --abbrev-commit

    # --oneline          This is a shorthand for &amp;quot;--pretty=oneline --abbrev-commit&amp;quot; used together.
    l1 = log --oneline

    # log commits-to-push
    lctp  = &amp;quot;!REMOTE_BRANCH=$(git svn info --url | gawk -F'/' '{print $NF}'); 
            COMMAND=&amp;quot;git l remotes/$REMOTE_BRANCH..HEAD&amp;quot;; 
            echo $COMMAND; 
            $COMMAND&amp;quot;
    lctp1 = &amp;quot;!REMOTE_BRANCH=$(git svn info --url | gawk -F'/' '{print $NF}'); 
            COMMAND=&amp;quot;git l1 remotes/$REMOTE_BRANCH..HEAD&amp;quot;; 
            echo $COMMAND; 
            $COMMAND&amp;quot;

    # log commits-to-merge
    # do not forget to execute &amp;quot;git svn fetch&amp;quot; first
    lctm  = &amp;quot;!REMOTE_BRANCH=$(git svn info --url | gawk -F'/' '{print $NF}'); 
            COMMAND=&amp;quot;git l HEAD..remotes/$REMOTE_BRANCH&amp;quot;; 
            echo $COMMAND; 
            $COMMAND&amp;quot;
    lctm1 = &amp;quot;!REMOTE_BRANCH=$(git svn info --url | gawk -F'/' '{print $NF}'); 
            COMMAND=&amp;quot;git l1 HEAD..remotes/$REMOTE_BRANCH&amp;quot;; 
            echo $COMMAND; 
            $COMMAND&amp;quot;

Read more »