# HG changeset patch
# User František Kučera <franta-hg@frantovo.cz>
# Date 1310761539 -7200
# Node ID b0f7d9ab4a072c975392e7b6fd14c8ff6ab1b8e1
# Parent  60658773f604769d7193f45f05d831d3044b1089
Glassfish 3.1.1

diff -r 60658773f604 -r b0f7d9ab4a07 java/nekurak.net-ear/nbproject/ant-deploy.xml
--- a/java/nekurak.net-ear/nbproject/ant-deploy.xml	Sun Jul 10 20:17:56 2011 +0200
+++ b/java/nekurak.net-ear/nbproject/ant-deploy.xml	Fri Jul 15 22:25:39 2011 +0200
@@ -3,6 +3,7 @@
     <target name="-init-cl-deployment-env" if="deploy.ant.enabled">
         <property file="${deploy.ant.properties.file}" />
         <available file="${deploy.ant.docbase.dir}/WEB-INF/sun-web.xml" property="sun.web.present"/>
+        <available file="${deploy.ant.docbase.dir}/WEB-INF/glassfish-web.xml" property="glassfish.web.present"/>
         <available file="${deploy.ant.resource.dir}" property="has.setup"/>
         <tempfile prefix="gfv3" property="gfv3.password.file" destdir="${java.io.tmpdir}"/>  <!-- do not forget to delete this! -->
         <echo message="AS_ADMIN_PASSWORD=${gfv3.password}" file="${gfv3.password.file}"/>
@@ -23,8 +24,34 @@
         <xmlproperty file="${temp.sun.web}" validate="false">
         </xmlproperty>    
         <delete file="${temp.sun.web}"/>
-        <property name="deploy.ant.client.url" value="${gfv3.url}${sun-web-app.context-root}"/>
-        <property name="deploy.context.root.argument" value="&amp;contextroot=${sun-web-app.context-root}"/>
+        <condition property="deploy.ant.client.url" value="${gfv3.url}${sun-web-app.context-root}" else="${gfv3.url}/${ant.project.name}">
+            <isset property="sun-web-app.context-root"/>
+        </condition>
+        <condition property="deploy.context.root.argument" value="&amp;contextroot=${sun-web-app.context-root}" else="/${ant.project.name}">
+            <isset property="sun-web-app.context-root"/>
+        </condition>
+    </target>
+    <target name="-parse-glassfish-web" depends="-init-cl-deployment-env" if="glassfish.web.present">
+        <tempfile prefix="gfv3" property="temp.gf.web" destdir="${java.io.tmpdir}"/>
+        <copy file="${deploy.ant.docbase.dir}/WEB-INF/glassfish-web.xml" tofile="${temp.gf.web}"/>
+        <!-- The doctype triggers resolution which can fail -->
+        <replace file="${temp.gf.web}">
+            <replacetoken><![CDATA[<!DOCTYPE]]></replacetoken>
+            <replacevalue><![CDATA[<!-- <!DOCTYPE]]></replacevalue>
+        </replace>
+        <replace file="${temp.gf.web}">
+            <replacetoken><![CDATA[<glassfish-web-app]]></replacetoken>
+            <replacevalue><![CDATA[--> <glassfish-web-app]]></replacevalue>
+        </replace>
+        <xmlproperty file="${temp.gf.web}" validate="false">
+        </xmlproperty>
+        <delete file="${temp.gf.web}"/>
+        <condition property="deploy.ant.client.url" value="${gfv3.url}${glassfish-web-app.context-root}" else="${gfv3.url}/${ant.project.name}">
+            <isset property="glassfish-web-app.context-root"/>
+        </condition>
+        <condition property="deploy.context.root.argument" value="&amp;contextroot=${glassfish-web-app.context-root}" else="/${ant.project.name}">
+            <isset property="glassfish-web-app.context-root"/>
+        </condition>
     </target>
     <target name="-no-parse-sun-web" depends="-init-cl-deployment-env" unless="sun.web.present">
         <property name="deploy.context.root.argument" value=""/>
@@ -33,7 +60,6 @@
         <tempfile prefix="gfv3" property="gfv3.resources.dir" destdir="${java.io.tmpdir}"/>
         <mkdir dir="${gfv3.resources.dir}"/>
         <mkdir dir="${gfv3.resources.dir}/META-INF"/>
-        <property name="gfv3.resources.file" value="${gfv3.resources.dir}/META-INF/sun-resources.xml"/>
         <copy todir="${gfv3.resources.dir}/META-INF">
             <fileset dir="${deploy.ant.resource.dir}"/>
         </copy>
@@ -42,7 +68,7 @@
         </jar>
         <delete dir="${gfv3.resources.dir}"/>
     </target>
-    <target name="-deploy-ant" depends="-parse-sun-web,-no-parse-sun-web,-add-resources" if="deploy.ant.enabled">
+    <target name="-deploy-ant" depends="-parse-glassfish-web, -parse-sun-web, -no-parse-sun-web,-add-resources" if="deploy.ant.enabled">
         <antcall target="-deploy-without-pw"/>
         <antcall target="-deploy-with-pw"/>
     </target>
diff -r 60658773f604 -r b0f7d9ab4a07 java/nekurak.net-ear/nbproject/build-impl.xml
--- a/java/nekurak.net-ear/nbproject/build-impl.xml	Sun Jul 10 20:17:56 2011 +0200
+++ b/java/nekurak.net-ear/nbproject/build-impl.xml	Fri Jul 15 22:25:39 2011 +0200
@@ -15,126 +15,129 @@
 
 -->
 <project xmlns:ear2="http://www.netbeans.org/ns/j2ee-earproject/2" basedir=".." default="default" name="nekurak.net-ear-impl">
-    <import file="ant-deploy.xml"/>
-    <fail message="Please build using Ant 1.7.1 or higher.">
-        <condition>
-            <not>
-                <antversion atleast="1.7.1"/>
-            </not>
-        </condition>
-    </fail>
-    <target depends="dist" description="Build whole project." name="default"/>
+	<import file="ant-deploy.xml"/>
+	<fail message="Please build using Ant 1.7.1 or higher.">
+		<condition>
+			<not>
+				<antversion atleast="1.7.1"/>
+			</not>
+		</condition>
+	</fail>
+	<target depends="dist" description="Build whole project." name="default"/>
     <!-- 
     INITIALIZATION SECTION 
     -->
-    <target name="pre-init">
+	<target name="pre-init">
         <!-- Empty placeholder for easier customization. -->
         <!-- You can override this target in the ../build.xml file. -->
-    </target>
-    <target depends="pre-init" name="init-private">
-        <property file="nbproject/private/private.properties"/>
-    </target>
-    <target depends="pre-init,init-private" name="init-userdir">
-        <property location="${netbeans.user}/build.properties" name="user.properties.file"/>
-    </target>
-    <target depends="pre-init,init-private,init-userdir" name="init-user">
-        <property file="${user.properties.file}"/>
-    </target>
-    <target depends="pre-init,init-private,init-userdir,init-user" name="init-project">
-        <property file="nbproject/project.properties"/>
-    </target>
-    <target depends="pre-init,init-private,init-userdir,init-user,init-project" name="do-init">
+	</target>
+	<target depends="pre-init" name="init-private">
+		<property file="nbproject/private/private.properties"/>
+	</target>
+	<target depends="pre-init,init-private" name="init-userdir">
+		<property location="${netbeans.user}/build.properties" name="user.properties.file"/>
+	</target>
+	<target depends="pre-init,init-private,init-userdir" name="init-user">
+		<property file="${user.properties.file}"/>
+	</target>
+	<target depends="pre-init,init-private,init-userdir,init-user" name="init-project">
+		<property file="nbproject/project.properties"/>
+	</target>
+	<target depends="pre-init,init-private,init-userdir,init-user,init-project" name="do-init">
         <!-- The two properties below are usually overridden -->
         <!-- by the active platform. Just a fallback. -->
-        <property name="default.javac.source" value="1.4"/>
-        <property name="default.javac.target" value="1.4"/>
-        <condition property="do.compile.jsps">
-            <istrue value="${compile.jsps}"/>
-        </condition>
-        <condition property="do.display.browser">
-            <and>
-                <istrue value="${display.browser}"/>
-                <isset property="client.module.uri"/>
-                <not>
-                    <isset property="app.client"/>
-                </not>
-            </and>
-        </condition>
-        <available file="${meta.inf}/MANIFEST.MF" property="has.custom.manifest"/>
+		<property name="default.javac.source" value="1.4"/>
+		<property name="default.javac.target" value="1.4"/>
+		<condition property="do.compile.jsps">
+			<istrue value="${compile.jsps}"/>
+		</condition>
+		<condition property="do.display.browser">
+			<and>
+				<istrue value="${display.browser}"/>
+				<isset property="client.module.uri"/>
+				<not>
+					<isset property="app.client"/>
+				</not>
+			</and>
+		</condition>
+		<available file="${meta.inf}/MANIFEST.MF" property="has.custom.manifest"/>
         <!--
                     Variables needed to support directory deployment.
                 -->
-        <condition property="do.package.with.custom.manifest.not.directory.deploy">
-            <and>
-                <isset property="has.custom.manifest"/>
-                <isfalse value="${directory.deployment.supported}"/>
-            </and>
-        </condition>
-        <condition property="do.package.without.custom.manifest.not.directory.deploy">
-            <and>
-                <not>
-                    <isset property="has.custom.manifest"/>
-                </not>
-                <isfalse value="${directory.deployment.supported}"/>
-            </and>
-        </condition>
-        <condition property="do.package.not.directory.deploy">
-            <isfalse value="${directory.deployment.supported}"/>
-        </condition>
+		<condition property="do.package.with.custom.manifest.not.directory.deploy">
+			<and>
+				<isset property="has.custom.manifest"/>
+				<isfalse value="${directory.deployment.supported}"/>
+			</and>
+		</condition>
+		<condition property="do.package.without.custom.manifest.not.directory.deploy">
+			<and>
+				<not>
+					<isset property="has.custom.manifest"/>
+				</not>
+				<isfalse value="${directory.deployment.supported}"/>
+			</and>
+		</condition>
+		<condition property="do.package.not.directory.deploy">
+			<isfalse value="${directory.deployment.supported}"/>
+		</condition>
         <!--End Variables needed to support directory deployment.-->
-        <condition else="" property="j2ee.appclient.mainclass.tool.param" value="-mainclass ${main.class}">
-            <and>
-                <isset property="main.class"/>
-                <not>
-                    <equals arg1="${main.class}" arg2="" trim="true"/>
-                </not>
-            </and>
-        </condition>
-        <condition else="" property="j2ee.appclient.jvmoptions.param" value="${j2ee.appclient.jvmoptions}">
-            <and>
-                <isset property="j2ee.appclient.jvmoptions"/>
-                <not>
-                    <equals arg1="${j2ee.appclient.jvmoptions}" arg2="" trim="true"/>
-                </not>
-            </and>
-        </condition>
-        <condition else="" property="application.args.param" value="${application.args}">
-            <and>
-                <isset property="application.args"/>
-                <not>
-                    <equals arg1="${application.args}" arg2="" trim="true"/>
-                </not>
-            </and>
-        </condition>
-        <condition property="can.debug.appclient">
-            <and>
-                <isset property="netbeans.home"/>
-                <isset property="app.client"/>
-            </and>
-        </condition>
-        <path id="endorsed.classpath.path" path="${endorsed.classpath}"/>
-        <condition else="" property="endorsed.classpath.cmd.line.arg" value="-Xbootclasspath/p:'${toString:endorsed.classpath.path}'">
-            <length length="0" string="${endorsed.classpath}" when="greater"/>
-        </condition>
-    </target>
-    <target depends="init" name="-init-cos">
-        <condition else="false" property="build.deploy.on.save">
-            <istrue value="${j2ee.deploy.on.save}"/>
-        </condition>
-    </target>
-    <target name="post-init">
+		<condition else="" property="j2ee.appclient.mainclass.tool.param" value="-mainclass ${main.class}">
+			<and>
+				<isset property="main.class"/>
+				<not>
+					<equals arg1="${main.class}" arg2="" trim="true"/>
+				</not>
+			</and>
+		</condition>
+		<condition else="" property="j2ee.appclient.jvmoptions.param" value="${j2ee.appclient.jvmoptions}">
+			<and>
+				<isset property="j2ee.appclient.jvmoptions"/>
+				<not>
+					<equals arg1="${j2ee.appclient.jvmoptions}" arg2="" trim="true"/>
+				</not>
+			</and>
+		</condition>
+		<condition else="" property="application.args.param" value="${application.args}">
+			<and>
+				<isset property="application.args"/>
+				<not>
+					<equals arg1="${application.args}" arg2="" trim="true"/>
+				</not>
+			</and>
+		</condition>
+		<condition property="can.debug.appclient">
+			<and>
+				<isset property="netbeans.home"/>
+				<isset property="app.client"/>
+			</and>
+		</condition>
+		<path id="endorsed.classpath.path" path="${endorsed.classpath}"/>
+		<condition else="" property="endorsed.classpath.cmd.line.arg" value="-Xbootclasspath/p:'${toString:endorsed.classpath.path}'">
+			<and>
+				<isset property="endorsed.classpath"/>
+				<length length="0" string="${endorsed.classpath}" when="greater"/>
+			</and>
+		</condition>
+	</target>
+	<target depends="init" name="-init-cos">
+		<condition else="false" property="build.deploy.on.save">
+			<istrue value="${j2ee.deploy.on.save}"/>
+		</condition>
+	</target>
+	<target name="post-init">
         <!-- Empty placeholder for easier customization. -->
         <!-- You can override this target in the ../build.xml file. -->
-    </target>
-    <target depends="pre-init,init-private,init-userdir,init-user,init-project,do-init" name="init-check">
-        <fail unless="build.dir">Must set build.dir</fail>
-        <fail unless="build.generated.dir">Must set build.generated.dir</fail>
-        <fail unless="dist.dir">Must set dist.dir</fail>
-        <fail unless="build.classes.excludes">Must set build.classes.excludes</fail>
-        <fail unless="dist.jar">Must set dist.jar</fail>
-    </target>
-    <target name="-init-taskdefs">
-        <fail unless="libs.CopyLibs.classpath">
+	</target>
+	<target depends="pre-init,init-private,init-userdir,init-user,init-project,do-init" name="init-check">
+		<fail unless="build.dir">Must set build.dir</fail>
+		<fail unless="build.generated.dir">Must set build.generated.dir</fail>
+		<fail unless="dist.dir">Must set dist.dir</fail>
+		<fail unless="build.classes.excludes">Must set build.classes.excludes</fail>
+		<fail unless="dist.jar">Must set dist.jar</fail>
+	</target>
+	<target name="-init-taskdefs">
+		<fail unless="libs.CopyLibs.classpath">
 The libs.CopyLibs.classpath property is not set up.
 This property must point to 
 org-netbeans-modules-java-j2seproject-copylibstask.jar file which is part
@@ -143,444 +146,483 @@
 Either open the project in the IDE and make sure CopyLibs library
 exists or setup the property manually. For example like this:
  ant -Dlibs.CopyLibs.classpath=a/path/to/org-netbeans-modules-java-j2seproject-copylibstask.jar
-                </fail>
-        <taskdef classpath="${libs.CopyLibs.classpath}" resource="org/netbeans/modules/java/j2seproject/copylibstask/antlib.xml"/>
-    </target>
-    <target depends="pre-init,init-private,init-userdir,init-user,init-project,do-init,post-init,init-check,-init-taskdefs" name="init"/>
+		</fail>
+		<taskdef classpath="${libs.CopyLibs.classpath}" resource="org/netbeans/modules/java/j2seproject/copylibstask/antlib.xml"/>
+	</target>
+	<target depends="-profile-pre-init, init, -profile-post-init, -profile-init-check" name="profile-init"/>
+	<target name="-profile-pre-init">
+        <!-- Empty placeholder for easier customization. -->
+        <!-- You can override this target in the ../build.xml file. -->
+	</target>
+	<target name="-profile-post-init">
+        <!-- Empty placeholder for easier customization. -->
+        <!-- You can override this target in the ../build.xml file. -->
+	</target>
+	<target depends="-profile-pre-init, init, -profile-post-init" name="-profile-init-check">
+		<fail unless="profiler.info.jvm">Must set JVM to use for profiling in profiler.info.jvm</fail>
+		<fail unless="profiler.info.jvmargs.agent">Must set profiler agent JVM arguments in profiler.info.jvmargs.agent</fail>
+	</target>
+	<target depends="pre-init,init-private,init-userdir,init-user,init-project,do-init,post-init,init-check,-init-taskdefs" name="init"/>
     <!--
     COMPILATION SECTION
     -->
-    <target depends="init" name="deps-jar" unless="no.deps"/>
-    <target depends="init" name="deps-j2ee-archive" unless="no.deps">
-        <condition property="build.deploy.on.save" value="false">
-            <not>
-                <isset property="build.deploy.on.save"/>
-            </not>
-        </condition>
-        <ant antfile="${project.nekurak_net-ejb}/build.xml" inheritall="false" target="dist-ear">
-            <property location="${build.dir}" name="dist.ear.dir"/>
-            <property name="deploy.on.save" value="${build.deploy.on.save}"/>
-        </ant>
-        <condition property="build.deploy.on.save" value="false">
-            <not>
-                <isset property="build.deploy.on.save"/>
-            </not>
-        </condition>
-        <ant antfile="${project.nekurak_net-rest}/build.xml" inheritall="false" target="dist-ear">
-            <property location="${build.dir}" name="dist.ear.dir"/>
-            <property name="deploy.on.save" value="${build.deploy.on.save}"/>
-        </ant>
-        <condition property="build.deploy.on.save" value="false">
-            <not>
-                <isset property="build.deploy.on.save"/>
-            </not>
-        </condition>
-        <ant antfile="${project.nekurak_net-web}/build.xml" inheritall="false" target="dist-ear">
-            <property location="${build.dir}" name="dist.ear.dir"/>
-            <property name="deploy.on.save" value="${build.deploy.on.save}"/>
-        </ant>
-        <condition property="build.deploy.on.save" value="false">
-            <not>
-                <isset property="build.deploy.on.save"/>
-            </not>
-        </condition>
-        <ant antfile="${project.nekurak_net-ws}/build.xml" inheritall="false" target="dist-ear">
-            <property location="${build.dir}" name="dist.ear.dir"/>
-            <property name="deploy.on.save" value="${build.deploy.on.save}"/>
-        </ant>
-    </target>
-    <target depends="init,deps-jar,deps-j2ee-archive" name="pre-pre-compile"/>
-    <target name="pre-compile">
+	<target depends="init" name="deps-jar" unless="no.deps"/>
+	<target depends="init" name="deps-j2ee-archive" unless="no.deps">
+		<condition property="build.deploy.on.save" value="false">
+			<not>
+				<isset property="build.deploy.on.save"/>
+			</not>
+		</condition>
+		<ant antfile="${project.nekurak_net-ejb}/build.xml" inheritall="false" target="dist-ear">
+			<property location="${build.dir}" name="dist.ear.dir"/>
+			<property name="deploy.on.save" value="${build.deploy.on.save}"/>
+		</ant>
+		<condition property="build.deploy.on.save" value="false">
+			<not>
+				<isset property="build.deploy.on.save"/>
+			</not>
+		</condition>
+		<ant antfile="${project.nekurak_net-rest}/build.xml" inheritall="false" target="dist-ear">
+			<property location="${build.dir}" name="dist.ear.dir"/>
+			<property name="deploy.on.save" value="${build.deploy.on.save}"/>
+		</ant>
+		<condition property="build.deploy.on.save" value="false">
+			<not>
+				<isset property="build.deploy.on.save"/>
+			</not>
+		</condition>
+		<ant antfile="${project.nekurak_net-web}/build.xml" inheritall="false" target="dist-ear">
+			<property location="${build.dir}" name="dist.ear.dir"/>
+			<property name="deploy.on.save" value="${build.deploy.on.save}"/>
+		</ant>
+		<condition property="build.deploy.on.save" value="false">
+			<not>
+				<isset property="build.deploy.on.save"/>
+			</not>
+		</condition>
+		<ant antfile="${project.nekurak_net-ws}/build.xml" inheritall="false" target="dist-ear">
+			<property location="${build.dir}" name="dist.ear.dir"/>
+			<property name="deploy.on.save" value="${build.deploy.on.save}"/>
+		</ant>
+	</target>
+	<target depends="init,deps-jar,deps-j2ee-archive" name="pre-pre-compile"/>
+	<target name="pre-compile">
         <!-- Empty placeholder for easier customization. -->
         <!-- You can override this target in the ../build.xml file. -->
-    </target>
-    <target depends="init,deps-jar,pre-pre-compile,pre-compile,-do-compile-deps" name="do-compile">
-        <copy todir="${build.dir}/META-INF">
-            <fileset dir="${meta.inf}"/>
-        </copy>
-    </target>
-    <target depends="init,deps-jar,pre-pre-compile,pre-compile" name="-do-compile-deps">
-        <copyfiles files="${reference.nekurak_net-web.dist-ear}" todir="${build.dir}//"/>
-        <copyfiles files="${reference.nekurak_net-ejb.dist-ear}" todir="${build.dir}//"/>
-        <copyfiles files="${reference.nekurak_net-rest.dist-ear}" todir="${build.dir}//"/>
-        <copyfiles files="${reference.nekurak_net-ws.dist-ear}" todir="${build.dir}//"/>
-    </target>
-    <target name="post-compile">
+	</target>
+	<target depends="init,deps-jar,pre-pre-compile,pre-compile,-do-compile-deps" name="do-compile">
+		<copy todir="${build.dir}/META-INF">
+			<fileset dir="${meta.inf}"/>
+		</copy>
+	</target>
+	<target depends="init,deps-jar,pre-pre-compile,pre-compile" name="-do-compile-deps">
+		<copyfiles files="${reference.nekurak_net-web.dist-ear}" todir="${build.dir}//"/>
+		<copyfiles files="${reference.nekurak_net-ejb.dist-ear}" todir="${build.dir}//"/>
+		<copyfiles files="${reference.nekurak_net-rest.dist-ear}" todir="${build.dir}//"/>
+		<copyfiles files="${reference.nekurak_net-ws.dist-ear}" todir="${build.dir}//"/>
+	</target>
+	<target name="post-compile">
         <!-- Empty placeholder for easier customization. -->
         <!-- You can override this target in the ../build.xml file. -->
-    </target>
-    <target depends="init,deps-jar,pre-pre-compile,pre-compile,do-compile,post-compile" description="Compile project." name="compile"/>
+	</target>
+	<target depends="init,deps-jar,pre-pre-compile,pre-compile,do-compile,post-compile" description="Compile project." name="compile"/>
     <!--
                 DIST BUILDING SECTION
             -->
-    <target name="pre-dist">
+	<target name="pre-dist">
         <!-- Empty placeholder for easier customization. -->
         <!-- You can override this target in the ../build.xml file. -->
-    </target>
-    <target depends="init,compile,pre-dist" name="do-dist-without-manifest" unless="has.custom.manifest">
-        <dirname file="${dist.jar}" property="dist.jar.dir"/>
-        <mkdir dir="${dist.jar.dir}"/>
-        <jar compress="${jar.compress}" jarfile="${dist.jar}">
-            <fileset dir="${build.dir}"/>
-        </jar>
-    </target>
-    <target depends="init,compile,pre-dist" if="has.custom.manifest" name="do-dist-with-manifest">
-        <dirname file="${dist.jar}" property="dist.jar.dir"/>
-        <mkdir dir="${dist.jar.dir}"/>
-        <jar compress="${jar.compress}" jarfile="${dist.jar}" manifest="${meta.inf}/MANIFEST.MF">
-            <fileset dir="${build.dir}"/>
-        </jar>
-    </target>
+	</target>
+	<target depends="init,compile,pre-dist" name="do-dist-without-manifest" unless="has.custom.manifest">
+		<dirname file="${dist.jar}" property="dist.jar.dir"/>
+		<mkdir dir="${dist.jar.dir}"/>
+		<jar compress="${jar.compress}" jarfile="${dist.jar}">
+			<fileset dir="${build.dir}"/>
+		</jar>
+	</target>
+	<target depends="init,compile,pre-dist" if="has.custom.manifest" name="do-dist-with-manifest">
+		<dirname file="${dist.jar}" property="dist.jar.dir"/>
+		<mkdir dir="${dist.jar.dir}"/>
+		<jar compress="${jar.compress}" jarfile="${dist.jar}" manifest="${meta.inf}/MANIFEST.MF">
+			<fileset dir="${build.dir}"/>
+		</jar>
+	</target>
     <!--
                 TARGETS NEEDED TO SUPPORT DIRECTORY DEPLOYMENT
             -->
-    <target depends="init,compile,pre-dist" if="do.package.without.custom.manifest.not.directory.deploy" name="-do-tmp-dist-without-manifest">
-        <dirname file="${dist.jar}" property="dist.jar.dir"/>
-        <mkdir dir="${dist.jar.dir}"/>
-        <jar compress="${jar.compress}" jarfile="${dist.jar}">
-            <fileset dir="${build.dir}"/>
-        </jar>
-    </target>
-    <target depends="init,compile,pre-dist" if="do.package.with.custom.manifest.not.directory.deploy" name="-do-tmp-dist-with-manifest">
-        <dirname file="${dist.jar}" property="dist.jar.dir"/>
-        <mkdir dir="${dist.jar.dir}"/>
-        <jar compress="${jar.compress}" jarfile="${dist.jar}" manifest="${meta.inf}/MANIFEST.MF">
-            <fileset dir="${build.dir}"/>
-        </jar>
-    </target>
-    <target depends="init,compile,pre-dist,-do-tmp-dist-without-manifest,-do-tmp-dist-with-manifest" name="-do-dist-directory-deploy"/>
-    <target depends="init,compile,pre-dist,-do-dist-directory-deploy,post-dist" description="Build distribution (JAR) - if directory deployment is not supported." name="dist-directory-deploy"/>
+	<target depends="init,compile,pre-dist" if="do.package.without.custom.manifest.not.directory.deploy" name="-do-tmp-dist-without-manifest">
+		<dirname file="${dist.jar}" property="dist.jar.dir"/>
+		<mkdir dir="${dist.jar.dir}"/>
+		<jar compress="${jar.compress}" jarfile="${dist.jar}">
+			<fileset dir="${build.dir}"/>
+		</jar>
+	</target>
+	<target depends="init,compile,pre-dist" if="do.package.with.custom.manifest.not.directory.deploy" name="-do-tmp-dist-with-manifest">
+		<dirname file="${dist.jar}" property="dist.jar.dir"/>
+		<mkdir dir="${dist.jar.dir}"/>
+		<jar compress="${jar.compress}" jarfile="${dist.jar}" manifest="${meta.inf}/MANIFEST.MF">
+			<fileset dir="${build.dir}"/>
+		</jar>
+	</target>
+	<target depends="init,compile,pre-dist,-do-tmp-dist-without-manifest,-do-tmp-dist-with-manifest" name="-do-dist-directory-deploy"/>
+	<target depends="init,compile,pre-dist,-do-dist-directory-deploy,post-dist" description="Build distribution (JAR) - if directory deployment is not supported." name="dist-directory-deploy"/>
     <!--
                 END TARGETS NEEDED TO SUPPORT DIRECTORY DEPLOYMENT
             -->
-    <target name="post-dist">
+	<target name="post-dist">
         <!-- Empty placeholder for easier customization. -->
         <!-- You can override this target in the ../build.xml file. -->
-    </target>
-    <target depends="init,compile,pre-dist,do-dist-without-manifest,do-dist-with-manifest,post-dist" description="Build distribution (JAR)." name="dist"/>
+	</target>
+	<target depends="init,compile,pre-dist,do-dist-without-manifest,do-dist-with-manifest,post-dist" description="Build distribution (JAR)." name="dist"/>
     <!--
     EXECUTION SECTION
     -->
-    <target depends="run-deploy,run-display-browser,run-ac" description="Deploy to server." name="run"/>
-    <target name="pre-run-deploy">
+	<target depends="run-deploy,run-display-browser,run-ac" description="Deploy to server." name="run"/>
+	<target name="pre-run-deploy">
         <!-- Empty placeholder for easier customization. -->
         <!-- You can override this target in the ../build.xml file. -->
-    </target>
-    <target name="post-run-deploy">
+	</target>
+	<target name="post-run-deploy">
         <!-- Empty placeholder for easier customization. -->
         <!-- You can override this target in the ../build.xml file. -->
-    </target>
-    <target name="-pre-nbmodule-run-deploy">
+	</target>
+	<target name="-pre-nbmodule-run-deploy">
         <!-- Empty placeholder for easier customization. -->
         <!-- This target can be overriden by NetBeans modules. Don't override it directly, use -pre-run-deploy task instead. -->
-    </target>
-    <target name="-post-nbmodule-run-deploy">
+	</target>
+	<target name="-post-nbmodule-run-deploy">
         <!-- Empty placeholder for easier customization. -->
         <!-- This target can be overriden by NetBeans modules. Don't override it directly, use -post-run-deploy task instead. -->
-    </target>
-    <target name="-run-deploy-am" unless="no.deps">
+	</target>
+	<target name="-run-deploy-am" unless="no.deps">
         <!-- Task to deploy to the Access Manager runtime. -->
-        <ant antfile="${project.nekurak_net-ejb}/build.xml" inheritall="false" target="-run-deploy-am"/>
-        <ant antfile="${project.nekurak_net-rest}/build.xml" inheritall="false" target="-run-deploy-am"/>
-        <ant antfile="${project.nekurak_net-web}/build.xml" inheritall="false" target="-run-deploy-am"/>
-        <ant antfile="${project.nekurak_net-ws}/build.xml" inheritall="false" target="-run-deploy-am"/>
-    </target>
-    <target depends="-init-cos,dist-directory-deploy,pre-run-deploy,-pre-nbmodule-run-deploy,-run-deploy-nb,-init-deploy-ant,-deploy-ant,-run-deploy-am,-post-nbmodule-run-deploy,post-run-deploy" name="run-deploy"/>
-    <target if="netbeans.home" name="-run-deploy-nb">
-        <nbdeploy clientModuleUri="${client.module.uri}" clientUrlPart="${client.urlPart}" debugmode="false" forceRedeploy="${forceRedeploy}"/>
-    </target>
-    <target name="-init-deploy-ant" unless="netbeans.home">
-        <property name="deploy.ant.archive" value="${dist.jar}"/>
-        <property name="deploy.ant.resource.dir" value="${resource.dir}"/>
-        <property name="deploy.ant.enabled" value="true"/>
-    </target>
-    <target depends="dist,-run-undeploy-nb,-init-deploy-ant,-undeploy-ant" name="run-undeploy"/>
-    <target if="netbeans.home" name="-run-undeploy-nb">
-        <fail message="Undeploy is not supported from within the IDE"/>
-    </target>
-    <target depends="dist" name="verify">
-        <nbverify file="${dist.jar}"/>
-    </target>
-    <target depends="run-deploy,-init-display-browser,-display-browser-nb,-display-browser-cl" name="run-display-browser"/>
-    <target if="do.display.browser" name="-init-display-browser">
-        <condition property="do.display.browser.nb">
-            <isset property="netbeans.home"/>
-        </condition>
-        <condition property="do.display.browser.cl">
-            <and>
-                <isset property="deploy.ant.enabled"/>
-                <isset property="deploy.ant.client.url"/>
-            </and>
-        </condition>
-    </target>
-    <target if="do.display.browser.nb" name="-display-browser-nb">
-        <nbbrowse url="${client.url}"/>
-    </target>
-    <target if="do.display.browser.cl" name="-get-browser" unless="browser">
-        <condition property="browser" value="rundll32">
-            <os family="windows"/>
-        </condition>
-        <condition else="" property="browser.args" value="url.dll,FileProtocolHandler">
-            <os family="windows"/>
-        </condition>
-        <condition property="browser" value="/usr/bin/open">
-            <os family="mac"/>
-        </condition>
-        <property environment="env"/>
-        <condition property="browser" value="${env.BROWSER}">
-            <isset property="env.BROWSER"/>
-        </condition>
-        <condition property="browser" value="/usr/bin/firefox">
-            <available file="/usr/bin/firefox"/>
-        </condition>
-        <condition property="browser" value="/usr/local/firefox/firefox">
-            <available file="/usr/local/firefox/firefox"/>
-        </condition>
-        <condition property="browser" value="/usr/bin/mozilla">
-            <available file="/usr/bin/mozilla"/>
-        </condition>
-        <condition property="browser" value="/usr/local/mozilla/mozilla">
-            <available file="/usr/local/mozilla/mozilla"/>
-        </condition>
-        <condition property="browser" value="/usr/sfw/lib/firefox/firefox">
-            <available file="/usr/sfw/lib/firefox/firefox"/>
-        </condition>
-        <condition property="browser" value="/opt/csw/bin/firefox">
-            <available file="/opt/csw/bin/firefox"/>
-        </condition>
-        <condition property="browser" value="/usr/sfw/lib/mozilla/mozilla">
-            <available file="/usr/sfw/lib/mozilla/mozilla"/>
-        </condition>
-        <condition property="browser" value="/opt/csw/bin/mozilla">
-            <available file="/opt/csw/bin/mozilla"/>
-        </condition>
-    </target>
-    <target depends="-get-browser" if="do.display.browser.cl" name="-display-browser-cl">
-        <fail unless="browser">
+		<ant antfile="${project.nekurak_net-ejb}/build.xml" inheritall="false" target="-run-deploy-am"/>
+		<ant antfile="${project.nekurak_net-rest}/build.xml" inheritall="false" target="-run-deploy-am"/>
+		<ant antfile="${project.nekurak_net-web}/build.xml" inheritall="false" target="-run-deploy-am"/>
+		<ant antfile="${project.nekurak_net-ws}/build.xml" inheritall="false" target="-run-deploy-am"/>
+	</target>
+	<target depends="-init-cos,dist-directory-deploy,pre-run-deploy,-pre-nbmodule-run-deploy,-run-deploy-nb,-init-deploy-ant,-deploy-ant,-run-deploy-am,-post-nbmodule-run-deploy,post-run-deploy" name="run-deploy"/>
+	<target if="netbeans.home" name="-run-deploy-nb">
+		<nbdeploy clientModuleUri="${client.module.uri}" clientUrlPart="${client.urlPart}" debugmode="false" forceRedeploy="${forceRedeploy}"/>
+	</target>
+	<target name="-init-deploy-ant" unless="netbeans.home">
+		<property name="deploy.ant.archive" value="${dist.jar}"/>
+		<property name="deploy.ant.resource.dir" value="${resource.dir}"/>
+		<property name="deploy.ant.enabled" value="true"/>
+	</target>
+	<target depends="dist,-run-undeploy-nb,-init-deploy-ant,-undeploy-ant" name="run-undeploy"/>
+	<target if="netbeans.home" name="-run-undeploy-nb">
+		<fail message="Undeploy is not supported from within the IDE"/>
+	</target>
+	<target depends="dist" name="verify">
+		<nbverify file="${dist.jar}"/>
+	</target>
+	<target depends="run-deploy,-init-display-browser,-display-browser-nb,-display-browser-cl" name="run-display-browser"/>
+	<target if="do.display.browser" name="-init-display-browser">
+		<condition property="do.display.browser.nb">
+			<isset property="netbeans.home"/>
+		</condition>
+		<condition property="do.display.browser.cl">
+			<and>
+				<isset property="deploy.ant.enabled"/>
+				<isset property="deploy.ant.client.url"/>
+			</and>
+		</condition>
+	</target>
+	<target if="do.display.browser.nb" name="-display-browser-nb">
+		<nbbrowse url="${client.url}"/>
+	</target>
+	<target if="do.display.browser.cl" name="-get-browser" unless="browser">
+		<condition property="browser" value="rundll32">
+			<os family="windows"/>
+		</condition>
+		<condition else="" property="browser.args" value="url.dll,FileProtocolHandler">
+			<os family="windows"/>
+		</condition>
+		<condition property="browser" value="/usr/bin/open">
+			<os family="mac"/>
+		</condition>
+		<property environment="env"/>
+		<condition property="browser" value="${env.BROWSER}">
+			<isset property="env.BROWSER"/>
+		</condition>
+		<condition property="browser" value="/usr/bin/firefox">
+			<available file="/usr/bin/firefox"/>
+		</condition>
+		<condition property="browser" value="/usr/local/firefox/firefox">
+			<available file="/usr/local/firefox/firefox"/>
+		</condition>
+		<condition property="browser" value="/usr/bin/mozilla">
+			<available file="/usr/bin/mozilla"/>
+		</condition>
+		<condition property="browser" value="/usr/local/mozilla/mozilla">
+			<available file="/usr/local/mozilla/mozilla"/>
+		</condition>
+		<condition property="browser" value="/usr/sfw/lib/firefox/firefox">
+			<available file="/usr/sfw/lib/firefox/firefox"/>
+		</condition>
+		<condition property="browser" value="/opt/csw/bin/firefox">
+			<available file="/opt/csw/bin/firefox"/>
+		</condition>
+		<condition property="browser" value="/usr/sfw/lib/mozilla/mozilla">
+			<available file="/usr/sfw/lib/mozilla/mozilla"/>
+		</condition>
+		<condition property="browser" value="/opt/csw/bin/mozilla">
+			<available file="/opt/csw/bin/mozilla"/>
+		</condition>
+	</target>
+	<target depends="-get-browser" if="do.display.browser.cl" name="-display-browser-cl">
+		<fail unless="browser">
             Browser not found, cannot launch the deployed application. Try to set the BROWSER environment variable.
-        </fail>
-        <property name="browse.url" value="${deploy.ant.client.url}${client.urlPart}"/>
-        <echo>Launching ${browse.url}</echo>
-        <exec executable="${browser}" spawn="true">
-            <arg line="${browser.args} ${browse.url}"/>
-        </exec>
-    </target>
-    <target if="app.client" name="run-ac">
-        <antcall target="-run-ac"/>
-    </target>
-    <target depends="init,-as-retrieve-option-workaround,-init-run-macros,-run-appclient-pregfv3,-run-appclient" name="-run-ac"/>
-    <target if="j2ee.appclient.tool.args" name="-run-appclient-pregfv3">
-        <ear2:run-appclient-pregfv3/>
-    </target>
-    <target name="-run-appclient" unless="j2ee.appclient.tool.args">
-        <ear2:run-appclient subprojectname="${app.client}"/>
-    </target>
-    <target if="j2ee.appclient.mainclass.args" name="-as-retrieve-option-workaround" unless="j2ee.clientName">
-        <property name="client.jar" value="${dist.dir}/nekurak.net-earClient.jar"/>
-        <sleep seconds="3"/>
-        <copy failonerror="false" file="${wa.copy.client.jar.from}/nekurak.net-ear/nekurak.net-earClient.jar" todir="${dist.dir}"/>
-        <copy failonerror="false" flatten="true" todir="${dist.dir}/">
-            <fileset dir="${wa.copy.client.jar.from}/nekurak.net-ear" includes="**/nekurak.net-earClient.jar"/>
-        </copy>
-        <copy flatten="true" todir="${dist.dir}/nekurak.net-earClient">
-            <fileset dir="${wa.copy.client.jar.from}/nekurak.net-ear" includes="**/*.*ar"/>
-        </copy>
-        <copy failonerror="false" flatten="false" todir="${dist.dir}/nekurak.net-earClient">
-            <fileset dir="${dist.dir}/gfdeploy/nekurak.net-ear" includes="**/*.jar"/>
-        </copy>
-    </target>
-    <target depends="init" name="-init-run-macros">
-        <macrodef name="run-appclient" uri="http://www.netbeans.org/ns/j2ee-earproject/2">
-            <attribute name="subprojectname"/>
-            <attribute default="${application.args.param}" name="args"/>
-            <element name="customize" optional="true"/>
-            <sequential>
-                <java dir="${basedir}" fork="true" jar="${client.jar}">
-                    <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
-                    <jvmarg line="${j2ee.appclient.tool.jvmoptions}${client.jar},arg=-name,arg=@{subprojectname}"/>
-                    <arg line="@{args}"/>
-                    <syspropertyset>
-                        <propertyref prefix="run-sys-prop."/>
-                        <mapper from="run-sys-prop.*" to="*" type="glob"/>
-                    </syspropertyset>
-                    <customize/>
-                </java>
-            </sequential>
-        </macrodef>
-        <macrodef name="run-appclient-pregfv3" uri="http://www.netbeans.org/ns/j2ee-earproject/2">
-            <element name="customize" optional="true"/>
-            <sequential>
-                <java classname="${j2ee.appclient.tool.mainclass}" fork="true">
-                    <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
-                    <jvmarg line="${j2ee.appclient.tool.jvmoptions}"/>
-                    <jvmarg line="${j2ee.appclient.jvmoptions.param}"/>
-                    <arg line="${j2ee.appclient.tool.args}"/>
-                    <arg line="-client ${client.jar}"/>
-                    <arg line="${j2ee.appclient.mainclass.tool.param}"/>
-                    <arg line="${application.args.param}"/>
-                    <classpath>
-                        <path path="${j2ee.platform.classpath}:${j2ee.appclient.tool.runtime}"/>
-                    </classpath>
-                    <syspropertyset>
-                        <propertyref prefix="run-sys-prop."/>
-                        <mapper from="run-sys-prop.*" to="*" type="glob"/>
-                    </syspropertyset>
-                    <customize/>
-                </java>
-            </sequential>
-        </macrodef>
-    </target>
+		</fail>
+		<property name="browse.url" value="${deploy.ant.client.url}${client.urlPart}"/>
+		<echo>Launching ${browse.url}</echo>
+		<exec executable="${browser}" spawn="true">
+			<arg line="${browser.args} ${browse.url}"/>
+		</exec>
+	</target>
+	<target if="app.client" name="run-ac">
+		<antcall target="-run-ac"/>
+	</target>
+	<target depends="init,-as-retrieve-option-workaround,-init-run-macros,-run-appclient-pregfv3,-run-appclient" name="-run-ac"/>
+	<target if="j2ee.appclient.tool.args" name="-run-appclient-pregfv3">
+		<ear2:run-appclient-pregfv3/>
+	</target>
+	<target name="-run-appclient" unless="j2ee.appclient.tool.args">
+		<ear2:run-appclient subprojectname="${app.client}"/>
+	</target>
+	<target if="j2ee.appclient.mainclass.args" name="-as-retrieve-option-workaround" unless="j2ee.clientName">
+		<property name="client.jar" value="${dist.dir}/nekurak.net-earClient.jar"/>
+		<sleep seconds="3"/>
+		<copy failonerror="false" file="${wa.copy.client.jar.from}/nekurak.net-ear/nekurak.net-earClient.jar" todir="${dist.dir}"/>
+		<copy failonerror="false" flatten="true" todir="${dist.dir}/">
+			<fileset dir="${wa.copy.client.jar.from}/nekurak.net-ear" includes="**/nekurak.net-earClient.jar"/>
+		</copy>
+		<copy flatten="true" todir="${dist.dir}/nekurak.net-earClient">
+			<fileset dir="${wa.copy.client.jar.from}/nekurak.net-ear" includes="**/*.*ar"/>
+		</copy>
+		<copy failonerror="false" flatten="false" todir="${dist.dir}/nekurak.net-earClient">
+			<fileset dir="${dist.dir}/gfdeploy/nekurak.net-ear" includes="**/*.jar"/>
+		</copy>
+	</target>
+	<target depends="init" name="-init-run-macros">
+		<macrodef name="run-appclient" uri="http://www.netbeans.org/ns/j2ee-earproject/2">
+			<attribute name="subprojectname"/>
+			<attribute default="${application.args.param}" name="args"/>
+			<element name="customize" optional="true"/>
+			<sequential>
+				<java dir="${basedir}" fork="true" jar="${client.jar}">
+					<jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
+					<jvmarg line="${j2ee.appclient.tool.jvmoptions}${client.jar},arg=-name,arg=@{subprojectname}"/>
+					<jvmarg line="${j2ee.appclient.jvmoptions.param}"/>
+					<arg line="@{args}"/>
+					<syspropertyset>
+						<propertyref prefix="run-sys-prop."/>
+						<mapper from="run-sys-prop.*" to="*" type="glob"/>
+					</syspropertyset>
+					<customize/>
+				</java>
+			</sequential>
+		</macrodef>
+		<macrodef name="run-appclient-pregfv3" uri="http://www.netbeans.org/ns/j2ee-earproject/2">
+			<element name="customize" optional="true"/>
+			<sequential>
+				<java classname="${j2ee.appclient.tool.mainclass}" fork="true">
+					<jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
+					<jvmarg line="${j2ee.appclient.tool.jvmoptions}"/>
+					<jvmarg line="${j2ee.appclient.jvmoptions.param}"/>
+					<arg line="${j2ee.appclient.tool.args}"/>
+					<arg line="-client ${client.jar}"/>
+					<arg line="${j2ee.appclient.mainclass.tool.param}"/>
+					<arg line="${application.args.param}"/>
+					<classpath>
+						<path path="${j2ee.platform.classpath}:${j2ee.appclient.tool.runtime}"/>
+					</classpath>
+					<syspropertyset>
+						<propertyref prefix="run-sys-prop."/>
+						<mapper from="run-sys-prop.*" to="*" type="glob"/>
+					</syspropertyset>
+					<customize/>
+				</java>
+			</sequential>
+		</macrodef>
+	</target>
     <!--
     DEBUGGING SECTION
     -->
-    <target depends="run-debug,run-debug-appclient" description="Deploy to server." name="debug"/>
-    <target depends="dist" description="Debug project in IDE." if="netbeans.home" name="run-debug" unless="app.client">
-        <nbdeploy clientModuleUri="${client.module.uri}" clientUrlPart="${client.urlPart}" debugmode="true"/>
-        <antcall target="connect-debugger"/>
-        <antcall target="debug-display-browser"/>
-    </target>
-    <target name="connect-debugger" unless="is.debugged">
-        <nbjpdaconnect address="${jpda.address}" host="${jpda.host}" name="${jpda.host}:${jpda.address}" transport="${jpda.transport}">
-            <classpath>
-                <path path="${debug.classpath}"/>
-                <fileset dir="${build.dir}" includes="lib/*.jar"/>
-            </classpath>
-            <sourcepath>
-                <path path="${ear.docbase.dirs}"/>
-            </sourcepath>
-        </nbjpdaconnect>
-    </target>
-    <target if="do.display.browser" name="debug-display-browser">
-        <nbbrowse url="${client.url}"/>
-    </target>
-    <target if="can.debug.appclient" name="run-debug-appclient">
-        <antcall target="-run-debug-appclient"/>
-    </target>
-    <target depends="init,-init-debug-args,-debug-appclient-deploy,-as-retrieve-option-workaround,-init-debug-macros,-debug-appclient-start-nbjpda,-debug-appclient-pregfv3,-debug-appclient,connect-debugger" name="-run-debug-appclient"/>
-    <target name="-init-debug-args">
-        <property name="version-output" value="java version &quot;${ant.java.version}"/>
-        <condition property="have-jdk-older-than-1.4">
-            <or>
-                <contains string="${version-output}" substring="java version &quot;1.0"/>
-                <contains string="${version-output}" substring="java version &quot;1.1"/>
-                <contains string="${version-output}" substring="java version &quot;1.2"/>
-                <contains string="${version-output}" substring="java version &quot;1.3"/>
-            </or>
-        </condition>
-        <condition else="-Xdebug" property="debug-args-line" value="-Xdebug -Xnoagent -Djava.compiler=none">
-            <istrue value="${have-jdk-older-than-1.4}"/>
-        </condition>
-    </target>
-    <target depends="init,-init-debug-args,-as-retrieve-option-workaround,-init-run-macros" name="-init-debug-macros">
-        <condition else="dt_socket" property="debug-transport-by-os" value="dt_shmem">
-            <os family="windows"/>
-        </condition>
-        <condition else="${debug-transport-by-os}" property="debug-transport-appclient" value="${debug.transport}">
-            <isset property="debug.transport"/>
-        </condition>
-        <macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2ee-earproject/2">
-            <attribute default="${main.class}" name="name"/>
-            <attribute default="${debug.classpath}" name="classpath"/>
-            <attribute default="" name="stopclassname"/>
-            <sequential>
-                <nbjpdastart addressproperty="jpda.address.appclient" name="@{name}" stopclassname="@{stopclassname}" transport="${debug-transport-appclient}">
-                    <classpath>
-                        <path path="@{classpath}"/>
-                    </classpath>
-                </nbjpdastart>
-            </sequential>
-        </macrodef>
-        <macrodef name="debug-appclient" uri="http://www.netbeans.org/ns/j2ee-earproject/2">
-            <attribute name="subprojectname"/>
-            <sequential>
-                <ear2:run-appclient subprojectname="@{subprojectname}">
-                    <customize>
-                        <jvmarg value="-Xrunjdwp:transport=${debug-transport-appclient},address=${jpda.address.appclient}"/>
-                        <jvmarg line="${debug-args-line}"/>
-                    </customize>
-                </ear2:run-appclient>
-            </sequential>
-        </macrodef>
-        <macrodef name="debug-appclient-pregfv3" uri="http://www.netbeans.org/ns/j2ee-earproject/2">
-            <sequential>
-                <ear2:run-appclient-pregfv3>
-                    <customize>
-                        <jvmarg value="-Xrunjdwp:transport=${debug-transport-appclient},address=${jpda.address.appclient}"/>
-                        <jvmarg line="${debug-args-line}"/>
-                    </customize>
-                </ear2:run-appclient-pregfv3>
-            </sequential>
-        </macrodef>
-    </target>
-    <target name="-debug-appclient-deploy">
-        <nbstartserver debugmode="true"/>
-        <nbdeploy clientModuleUri="${client.module.uri}" clientUrlPart="${client.urlPart}" debugmode="true"/>
-    </target>
-    <target name="-debug-appclient-start-nbjpda">
-        <ear2:nbjpdastart classpath="" name="${app.client}"/>
-    </target>
-    <target if="j2ee.appclient.tool.args" name="-debug-appclient-pregfv3">
-        <ear2:debug-appclient-pregfv3/>
-    </target>
-    <target name="-debug-appclient" unless="j2ee.appclient.tool.args">
-        <mkdir dir="${dist.dir}/nekurak.net-earClient"/>
-        <copy flatten="true" todir="${dist.dir}/nekurak.net-earClient">
-            <fileset dir="${wa.copy.client.jar.from}/nekurak.net-ear" includes="**/*.*ar"/>
-        </copy>
-        <ear2:debug-appclient subprojectname="${app.client}"/>
-    </target>
+	<target depends="run-debug,run-debug-appclient" description="Deploy to server." name="debug"/>
+	<target depends="dist" description="Debug project in IDE." if="netbeans.home" name="run-debug" unless="app.client">
+		<nbdeploy clientModuleUri="${client.module.uri}" clientUrlPart="${client.urlPart}" debugmode="true"/>
+		<antcall target="connect-debugger"/>
+		<antcall target="debug-display-browser"/>
+	</target>
+	<target name="connect-debugger" unless="is.debugged">
+		<nbjpdaconnect address="${jpda.address}" host="${jpda.host}" name="${jpda.host}:${jpda.address}" transport="${jpda.transport}">
+			<classpath>
+				<path path="${debug.classpath}"/>
+				<fileset dir="${build.dir}" includes="lib/*.jar"/>
+			</classpath>
+			<sourcepath>
+				<path path="${ear.docbase.dirs}"/>
+			</sourcepath>
+		</nbjpdaconnect>
+	</target>
+	<target if="do.display.browser" name="debug-display-browser">
+		<nbbrowse url="${client.url}"/>
+	</target>
+	<target if="can.debug.appclient" name="run-debug-appclient">
+		<antcall target="-run-debug-appclient"/>
+	</target>
+	<target depends="init,-init-debug-args,-debug-appclient-deploy,-as-retrieve-option-workaround,-init-debug-macros,-debug-appclient-start-nbjpda,-debug-appclient-pregfv3,-debug-appclient,connect-debugger" name="-run-debug-appclient"/>
+	<target name="-init-debug-args">
+		<property name="version-output" value="java version &quot;${ant.java.version}"/>
+		<condition property="have-jdk-older-than-1.4">
+			<or>
+				<contains string="${version-output}" substring="java version &quot;1.0"/>
+				<contains string="${version-output}" substring="java version &quot;1.1"/>
+				<contains string="${version-output}" substring="java version &quot;1.2"/>
+				<contains string="${version-output}" substring="java version &quot;1.3"/>
+			</or>
+		</condition>
+		<condition else="-Xdebug" property="debug-args-line" value="-Xdebug -Xnoagent -Djava.compiler=none">
+			<istrue value="${have-jdk-older-than-1.4}"/>
+		</condition>
+	</target>
+	<target depends="init,-init-debug-args,-as-retrieve-option-workaround,-init-run-macros" name="-init-debug-macros">
+		<condition else="dt_socket" property="debug-transport-by-os" value="dt_shmem">
+			<os family="windows"/>
+		</condition>
+		<condition else="${debug-transport-by-os}" property="debug-transport-appclient" value="${debug.transport}">
+			<isset property="debug.transport"/>
+		</condition>
+		<macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2ee-earproject/2">
+			<attribute default="${main.class}" name="name"/>
+			<attribute default="${debug.classpath}" name="classpath"/>
+			<attribute default="" name="stopclassname"/>
+			<sequential>
+				<nbjpdastart addressproperty="jpda.address.appclient" name="@{name}" stopclassname="@{stopclassname}" transport="${debug-transport-appclient}">
+					<classpath>
+						<path path="@{classpath}"/>
+					</classpath>
+				</nbjpdastart>
+			</sequential>
+		</macrodef>
+		<macrodef name="debug-appclient" uri="http://www.netbeans.org/ns/j2ee-earproject/2">
+			<attribute name="subprojectname"/>
+			<sequential>
+				<ear2:run-appclient subprojectname="@{subprojectname}">
+					<customize>
+						<jvmarg value="-Xrunjdwp:transport=${debug-transport-appclient},address=${jpda.address.appclient}"/>
+						<jvmarg line="${debug-args-line}"/>
+					</customize>
+				</ear2:run-appclient>
+			</sequential>
+		</macrodef>
+		<macrodef name="debug-appclient-pregfv3" uri="http://www.netbeans.org/ns/j2ee-earproject/2">
+			<sequential>
+				<ear2:run-appclient-pregfv3>
+					<customize>
+						<jvmarg value="-Xrunjdwp:transport=${debug-transport-appclient},address=${jpda.address.appclient}"/>
+						<jvmarg line="${debug-args-line}"/>
+					</customize>
+				</ear2:run-appclient-pregfv3>
+			</sequential>
+		</macrodef>
+	</target>
+	<target name="-debug-appclient-deploy">
+		<nbstartserver debugmode="true"/>
+		<nbdeploy clientModuleUri="${client.module.uri}" clientUrlPart="${client.urlPart}" debugmode="true"/>
+	</target>
+	<target name="-debug-appclient-start-nbjpda">
+		<ear2:nbjpdastart classpath="" name="${app.client}"/>
+	</target>
+	<target if="j2ee.appclient.tool.args" name="-debug-appclient-pregfv3">
+		<ear2:debug-appclient-pregfv3/>
+	</target>
+	<target name="-debug-appclient" unless="j2ee.appclient.tool.args">
+		<ear2:debug-appclient subprojectname="${app.client}"/>
+	</target>
+    <!--
+    =================
+    PROFILING SECTION
+    =================
+    -->
+	<target description="Profile a J2EE project in the IDE." name="profile">
+		<condition else="start-profiled-server" property="profiler.startserver.target" value="start-profiled-server-extraargs">
+			<isset property="profiler.info.jvmargs.extra"/>
+		</condition>
+		<antcall target="${profiler.startserver.target}"/>
+		<antcall target="run"/>
+		<antcall target="start-loadgen"/>
+	</target>
+	<target name="start-profiled-server">
+		<nbstartprofiledserver forceRestart="${profiler.j2ee.serverForceRestart}" javaPlatform="${profiler.info.javaPlatform}" startupTimeout="${profiler.j2ee.serverStartupTimeout}">
+			<jvmarg value="${profiler.info.jvmargs.agent}"/>
+			<jvmarg value="${profiler.j2ee.agentID}"/>
+		</nbstartprofiledserver>
+	</target>
+	<target name="start-profiled-server-extraargs">
+		<nbstartprofiledserver forceRestart="${profiler.j2ee.serverForceRestart}" javaPlatform="${profiler.info.javaPlatform}" startupTimeout="${profiler.j2ee.serverStartupTimeout}">
+			<jvmarg value="${profiler.info.jvmargs.extra}"/>
+			<jvmarg value="${profiler.info.jvmargs.agent}"/>
+			<jvmarg value="${profiler.j2ee.agentID}"/>
+		</nbstartprofiledserver>
+	</target>
+	<target if="profiler.loadgen.path" name="start-loadgen">
+		<loadgenstart path="${profiler.loadgen.path}"/>
+	</target>
     <!--
     CLEANUP SECTION
     -->
-    <target depends="init" name="deps-clean" unless="no.deps">
-        <condition property="build.deploy.on.save" value="false">
-            <not>
-                <isset property="build.deploy.on.save"/>
-            </not>
-        </condition>
-        <ant antfile="${project.nekurak_net-ejb}/build.xml" inheritall="false" target="clean-ear">
-            <property location="${build.dir}" name="dist.ear.dir"/>
-            <property name="deploy.on.save" value="${build.deploy.on.save}"/>
-        </ant>
-        <condition property="build.deploy.on.save" value="false">
-            <not>
-                <isset property="build.deploy.on.save"/>
-            </not>
-        </condition>
-        <ant antfile="${project.nekurak_net-rest}/build.xml" inheritall="false" target="clean-ear">
-            <property location="${build.dir}" name="dist.ear.dir"/>
-            <property name="deploy.on.save" value="${build.deploy.on.save}"/>
-        </ant>
-        <condition property="build.deploy.on.save" value="false">
-            <not>
-                <isset property="build.deploy.on.save"/>
-            </not>
-        </condition>
-        <ant antfile="${project.nekurak_net-web}/build.xml" inheritall="false" target="clean-ear">
-            <property location="${build.dir}" name="dist.ear.dir"/>
-            <property name="deploy.on.save" value="${build.deploy.on.save}"/>
-        </ant>
-        <condition property="build.deploy.on.save" value="false">
-            <not>
-                <isset property="build.deploy.on.save"/>
-            </not>
-        </condition>
-        <ant antfile="${project.nekurak_net-ws}/build.xml" inheritall="false" target="clean-ear">
-            <property location="${build.dir}" name="dist.ear.dir"/>
-            <property name="deploy.on.save" value="${build.deploy.on.save}"/>
-        </ant>
-    </target>
-    <target depends="init" name="do-clean">
-        <delete dir="${build.dir}"/>
-        <delete dir="${dist.dir}"/>
-        <delete dir="${build.dir}"/>
-    </target>
-    <target depends="init" if="netbeans.home" name="undeploy-clean">
-        <nbundeploy failOnError="false" startServer="false"/>
-    </target>
-    <target name="post-clean">
+	<target depends="init" name="deps-clean" unless="no.deps">
+		<condition property="build.deploy.on.save" value="false">
+			<not>
+				<isset property="build.deploy.on.save"/>
+			</not>
+		</condition>
+		<ant antfile="${project.nekurak_net-ejb}/build.xml" inheritall="false" target="clean-ear">
+			<property location="${build.dir}" name="dist.ear.dir"/>
+			<property name="deploy.on.save" value="${build.deploy.on.save}"/>
+		</ant>
+		<condition property="build.deploy.on.save" value="false">
+			<not>
+				<isset property="build.deploy.on.save"/>
+			</not>
+		</condition>
+		<ant antfile="${project.nekurak_net-rest}/build.xml" inheritall="false" target="clean-ear">
+			<property location="${build.dir}" name="dist.ear.dir"/>
+			<property name="deploy.on.save" value="${build.deploy.on.save}"/>
+		</ant>
+		<condition property="build.deploy.on.save" value="false">
+			<not>
+				<isset property="build.deploy.on.save"/>
+			</not>
+		</condition>
+		<ant antfile="${project.nekurak_net-web}/build.xml" inheritall="false" target="clean-ear">
+			<property location="${build.dir}" name="dist.ear.dir"/>
+			<property name="deploy.on.save" value="${build.deploy.on.save}"/>
+		</ant>
+		<condition property="build.deploy.on.save" value="false">
+			<not>
+				<isset property="build.deploy.on.save"/>
+			</not>
+		</condition>
+		<ant antfile="${project.nekurak_net-ws}/build.xml" inheritall="false" target="clean-ear">
+			<property location="${build.dir}" name="dist.ear.dir"/>
+			<property name="deploy.on.save" value="${build.deploy.on.save}"/>
+		</ant>
+	</target>
+	<target depends="init" name="do-clean">
+		<delete dir="${build.dir}"/>
+		<delete dir="${dist.dir}"/>
+		<delete dir="${build.dir}"/>
+	</target>
+	<target depends="init" if="netbeans.home" name="undeploy-clean">
+		<nbundeploy failOnError="false" startServer="false"/>
+	</target>
+	<target name="post-clean">
         <!-- Empty placeholder for easier customization. -->
         <!-- You can override this target in the ../build.xml file. -->
-    </target>
-    <target depends="init,undeploy-clean,deps-clean,do-clean,post-clean" description="Clean build products." name="clean"/>
+	</target>
+	<target depends="init,undeploy-clean,deps-clean,do-clean,post-clean" description="Clean build products." name="clean"/>
 </project>
diff -r 60658773f604 -r b0f7d9ab4a07 java/nekurak.net-ear/nbproject/genfiles.properties
--- a/java/nekurak.net-ear/nbproject/genfiles.properties	Sun Jul 10 20:17:56 2011 +0200
+++ b/java/nekurak.net-ear/nbproject/genfiles.properties	Fri Jul 15 22:25:39 2011 +0200
@@ -4,5 +4,5 @@
 # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
 # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
 nbproject/build-impl.xml.data.CRC32=3ed495e4
-nbproject/build-impl.xml.script.CRC32=1197b7f6
-nbproject/build-impl.xml.stylesheet.CRC32=56fd2fa2@1.18.1
+nbproject/build-impl.xml.script.CRC32=904b1c1e
+nbproject/build-impl.xml.stylesheet.CRC32=e4530a36@1.24.1
diff -r 60658773f604 -r b0f7d9ab4a07 java/nekurak.net-ear/nbproject/project.properties
--- a/java/nekurak.net-ear/nbproject/project.properties	Sun Jul 10 20:17:56 2011 +0200
+++ b/java/nekurak.net-ear/nbproject/project.properties	Fri Jul 15 22:25:39 2011 +0200
@@ -10,9 +10,10 @@
 endorsed.classpath=\
     ${libs.javaee-endorsed-api-6.0.classpath}
 j2ee.appclient.mainclass.args=${j2ee.appclient.tool.args}
+j2ee.compile.on.save=false
 j2ee.deploy.on.save=false
 j2ee.platform=1.6
-j2ee.platform.classpath=
+j2ee.platform.classpath=${j2ee.server.home}/modules/endorsed/javax.annotation.jar:${j2ee.server.home}/modules/javax.transaction.jar:${j2ee.server.home}/modules/jsf-api.jar:${j2ee.server.home}/modules/jsf-impl.jar:${j2ee.server.home}/modules/jaxrpc-api-osgi.jar:${j2ee.server.home}/modules/javax.enterprise.deploy.jar:${j2ee.server.home}/modules/javax.resource.jar:${j2ee.server.home}/modules/jstl-impl.jar:${j2ee.server.home}/modules/jersey-core.jar:${j2ee.server.home}/modules/javax.security.auth.message.jar:${j2ee.server.home}/modules/javax.servlet.jar:${j2ee.server.home}/modules/javax.servlet.jsp.jstl.jar:${j2ee.server.home}/modules/javax.ejb.jar:${j2ee.server.home}/modules/javax.servlet.jsp.jar:${j2ee.server.home}/modules/bean-validator.jar:${j2ee.server.home}/modules/javax.management.j2ee.jar:${j2ee.server.home}/modules/weld-osgi-bundle.jar:${j2ee.server.home}/modules/javax.mail.jar:${j2ee.server.home}/modules/javax.jms.jar:${j2ee.server.home}/modules/endorsed/jaxb-api-osgi.jar:${j2ee.server.home}/modules/endorsed/webservices-api-osgi.jar:${j2ee.server.home}/modules/javax.security.jacc.jar:${j2ee.server.home}/modules/javax.persistence.jar
 j2ee.platform.embeddableejb.classpath=${j2ee.server.home}/lib/embedded/glassfish-embedded-static-shell.jar
 j2ee.platform.wscompile.classpath=${j2ee.server.home}/modules/webservices-osgi.jar
 j2ee.platform.wsgen.classpath=${j2ee.server.home}/modules/webservices-osgi.jar:${j2ee.server.home}/modules/endorsed/webservices-api-osgi.jar:${j2ee.server.home}/modules/jaxb-osgi.jar:${j2ee.server.home}/modules/endorsed/jaxb-api-osgi.jar:${j2ee.server.home}/modules/javax.ejb.jar
diff -r 60658773f604 -r b0f7d9ab4a07 java/nekurak.net-ejb/nbproject/ant-deploy.xml
--- a/java/nekurak.net-ejb/nbproject/ant-deploy.xml	Sun Jul 10 20:17:56 2011 +0200
+++ b/java/nekurak.net-ejb/nbproject/ant-deploy.xml	Fri Jul 15 22:25:39 2011 +0200
@@ -3,6 +3,7 @@
     <target name="-init-cl-deployment-env" if="deploy.ant.enabled">
         <property file="${deploy.ant.properties.file}" />
         <available file="${deploy.ant.docbase.dir}/WEB-INF/sun-web.xml" property="sun.web.present"/>
+        <available file="${deploy.ant.docbase.dir}/WEB-INF/glassfish-web.xml" property="glassfish.web.present"/>
         <available file="${deploy.ant.resource.dir}" property="has.setup"/>
         <tempfile prefix="gfv3" property="gfv3.password.file" destdir="${java.io.tmpdir}"/>  <!-- do not forget to delete this! -->
         <echo message="AS_ADMIN_PASSWORD=${gfv3.password}" file="${gfv3.password.file}"/>
@@ -23,8 +24,34 @@
         <xmlproperty file="${temp.sun.web}" validate="false">
         </xmlproperty>    
         <delete file="${temp.sun.web}"/>
-        <property name="deploy.ant.client.url" value="${gfv3.url}${sun-web-app.context-root}"/>
-        <property name="deploy.context.root.argument" value="&amp;contextroot=${sun-web-app.context-root}"/>
+        <condition property="deploy.ant.client.url" value="${gfv3.url}${sun-web-app.context-root}" else="${gfv3.url}/${ant.project.name}">
+            <isset property="sun-web-app.context-root"/>
+        </condition>
+        <condition property="deploy.context.root.argument" value="&amp;contextroot=${sun-web-app.context-root}" else="/${ant.project.name}">
+            <isset property="sun-web-app.context-root"/>
+        </condition>
+    </target>
+    <target name="-parse-glassfish-web" depends="-init-cl-deployment-env" if="glassfish.web.present">
+        <tempfile prefix="gfv3" property="temp.gf.web" destdir="${java.io.tmpdir}"/>
+        <copy file="${deploy.ant.docbase.dir}/WEB-INF/glassfish-web.xml" tofile="${temp.gf.web}"/>
+        <!-- The doctype triggers resolution which can fail -->
+        <replace file="${temp.gf.web}">
+            <replacetoken><![CDATA[<!DOCTYPE]]></replacetoken>
+            <replacevalue><![CDATA[<!-- <!DOCTYPE]]></replacevalue>
+        </replace>
+        <replace file="${temp.gf.web}">
+            <replacetoken><![CDATA[<glassfish-web-app]]></replacetoken>
+            <replacevalue><![CDATA[--> <glassfish-web-app]]></replacevalue>
+        </replace>
+        <xmlproperty file="${temp.gf.web}" validate="false">
+        </xmlproperty>
+        <delete file="${temp.gf.web}"/>
+        <condition property="deploy.ant.client.url" value="${gfv3.url}${glassfish-web-app.context-root}" else="${gfv3.url}/${ant.project.name}">
+            <isset property="glassfish-web-app.context-root"/>
+        </condition>
+        <condition property="deploy.context.root.argument" value="&amp;contextroot=${glassfish-web-app.context-root}" else="/${ant.project.name}">
+            <isset property="glassfish-web-app.context-root"/>
+        </condition>
     </target>
     <target name="-no-parse-sun-web" depends="-init-cl-deployment-env" unless="sun.web.present">
         <property name="deploy.context.root.argument" value=""/>
@@ -33,7 +60,6 @@
         <tempfile prefix="gfv3" property="gfv3.resources.dir" destdir="${java.io.tmpdir}"/>
         <mkdir dir="${gfv3.resources.dir}"/>
         <mkdir dir="${gfv3.resources.dir}/META-INF"/>
-        <property name="gfv3.resources.file" value="${gfv3.resources.dir}/META-INF/sun-resources.xml"/>
         <copy todir="${gfv3.resources.dir}/META-INF">
             <fileset dir="${deploy.ant.resource.dir}"/>
         </copy>
@@ -42,7 +68,7 @@
         </jar>
         <delete dir="${gfv3.resources.dir}"/>
     </target>
-    <target name="-deploy-ant" depends="-parse-sun-web,-no-parse-sun-web,-add-resources" if="deploy.ant.enabled">
+    <target name="-deploy-ant" depends="-parse-glassfish-web, -parse-sun-web, -no-parse-sun-web,-add-resources" if="deploy.ant.enabled">
         <antcall target="-deploy-without-pw"/>
         <antcall target="-deploy-with-pw"/>
     </target>
diff -r 60658773f604 -r b0f7d9ab4a07 java/nekurak.net-ejb/nbproject/build-impl.xml
--- a/java/nekurak.net-ejb/nbproject/build-impl.xml	Sun Jul 10 20:17:56 2011 +0200
+++ b/java/nekurak.net-ejb/nbproject/build-impl.xml	Fri Jul 15 22:25:39 2011 +0200
@@ -118,8 +118,23 @@
         <property name="excludes" value=""/>
         <path id="endorsed.classpath.path" path="${endorsed.classpath}"/>
         <condition else="" property="endorsed.classpath.cmd.line.arg" value="-Xbootclasspath/p:'${toString:endorsed.classpath.path}'">
-            <length length="0" string="${endorsed.classpath}" when="greater"/>
+            <and>
+                <isset property="endorsed.classpath"/>
+                <length length="0" string="${endorsed.classpath}" when="greater"/>
+            </and>
         </condition>
+        <condition property="is.server.weblogic" value="true">
+            <equals arg1="${j2ee.server.type}" arg2="WebLogic9"/>
+        </condition>
+        <condition else="false" property="jdkBug6558476">
+            <and>
+                <matches pattern="1\.[56]" string="${java.specification.version}"/>
+                <not>
+                    <os family="unix"/>
+                </not>
+            </and>
+        </condition>
+        <property name="javac.fork" value="${jdkBug6558476}"/>
     </target>
     <target depends="init" name="-init-cos" unless="deploy.on.save">
         <condition property="deploy.on.save" value="true">
@@ -188,7 +203,7 @@
                 <property location="${build.dir}/empty" name="empty.dir"/>
                 <mkdir dir="${empty.dir}"/>
                 <mkdir dir="@{apgeneratedsrcdir}"/>
-                <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" includeantruntime="false" includes="@{includes}" source="${javac.source}" srcdir="@{srcdir}" target="${javac.target}">
+                <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" fork="${javac.fork}" includeantruntime="false" includes="@{includes}" source="${javac.source}" srcdir="@{srcdir}" target="${javac.target}">
                     <src>
                         <dirset dir="@{gensrcdir}" erroronmissingdir="false">
                             <include name="*"/>
@@ -259,15 +274,18 @@
             <attribute default="${build.classes.dir}" name="destdir"/>
             <sequential>
                 <fail unless="javac.includes">Must set javac.includes</fail>
-                <pathconvert pathsep="," property="javac.includes.binary">
+                <pathconvert pathsep="${line.separator}" property="javac.includes.binary">
                     <path>
                         <filelist dir="@{destdir}" files="${javac.includes}"/>
                     </path>
                     <globmapper from="*.java" to="*.class"/>
                 </pathconvert>
+                <tempfile deleteonexit="true" property="javac.includesfile.binary"/>
+                <echo file="${javac.includesfile.binary}" message="${javac.includes.binary}"/>
                 <delete>
-                    <files includes="${javac.includes.binary}"/>
+                    <files includesfile="${javac.includesfile.binary}"/>
                 </delete>
+                <delete file="${javac.includesfile.binary}"/>
             </sequential>
         </macrodef>
     </target>
@@ -295,6 +313,7 @@
                     <formatter type="brief" usefile="false"/>
                     <formatter type="xml"/>
                     <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
+                    <jvmarg value="-ea"/>
                     <jvmarg line="${runmain.jvmargs}"/>
                 </junit>
             </sequential>
@@ -424,6 +443,19 @@
     <target depends="-init-ap-cmdline-properties,-init-ap-cmdline-supported" name="-init-ap-cmdline">
         <property name="ap.cmd.line.internal" value=""/>
     </target>
+    <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-check" name="profile-init"/>
+    <target name="-profile-pre-init">
+        <!-- Empty placeholder for easier customization. -->
+        <!-- You can override this target in the ../build.xml file. -->
+    </target>
+    <target name="-profile-post-init">
+        <!-- Empty placeholder for easier customization. -->
+        <!-- You can override this target in the ../build.xml file. -->
+    </target>
+    <target depends="-profile-pre-init, init, -profile-post-init" name="-profile-init-check">
+        <fail unless="profiler.info.jvm">Must set JVM to use for profiling in profiler.info.jvm</fail>
+        <fail unless="profiler.info.jvmargs.agent">Must set profiler agent JVM arguments in profiler.info.jvmargs.agent</fail>
+    </target>
     <target depends="-pre-init,-init-private,-init-userdir,-init-user,-init-project,-do-init,-post-init,-init-check,-init-macrodef-property,-init-macrodef-javac,-init-macrodef-junit,-init-macrodef-java,-init-macrodef-nbjpda,-init-macrodef-debug,-init-taskdefs,-init-ap-cmdline" name="init"/>
     <!--
                 COMPILATION SECTION
@@ -453,10 +485,16 @@
         <!-- Empty placeholder for easier customization. -->
         <!-- You can override this target in the ../build.xml file. -->
     </target>
-    <target depends="compile" name="library-inclusion-in-archive">
-        <copyfiles files="${reference.nekurak_net-lib.jar}" todir="${build.classes.dir}"/>
-        <copyfiles files="${reference.SuperDAO.jar}" todir="${build.classes.dir}"/>
-        <copyfiles files="${libs.Smack-XMPP.classpath}" todir="${build.classes.dir}"/>
+    <target depends="compile" if="is.server.weblogic" name="library-inclusion-in-archive">
+        <basename file="${reference.nekurak_net-lib.jar}" property="manifest.reference.nekurak_net-lib.jar"/>
+        <basename file="${reference.SuperDAO.jar}" property="manifest.reference.SuperDAO.jar"/>
+        <basename file="${libs.Smack-XMPP.classpath}" property="manifest.libs.Smack-XMPP.classpath"/>
+        <manifest file="${build.ear.classes.dir}/META-INF/MANIFEST.MF" mode="update">
+            <attribute name="Extension-List" value="jar-1 jar-2 jar-3 "/>
+            <attribute name="jar-1-Extension-Name" value="${manifest.reference.nekurak_net-lib.jar}"/>
+            <attribute name="jar-2-Extension-Name" value="${manifest.reference.SuperDAO.jar}"/>
+            <attribute name="jar-3-Extension-Name" value="${manifest.libs.Smack-XMPP.classpath}"/>
+        </manifest>
     </target>
     <target depends="compile" name="library-inclusion-in-manifest">
         <copyfiles files="${reference.nekurak_net-lib.jar}" todir="${dist.ear.dir}/lib"/>
@@ -635,6 +673,35 @@
     </target>
     <target depends="init,-pre-debug-fix,-do-debug-fix" if="netbeans.home" name="debug-fix"/>
     <!--
+            =================
+            PROFILING SECTION
+            =================
+            -->
+    <target description="Profile a J2EE project in the IDE." name="profile">
+        <condition else="start-profiled-server" property="profiler.startserver.target" value="start-profiled-server-extraargs">
+            <isset property="profiler.info.jvmargs.extra"/>
+        </condition>
+        <antcall target="${profiler.startserver.target}"/>
+        <antcall target="run"/>
+        <antcall target="start-loadgen"/>
+    </target>
+    <target name="start-profiled-server">
+        <nbstartprofiledserver forceRestart="${profiler.j2ee.serverForceRestart}" javaPlatform="${profiler.info.javaPlatform}" startupTimeout="${profiler.j2ee.serverStartupTimeout}">
+            <jvmarg value="${profiler.info.jvmargs.agent}"/>
+            <jvmarg value="${profiler.j2ee.agentID}"/>
+        </nbstartprofiledserver>
+    </target>
+    <target name="start-profiled-server-extraargs">
+        <nbstartprofiledserver forceRestart="${profiler.j2ee.serverForceRestart}" javaPlatform="${profiler.info.javaPlatform}" startupTimeout="${profiler.j2ee.serverStartupTimeout}">
+            <jvmarg value="${profiler.info.jvmargs.extra}"/>
+            <jvmarg value="${profiler.info.jvmargs.agent}"/>
+            <jvmarg value="${profiler.j2ee.agentID}"/>
+        </nbstartprofiledserver>
+    </target>
+    <target if="profiler.loadgen.path" name="start-loadgen">
+        <loadgenstart path="${profiler.loadgen.path}"/>
+    </target>
+    <!--
                 JAVADOC SECTION
             -->
     <target depends="init" if="have.sources" name="javadoc-build">
@@ -750,6 +817,35 @@
     </target>
     <target depends="init,-pre-debug-fix,-do-debug-fix-test" if="netbeans.home" name="debug-fix-test"/>
     <!--
+        =========================
+        TESTS PROFILING  SECTION
+        =========================
+        -->
+    <target depends="profile-init,compile-test-single" if="netbeans.home" name="profile-test-single">
+        <nbprofiledirect>
+            <classpath>
+                <path path="${run.test.classpath}"/>
+                <path path="${j2ee.platform.classpath}"/>
+            </classpath>
+        </nbprofiledirect>
+        <junit dir="${profiler.info.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" jvm="${profiler.info.jvm}" showoutput="true">
+            <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/>
+            <jvmarg value="${profiler.info.jvmargs.agent}"/>
+            <jvmarg line="${profiler.info.jvmargs}"/>
+            <test name="${profile.class}"/>
+            <classpath>
+                <path path="${run.test.classpath}"/>
+                <path path="${j2ee.platform.classpath}"/>
+            </classpath>
+            <syspropertyset>
+                <propertyref prefix="test-sys-prop."/>
+                <mapper from="test-sys-prop.*" to="*" type="glob"/>
+            </syspropertyset>
+            <formatter type="brief" usefile="false"/>
+            <formatter type="xml"/>
+        </junit>
+    </target>
+    <!--
                 CLEANUP SECTION
             -->
     <target depends="init" if="no.dist.ear.dir" name="deps-clean" unless="no.deps">
diff -r 60658773f604 -r b0f7d9ab4a07 java/nekurak.net-ejb/nbproject/genfiles.properties
--- a/java/nekurak.net-ejb/nbproject/genfiles.properties	Sun Jul 10 20:17:56 2011 +0200
+++ b/java/nekurak.net-ejb/nbproject/genfiles.properties	Fri Jul 15 22:25:39 2011 +0200
@@ -1,8 +1,8 @@
-build.xml.data.CRC32=70881d3e
+build.xml.data.CRC32=7060a689
 build.xml.script.CRC32=d7a2a0ed
-build.xml.stylesheet.CRC32=5910fda3@1.22.1
+build.xml.stylesheet.CRC32=5910fda3@1.28.1
 # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
 # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
-nbproject/build-impl.xml.data.CRC32=70881d3e
-nbproject/build-impl.xml.script.CRC32=ad4fc04b
-nbproject/build-impl.xml.stylesheet.CRC32=33606734@1.22.2
+nbproject/build-impl.xml.data.CRC32=7060a689
+nbproject/build-impl.xml.script.CRC32=8a650959
+nbproject/build-impl.xml.stylesheet.CRC32=6cd662d4@1.28.1
diff -r 60658773f604 -r b0f7d9ab4a07 java/nekurak.net-ejb/nbproject/project.properties
--- a/java/nekurak.net-ejb/nbproject/project.properties	Sun Jul 10 20:17:56 2011 +0200
+++ b/java/nekurak.net-ejb/nbproject/project.properties	Fri Jul 15 22:25:39 2011 +0200
@@ -1,6 +1,5 @@
 annotation.processing.enabled=true
 annotation.processing.enabled.in.editor=true
-annotation.processing.processors.list=
 annotation.processing.run.all.processors=true
 annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output
 build.classes.dir=${build.dir}/classes
@@ -22,9 +21,10 @@
     ${libs.javaee-endorsed-api-6.0.classpath}
 excludes=
 includes=**
+j2ee.compile.on.save=false
 j2ee.deploy.on.save=false
 j2ee.platform=1.6
-j2ee.platform.classpath=
+j2ee.platform.classpath=${j2ee.server.home}/modules/endorsed/javax.annotation.jar:${j2ee.server.home}/modules/javax.transaction.jar:${j2ee.server.home}/modules/jsf-api.jar:${j2ee.server.home}/modules/jsf-impl.jar:${j2ee.server.home}/modules/jaxrpc-api-osgi.jar:${j2ee.server.home}/modules/javax.enterprise.deploy.jar:${j2ee.server.home}/modules/javax.resource.jar:${j2ee.server.home}/modules/jstl-impl.jar:${j2ee.server.home}/modules/jersey-core.jar:${j2ee.server.home}/modules/javax.security.auth.message.jar:${j2ee.server.home}/modules/javax.servlet.jar:${j2ee.server.home}/modules/javax.servlet.jsp.jstl.jar:${j2ee.server.home}/modules/javax.ejb.jar:${j2ee.server.home}/modules/javax.servlet.jsp.jar:${j2ee.server.home}/modules/bean-validator.jar:${j2ee.server.home}/modules/javax.management.j2ee.jar:${j2ee.server.home}/modules/weld-osgi-bundle.jar:${j2ee.server.home}/modules/javax.mail.jar:${j2ee.server.home}/modules/javax.jms.jar:${j2ee.server.home}/modules/endorsed/jaxb-api-osgi.jar:${j2ee.server.home}/modules/endorsed/webservices-api-osgi.jar:${j2ee.server.home}/modules/javax.security.jacc.jar:${j2ee.server.home}/modules/javax.persistence.jar
 j2ee.platform.embeddableejb.classpath=${j2ee.server.home}/lib/embedded/glassfish-embedded-static-shell.jar
 j2ee.platform.wscompile.classpath=${j2ee.server.home}/modules/webservices-osgi.jar
 j2ee.platform.wsgen.classpath=${j2ee.server.home}/modules/webservices-osgi.jar:${j2ee.server.home}/modules/endorsed/webservices-api-osgi.jar:${j2ee.server.home}/modules/jaxb-osgi.jar:${j2ee.server.home}/modules/endorsed/jaxb-api-osgi.jar:${j2ee.server.home}/modules/javax.ejb.jar
@@ -39,9 +39,10 @@
     ${libs.Smack-XMPP.classpath}
 javac.debug=true
 javac.deprecation=false
-javac.processorpath=${javac.classpath}
-javac.source=1.5
-javac.target=1.5
+javac.processorpath=\
+    ${javac.classpath}
+javac.source=1.6
+javac.target=1.6
 javac.test.classpath=\
     ${javac.classpath}:\
     ${build.classes.dir}:\
diff -r 60658773f604 -r b0f7d9ab4a07 java/nekurak.net-ejb/nbproject/project.xml
--- a/java/nekurak.net-ejb/nbproject/project.xml	Sun Jul 10 20:17:56 2011 +0200
+++ b/java/nekurak.net-ejb/nbproject/project.xml	Fri Jul 15 22:25:39 2011 +0200
@@ -9,10 +9,10 @@
             <included-library dirs="200">reference.SuperDAO.jar</included-library>
             <included-library dirs="200">libs.Smack-XMPP.classpath</included-library>
             <source-roots>
-                <root id="src.dir" name="Source Packages"/>
+                <root id="src.dir"/>
             </source-roots>
             <test-roots>
-                <root id="test.src.dir" name="Test Packages"/>
+                <root id="test.src.dir"/>
             </test-roots>
         </data>
         <references xmlns="http://www.netbeans.org/ns/ant-project-references/1">
diff -r 60658773f604 -r b0f7d9ab4a07 java/nekurak.net-ejb/src/java/cz/frantovo/nekurak/ejb/UzivatelEJB.java
--- a/java/nekurak.net-ejb/src/java/cz/frantovo/nekurak/ejb/UzivatelEJB.java	Sun Jul 10 20:17:56 2011 +0200
+++ b/java/nekurak.net-ejb/src/java/cz/frantovo/nekurak/ejb/UzivatelEJB.java	Fri Jul 15 22:25:39 2011 +0200
@@ -35,6 +35,7 @@
 	private Map<Locale, ResourceBundle> lokalizace = new HashMap<Locale, ResourceBundle>();
 
 	/** Uživatele může zakládat kdokoli – uživatel se registruje sám. */
+	@Override
 	public void registrujUzivatele(PozadavekNaRegistraciUzivatele p) throws NekurakVyjimka {
 		try {
 			Uzivatel u = p.getUzivatel();
diff -r 60658773f604 -r b0f7d9ab4a07 java/nekurak.net-lib/nbproject/build-impl.xml
--- a/java/nekurak.net-lib/nbproject/build-impl.xml	Sun Jul 10 20:17:56 2011 +0200
+++ b/java/nekurak.net-lib/nbproject/build-impl.xml	Fri Jul 15 22:25:39 2011 +0200
@@ -55,7 +55,14 @@
     </target>
     <target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property" name="-do-init">
         <available file="${manifest.file}" property="manifest.available"/>
-        <available file="${application.splash}" property="splashscreen.available"/>
+        <condition property="splashscreen.available">
+            <and>
+                <not>
+                    <equals arg1="${application.splash}" arg2="" trim="true"/>
+                </not>
+                <available file="${application.splash}"/>
+            </and>
+        </condition>
         <condition property="main.class.available">
             <and>
                 <isset property="main.class"/>
@@ -70,8 +77,14 @@
                 <isset property="main.class.available"/>
             </and>
         </condition>
+        <condition property="do.archive">
+            <not>
+                <istrue value="${jar.archive.disabled}"/>
+            </not>
+        </condition>
         <condition property="do.mkdist">
             <and>
+                <isset property="do.archive"/>
                 <isset property="libs.CopyLibs.classpath"/>
                 <not>
                     <istrue value="${mkdist.disabled}"/>
@@ -84,40 +97,41 @@
                 <isset property="do.mkdist"/>
             </and>
         </condition>
-        <condition property="manifest.available+main.class+mkdist.available+splashscreen.available">
-            <and>
-                <istrue value="${manifest.available+main.class+mkdist.available}"/>
-                <istrue value="${splashscreen.available}"/>
-            </and>
-        </condition>
-        <condition property="do.archive">
-            <not>
-                <istrue value="${jar.archive.disabled}"/>
-            </not>
-        </condition>
         <condition property="do.archive+manifest.available">
             <and>
                 <isset property="manifest.available"/>
                 <istrue value="${do.archive}"/>
             </and>
         </condition>
+        <condition property="do.archive+main.class.available">
+            <and>
+                <isset property="main.class.available"/>
+                <istrue value="${do.archive}"/>
+            </and>
+        </condition>
+        <condition property="do.archive+splashscreen.available">
+            <and>
+                <isset property="splashscreen.available"/>
+                <istrue value="${do.archive}"/>
+            </and>
+        </condition>
         <condition property="do.archive+manifest.available+main.class">
             <and>
                 <istrue value="${manifest.available+main.class}"/>
                 <istrue value="${do.archive}"/>
             </and>
         </condition>
-        <condition property="do.archive+manifest.available+main.class+mkdist.available">
-            <and>
-                <istrue value="${manifest.available+main.class+mkdist.available}"/>
-                <istrue value="${do.archive}"/>
-            </and>
+        <condition property="manifest.available-mkdist.available">
+            <or>
+                <istrue value="${manifest.available}"/>
+                <isset property="do.mkdist"/>
+            </or>
         </condition>
-        <condition property="do.archive+manifest.available+main.class+mkdist.available+splashscreen.available">
-            <and>
-                <istrue value="${manifest.available+main.class+mkdist.available+splashscreen.available}"/>
-                <istrue value="${do.archive}"/>
-            </and>
+        <condition property="manifest.available+main.class-mkdist.available">
+            <or>
+                <istrue value="${manifest.available+main.class}"/>
+                <isset property="do.mkdist"/>
+            </or>
         </condition>
         <condition property="have.tests">
             <or>
@@ -173,8 +187,17 @@
         <condition else="" property="endorsed.classpath.cmd.line.arg" value="-Xbootclasspath/p:'${toString:endorsed.classpath.path}'">
             <length length="0" string="${endorsed.classpath}" when="greater"/>
         </condition>
-        <property name="javac.fork" value="false"/>
+        <condition else="false" property="jdkBug6558476">
+            <and>
+                <matches pattern="1\.[56]" string="${java.specification.version}"/>
+                <not>
+                    <os family="unix"/>
+                </not>
+            </and>
+        </condition>
+        <property name="javac.fork" value="${jdkBug6558476}"/>
         <property name="jar.index" value="false"/>
+        <property name="jar.index.metainf" value="${jar.index}"/>
         <available file="${meta.inf.dir}/persistence.xml" property="has.persistence.xml"/>
     </target>
     <target name="-post-init">
@@ -302,7 +325,9 @@
                 <delete>
                     <files includesfile="${javac.includesfile.binary}"/>
                 </delete>
-                <delete file="${javac.includesfile.binary}"/>
+                <delete>
+                    <fileset file="${javac.includesfile.binary}"/>
+                </delete>
             </sequential>
         </macrodef>
     </target>
@@ -312,7 +337,8 @@
             <attribute default="${excludes}" name="excludes"/>
             <attribute default="**" name="testincludes"/>
             <sequential>
-                <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" showoutput="true" tempdir="${build.dir}">
+                <property name="junit.forkmode" value="perTest"/>
+                <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
                     <batchtest todir="${build.test.results.dir}">
                         <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
                             <filename name="@{testincludes}"/>
@@ -328,11 +354,56 @@
                     <formatter type="brief" usefile="false"/>
                     <formatter type="xml"/>
                     <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
+                    <jvmarg value="-ea"/>
                     <jvmarg line="${run.jvmargs}"/>
                 </junit>
             </sequential>
         </macrodef>
     </target>
+    <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile, -profile-init-check" name="profile-init"/>
+    <target name="-profile-pre-init">
+        <!-- Empty placeholder for easier customization. -->
+        <!-- You can override this target in the ../build.xml file. -->
+    </target>
+    <target name="-profile-post-init">
+        <!-- Empty placeholder for easier customization. -->
+        <!-- You can override this target in the ../build.xml file. -->
+    </target>
+    <target name="-profile-init-macrodef-profile">
+        <macrodef name="resolve">
+            <attribute name="name"/>
+            <attribute name="value"/>
+            <sequential>
+                <property name="@{name}" value="${env.@{value}}"/>
+            </sequential>
+        </macrodef>
+        <macrodef name="profile">
+            <attribute default="${main.class}" name="classname"/>
+            <element name="customize" optional="true"/>
+            <sequential>
+                <property environment="env"/>
+                <resolve name="profiler.current.path" value="${profiler.info.pathvar}"/>
+                <java classname="@{classname}" dir="${profiler.info.dir}" fork="true" jvm="${profiler.info.jvm}">
+                    <jvmarg value="${profiler.info.jvmargs.agent}"/>
+                    <jvmarg line="${profiler.info.jvmargs}"/>
+                    <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/>
+                    <arg line="${application.args}"/>
+                    <classpath>
+                        <path path="${run.classpath}"/>
+                    </classpath>
+                    <syspropertyset>
+                        <propertyref prefix="run-sys-prop."/>
+                        <mapper from="run-sys-prop.*" to="*" type="glob"/>
+                    </syspropertyset>
+                    <customize/>
+                </java>
+            </sequential>
+        </macrodef>
+    </target>
+    <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile" name="-profile-init-check">
+        <fail unless="profiler.info.jvm">Must set JVM to use for profiling in profiler.info.jvm</fail>
+        <fail unless="profiler.info.jvmargs.agent">Must set profiler agent JVM arguments in profiler.info.jvmargs.agent</fail>
+    </target>
     <target depends="-init-debug-args" name="-init-macrodef-nbjpda">
         <macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1">
             <attribute default="${main.class}" name="name"/>
@@ -427,6 +498,7 @@
     </target>
     <target name="-init-macrodef-copylibs">
         <macrodef name="copylibs" uri="http://www.netbeans.org/ns/j2se-project/3">
+            <attribute default="${manifest.file}" name="manifest"/>
             <element name="customize" optional="true"/>
             <sequential>
                 <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
@@ -442,7 +514,7 @@
                     </chainedmapper>
                 </pathconvert>
                 <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
-                <copylibs compress="${jar.compress}" index="${jar.index}" jarfile="${dist.jar}" manifest="${manifest.file}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
+                <copylibs compress="${jar.compress}" index="${jar.index}" indexMetaInf="${jar.index.metainf}" jarfile="${dist.jar}" manifest="@{manifest}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
                     <fileset dir="${build.classes.dir}"/>
                     <manifest>
                         <attribute name="Class-Path" value="${jar.classpath}"/>
@@ -571,10 +643,10 @@
         <!-- Empty placeholder for easier customization. -->
         <!-- You can override this target in the ../build.xml file. -->
     </target>
-    <target depends="init,compile,-pre-pre-jar,-pre-jar" if="do.archive" name="-do-jar-without-manifest" unless="manifest.available">
+    <target depends="init,compile,-pre-pre-jar,-pre-jar" if="do.archive" name="-do-jar-without-manifest" unless="manifest.available-mkdist.available">
         <j2seproject1:jar/>
     </target>
-    <target depends="init,compile,-pre-pre-jar,-pre-jar" if="do.archive+manifest.available" name="-do-jar-with-manifest" unless="manifest.available+main.class">
+    <target depends="init,compile,-pre-pre-jar,-pre-jar" if="do.archive+manifest.available" name="-do-jar-with-manifest" unless="manifest.available+main.class-mkdist.available">
         <j2seproject1:jar manifest="${manifest.file}"/>
     </target>
     <target depends="init,compile,-pre-pre-jar,-pre-jar" if="do.archive+manifest.available+main.class" name="-do-jar-with-mainclass" unless="manifest.available+main.class+mkdist.available">
@@ -583,44 +655,53 @@
                 <j2seproject1:attribute name="Main-Class" value="${main.class}"/>
             </j2seproject1:manifest>
         </j2seproject1:jar>
-        <echo>To run this application from the command line without Ant, try:</echo>
+        <echo level="info">To run this application from the command line without Ant, try:</echo>
         <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
         <property location="${dist.jar}" name="dist.jar.resolved"/>
         <pathconvert property="run.classpath.with.dist.jar">
             <path path="${run.classpath}"/>
             <map from="${build.classes.dir.resolved}" to="${dist.jar.resolved}"/>
         </pathconvert>
-        <echo>java -cp "${run.classpath.with.dist.jar}" ${main.class}</echo>
+        <echo level="info">java -cp "${run.classpath.with.dist.jar}" ${main.class}</echo>
     </target>
-    <target depends="init,compile,-pre-pre-jar,-pre-jar,-init-macrodef-copylibs" if="do.archive+manifest.available+main.class+mkdist.available+splashscreen.available" name="-do-jar-with-libraries-and-splashscreen">
+    <target depends="init" if="do.archive" name="-do-jar-with-libraries-create-manifest" unless="manifest.available">
+        <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/>
+        <touch file="${tmp.manifest.file}" verbose="false"/>
+    </target>
+    <target depends="init" if="do.archive+manifest.available" name="-do-jar-with-libraries-copy-manifest">
+        <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/>
+        <copy file="${manifest.file}" tofile="${tmp.manifest.file}"/>
+    </target>
+    <target depends="init,-do-jar-with-libraries-create-manifest,-do-jar-with-libraries-copy-manifest" if="do.archive+main.class.available" name="-do-jar-with-libraries-set-main">
+        <manifest file="${tmp.manifest.file}" mode="update">
+            <attribute name="Main-Class" value="${main.class}"/>
+        </manifest>
+    </target>
+    <target depends="init,-do-jar-with-libraries-create-manifest,-do-jar-with-libraries-copy-manifest" if="do.archive+splashscreen.available" name="-do-jar-with-libraries-set-splashscreen">
         <basename file="${application.splash}" property="splashscreen.basename"/>
         <mkdir dir="${build.classes.dir}/META-INF"/>
         <copy failonerror="false" file="${application.splash}" todir="${build.classes.dir}/META-INF"/>
-        <j2seproject3:copylibs>
-            <customize>
-                <attribute name="Main-Class" value="${main.class}"/>
-                <attribute name="SplashScreen-Image" value="META-INF/${splashscreen.basename}"/>
-            </customize>
-        </j2seproject3:copylibs>
-        <echo>To run this application from the command line without Ant, try:</echo>
+        <manifest file="${tmp.manifest.file}" mode="update">
+            <attribute name="SplashScreen-Image" value="META-INF/${splashscreen.basename}"/>
+        </manifest>
+    </target>
+    <target depends="init,-init-macrodef-copylibs,compile,-pre-pre-jar,-pre-jar,-do-jar-with-libraries-create-manifest,-do-jar-with-libraries-copy-manifest,-do-jar-with-libraries-set-main,-do-jar-with-libraries-set-splashscreen" if="do.mkdist" name="-do-jar-with-libraries-pack">
+        <j2seproject3:copylibs manifest="${tmp.manifest.file}"/>
+        <echo level="info">To run this application from the command line without Ant, try:</echo>
         <property location="${dist.jar}" name="dist.jar.resolved"/>
-        <echo>java -jar "${dist.jar.resolved}"</echo>
+        <echo level="info">java -jar "${dist.jar.resolved}"</echo>
     </target>
-    <target depends="init,compile,-pre-pre-jar,-pre-jar,-init-macrodef-copylibs" if="do.archive+manifest.available+main.class+mkdist.available" name="-do-jar-with-libraries" unless="splashscreen.available">
-        <j2seproject3:copylibs>
-            <customize>
-                <attribute name="Main-Class" value="${main.class}"/>
-            </customize>
-        </j2seproject3:copylibs>
-        <echo>To run this application from the command line without Ant, try:</echo>
-        <property location="${dist.jar}" name="dist.jar.resolved"/>
-        <echo>java -jar "${dist.jar.resolved}"</echo>
+    <target depends="-do-jar-with-libraries-pack" if="do.archive" name="-do-jar-with-libraries-delete-manifest">
+        <delete>
+            <fileset file="${tmp.manifest.file}"/>
+        </delete>
     </target>
+    <target depends="init,compile,-pre-pre-jar,-pre-jar,-do-jar-with-libraries-create-manifest,-do-jar-with-libraries-copy-manifest,-do-jar-with-libraries-set-main,-do-jar-with-libraries-set-splashscreen,-do-jar-with-libraries-pack,-do-jar-with-libraries-delete-manifest" name="-do-jar-with-libraries"/>
     <target name="-post-jar">
         <!-- Empty placeholder for easier customization. -->
         <!-- You can override this target in the ../build.xml file. -->
     </target>
-    <target depends="init,compile,-pre-jar,-do-jar-with-manifest,-do-jar-without-manifest,-do-jar-with-mainclass,-do-jar-with-libraries-and-splashscreen,-do-jar-with-libraries,-post-jar" description="Build JAR." name="jar"/>
+    <target depends="init,compile,-pre-jar,-do-jar-with-manifest,-do-jar-without-manifest,-do-jar-with-mainclass,-do-jar-with-libraries,-post-jar" description="Build JAR." name="jar"/>
     <!--
                 =================
                 EXECUTION SECTION
@@ -686,6 +767,72 @@
     </target>
     <target depends="init,-pre-debug-fix,-do-debug-fix" if="netbeans.home" name="debug-fix"/>
     <!--
+                =================
+                PROFILING SECTION
+                =================
+            -->
+    <target depends="profile-init,compile" description="Profile a project in the IDE." if="netbeans.home" name="profile">
+        <nbprofiledirect>
+            <classpath>
+                <path path="${run.classpath}"/>
+            </classpath>
+        </nbprofiledirect>
+        <profile/>
+    </target>
+    <target depends="profile-init,compile-single" description="Profile a selected class in the IDE." if="netbeans.home" name="profile-single">
+        <fail unless="profile.class">Must select one file in the IDE or set profile.class</fail>
+        <nbprofiledirect>
+            <classpath>
+                <path path="${run.classpath}"/>
+            </classpath>
+        </nbprofiledirect>
+        <profile classname="${profile.class}"/>
+    </target>
+    <!--
+                =========================
+                APPLET PROFILING  SECTION
+                =========================
+            -->
+    <target depends="profile-init,compile-single" if="netbeans.home" name="profile-applet">
+        <nbprofiledirect>
+            <classpath>
+                <path path="${run.classpath}"/>
+            </classpath>
+        </nbprofiledirect>
+        <profile classname="sun.applet.AppletViewer">
+            <customize>
+                <arg value="${applet.url}"/>
+            </customize>
+        </profile>
+    </target>
+    <!--
+                =========================
+                TESTS PROFILING  SECTION
+                =========================
+            -->
+    <target depends="profile-init,compile-test-single" if="netbeans.home" name="profile-test-single">
+        <nbprofiledirect>
+            <classpath>
+                <path path="${run.test.classpath}"/>
+            </classpath>
+        </nbprofiledirect>
+        <junit dir="${profiler.info.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" jvm="${profiler.info.jvm}" showoutput="true">
+            <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/>
+            <jvmarg value="${profiler.info.jvmargs.agent}"/>
+            <jvmarg line="${profiler.info.jvmargs}"/>
+            <test name="${profile.class}"/>
+            <classpath>
+                <path path="${run.test.classpath}"/>
+            </classpath>
+            <syspropertyset>
+                <propertyref prefix="test-sys-prop."/>
+                <mapper from="test-sys-prop.*" to="*" type="glob"/>
+            </syspropertyset>
+            <formatter type="brief" usefile="false"/>
+            <formatter type="xml"/>
+        </junit>
+    </target>
+    <!--
                 ===============
                 JAVADOC SECTION
                 ===============
@@ -731,7 +878,7 @@
     <target if="do.depend.true" name="-compile-test-depend">
         <j2seproject3:depend classpath="${javac.test.classpath}" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/>
     </target>
-    <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-compile-test-depend" if="have.tests" name="-do-compile-test">
+    <target depends="init,deps-jar,compile,-pre-pre-compile-test,-pre-compile-test,-compile-test-depend" if="have.tests" name="-do-compile-test">
         <j2seproject3:javac apgeneratedsrcdir="${build.test.classes.dir}" classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" processorpath="${javac.test.processorpath}" srcdir="${test.src.dir}"/>
         <copy todir="${build.test.classes.dir}">
             <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
@@ -746,7 +893,7 @@
         <!-- Empty placeholder for easier customization. -->
         <!-- You can override this target in the ../build.xml file. -->
     </target>
-    <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single" if="have.tests" name="-do-compile-test-single">
+    <target depends="init,deps-jar,compile,-pre-pre-compile-test,-pre-compile-test-single" if="have.tests" name="-do-compile-test-single">
         <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
         <j2seproject3:force-recompile destdir="${build.test.classes.dir}"/>
         <j2seproject3:javac apgeneratedsrcdir="${build.test.classes.dir}" classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" excludes="" includes="${javac.includes}" processorpath="${javac.test.processorpath}" sourcepath="${test.src.dir}" srcdir="${test.src.dir}"/>
diff -r 60658773f604 -r b0f7d9ab4a07 java/nekurak.net-lib/nbproject/genfiles.properties
--- a/java/nekurak.net-lib/nbproject/genfiles.properties	Sun Jul 10 20:17:56 2011 +0200
+++ b/java/nekurak.net-lib/nbproject/genfiles.properties	Fri Jul 15 22:25:39 2011 +0200
@@ -4,5 +4,5 @@
 # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
 # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
 nbproject/build-impl.xml.data.CRC32=11ce77af
-nbproject/build-impl.xml.script.CRC32=827b6ce9
-nbproject/build-impl.xml.stylesheet.CRC32=229523de@1.38.3.45
+nbproject/build-impl.xml.script.CRC32=2e465a03
+nbproject/build-impl.xml.stylesheet.CRC32=0c01fd8e@1.43.1.45
diff -r 60658773f604 -r b0f7d9ab4a07 java/nekurak.net-lib/nbproject/project.properties
--- a/java/nekurak.net-lib/nbproject/project.properties	Sun Jul 10 20:17:56 2011 +0200
+++ b/java/nekurak.net-lib/nbproject/project.properties	Fri Jul 15 22:25:39 2011 +0200
@@ -1,3 +1,8 @@
+annotation.processing.enabled=true
+annotation.processing.enabled.in.editor=false
+annotation.processing.run.all.processors=true
+application.title=nekurak.net-lib
+application.vendor=fiki
 build.classes.dir=${build.dir}/classes
 build.classes.excludes=**/*.java,**/*.form
 # This directory is removed when the project is cleaned:
@@ -18,6 +23,7 @@
 dist.dir=dist
 dist.jar=${dist.dir}/nekurak.net-lib.jar
 dist.javadoc.dir=${dist.dir}/javadoc
+endorsed.classpath=
 excludes=
 includes=**
 jar.compress=false
@@ -26,8 +32,10 @@
 # Space-separated list of extra javac options
 javac.compilerargs=
 javac.deprecation=false
-javac.source=1.5
-javac.target=1.5
+javac.processorpath=\
+    ${javac.classpath}
+javac.source=1.6
+javac.target=1.6
 javac.test.classpath=\
     ${javac.classpath}:\
     ${build.classes.dir}:\
@@ -44,6 +52,7 @@
 javadoc.version=false
 javadoc.windowtitle=
 meta.inf.dir=${src.dir}/META-INF
+mkdist.disabled=false
 platform.active=default_platform
 run.classpath=\
     ${javac.classpath}:\
diff -r 60658773f604 -r b0f7d9ab4a07 java/nekurak.net-lib/src/cz/frantovo/nekurak/dto/Podnik.java
--- a/java/nekurak.net-lib/src/cz/frantovo/nekurak/dto/Podnik.java	Sun Jul 10 20:17:56 2011 +0200
+++ b/java/nekurak.net-lib/src/cz/frantovo/nekurak/dto/Podnik.java	Fri Jul 15 22:25:39 2011 +0200
@@ -73,7 +73,7 @@
 
 	/**
 	 * Získá z URL webové stránky podniku doménové jméno převedené na malá písmena.
-	 * Např. z „http://www.example.com/index.html“ získá „www.example.com“.
+	 * Např. z „http://www.Example.COM/index.html“ získá „www.example.com“.
 	 * @return doménové jméno nebo null v případě chyby.
 	 */
 	public String getUrlDomena() {
diff -r 60658773f604 -r b0f7d9ab4a07 java/nekurak.net-rest/nbproject/ant-deploy.xml
--- a/java/nekurak.net-rest/nbproject/ant-deploy.xml	Sun Jul 10 20:17:56 2011 +0200
+++ b/java/nekurak.net-rest/nbproject/ant-deploy.xml	Fri Jul 15 22:25:39 2011 +0200
@@ -3,6 +3,7 @@
     <target name="-init-cl-deployment-env" if="deploy.ant.enabled">
         <property file="${deploy.ant.properties.file}" />
         <available file="${deploy.ant.docbase.dir}/WEB-INF/sun-web.xml" property="sun.web.present"/>
+        <available file="${deploy.ant.docbase.dir}/WEB-INF/glassfish-web.xml" property="glassfish.web.present"/>
         <available file="${deploy.ant.resource.dir}" property="has.setup"/>
         <tempfile prefix="gfv3" property="gfv3.password.file" destdir="${java.io.tmpdir}"/>  <!-- do not forget to delete this! -->
         <echo message="AS_ADMIN_PASSWORD=${gfv3.password}" file="${gfv3.password.file}"/>
@@ -23,8 +24,34 @@
         <xmlproperty file="${temp.sun.web}" validate="false">
         </xmlproperty>    
         <delete file="${temp.sun.web}"/>
-        <property name="deploy.ant.client.url" value="${gfv3.url}${sun-web-app.context-root}"/>
-        <property name="deploy.context.root.argument" value="&amp;contextroot=${sun-web-app.context-root}"/>
+        <condition property="deploy.ant.client.url" value="${gfv3.url}${sun-web-app.context-root}" else="${gfv3.url}/${ant.project.name}">
+            <isset property="sun-web-app.context-root"/>
+        </condition>
+        <condition property="deploy.context.root.argument" value="&amp;contextroot=${sun-web-app.context-root}" else="/${ant.project.name}">
+            <isset property="sun-web-app.context-root"/>
+        </condition>
+    </target>
+    <target name="-parse-glassfish-web" depends="-init-cl-deployment-env" if="glassfish.web.present">
+        <tempfile prefix="gfv3" property="temp.gf.web" destdir="${java.io.tmpdir}"/>
+        <copy file="${deploy.ant.docbase.dir}/WEB-INF/glassfish-web.xml" tofile="${temp.gf.web}"/>
+        <!-- The doctype triggers resolution which can fail -->
+        <replace file="${temp.gf.web}">
+            <replacetoken><![CDATA[<!DOCTYPE]]></replacetoken>
+            <replacevalue><![CDATA[<!-- <!DOCTYPE]]></replacevalue>
+        </replace>
+        <replace file="${temp.gf.web}">
+            <replacetoken><![CDATA[<glassfish-web-app]]></replacetoken>
+            <replacevalue><![CDATA[--> <glassfish-web-app]]></replacevalue>
+        </replace>
+        <xmlproperty file="${temp.gf.web}" validate="false">
+        </xmlproperty>
+        <delete file="${temp.gf.web}"/>
+        <condition property="deploy.ant.client.url" value="${gfv3.url}${glassfish-web-app.context-root}" else="${gfv3.url}/${ant.project.name}">
+            <isset property="glassfish-web-app.context-root"/>
+        </condition>
+        <condition property="deploy.context.root.argument" value="&amp;contextroot=${glassfish-web-app.context-root}" else="/${ant.project.name}">
+            <isset property="glassfish-web-app.context-root"/>
+        </condition>
     </target>
     <target name="-no-parse-sun-web" depends="-init-cl-deployment-env" unless="sun.web.present">
         <property name="deploy.context.root.argument" value=""/>
@@ -33,7 +60,6 @@
         <tempfile prefix="gfv3" property="gfv3.resources.dir" destdir="${java.io.tmpdir}"/>
         <mkdir dir="${gfv3.resources.dir}"/>
         <mkdir dir="${gfv3.resources.dir}/META-INF"/>
-        <property name="gfv3.resources.file" value="${gfv3.resources.dir}/META-INF/sun-resources.xml"/>
         <copy todir="${gfv3.resources.dir}/META-INF">
             <fileset dir="${deploy.ant.resource.dir}"/>
         </copy>
@@ -42,7 +68,7 @@
         </jar>
         <delete dir="${gfv3.resources.dir}"/>
     </target>
-    <target name="-deploy-ant" depends="-parse-sun-web,-no-parse-sun-web,-add-resources" if="deploy.ant.enabled">
+    <target name="-deploy-ant" depends="-parse-glassfish-web, -parse-sun-web, -no-parse-sun-web,-add-resources" if="deploy.ant.enabled">
         <antcall target="-deploy-without-pw"/>
         <antcall target="-deploy-with-pw"/>
     </target>
diff -r 60658773f604 -r b0f7d9ab4a07 java/nekurak.net-rest/nbproject/build-impl.xml
--- a/java/nekurak.net-rest/nbproject/build-impl.xml	Sun Jul 10 20:17:56 2011 +0200
+++ b/java/nekurak.net-rest/nbproject/build-impl.xml	Fri Jul 15 22:25:39 2011 +0200
@@ -174,8 +174,20 @@
         <property name="runmain.jvmargs" value=""/>
         <path id="endorsed.classpath.path" path="${endorsed.classpath}"/>
         <condition else="" property="endorsed.classpath.cmd.line.arg" value="-Xbootclasspath/p:'${toString:endorsed.classpath.path}'">
-            <length length="0" string="${endorsed.classpath}" when="greater"/>
+            <and>
+                <isset property="endorsed.classpath"/>
+                <length length="0" string="${endorsed.classpath}" when="greater"/>
+            </and>
         </condition>
+        <condition else="false" property="jdkBug6558476">
+            <and>
+                <matches pattern="1\.[56]" string="${java.specification.version}"/>
+                <not>
+                    <os family="unix"/>
+                </not>
+            </and>
+        </condition>
+        <property name="javac.fork" value="${jdkBug6558476}"/>
     </target>
     <target depends="init" name="-init-cos" unless="deploy.on.save">
         <condition property="deploy.on.save" value="true">
@@ -246,7 +258,7 @@
                 <property location="${build.dir}/empty" name="empty.dir"/>
                 <mkdir dir="${empty.dir}"/>
                 <mkdir dir="@{apgeneratedsrcdir}"/>
-                <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" includeantruntime="false" includes="@{includes}" source="${javac.source}" srcdir="@{srcdir}" target="${javac.target}">
+                <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" fork="${javac.fork}" includeantruntime="false" includes="@{includes}" source="${javac.source}" srcdir="@{srcdir}" target="${javac.target}">
                     <src>
                         <dirset dir="@{gensrcdir}" erroronmissingdir="false">
                             <include name="*"/>
@@ -316,15 +328,18 @@
             <attribute default="${build.classes.dir}" name="destdir"/>
             <sequential>
                 <fail unless="javac.includes">Must set javac.includes</fail>
-                <pathconvert pathsep="," property="javac.includes.binary">
+                <pathconvert pathsep="${line.separator}" property="javac.includes.binary">
                     <path>
                         <filelist dir="@{destdir}" files="${javac.includes}"/>
                     </path>
                     <globmapper from="*.java" to="*.class"/>
                 </pathconvert>
+                <tempfile deleteonexit="true" property="javac.includesfile.binary"/>
+                <echo file="${javac.includesfile.binary}" message="${javac.includes.binary}"/>
                 <delete>
-                    <files includes="${javac.includes.binary}"/>
+                    <files includesfile="${javac.includesfile.binary}"/>
                 </delete>
+                <delete file="${javac.includesfile.binary}"/>
             </sequential>
         </macrodef>
     </target>
@@ -350,6 +365,7 @@
                     <formatter type="brief" usefile="false"/>
                     <formatter type="xml"/>
                     <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
+                    <jvmarg value="-ea"/>
                     <jvmarg line="${runmain.jvmargs}"/>
                 </junit>
             </sequential>
@@ -493,6 +509,19 @@
     <target depends="-init-ap-cmdline-properties,-init-ap-cmdline-supported" name="-init-ap-cmdline">
         <property name="ap.cmd.line.internal" value=""/>
     </target>
+    <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-check" name="profile-init"/>
+    <target name="-profile-pre-init">
+        <!-- Empty placeholder for easier customization. -->
+        <!-- You can override this target in the ../build.xml file. -->
+    </target>
+    <target name="-profile-post-init">
+        <!-- Empty placeholder for easier customization. -->
+        <!-- You can override this target in the ../build.xml file. -->
+    </target>
+    <target depends="-profile-pre-init, init, -profile-post-init" name="-profile-init-check">
+        <fail unless="profiler.info.jvm">Must set JVM to use for profiling in profiler.info.jvm</fail>
+        <fail unless="profiler.info.jvmargs.agent">Must set profiler agent JVM arguments in profiler.info.jvmargs.agent</fail>
+    </target>
     <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init,-post-init,-init-check,-init-macrodef-property,-init-macrodef-javac,-init-macrodef-junit,-init-macrodef-java,-init-macrodef-nbjpda,-init-macrodef-nbjsdebug,-init-macrodef-debug,-init-taskdefs,-init-ap-cmdline" name="init"/>
     <!--
                 COMPILATION SECTION
@@ -562,6 +591,8 @@
         <!-- You can override this target in the ../build.xml file. -->
     </target>
     <target depends="init,deps-jar,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single" name="compile-single"/>
+    <property name="jspc.schemas" value="/resources/schemas/"/>
+    <property name="jspc.dtds" value="/resources/dtds/"/>
     <target depends="compile" description="Test compile JSP pages to expose compilation errors." if="do.compile.jsps" name="compile-jsps">
         <mkdir dir="${build.generated.dir}/src"/>
         <java classname="org.netbeans.modules.web.project.ant.JspC" failonerror="true" fork="true">
@@ -570,9 +601,12 @@
             <arg value="-d"/>
             <arg file="${basedir}/${build.generated.dir}/src"/>
             <arg value="-die1"/>
+            <arg value="-schemas ${jspc.schemas}"/>
+            <arg value="-dtds ${jspc.dtds}"/>
             <arg value="-compilerSourceVM ${javac.source}"/>
             <arg value="-compilerTargetVM ${javac.target}"/>
             <arg value="-javaEncoding ${source.encoding}"/>
+            <arg value="-sysClasspath ${libs.jsp-compilation-syscp.classpath}"/>
             <classpath path="${java.home}/../lib/tools.jar:${libs.jsp-compiler.classpath}:${libs.jsp-compilation.classpath}"/>
         </java>
         <mkdir dir="${build.generated.dir}/classes"/>
@@ -587,6 +621,9 @@
             <arg value="-d"/>
             <arg file="${basedir}/${build.generated.dir}/src"/>
             <arg value="-die1"/>
+            <arg value="-schemas ${jspc.schemas}"/>
+            <arg value="-dtds ${jspc.dtds}"/>
+            <arg value="-sysClasspath ${libs.jsp-compilation-syscp.classpath}"/>
             <arg value="-jspc.files"/>
             <arg path="${jsp.includes}"/>
             <arg value="-compilerSourceVM ${javac.source}"/>
@@ -828,6 +865,35 @@
     </target>
     <target depends="init,-pre-debug-fix,-do-debug-fix" if="netbeans.home" name="debug-fix"/>
     <!--
+            =================
+            PROFILING SECTION
+            =================
+            -->
+    <target description="Profile a J2EE project in the IDE." name="profile">
+        <condition else="start-profiled-server" property="profiler.startserver.target" value="start-profiled-server-extraargs">
+            <isset property="profiler.info.jvmargs.extra"/>
+        </condition>
+        <antcall target="${profiler.startserver.target}"/>
+        <antcall target="run"/>
+        <antcall target="start-loadgen"/>
+    </target>
+    <target name="start-profiled-server">
+        <nbstartprofiledserver forceRestart="${profiler.j2ee.serverForceRestart}" javaPlatform="${profiler.info.javaPlatform}" startupTimeout="${profiler.j2ee.serverStartupTimeout}">
+            <jvmarg value="${profiler.info.jvmargs.agent}"/>
+            <jvmarg value="${profiler.j2ee.agentID}"/>
+        </nbstartprofiledserver>
+    </target>
+    <target name="start-profiled-server-extraargs">
+        <nbstartprofiledserver forceRestart="${profiler.j2ee.serverForceRestart}" javaPlatform="${profiler.info.javaPlatform}" startupTimeout="${profiler.j2ee.serverStartupTimeout}">
+            <jvmarg value="${profiler.info.jvmargs.extra}"/>
+            <jvmarg value="${profiler.info.jvmargs.agent}"/>
+            <jvmarg value="${profiler.j2ee.agentID}"/>
+        </nbstartprofiledserver>
+    </target>
+    <target if="profiler.loadgen.path" name="start-loadgen">
+        <loadgenstart path="${profiler.loadgen.path}"/>
+    </target>
+    <!--
                 JAVADOC SECTION
             -->
     <target depends="init" if="have.sources" name="javadoc-build">
@@ -949,6 +1015,35 @@
     </target>
     <target depends="init,-pre-debug-fix,-do-debug-fix-test" if="netbeans.home" name="debug-fix-test"/>
     <!--
+        =========================
+        TESTS PROFILING  SECTION
+        =========================
+        -->
+    <target depends="profile-init,compile-test-single" if="netbeans.home" name="profile-test-single">
+        <nbprofiledirect>
+            <classpath>
+                <path path="${run.test.classpath}"/>
+                <path path="${j2ee.platform.classpath}"/>
+            </classpath>
+        </nbprofiledirect>
+        <junit dir="${profiler.info.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" jvm="${profiler.info.jvm}" showoutput="true">
+            <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/>
+            <jvmarg value="${profiler.info.jvmargs.agent}"/>
+            <jvmarg line="${profiler.info.jvmargs}"/>
+            <test name="${profile.class}"/>
+            <classpath>
+                <path path="${run.test.classpath}"/>
+                <path path="${j2ee.platform.classpath}"/>
+            </classpath>
+            <syspropertyset>
+                <propertyref prefix="test-sys-prop."/>
+                <mapper from="test-sys-prop.*" to="*" type="glob"/>
+            </syspropertyset>
+            <formatter type="brief" usefile="false"/>
+            <formatter type="xml"/>
+        </junit>
+    </target>
+    <!--
                 
                 CLEANUP SECTION
             -->
diff -r 60658773f604 -r b0f7d9ab4a07 java/nekurak.net-rest/nbproject/genfiles.properties
--- a/java/nekurak.net-rest/nbproject/genfiles.properties	Sun Jul 10 20:17:56 2011 +0200
+++ b/java/nekurak.net-rest/nbproject/genfiles.properties	Fri Jul 15 22:25:39 2011 +0200
@@ -1,11 +1,11 @@
 build.xml.data.CRC32=35b9fabc
 build.xml.script.CRC32=fb1b7f84
-build.xml.stylesheet.CRC32=651128d4@1.24.1.1
+build.xml.stylesheet.CRC32=651128d4@1.31.2.1
 # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
 # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
 nbproject/build-impl.xml.data.CRC32=35b9fabc
-nbproject/build-impl.xml.script.CRC32=6da89432
-nbproject/build-impl.xml.stylesheet.CRC32=8419264d@1.24.2.1
+nbproject/build-impl.xml.script.CRC32=1ed11878
+nbproject/build-impl.xml.stylesheet.CRC32=8ca9f0e6@1.31.2.1
 nbproject/rest-build.xml.data.CRC32=d32e8880
 nbproject/rest-build.xml.script.CRC32=23da2c77
 nbproject/rest-build.xml.stylesheet.CRC32=ddd64843@1.4.1
diff -r 60658773f604 -r b0f7d9ab4a07 java/nekurak.net-rest/nbproject/project.properties
--- a/java/nekurak.net-rest/nbproject/project.properties	Sun Jul 10 20:17:56 2011 +0200
+++ b/java/nekurak.net-rest/nbproject/project.properties	Fri Jul 15 22:25:39 2011 +0200
@@ -1,6 +1,5 @@
 annotation.processing.enabled=true
 annotation.processing.enabled.in.editor=true
-annotation.processing.processors.list=
 annotation.processing.run.all.processors=true
 annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output
 build.classes.dir=${build.web.dir}/WEB-INF/classes
@@ -27,9 +26,10 @@
     ${libs.javaee-endorsed-api-6.0.classpath}
 excludes=
 includes=**
+j2ee.compile.on.save=false
 j2ee.deploy.on.save=false
 j2ee.platform=1.6-web
-j2ee.platform.classpath=${j2ee.server.home}/modules/javax.servlet.jar:${j2ee.server.home}/modules/jstl-impl.jar:${j2ee.server.home}/modules/javax.ejb.jar:${j2ee.server.home}/modules/javax.enterprise.deploy.jar:${j2ee.server.home}/modules/javax.security.jacc.jar:${j2ee.server.home}/modules/bean-validator.jar:${j2ee.server.home}/modules/javax.transaction.jar:${j2ee.server.home}/modules/jsr311-api.jar:${j2ee.server.home}/modules/jsf-api.jar:${j2ee.server.home}/modules/javax.security.auth.message.jar:${j2ee.server.home}/modules/javax.servlet.jsp.jar:${j2ee.server.home}/modules/endorsed/javax.annotation.jar:${j2ee.server.home}/modules/javax.management.j2ee.jar:${j2ee.server.home}/modules/endorsed/webservices-api-osgi.jar:${j2ee.server.home}/modules/endorsed/jaxb-api-osgi.jar:${j2ee.server.home}/modules/javax.jms.jar:${j2ee.server.home}/modules/javax.persistence.jar:${j2ee.server.home}/modules/javax.servlet.jsp.jstl.jar:${j2ee.server.home}/modules/javax.resource.jar:${j2ee.server.home}/modules/weld-osgi-bundle.jar:${j2ee.server.home}/modules/jsf-impl.jar:${j2ee.server.home}/modules/mail.jar
+j2ee.platform.classpath=${j2ee.server.home}/modules/endorsed/javax.annotation.jar:${j2ee.server.home}/modules/javax.transaction.jar:${j2ee.server.home}/modules/jsf-api.jar:${j2ee.server.home}/modules/jsf-impl.jar:${j2ee.server.home}/modules/jaxrpc-api-osgi.jar:${j2ee.server.home}/modules/javax.enterprise.deploy.jar:${j2ee.server.home}/modules/javax.resource.jar:${j2ee.server.home}/modules/jstl-impl.jar:${j2ee.server.home}/modules/jersey-core.jar:${j2ee.server.home}/modules/javax.security.auth.message.jar:${j2ee.server.home}/modules/javax.servlet.jar:${j2ee.server.home}/modules/javax.servlet.jsp.jstl.jar:${j2ee.server.home}/modules/javax.ejb.jar:${j2ee.server.home}/modules/javax.servlet.jsp.jar:${j2ee.server.home}/modules/bean-validator.jar:${j2ee.server.home}/modules/javax.management.j2ee.jar:${j2ee.server.home}/modules/weld-osgi-bundle.jar:${j2ee.server.home}/modules/javax.mail.jar:${j2ee.server.home}/modules/javax.jms.jar:${j2ee.server.home}/modules/endorsed/jaxb-api-osgi.jar:${j2ee.server.home}/modules/endorsed/webservices-api-osgi.jar:${j2ee.server.home}/modules/javax.security.jacc.jar:${j2ee.server.home}/modules/javax.persistence.jar
 j2ee.platform.embeddableejb.classpath=${j2ee.server.home}/lib/embedded/glassfish-embedded-static-shell.jar
 j2ee.platform.wscompile.classpath=${j2ee.server.home}/modules/webservices-osgi.jar
 j2ee.platform.wsgen.classpath=${j2ee.server.home}/modules/webservices-osgi.jar:${j2ee.server.home}/modules/endorsed/webservices-api-osgi.jar:${j2ee.server.home}/modules/jaxb-osgi.jar:${j2ee.server.home}/modules/endorsed/jaxb-api-osgi.jar:${j2ee.server.home}/modules/javax.ejb.jar
@@ -43,9 +43,10 @@
 javac.compilerargs=
 javac.debug=true
 javac.deprecation=false
-javac.processorpath=${javac.classpath}
-javac.source=1.5
-javac.target=1.5
+javac.processorpath=\
+    ${javac.classpath}
+javac.source=1.6
+javac.target=1.6
 javac.test.classpath=\
     ${javac.classpath}:\
     ${build.classes.dir}:\
diff -r 60658773f604 -r b0f7d9ab4a07 java/nekurak.net-web/nbproject/ant-deploy.xml
--- a/java/nekurak.net-web/nbproject/ant-deploy.xml	Sun Jul 10 20:17:56 2011 +0200
+++ b/java/nekurak.net-web/nbproject/ant-deploy.xml	Fri Jul 15 22:25:39 2011 +0200
@@ -3,6 +3,7 @@
     <target name="-init-cl-deployment-env" if="deploy.ant.enabled">
         <property file="${deploy.ant.properties.file}" />
         <available file="${deploy.ant.docbase.dir}/WEB-INF/sun-web.xml" property="sun.web.present"/>
+        <available file="${deploy.ant.docbase.dir}/WEB-INF/glassfish-web.xml" property="glassfish.web.present"/>
         <available file="${deploy.ant.resource.dir}" property="has.setup"/>
         <tempfile prefix="gfv3" property="gfv3.password.file" destdir="${java.io.tmpdir}"/>  <!-- do not forget to delete this! -->
         <echo message="AS_ADMIN_PASSWORD=${gfv3.password}" file="${gfv3.password.file}"/>
@@ -23,8 +24,34 @@
         <xmlproperty file="${temp.sun.web}" validate="false">
         </xmlproperty>    
         <delete file="${temp.sun.web}"/>
-        <property name="deploy.ant.client.url" value="${gfv3.url}${sun-web-app.context-root}"/>
-        <property name="deploy.context.root.argument" value="&amp;contextroot=${sun-web-app.context-root}"/>
+        <condition property="deploy.ant.client.url" value="${gfv3.url}${sun-web-app.context-root}" else="${gfv3.url}/${ant.project.name}">
+            <isset property="sun-web-app.context-root"/>
+        </condition>
+        <condition property="deploy.context.root.argument" value="&amp;contextroot=${sun-web-app.context-root}" else="/${ant.project.name}">
+            <isset property="sun-web-app.context-root"/>
+        </condition>
+    </target>
+    <target name="-parse-glassfish-web" depends="-init-cl-deployment-env" if="glassfish.web.present">
+        <tempfile prefix="gfv3" property="temp.gf.web" destdir="${java.io.tmpdir}"/>
+        <copy file="${deploy.ant.docbase.dir}/WEB-INF/glassfish-web.xml" tofile="${temp.gf.web}"/>
+        <!-- The doctype triggers resolution which can fail -->
+        <replace file="${temp.gf.web}">
+            <replacetoken><![CDATA[<!DOCTYPE]]></replacetoken>
+            <replacevalue><![CDATA[<!-- <!DOCTYPE]]></replacevalue>
+        </replace>
+        <replace file="${temp.gf.web}">
+            <replacetoken><![CDATA[<glassfish-web-app]]></replacetoken>
+            <replacevalue><![CDATA[--> <glassfish-web-app]]></replacevalue>
+        </replace>
+        <xmlproperty file="${temp.gf.web}" validate="false">
+        </xmlproperty>
+        <delete file="${temp.gf.web}"/>
+        <condition property="deploy.ant.client.url" value="${gfv3.url}${glassfish-web-app.context-root}" else="${gfv3.url}/${ant.project.name}">
+            <isset property="glassfish-web-app.context-root"/>
+        </condition>
+        <condition property="deploy.context.root.argument" value="&amp;contextroot=${glassfish-web-app.context-root}" else="/${ant.project.name}">
+            <isset property="glassfish-web-app.context-root"/>
+        </condition>
     </target>
     <target name="-no-parse-sun-web" depends="-init-cl-deployment-env" unless="sun.web.present">
         <property name="deploy.context.root.argument" value=""/>
@@ -33,7 +60,6 @@
         <tempfile prefix="gfv3" property="gfv3.resources.dir" destdir="${java.io.tmpdir}"/>
         <mkdir dir="${gfv3.resources.dir}"/>
         <mkdir dir="${gfv3.resources.dir}/META-INF"/>
-        <property name="gfv3.resources.file" value="${gfv3.resources.dir}/META-INF/sun-resources.xml"/>
         <copy todir="${gfv3.resources.dir}/META-INF">
             <fileset dir="${deploy.ant.resource.dir}"/>
         </copy>
@@ -42,7 +68,7 @@
         </jar>
         <delete dir="${gfv3.resources.dir}"/>
     </target>
-    <target name="-deploy-ant" depends="-parse-sun-web,-no-parse-sun-web,-add-resources" if="deploy.ant.enabled">
+    <target name="-deploy-ant" depends="-parse-glassfish-web, -parse-sun-web, -no-parse-sun-web,-add-resources" if="deploy.ant.enabled">
         <antcall target="-deploy-without-pw"/>
         <antcall target="-deploy-with-pw"/>
     </target>
diff -r 60658773f604 -r b0f7d9ab4a07 java/nekurak.net-web/nbproject/build-impl.xml
--- a/java/nekurak.net-web/nbproject/build-impl.xml	Sun Jul 10 20:17:56 2011 +0200
+++ b/java/nekurak.net-web/nbproject/build-impl.xml	Fri Jul 15 22:25:39 2011 +0200
@@ -174,8 +174,20 @@
         <property name="runmain.jvmargs" value=""/>
         <path id="endorsed.classpath.path" path="${endorsed.classpath}"/>
         <condition else="" property="endorsed.classpath.cmd.line.arg" value="-Xbootclasspath/p:'${toString:endorsed.classpath.path}'">
-            <length length="0" string="${endorsed.classpath}" when="greater"/>
+            <and>
+                <isset property="endorsed.classpath"/>
+                <length length="0" string="${endorsed.classpath}" when="greater"/>
+            </and>
         </condition>
+        <condition else="false" property="jdkBug6558476">
+            <and>
+                <matches pattern="1\.[56]" string="${java.specification.version}"/>
+                <not>
+                    <os family="unix"/>
+                </not>
+            </and>
+        </condition>
+        <property name="javac.fork" value="${jdkBug6558476}"/>
     </target>
     <target depends="init" name="-init-cos" unless="deploy.on.save">
         <condition property="deploy.on.save" value="true">
@@ -246,7 +258,7 @@
                 <property location="${build.dir}/empty" name="empty.dir"/>
                 <mkdir dir="${empty.dir}"/>
                 <mkdir dir="@{apgeneratedsrcdir}"/>
-                <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" includeantruntime="false" includes="@{includes}" source="${javac.source}" srcdir="@{srcdir}" target="${javac.target}">
+                <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" fork="${javac.fork}" includeantruntime="false" includes="@{includes}" source="${javac.source}" srcdir="@{srcdir}" target="${javac.target}">
                     <src>
                         <dirset dir="@{gensrcdir}" erroronmissingdir="false">
                             <include name="*"/>
@@ -316,15 +328,18 @@
             <attribute default="${build.classes.dir}" name="destdir"/>
             <sequential>
                 <fail unless="javac.includes">Must set javac.includes</fail>
-                <pathconvert pathsep="," property="javac.includes.binary">
+                <pathconvert pathsep="${line.separator}" property="javac.includes.binary">
                     <path>
                         <filelist dir="@{destdir}" files="${javac.includes}"/>
                     </path>
                     <globmapper from="*.java" to="*.class"/>
                 </pathconvert>
+                <tempfile deleteonexit="true" property="javac.includesfile.binary"/>
+                <echo file="${javac.includesfile.binary}" message="${javac.includes.binary}"/>
                 <delete>
-                    <files includes="${javac.includes.binary}"/>
+                    <files includesfile="${javac.includesfile.binary}"/>
                 </delete>
+                <delete file="${javac.includesfile.binary}"/>
             </sequential>
         </macrodef>
     </target>
@@ -350,6 +365,7 @@
                     <formatter type="brief" usefile="false"/>
                     <formatter type="xml"/>
                     <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
+                    <jvmarg value="-ea"/>
                     <jvmarg line="${runmain.jvmargs}"/>
                 </junit>
             </sequential>
@@ -493,6 +509,19 @@
     <target depends="-init-ap-cmdline-properties,-init-ap-cmdline-supported" name="-init-ap-cmdline">
         <property name="ap.cmd.line.internal" value=""/>
     </target>
+    <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-check" name="profile-init"/>
+    <target name="-profile-pre-init">
+        <!-- Empty placeholder for easier customization. -->
+        <!-- You can override this target in the ../build.xml file. -->
+    </target>
+    <target name="-profile-post-init">
+        <!-- Empty placeholder for easier customization. -->
+        <!-- You can override this target in the ../build.xml file. -->
+    </target>
+    <target depends="-profile-pre-init, init, -profile-post-init" name="-profile-init-check">
+        <fail unless="profiler.info.jvm">Must set JVM to use for profiling in profiler.info.jvm</fail>
+        <fail unless="profiler.info.jvmargs.agent">Must set profiler agent JVM arguments in profiler.info.jvmargs.agent</fail>
+    </target>
     <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init,-post-init,-init-check,-init-macrodef-property,-init-macrodef-javac,-init-macrodef-junit,-init-macrodef-java,-init-macrodef-nbjpda,-init-macrodef-nbjsdebug,-init-macrodef-debug,-init-taskdefs,-init-ap-cmdline" name="init"/>
     <!--
                 COMPILATION SECTION
@@ -562,6 +591,8 @@
         <!-- You can override this target in the ../build.xml file. -->
     </target>
     <target depends="init,deps-jar,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single" name="compile-single"/>
+    <property name="jspc.schemas" value="/resources/schemas/"/>
+    <property name="jspc.dtds" value="/resources/dtds/"/>
     <target depends="compile" description="Test compile JSP pages to expose compilation errors." if="do.compile.jsps" name="compile-jsps">
         <mkdir dir="${build.generated.dir}/src"/>
         <java classname="org.netbeans.modules.web.project.ant.JspC" failonerror="true" fork="true">
@@ -570,9 +601,12 @@
             <arg value="-d"/>
             <arg file="${basedir}/${build.generated.dir}/src"/>
             <arg value="-die1"/>
+            <arg value="-schemas ${jspc.schemas}"/>
+            <arg value="-dtds ${jspc.dtds}"/>
             <arg value="-compilerSourceVM ${javac.source}"/>
             <arg value="-compilerTargetVM ${javac.target}"/>
             <arg value="-javaEncoding ${source.encoding}"/>
+            <arg value="-sysClasspath ${libs.jsp-compilation-syscp.classpath}"/>
             <classpath path="${java.home}/../lib/tools.jar:${libs.jsp-compiler.classpath}:${libs.jsp-compilation.classpath}"/>
         </java>
         <mkdir dir="${build.generated.dir}/classes"/>
@@ -587,6 +621,9 @@
             <arg value="-d"/>
             <arg file="${basedir}/${build.generated.dir}/src"/>
             <arg value="-die1"/>
+            <arg value="-schemas ${jspc.schemas}"/>
+            <arg value="-dtds ${jspc.dtds}"/>
+            <arg value="-sysClasspath ${libs.jsp-compilation-syscp.classpath}"/>
             <arg value="-jspc.files"/>
             <arg path="${jsp.includes}"/>
             <arg value="-compilerSourceVM ${javac.source}"/>
@@ -830,6 +867,35 @@
     </target>
     <target depends="init,-pre-debug-fix,-do-debug-fix" if="netbeans.home" name="debug-fix"/>
     <!--
+            =================
+            PROFILING SECTION
+            =================
+            -->
+    <target description="Profile a J2EE project in the IDE." name="profile">
+        <condition else="start-profiled-server" property="profiler.startserver.target" value="start-profiled-server-extraargs">
+            <isset property="profiler.info.jvmargs.extra"/>
+        </condition>
+        <antcall target="${profiler.startserver.target}"/>
+        <antcall target="run"/>
+        <antcall target="start-loadgen"/>
+    </target>
+    <target name="start-profiled-server">
+        <nbstartprofiledserver forceRestart="${profiler.j2ee.serverForceRestart}" javaPlatform="${profiler.info.javaPlatform}" startupTimeout="${profiler.j2ee.serverStartupTimeout}">
+            <jvmarg value="${profiler.info.jvmargs.agent}"/>
+            <jvmarg value="${profiler.j2ee.agentID}"/>
+        </nbstartprofiledserver>
+    </target>
+    <target name="start-profiled-server-extraargs">
+        <nbstartprofiledserver forceRestart="${profiler.j2ee.serverForceRestart}" javaPlatform="${profiler.info.javaPlatform}" startupTimeout="${profiler.j2ee.serverStartupTimeout}">
+            <jvmarg value="${profiler.info.jvmargs.extra}"/>
+            <jvmarg value="${profiler.info.jvmargs.agent}"/>
+            <jvmarg value="${profiler.j2ee.agentID}"/>
+        </nbstartprofiledserver>
+    </target>
+    <target if="profiler.loadgen.path" name="start-loadgen">
+        <loadgenstart path="${profiler.loadgen.path}"/>
+    </target>
+    <!--
                 JAVADOC SECTION
             -->
     <target depends="init" if="have.sources" name="javadoc-build">
@@ -951,6 +1017,35 @@
     </target>
     <target depends="init,-pre-debug-fix,-do-debug-fix-test" if="netbeans.home" name="debug-fix-test"/>
     <!--
+        =========================
+        TESTS PROFILING  SECTION
+        =========================
+        -->
+    <target depends="profile-init,compile-test-single" if="netbeans.home" name="profile-test-single">
+        <nbprofiledirect>
+            <classpath>
+                <path path="${run.test.classpath}"/>
+                <path path="${j2ee.platform.classpath}"/>
+            </classpath>
+        </nbprofiledirect>
+        <junit dir="${profiler.info.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" jvm="${profiler.info.jvm}" showoutput="true">
+            <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/>
+            <jvmarg value="${profiler.info.jvmargs.agent}"/>
+            <jvmarg line="${profiler.info.jvmargs}"/>
+            <test name="${profile.class}"/>
+            <classpath>
+                <path path="${run.test.classpath}"/>
+                <path path="${j2ee.platform.classpath}"/>
+            </classpath>
+            <syspropertyset>
+                <propertyref prefix="test-sys-prop."/>
+                <mapper from="test-sys-prop.*" to="*" type="glob"/>
+            </syspropertyset>
+            <formatter type="brief" usefile="false"/>
+            <formatter type="xml"/>
+        </junit>
+    </target>
+    <!--
                 
                 CLEANUP SECTION
             -->
diff -r 60658773f604 -r b0f7d9ab4a07 java/nekurak.net-web/nbproject/genfiles.properties
--- a/java/nekurak.net-web/nbproject/genfiles.properties	Sun Jul 10 20:17:56 2011 +0200
+++ b/java/nekurak.net-web/nbproject/genfiles.properties	Fri Jul 15 22:25:39 2011 +0200
@@ -4,8 +4,8 @@
 # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
 # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
 nbproject/build-impl.xml.data.CRC32=28fc3c5a
-nbproject/build-impl.xml.script.CRC32=b8c3901f
-nbproject/build-impl.xml.stylesheet.CRC32=8419264d@1.24.2.1
+nbproject/build-impl.xml.script.CRC32=37b9073f
+nbproject/build-impl.xml.stylesheet.CRC32=8ca9f0e6@1.31.2.1
 nbproject/rest-build.xml.data.CRC32=84da1c7b
 nbproject/rest-build.xml.script.CRC32=3db088b3
 nbproject/rest-build.xml.stylesheet.CRC32=ddd64843@1.4.1
diff -r 60658773f604 -r b0f7d9ab4a07 java/nekurak.net-web/nbproject/project.properties
--- a/java/nekurak.net-web/nbproject/project.properties	Sun Jul 10 20:17:56 2011 +0200
+++ b/java/nekurak.net-web/nbproject/project.properties	Fri Jul 15 22:25:39 2011 +0200
@@ -1,6 +1,5 @@
 annotation.processing.enabled=true
 annotation.processing.enabled.in.editor=true
-annotation.processing.processors.list=
 annotation.processing.run.all.processors=true
 annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output
 build.classes.dir=${build.web.dir}/WEB-INF/classes
@@ -26,9 +25,10 @@
 endorsed.classpath=
 excludes=
 includes=**
+j2ee.compile.on.save=true
 j2ee.deploy.on.save=true
 j2ee.platform=1.5
-j2ee.platform.classpath=
+j2ee.platform.classpath=${j2ee.server.home}/modules/endorsed/javax.annotation.jar:${j2ee.server.home}/modules/javax.transaction.jar:${j2ee.server.home}/modules/jsf-api.jar:${j2ee.server.home}/modules/jsf-impl.jar:${j2ee.server.home}/modules/jaxrpc-api-osgi.jar:${j2ee.server.home}/modules/javax.enterprise.deploy.jar:${j2ee.server.home}/modules/javax.resource.jar:${j2ee.server.home}/modules/jstl-impl.jar:${j2ee.server.home}/modules/jersey-core.jar:${j2ee.server.home}/modules/javax.security.auth.message.jar:${j2ee.server.home}/modules/javax.servlet.jar:${j2ee.server.home}/modules/javax.servlet.jsp.jstl.jar:${j2ee.server.home}/modules/javax.ejb.jar:${j2ee.server.home}/modules/javax.servlet.jsp.jar:${j2ee.server.home}/modules/bean-validator.jar:${j2ee.server.home}/modules/javax.management.j2ee.jar:${j2ee.server.home}/modules/weld-osgi-bundle.jar:${j2ee.server.home}/modules/javax.mail.jar:${j2ee.server.home}/modules/javax.jms.jar:${j2ee.server.home}/modules/endorsed/jaxb-api-osgi.jar:${j2ee.server.home}/modules/endorsed/webservices-api-osgi.jar:${j2ee.server.home}/modules/javax.security.jacc.jar:${j2ee.server.home}/modules/javax.persistence.jar
 j2ee.platform.embeddableejb.classpath=${j2ee.server.home}/lib/embedded/glassfish-embedded-static-shell.jar
 j2ee.platform.wscompile.classpath=${j2ee.server.home}/modules/webservices-osgi.jar
 j2ee.platform.wsgen.classpath=${j2ee.server.home}/modules/webservices-osgi.jar:${j2ee.server.home}/modules/endorsed/webservices-api-osgi.jar:${j2ee.server.home}/modules/jaxb-osgi.jar:${j2ee.server.home}/modules/endorsed/jaxb-api-osgi.jar:${j2ee.server.home}/modules/javax.ejb.jar
@@ -43,9 +43,10 @@
 javac.compilerargs=
 javac.debug=true
 javac.deprecation=false
-javac.processorpath=${javac.classpath}
-javac.source=1.5
-javac.target=1.5
+javac.processorpath=\
+    ${javac.classpath}
+javac.source=1.6
+javac.target=1.6
 javac.test.classpath=\
     ${javac.classpath}:\
     ${build.classes.dir}:\
diff -r 60658773f604 -r b0f7d9ab4a07 java/nekurak.net-web/web/WEB-INF/glassfish-web.xml
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/java/nekurak.net-web/web/WEB-INF/glassfish-web.xml	Fri Jul 15 22:25:39 2011 +0200
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE glassfish-web-app PUBLIC "-//GlassFish.org//DTD GlassFish Application Server 3.1 Servlet 3.0//EN" "http://glassfish.org/dtds/glassfish-web-app_3_0-1.dtd">
+<glassfish-web-app error-url="">
+	<context-root>/nekurak.net-web</context-root>
+	<security-role-mapping>
+		<!-- TODO: opravit role vs. skupiny (tabulka v DB) -->
+		<role-name>opravneny</role-name>
+		<group-name>bezny</group-name>
+	</security-role-mapping>
+	<session-config>
+		<session-properties>
+			<!--
+				Aby se nám do URL nedostávalo ;jsessionid=…
+				ve výchozím stavu jsou obě true,
+				enableCookies nemusíme uvádět,
+				skrze enableURLRewriting zakážeme vkládání ID do URL,
+				uživatelům bez cookies nebudou fungovat relace.
+				Viz http://www.i-coding.de/www/en/glassfish/configuration/session-id.html
+			-->
+			<property name="enableCookies" value="true"/>
+			<property name="enableURLRewriting" value="false"/>
+		</session-properties>
+	</session-config>
+	<class-loader delegate="true"/>
+	<jsp-config>
+		<property name="keepgenerated" value="true">
+			<description>Keep a copy of the generated servlet class' java code.</description>
+		</property>
+	</jsp-config>	
+	<parameter-encoding default-charset="UTF-8"/>
+</glassfish-web-app>
diff -r 60658773f604 -r b0f7d9ab4a07 java/nekurak.net-web/web/WEB-INF/sun-web.xml
--- a/java/nekurak.net-web/web/WEB-INF/sun-web.xml	Sun Jul 10 20:17:56 2011 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE sun-web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Application Server 9.0 Servlet 2.5//EN" "http://www.sun.com/software/appserver/dtds/sun-web-app_2_5-0.dtd">
-<sun-web-app error-url="">
-	<context-root>/nekurak.net-web</context-root>
-	<class-loader delegate="true"/>
-	<parameter-encoding default-charset="UTF-8"/>
-	<session-config>
-		<session-properties>
-			<!--
-				Aby se nám do URL nedostávalo ;jsessionid=…
-				ve výchozím stavu jsou obě true,
-				enableCookies nemusíme uvádět,
-				skrze enableURLRewriting zakážeme vkládání ID do URL,
-				uživatelům bez cookies nebudou fungovat relace.
-				Viz http://www.i-coding.de/www/en/glassfish/configuration/session-id.html
-			-->
-			<property name="enableCookies" value="true"/>
-			<property name="enableURLRewriting" value="false"/>
-		</session-properties>
-	</session-config>
-	<jsp-config>
-		<property name="keepgenerated" value="true">
-			<description>Keep a copy of the generated servlet class' java code.</description>
-		</property>
-	</jsp-config>
-	<security-role-mapping>
-		<!-- TODO: opravit role vs. skupiny (tabulka v DB) -->
-		<role-name>opravneny</role-name>
-		<group-name>bezny</group-name>
-	</security-role-mapping>
-</sun-web-app>
diff -r 60658773f604 -r b0f7d9ab4a07 java/nekurak.net-ws/nbproject/ant-deploy.xml
--- a/java/nekurak.net-ws/nbproject/ant-deploy.xml	Sun Jul 10 20:17:56 2011 +0200
+++ b/java/nekurak.net-ws/nbproject/ant-deploy.xml	Fri Jul 15 22:25:39 2011 +0200
@@ -3,6 +3,7 @@
     <target name="-init-cl-deployment-env" if="deploy.ant.enabled">
         <property file="${deploy.ant.properties.file}" />
         <available file="${deploy.ant.docbase.dir}/WEB-INF/sun-web.xml" property="sun.web.present"/>
+        <available file="${deploy.ant.docbase.dir}/WEB-INF/glassfish-web.xml" property="glassfish.web.present"/>
         <available file="${deploy.ant.resource.dir}" property="has.setup"/>
         <tempfile prefix="gfv3" property="gfv3.password.file" destdir="${java.io.tmpdir}"/>  <!-- do not forget to delete this! -->
         <echo message="AS_ADMIN_PASSWORD=${gfv3.password}" file="${gfv3.password.file}"/>
@@ -23,8 +24,34 @@
         <xmlproperty file="${temp.sun.web}" validate="false">
         </xmlproperty>    
         <delete file="${temp.sun.web}"/>
-        <property name="deploy.ant.client.url" value="${gfv3.url}${sun-web-app.context-root}"/>
-        <property name="deploy.context.root.argument" value="&amp;contextroot=${sun-web-app.context-root}"/>
+        <condition property="deploy.ant.client.url" value="${gfv3.url}${sun-web-app.context-root}" else="${gfv3.url}/${ant.project.name}">
+            <isset property="sun-web-app.context-root"/>
+        </condition>
+        <condition property="deploy.context.root.argument" value="&amp;contextroot=${sun-web-app.context-root}" else="/${ant.project.name}">
+            <isset property="sun-web-app.context-root"/>
+        </condition>
+    </target>
+    <target name="-parse-glassfish-web" depends="-init-cl-deployment-env" if="glassfish.web.present">
+        <tempfile prefix="gfv3" property="temp.gf.web" destdir="${java.io.tmpdir}"/>
+        <copy file="${deploy.ant.docbase.dir}/WEB-INF/glassfish-web.xml" tofile="${temp.gf.web}"/>
+        <!-- The doctype triggers resolution which can fail -->
+        <replace file="${temp.gf.web}">
+            <replacetoken><![CDATA[<!DOCTYPE]]></replacetoken>
+            <replacevalue><![CDATA[<!-- <!DOCTYPE]]></replacevalue>
+        </replace>
+        <replace file="${temp.gf.web}">
+            <replacetoken><![CDATA[<glassfish-web-app]]></replacetoken>
+            <replacevalue><![CDATA[--> <glassfish-web-app]]></replacevalue>
+        </replace>
+        <xmlproperty file="${temp.gf.web}" validate="false">
+        </xmlproperty>
+        <delete file="${temp.gf.web}"/>
+        <condition property="deploy.ant.client.url" value="${gfv3.url}${glassfish-web-app.context-root}" else="${gfv3.url}/${ant.project.name}">
+            <isset property="glassfish-web-app.context-root"/>
+        </condition>
+        <condition property="deploy.context.root.argument" value="&amp;contextroot=${glassfish-web-app.context-root}" else="/${ant.project.name}">
+            <isset property="glassfish-web-app.context-root"/>
+        </condition>
     </target>
     <target name="-no-parse-sun-web" depends="-init-cl-deployment-env" unless="sun.web.present">
         <property name="deploy.context.root.argument" value=""/>
@@ -33,7 +60,6 @@
         <tempfile prefix="gfv3" property="gfv3.resources.dir" destdir="${java.io.tmpdir}"/>
         <mkdir dir="${gfv3.resources.dir}"/>
         <mkdir dir="${gfv3.resources.dir}/META-INF"/>
-        <property name="gfv3.resources.file" value="${gfv3.resources.dir}/META-INF/sun-resources.xml"/>
         <copy todir="${gfv3.resources.dir}/META-INF">
             <fileset dir="${deploy.ant.resource.dir}"/>
         </copy>
@@ -42,7 +68,7 @@
         </jar>
         <delete dir="${gfv3.resources.dir}"/>
     </target>
-    <target name="-deploy-ant" depends="-parse-sun-web,-no-parse-sun-web,-add-resources" if="deploy.ant.enabled">
+    <target name="-deploy-ant" depends="-parse-glassfish-web, -parse-sun-web, -no-parse-sun-web,-add-resources" if="deploy.ant.enabled">
         <antcall target="-deploy-without-pw"/>
         <antcall target="-deploy-with-pw"/>
     </target>
diff -r 60658773f604 -r b0f7d9ab4a07 java/nekurak.net-ws/nbproject/build-impl.xml
--- a/java/nekurak.net-ws/nbproject/build-impl.xml	Sun Jul 10 20:17:56 2011 +0200
+++ b/java/nekurak.net-ws/nbproject/build-impl.xml	Fri Jul 15 22:25:39 2011 +0200
@@ -174,8 +174,20 @@
         <property name="runmain.jvmargs" value=""/>
         <path id="endorsed.classpath.path" path="${endorsed.classpath}"/>
         <condition else="" property="endorsed.classpath.cmd.line.arg" value="-Xbootclasspath/p:'${toString:endorsed.classpath.path}'">
-            <length length="0" string="${endorsed.classpath}" when="greater"/>
+            <and>
+                <isset property="endorsed.classpath"/>
+                <length length="0" string="${endorsed.classpath}" when="greater"/>
+            </and>
         </condition>
+        <condition else="false" property="jdkBug6558476">
+            <and>
+                <matches pattern="1\.[56]" string="${java.specification.version}"/>
+                <not>
+                    <os family="unix"/>
+                </not>
+            </and>
+        </condition>
+        <property name="javac.fork" value="${jdkBug6558476}"/>
     </target>
     <target depends="init" name="-init-cos" unless="deploy.on.save">
         <condition property="deploy.on.save" value="true">
@@ -246,7 +258,7 @@
                 <property location="${build.dir}/empty" name="empty.dir"/>
                 <mkdir dir="${empty.dir}"/>
                 <mkdir dir="@{apgeneratedsrcdir}"/>
-                <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" includeantruntime="false" includes="@{includes}" source="${javac.source}" srcdir="@{srcdir}" target="${javac.target}">
+                <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" fork="${javac.fork}" includeantruntime="false" includes="@{includes}" source="${javac.source}" srcdir="@{srcdir}" target="${javac.target}">
                     <src>
                         <dirset dir="@{gensrcdir}" erroronmissingdir="false">
                             <include name="*"/>
@@ -316,15 +328,18 @@
             <attribute default="${build.classes.dir}" name="destdir"/>
             <sequential>
                 <fail unless="javac.includes">Must set javac.includes</fail>
-                <pathconvert pathsep="," property="javac.includes.binary">
+                <pathconvert pathsep="${line.separator}" property="javac.includes.binary">
                     <path>
                         <filelist dir="@{destdir}" files="${javac.includes}"/>
                     </path>
                     <globmapper from="*.java" to="*.class"/>
                 </pathconvert>
+                <tempfile deleteonexit="true" property="javac.includesfile.binary"/>
+                <echo file="${javac.includesfile.binary}" message="${javac.includes.binary}"/>
                 <delete>
-                    <files includes="${javac.includes.binary}"/>
+                    <files includesfile="${javac.includesfile.binary}"/>
                 </delete>
+                <delete file="${javac.includesfile.binary}"/>
             </sequential>
         </macrodef>
     </target>
@@ -350,6 +365,7 @@
                     <formatter type="brief" usefile="false"/>
                     <formatter type="xml"/>
                     <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
+                    <jvmarg value="-ea"/>
                     <jvmarg line="${runmain.jvmargs}"/>
                 </junit>
             </sequential>
@@ -493,6 +509,19 @@
     <target depends="-init-ap-cmdline-properties,-init-ap-cmdline-supported" name="-init-ap-cmdline">
         <property name="ap.cmd.line.internal" value=""/>
     </target>
+    <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-check" name="profile-init"/>
+    <target name="-profile-pre-init">
+        <!-- Empty placeholder for easier customization. -->
+        <!-- You can override this target in the ../build.xml file. -->
+    </target>
+    <target name="-profile-post-init">
+        <!-- Empty placeholder for easier customization. -->
+        <!-- You can override this target in the ../build.xml file. -->
+    </target>
+    <target depends="-profile-pre-init, init, -profile-post-init" name="-profile-init-check">
+        <fail unless="profiler.info.jvm">Must set JVM to use for profiling in profiler.info.jvm</fail>
+        <fail unless="profiler.info.jvmargs.agent">Must set profiler agent JVM arguments in profiler.info.jvmargs.agent</fail>
+    </target>
     <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init,-post-init,-init-check,-init-macrodef-property,-init-macrodef-javac,-init-macrodef-junit,-init-macrodef-java,-init-macrodef-nbjpda,-init-macrodef-nbjsdebug,-init-macrodef-debug,-init-taskdefs,-init-ap-cmdline" name="init"/>
     <!--
                 COMPILATION SECTION
@@ -562,6 +591,8 @@
         <!-- You can override this target in the ../build.xml file. -->
     </target>
     <target depends="init,deps-jar,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single" name="compile-single"/>
+    <property name="jspc.schemas" value="/resources/schemas/"/>
+    <property name="jspc.dtds" value="/resources/dtds/"/>
     <target depends="compile" description="Test compile JSP pages to expose compilation errors." if="do.compile.jsps" name="compile-jsps">
         <mkdir dir="${build.generated.dir}/src"/>
         <java classname="org.netbeans.modules.web.project.ant.JspC" failonerror="true" fork="true">
@@ -570,9 +601,12 @@
             <arg value="-d"/>
             <arg file="${basedir}/${build.generated.dir}/src"/>
             <arg value="-die1"/>
+            <arg value="-schemas ${jspc.schemas}"/>
+            <arg value="-dtds ${jspc.dtds}"/>
             <arg value="-compilerSourceVM ${javac.source}"/>
             <arg value="-compilerTargetVM ${javac.target}"/>
             <arg value="-javaEncoding ${source.encoding}"/>
+            <arg value="-sysClasspath ${libs.jsp-compilation-syscp.classpath}"/>
             <classpath path="${java.home}/../lib/tools.jar:${libs.jsp-compiler.classpath}:${libs.jsp-compilation.classpath}"/>
         </java>
         <mkdir dir="${build.generated.dir}/classes"/>
@@ -587,6 +621,9 @@
             <arg value="-d"/>
             <arg file="${basedir}/${build.generated.dir}/src"/>
             <arg value="-die1"/>
+            <arg value="-schemas ${jspc.schemas}"/>
+            <arg value="-dtds ${jspc.dtds}"/>
+            <arg value="-sysClasspath ${libs.jsp-compilation-syscp.classpath}"/>
             <arg value="-jspc.files"/>
             <arg path="${jsp.includes}"/>
             <arg value="-compilerSourceVM ${javac.source}"/>
@@ -828,6 +865,35 @@
     </target>
     <target depends="init,-pre-debug-fix,-do-debug-fix" if="netbeans.home" name="debug-fix"/>
     <!--
+            =================
+            PROFILING SECTION
+            =================
+            -->
+    <target description="Profile a J2EE project in the IDE." name="profile">
+        <condition else="start-profiled-server" property="profiler.startserver.target" value="start-profiled-server-extraargs">
+            <isset property="profiler.info.jvmargs.extra"/>
+        </condition>
+        <antcall target="${profiler.startserver.target}"/>
+        <antcall target="run"/>
+        <antcall target="start-loadgen"/>
+    </target>
+    <target name="start-profiled-server">
+        <nbstartprofiledserver forceRestart="${profiler.j2ee.serverForceRestart}" javaPlatform="${profiler.info.javaPlatform}" startupTimeout="${profiler.j2ee.serverStartupTimeout}">
+            <jvmarg value="${profiler.info.jvmargs.agent}"/>
+            <jvmarg value="${profiler.j2ee.agentID}"/>
+        </nbstartprofiledserver>
+    </target>
+    <target name="start-profiled-server-extraargs">
+        <nbstartprofiledserver forceRestart="${profiler.j2ee.serverForceRestart}" javaPlatform="${profiler.info.javaPlatform}" startupTimeout="${profiler.j2ee.serverStartupTimeout}">
+            <jvmarg value="${profiler.info.jvmargs.extra}"/>
+            <jvmarg value="${profiler.info.jvmargs.agent}"/>
+            <jvmarg value="${profiler.j2ee.agentID}"/>
+        </nbstartprofiledserver>
+    </target>
+    <target if="profiler.loadgen.path" name="start-loadgen">
+        <loadgenstart path="${profiler.loadgen.path}"/>
+    </target>
+    <!--
                 JAVADOC SECTION
             -->
     <target depends="init" if="have.sources" name="javadoc-build">
@@ -949,6 +1015,35 @@
     </target>
     <target depends="init,-pre-debug-fix,-do-debug-fix-test" if="netbeans.home" name="debug-fix-test"/>
     <!--
+        =========================
+        TESTS PROFILING  SECTION
+        =========================
+        -->
+    <target depends="profile-init,compile-test-single" if="netbeans.home" name="profile-test-single">
+        <nbprofiledirect>
+            <classpath>
+                <path path="${run.test.classpath}"/>
+                <path path="${j2ee.platform.classpath}"/>
+            </classpath>
+        </nbprofiledirect>
+        <junit dir="${profiler.info.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" jvm="${profiler.info.jvm}" showoutput="true">
+            <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/>
+            <jvmarg value="${profiler.info.jvmargs.agent}"/>
+            <jvmarg line="${profiler.info.jvmargs}"/>
+            <test name="${profile.class}"/>
+            <classpath>
+                <path path="${run.test.classpath}"/>
+                <path path="${j2ee.platform.classpath}"/>
+            </classpath>
+            <syspropertyset>
+                <propertyref prefix="test-sys-prop."/>
+                <mapper from="test-sys-prop.*" to="*" type="glob"/>
+            </syspropertyset>
+            <formatter type="brief" usefile="false"/>
+            <formatter type="xml"/>
+        </junit>
+    </target>
+    <!--
                 
                 CLEANUP SECTION
             -->
diff -r 60658773f604 -r b0f7d9ab4a07 java/nekurak.net-ws/nbproject/genfiles.properties
--- a/java/nekurak.net-ws/nbproject/genfiles.properties	Sun Jul 10 20:17:56 2011 +0200
+++ b/java/nekurak.net-ws/nbproject/genfiles.properties	Fri Jul 15 22:25:39 2011 +0200
@@ -3,10 +3,10 @@
 build.xml.stylesheet.CRC32=c0ebde35@1.21.2.1
 # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
 # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
-nbproject/build-impl.xml.data.CRC32=e6e63e07
-nbproject/build-impl.xml.script.CRC32=9b10bf3f
-nbproject/build-impl.xml.stylesheet.CRC32=8419264d@1.24.3.1
+nbproject/build-impl.xml.data.CRC32=6e851502
+nbproject/build-impl.xml.script.CRC32=9d4ac7d8
+nbproject/build-impl.xml.stylesheet.CRC32=8ca9f0e6@1.31.2.1
 nbproject/wsit-deploy.xml.data.CRC32=4cb22909
 nbproject/wsit-deploy.xml.script.CRC32=deb039de
 nbproject/wsit-deploy.xml.stylesheet.CRC32=beb36995@3.9.1
-nbproject/jaxws-build.xml.stylesheet.CRC32=b0a0073f
+nbproject/jaxws-build.xml.stylesheet.CRC32=03b77b15
diff -r 60658773f604 -r b0f7d9ab4a07 java/nekurak.net-ws/nbproject/jaxws-build.xml
--- a/java/nekurak.net-ws/nbproject/jaxws-build.xml	Sun Jul 10 20:17:56 2011 +0200
+++ b/java/nekurak.net-ws/nbproject/jaxws-build.xml	Fri Jul 15 22:25:39 2011 +0200
@@ -15,16 +15,24 @@
     <target name="wsgen-init" depends="init, -do-compile">
         <mkdir dir="${build.generated.sources.dir}/jax-ws/resources/"/>
         <mkdir dir="${build.classes.dir}"/>
+        <mkdir dir="${build.classes.dir}/META-INF"/>
+        <property name="j2ee.platform.wsgen.classpath" value="${libs.jaxws21.classpath}"/>
         <taskdef name="wsgen" classname="com.sun.tools.ws.ant.WsGen">
             <classpath path="${java.home}/../lib/tools.jar:${build.classes.dir}:${j2ee.platform.wsgen.classpath}:${javac.classpath}"/>
         </taskdef>
     </target>
     <target name="wsgen-Podnik" depends="wsgen-init">
+        <copy todir="${build.classes.dir}/META-INF">
+            <fileset dir="${webinf.dir}" includes="wsit-cz.frantovo.nekurak.ws.Podnik.xml"/>
+        </copy>
         <wsgen sourcedestdir="${build.generated.sources.dir}/jax-ws" resourcedestdir="${build.generated.sources.dir}/jax-ws/resources/" destdir="${build.generated.sources.dir}/jax-ws" verbose="true" xendorsed="true" keep="true" genwsdl="true" sei="cz.frantovo.nekurak.ws.Podnik">
             <classpath path="${java.home}/../lib/tools.jar:${build.classes.dir}:${j2ee.platform.wsgen.classpath}:${javac.classpath}"/>
         </wsgen>
     </target>
     <target name="wsgen-Pokus" depends="wsgen-init">
+        <copy todir="${build.classes.dir}/META-INF">
+            <fileset dir="${webinf.dir}" includes="wsit-cz.frantovo.nekurak.ws.Pokus.xml"/>
+        </copy>
         <wsgen sourcedestdir="${build.generated.sources.dir}/jax-ws" resourcedestdir="${build.generated.sources.dir}/jax-ws/resources/" destdir="${build.generated.sources.dir}/jax-ws" verbose="true" xendorsed="true" keep="true" genwsdl="true" sei="cz.frantovo.nekurak.ws.Pokus">
             <classpath path="${java.home}/../lib/tools.jar:${build.classes.dir}:${j2ee.platform.wsgen.classpath}:${javac.classpath}"/>
         </wsgen>
diff -r 60658773f604 -r b0f7d9ab4a07 java/nekurak.net-ws/nbproject/project.properties
--- a/java/nekurak.net-ws/nbproject/project.properties	Sun Jul 10 20:17:56 2011 +0200
+++ b/java/nekurak.net-ws/nbproject/project.properties	Fri Jul 15 22:25:39 2011 +0200
@@ -1,6 +1,5 @@
 annotation.processing.enabled=true
 annotation.processing.enabled.in.editor=true
-annotation.processing.processors.list=
 annotation.processing.run.all.processors=true
 annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output
 build.classes.dir=${build.web.dir}/WEB-INF/classes
@@ -27,9 +26,10 @@
     ${libs.javaee-endorsed-api-6.0.classpath}
 excludes=
 includes=**
+j2ee.compile.on.save=false
 j2ee.deploy.on.save=false
 j2ee.platform=1.6-web
-j2ee.platform.classpath=${j2ee.server.home}/modules/javax.servlet.jar:${j2ee.server.home}/modules/jstl-impl.jar:${j2ee.server.home}/modules/javax.ejb.jar:${j2ee.server.home}/modules/javax.enterprise.deploy.jar:${j2ee.server.home}/modules/javax.security.jacc.jar:${j2ee.server.home}/modules/bean-validator.jar:${j2ee.server.home}/modules/javax.transaction.jar:${j2ee.server.home}/modules/jsr311-api.jar:${j2ee.server.home}/modules/jsf-api.jar:${j2ee.server.home}/modules/javax.security.auth.message.jar:${j2ee.server.home}/modules/javax.servlet.jsp.jar:${j2ee.server.home}/modules/endorsed/javax.annotation.jar:${j2ee.server.home}/modules/javax.management.j2ee.jar:${j2ee.server.home}/modules/endorsed/webservices-api-osgi.jar:${j2ee.server.home}/modules/endorsed/jaxb-api-osgi.jar:${j2ee.server.home}/modules/javax.jms.jar:${j2ee.server.home}/modules/javax.persistence.jar:${j2ee.server.home}/modules/javax.servlet.jsp.jstl.jar:${j2ee.server.home}/modules/javax.resource.jar:${j2ee.server.home}/modules/weld-osgi-bundle.jar:${j2ee.server.home}/modules/jsf-impl.jar:${j2ee.server.home}/modules/mail.jar
+j2ee.platform.classpath=${j2ee.server.home}/modules/endorsed/javax.annotation.jar:${j2ee.server.home}/modules/javax.transaction.jar:${j2ee.server.home}/modules/jsf-api.jar:${j2ee.server.home}/modules/jsf-impl.jar:${j2ee.server.home}/modules/jaxrpc-api-osgi.jar:${j2ee.server.home}/modules/javax.enterprise.deploy.jar:${j2ee.server.home}/modules/javax.resource.jar:${j2ee.server.home}/modules/jstl-impl.jar:${j2ee.server.home}/modules/jersey-core.jar:${j2ee.server.home}/modules/javax.security.auth.message.jar:${j2ee.server.home}/modules/javax.servlet.jar:${j2ee.server.home}/modules/javax.servlet.jsp.jstl.jar:${j2ee.server.home}/modules/javax.ejb.jar:${j2ee.server.home}/modules/javax.servlet.jsp.jar:${j2ee.server.home}/modules/bean-validator.jar:${j2ee.server.home}/modules/javax.management.j2ee.jar:${j2ee.server.home}/modules/weld-osgi-bundle.jar:${j2ee.server.home}/modules/javax.mail.jar:${j2ee.server.home}/modules/javax.jms.jar:${j2ee.server.home}/modules/endorsed/jaxb-api-osgi.jar:${j2ee.server.home}/modules/endorsed/webservices-api-osgi.jar:${j2ee.server.home}/modules/javax.security.jacc.jar:${j2ee.server.home}/modules/javax.persistence.jar
 j2ee.platform.embeddableejb.classpath=${j2ee.server.home}/lib/embedded/glassfish-embedded-static-shell.jar
 j2ee.platform.wscompile.classpath=${j2ee.server.home}/modules/webservices-osgi.jar
 j2ee.platform.wsgen.classpath=${j2ee.server.home}/modules/webservices-osgi.jar:${j2ee.server.home}/modules/endorsed/webservices-api-osgi.jar:${j2ee.server.home}/modules/jaxb-osgi.jar:${j2ee.server.home}/modules/endorsed/jaxb-api-osgi.jar:${j2ee.server.home}/modules/javax.ejb.jar
@@ -43,9 +43,10 @@
 javac.compilerargs=
 javac.debug=true
 javac.deprecation=false
-javac.processorpath=${javac.classpath}
-javac.source=1.5
-javac.target=1.5
+javac.processorpath=\
+    ${javac.classpath}
+javac.source=1.6
+javac.target=1.6
 javac.test.classpath=\
     ${javac.classpath}:\
     ${build.classes.dir}:\
@@ -66,7 +67,6 @@
 javadoc.windowtitle=
 jspcompilation.classpath=${jspc.classpath}:${javac.classpath}
 lib.dir=${web.docbase.dir}/WEB-INF/lib
-no.dependencies=false
 persistence.xml.dir=${conf.dir}
 platform.active=default_platform
 project.nekurak_net-lib=../nekurak.net-lib
diff -r 60658773f604 -r b0f7d9ab4a07 java/nekurak.net-ws/nbproject/project.xml
--- a/java/nekurak.net-ws/nbproject/project.xml	Sun Jul 10 20:17:56 2011 +0200
+++ b/java/nekurak.net-ws/nbproject/project.xml	Fri Jul 15 22:25:39 2011 +0200
@@ -16,10 +16,10 @@
             </web-module-libraries>
             <web-module-additional-libraries/>
             <source-roots>
-                <root id="src.dir" name="Source Packages"/>
+                <root id="src.dir"/>
             </source-roots>
             <test-roots>
-                <root id="test.src.dir" name="Test Packages"/>
+                <root id="test.src.dir"/>
             </test-roots>
         </data>
         <references xmlns="http://www.netbeans.org/ns/ant-project-references/1">