REST: přidán nový webový modul.
1.1 --- a/.hgignore Thu Mar 18 14:33:35 2010 +0100
1.2 +++ b/.hgignore Tue Mar 23 00:50:39 2010 +0100
1.3 @@ -4,6 +4,7 @@
1.4 java/nekurak.net-web/web/nekurak.net-src.zip
1.5 java/nekurak.net-web/web/nekurak.net-src.zip.SHA-512
1.6 java/nekurak.net-web/src/conf/MANIFEST.MF
1.7 +
1.8 java/nekurak.net-mvn/target/*
1.9
1.10 java/nekurak.net-ear/dist/*
1.11 @@ -19,3 +20,7 @@
1.12 java/nekurak.net-lib/nbproject/private
1.13
1.14 java/nekurak.net-web/lib/*
1.15 +
1.16 +java/nekurak.net-rest/dist/*
1.17 +java/nekurak.net-rest/build/*
1.18 +java/nekurak.net-rest/nbproject/private
2.1 --- a/java/nekurak.net-ear/nbproject/build-impl.xml Thu Mar 18 14:33:35 2010 +0100
2.2 +++ b/java/nekurak.net-ear/nbproject/build-impl.xml Tue Mar 23 00:50:39 2010 +0100
2.3 @@ -166,6 +166,15 @@
2.4 <isset property="build.deploy.on.save"/>
2.5 </not>
2.6 </condition>
2.7 + <ant antfile="${project.nekurak_net-rest}/build.xml" inheritall="false" target="dist-ear">
2.8 + <property location="${build.dir}" name="dist.ear.dir"/>
2.9 + <property name="deploy.on.save" value="${build.deploy.on.save}"/>
2.10 + </ant>
2.11 + <condition property="build.deploy.on.save" value="false">
2.12 + <not>
2.13 + <isset property="build.deploy.on.save"/>
2.14 + </not>
2.15 + </condition>
2.16 <ant antfile="${project.nekurak_net-web}/build.xml" inheritall="false" target="dist-ear">
2.17 <property location="${build.dir}" name="dist.ear.dir"/>
2.18 <property name="deploy.on.save" value="${build.deploy.on.save}"/>
2.19 @@ -184,6 +193,7 @@
2.20 <target depends="init,deps-jar,pre-pre-compile,pre-compile" name="-do-compile-deps">
2.21 <copyfiles files="${reference.nekurak_net-web.dist-ear}" todir="${build.dir}//"/>
2.22 <copyfiles files="${reference.nekurak_net-ejb.dist-ear}" todir="${build.dir}//"/>
2.23 + <copyfiles files="${reference.nekurak_net-rest.dist-ear}" todir="${build.dir}//"/>
2.24 </target>
2.25 <target name="post-compile">
2.26 <!-- Empty placeholder for easier customization. -->
2.27 @@ -261,6 +271,7 @@
2.28 <target name="-run-deploy-am" unless="no.deps">
2.29 <!-- Task to deploy to the Access Manager runtime. -->
2.30 <ant antfile="${project.nekurak_net-ejb}/build.xml" inheritall="false" target="-run-deploy-am"/>
2.31 + <ant antfile="${project.nekurak_net-rest}/build.xml" inheritall="false" target="-run-deploy-am"/>
2.32 <ant antfile="${project.nekurak_net-web}/build.xml" inheritall="false" target="-run-deploy-am"/>
2.33 </target>
2.34 <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"/>
2.35 @@ -455,6 +466,15 @@
2.36 <isset property="build.deploy.on.save"/>
2.37 </not>
2.38 </condition>
2.39 + <ant antfile="${project.nekurak_net-rest}/build.xml" inheritall="false" target="clean-ear">
2.40 + <property location="${build.dir}" name="dist.ear.dir"/>
2.41 + <property name="deploy.on.save" value="${build.deploy.on.save}"/>
2.42 + </ant>
2.43 + <condition property="build.deploy.on.save" value="false">
2.44 + <not>
2.45 + <isset property="build.deploy.on.save"/>
2.46 + </not>
2.47 + </condition>
2.48 <ant antfile="${project.nekurak_net-web}/build.xml" inheritall="false" target="clean-ear">
2.49 <property location="${build.dir}" name="dist.ear.dir"/>
2.50 <property name="deploy.on.save" value="${build.deploy.on.save}"/>
3.1 --- a/java/nekurak.net-ear/nbproject/genfiles.properties Thu Mar 18 14:33:35 2010 +0100
3.2 +++ b/java/nekurak.net-ear/nbproject/genfiles.properties Tue Mar 23 00:50:39 2010 +0100
3.3 @@ -3,6 +3,6 @@
3.4 build.xml.stylesheet.CRC32=475c2a62@1.17.2
3.5 # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
3.6 # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
3.7 -nbproject/build-impl.xml.data.CRC32=dd0510f0
3.8 -nbproject/build-impl.xml.script.CRC32=b94a2023
3.9 +nbproject/build-impl.xml.data.CRC32=efe37659
3.10 +nbproject/build-impl.xml.script.CRC32=4bf9637a
3.11 nbproject/build-impl.xml.stylesheet.CRC32=624b8ca2@1.17.2
4.1 --- a/java/nekurak.net-ear/nbproject/project.properties Thu Mar 18 14:33:35 2010 +0100
4.2 +++ b/java/nekurak.net-ear/nbproject/project.properties Tue Mar 23 00:50:39 2010 +0100
4.3 @@ -16,7 +16,8 @@
4.4 jar.compress=false
4.5 jar.content.additional=\
4.6 ${reference.nekurak_net-web.dist-ear}:\
4.7 - ${reference.nekurak_net-ejb.dist-ear}
4.8 + ${reference.nekurak_net-ejb.dist-ear}:\
4.9 + ${reference.nekurak_net-rest.dist-ear}
4.10 jar.name=nekurak.net-ear.ear
4.11 javac.debug=true
4.12 javac.deprecation=false
4.13 @@ -26,8 +27,10 @@
4.14 no.dependencies=false
4.15 platform.active=default_platform
4.16 project.nekurak_net-ejb=../nekurak.net-ejb
4.17 +project.nekurak_net-rest=../nekurak.net-rest
4.18 project.nekurak_net-web=../nekurak.net-web
4.19 reference.nekurak_net-ejb.dist-ear=${project.nekurak_net-ejb}/dist/nekurak.net-ejb.jar
4.20 +reference.nekurak_net-rest.dist-ear=${project.nekurak_net-rest}/dist/nekurak.net-rest.war
4.21 reference.nekurak_net-web.dist-ear=${project.nekurak_net-web}/dist/nekurak.net-web.war
4.22 resource.dir=setup
4.23 run.classpath=
5.1 --- a/java/nekurak.net-ear/nbproject/project.xml Thu Mar 18 14:33:35 2010 +0100
5.2 +++ b/java/nekurak.net-ear/nbproject/project.xml Tue Mar 23 00:50:39 2010 +0100
5.3 @@ -15,6 +15,10 @@
5.4 <file>${reference.nekurak_net-ejb.dist-ear}</file>
5.5 <path-in-war>/</path-in-war>
5.6 </library>
5.7 + <library>
5.8 + <file>${reference.nekurak_net-rest.dist-ear}</file>
5.9 + <path-in-war>/</path-in-war>
5.10 + </library>
5.11 </web-module-additional-libraries>
5.12 </data>
5.13 <references xmlns="http://www.netbeans.org/ns/ant-project-references/1">
5.14 @@ -27,6 +31,14 @@
5.15 <id>dist-ear</id>
5.16 </reference>
5.17 <reference>
5.18 + <foreign-project>nekurak_net-rest</foreign-project>
5.19 + <artifact-type>j2ee_ear_archive</artifact-type>
5.20 + <script>build.xml</script>
5.21 + <target>dist-ear</target>
5.22 + <clean-target>clean-ear</clean-target>
5.23 + <id>dist-ear</id>
5.24 + </reference>
5.25 + <reference>
5.26 <foreign-project>nekurak_net-web</foreign-project>
5.27 <artifact-type>j2ee_ear_archive</artifact-type>
5.28 <script>build.xml</script>
6.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
6.2 +++ b/java/nekurak.net-ear/src/conf/application.xml Tue Mar 23 00:50:39 2010 +0100
6.3 @@ -0,0 +1,19 @@
6.4 +<?xml version="1.0" encoding="UTF-8"?>
6.5 +<application version="6" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application_6.xsd">
6.6 + <display-name>nekurak.net-ear</display-name>
6.7 + <module>
6.8 + <web>
6.9 + <web-uri>nekurak.net-web.war</web-uri>
6.10 + <context-root>/nekurak.net-web</context-root>
6.11 + </web>
6.12 + </module>
6.13 + <module>
6.14 + <web>
6.15 + <web-uri>nekurak.net-rest.war</web-uri>
6.16 + <context-root>/nekurak.net-rest</context-root>
6.17 + </web>
6.18 + </module>
6.19 + <module>
6.20 + <ejb>nekurak.net-ejb.jar</ejb>
6.21 + </module>
6.22 +</application>
7.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
7.2 +++ b/java/nekurak.net-ejb/src/conf/Clanek.hbm.xml Tue Mar 23 00:50:39 2010 +0100
7.3 @@ -0,0 +1,14 @@
7.4 +<?xml version="1.0"?>
7.5 +<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
7.6 +"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
7.7 +<hibernate-mapping>
7.8 + <class name="cz.frantovo.nekurak.dto.Clanek" table="clanek">
7.9 + <id name="id" column="id" type="integer">
7.10 + <generator class="sequence">
7.11 + <param name="sequence">clanek_seq</param>
7.12 + </generator>
7.13 + </id>
7.14 + <property name="nadpis" column="nadpis"/>
7.15 + <property name="text" column="text"/>
7.16 + </class>
7.17 +</hibernate-mapping>
7.18 \ No newline at end of file
8.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
8.2 +++ b/java/nekurak.net-ejb/src/java/cz/frantovo/nekurak/dao/ClanekDAO.java Tue Mar 23 00:50:39 2010 +0100
8.3 @@ -0,0 +1,38 @@
8.4 +package cz.frantovo.nekurak.dao;
8.5 +
8.6 +import cz.frantovo.nekurak.dto.Clanek;
8.7 +import java.util.Collection;
8.8 +import javax.ejb.LocalBean;
8.9 +import javax.ejb.Stateless;
8.10 +import javax.persistence.EntityManager;
8.11 +import javax.persistence.PersistenceContext;
8.12 +import javax.persistence.Query;
8.13 +
8.14 +/**
8.15 + *
8.16 + * @author fiki
8.17 + */
8.18 +@Stateless
8.19 +@LocalBean
8.20 +public class ClanekDAO {
8.21 +
8.22 + @PersistenceContext(unitName = DAO.PU)
8.23 + private EntityManager em;
8.24 +
8.25 + public Clanek getClanek(int id) {
8.26 + return em.find(Clanek.class, id);
8.27 + }
8.28 +
8.29 + public Collection<Clanek> getClanky() {
8.30 + Query dotaz = em.createQuery("FROM " + DAO.t(Clanek.class) + " c ORDER BY id");
8.31 + return dotaz.getResultList();
8.32 + }
8.33 +
8.34 + public void zalozClanek(Clanek clanek) {
8.35 + em.persist(clanek);
8.36 + }
8.37 +
8.38 + public void upravClanek(Clanek clanek) {
8.39 + em.merge(clanek);
8.40 + }
8.41 +}
9.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
9.2 +++ b/java/nekurak.net-ejb/src/java/cz/frantovo/nekurak/ejb/ClanekEJB.java Tue Mar 23 00:50:39 2010 +0100
9.3 @@ -0,0 +1,37 @@
9.4 +package cz.frantovo.nekurak.ejb;
9.5 +
9.6 +import cz.frantovo.nekurak.dao.ClanekDAO;
9.7 +import cz.frantovo.nekurak.dto.Clanek;
9.8 +import java.util.Collection;
9.9 +import javax.annotation.security.RolesAllowed;
9.10 +import javax.ejb.EJB;
9.11 +import javax.ejb.Stateless;
9.12 +
9.13 +/**
9.14 + * Redakční část – správa článků/stránek.
9.15 + * @author fiki
9.16 + */
9.17 +@Stateless
9.18 +public class ClanekEJB implements ClanekRemote {
9.19 +
9.20 + @EJB
9.21 + private ClanekDAO clanekDAO;
9.22 +
9.23 + public Clanek getClanek(int id) {
9.24 + return clanekDAO.getClanek(id);
9.25 + }
9.26 +
9.27 + public Collection<Clanek> getClanky() {
9.28 + return clanekDAO.getClanky();
9.29 + }
9.30 +
9.31 + @RolesAllowed("redaktor")
9.32 + public void zalozClanek(Clanek clanek) {
9.33 + clanekDAO.zalozClanek(clanek);
9.34 + }
9.35 +
9.36 + @RolesAllowed("redaktor")
9.37 + public void upravClanek(Clanek clanek) {
9.38 + clanekDAO.upravClanek(clanek);
9.39 + }
9.40 +}
10.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
10.2 +++ b/java/nekurak.net-lib/src/cz/frantovo/nekurak/dto/Clanek.java Tue Mar 23 00:50:39 2010 +0100
10.3 @@ -0,0 +1,32 @@
10.4 +package cz.frantovo.nekurak.dto;
10.5 +
10.6 +public class Clanek {
10.7 +
10.8 + private int id;
10.9 + private String nadpis;
10.10 + private String text;
10.11 +
10.12 + public int getId() {
10.13 + return id;
10.14 + }
10.15 +
10.16 + public void setId(int id) {
10.17 + this.id = id;
10.18 + }
10.19 +
10.20 + public String getNadpis() {
10.21 + return nadpis;
10.22 + }
10.23 +
10.24 + public void setNadpis(String nadpis) {
10.25 + this.nadpis = nadpis;
10.26 + }
10.27 +
10.28 + public String getText() {
10.29 + return text;
10.30 + }
10.31 +
10.32 + public void setText(String text) {
10.33 + this.text = text;
10.34 + }
10.35 +}
11.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
11.2 +++ b/java/nekurak.net-lib/src/cz/frantovo/nekurak/ejb/ClanekRemote.java Tue Mar 23 00:50:39 2010 +0100
11.3 @@ -0,0 +1,21 @@
11.4 +package cz.frantovo.nekurak.ejb;
11.5 +
11.6 +import cz.frantovo.nekurak.dto.Clanek;
11.7 +import java.util.Collection;
11.8 +import javax.ejb.Remote;
11.9 +
11.10 +/**
11.11 + *
11.12 + * @author fiki
11.13 + */
11.14 +@Remote
11.15 +public interface ClanekRemote {
11.16 +
11.17 + public Clanek getClanek(int id);
11.18 +
11.19 + public void zalozClanek(Clanek clanek);
11.20 +
11.21 + public void upravClanek(Clanek clanek);
11.22 +
11.23 + public Collection<Clanek> getClanky();
11.24 +}
12.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
12.2 +++ b/java/nekurak.net-lib/src/cz/frantovo/nekurak/xml/ClanekXML.java Tue Mar 23 00:50:39 2010 +0100
12.3 @@ -0,0 +1,53 @@
12.4 +package cz.frantovo.nekurak.xml;
12.5 +
12.6 +import cz.frantovo.nekurak.dto.Clanek;
12.7 +import javax.xml.bind.annotation.XmlAttribute;
12.8 +import javax.xml.bind.annotation.XmlElement;
12.9 +import javax.xml.bind.annotation.XmlRootElement;
12.10 +
12.11 +/**
12.12 + * Převaděč do XML
12.13 + * @author fiki
12.14 + */
12.15 +@XmlRootElement
12.16 +public class ClanekXML {
12.17 +
12.18 + private Clanek clanek;
12.19 +
12.20 + public ClanekXML() {
12.21 + }
12.22 +
12.23 + public ClanekXML(Clanek clanek) {
12.24 + this.clanek = clanek;
12.25 + }
12.26 +
12.27 + @XmlAttribute(name = "id", required = true)
12.28 + public int getId() {
12.29 + return clanek.getId();
12.30 + }
12.31 +
12.32 + @XmlAttribute(name = "id", required = true)
12.33 + public void setId(int id) {
12.34 + clanek.setId(id);
12.35 + }
12.36 +
12.37 + @XmlElement
12.38 + public String getNadpis() {
12.39 + return clanek.getNadpis();
12.40 + }
12.41 +
12.42 + @XmlElement
12.43 + public void setNadpis(String nadpis) {
12.44 + clanek.setNadpis(nadpis);
12.45 + }
12.46 +
12.47 + @XmlElement
12.48 + public String getText() {
12.49 + return clanek.getText();
12.50 + }
12.51 +
12.52 + @XmlElement
12.53 + public void setText(String text) {
12.54 + clanek.setText(text);
12.55 + }
12.56 +}
13.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
13.2 +++ b/java/nekurak.net-lib/src/cz/frantovo/nekurak/xml/package-info.java Tue Mar 23 00:50:39 2010 +0100
13.3 @@ -0,0 +1,5 @@
13.4 +/**
13.5 + * Třídy pro překlad mezi objekty a XML
13.6 + */
13.7 +package cz.frantovo.nekurak.xml;
13.8 +
14.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
14.2 +++ b/java/nekurak.net-rest/nbproject/ant-deploy.xml Tue Mar 23 00:50:39 2010 +0100
14.3 @@ -0,0 +1,60 @@
14.4 +<?xml version="1.0" encoding="UTF-8"?>
14.5 +<project default="-deploy-ant" basedir=".">
14.6 + <target name="-init-cl-deployment-env" if="deploy.ant.enabled">
14.7 + <property file="${deploy.ant.properties.file}" />
14.8 + <available file="${deploy.ant.docbase.dir}/WEB-INF/sun-web.xml" property="sun.web.present"/>
14.9 + <available file="${deploy.ant.resource.dir}" property="has.setup"/>
14.10 + <tempfile prefix="gfv3" property="gfv3.password.file" destdir="${java.io.tmpdir}"/> <!-- do not forget to delete this! -->
14.11 + <echo message="AS_ADMIN_PASSWORD=${gfv3.password}" file="${gfv3.password.file}"/>
14.12 + </target>
14.13 +
14.14 + <target name="-parse-sun-web" depends="-init-cl-deployment-env" if="sun.web.present">
14.15 + <tempfile prefix="gfv3" property="temp.sun.web" destdir="${java.io.tmpdir}"/>
14.16 + <copy file="${deploy.ant.docbase.dir}/WEB-INF/sun-web.xml" tofile="${temp.sun.web}"/>
14.17 + <!-- The doctype triggers resolution which can fail -->
14.18 + <replace file="${temp.sun.web}">
14.19 + <replacetoken><![CDATA[<!DOCTYPE]]></replacetoken>
14.20 + <replacevalue><![CDATA[<!-- <!DOCTYPE]]></replacevalue>
14.21 + </replace>
14.22 + <replace file="${temp.sun.web}">
14.23 + <replacetoken><![CDATA[<sun-web-app]]></replacetoken>
14.24 + <replacevalue><![CDATA[--> <sun-web-app]]></replacevalue>
14.25 + </replace>
14.26 + <xmlproperty file="${temp.sun.web}" validate="false">
14.27 + </xmlproperty>
14.28 + <delete file="${temp.sun.web}"/>
14.29 + <property name="deploy.ant.client.url" value="${gfv3.url}${sun-web-app.context-root}"/>
14.30 + <property name="deploy.context.root.argument" value="?contextroot=${sun-web-app.context-root}"/>
14.31 + </target>
14.32 + <target name="-no-parse-sun-web" depends="-init-cl-deployment-env" unless="sun.web.present">
14.33 + <property name="deploy.context.root.argument" value=""/>
14.34 + </target>
14.35 + <target name="-add-resources" depends="-init-cl-deployment-env" if="has.setup">
14.36 + <tempfile prefix="gfv3" property="gfv3.resources.dir" destdir="${java.io.tmpdir}"/>
14.37 + <mkdir dir="${gfv3.resources.dir}"/>
14.38 + <mkdir dir="${gfv3.resources.dir}/META-INF"/>
14.39 + <property name="gfv3.resources.file" value="${gfv3.resources.dir}/META-INF/sun-resources.xml"/>
14.40 + <copy todir="${gfv3.resources.dir}/META-INF">
14.41 + <fileset dir="${deploy.ant.resource.dir}"/>
14.42 + </copy>
14.43 + <jar destfile="${deploy.ant.archive}" update="true">
14.44 + <fileset dir="${gfv3.resources.dir}"/>
14.45 + </jar>
14.46 + <delete dir="${gfv3.resources.dir}"/>
14.47 + </target>
14.48 + <target name="-deploy-ant" depends="-parse-sun-web,-no-parse-sun-web,-add-resources" if="deploy.ant.enabled">
14.49 + <echo message="Deploying ${deploy.ant.archive}"/>
14.50 + <tempfile prefix="gfv3" property="gfv3.results.file" destdir="${java.io.tmpdir}"/> <!-- do not forget to delete this! -->
14.51 + <property name="full.deploy.ant.archive" location="${deploy.ant.archive}"/>
14.52 + <get src="${gfv3.url}/__asadmin/deploy?path=${full.deploy.ant.archive}${deploy.context.root.argument}?force=true?name=${ant.project.name}"
14.53 + dest="${gfv3.results.file}"/>
14.54 + <delete file="${gfv3.results.file}"/>
14.55 + </target>
14.56 + <target name="-undeploy-ant" depends="-init-cl-deployment-env" if="deploy.ant.enabled">
14.57 + <echo message="Undeploying ${deploy.ant.archive}"/>
14.58 + <tempfile prefix="gfv3" property="gfv3.results.file" destdir="${java.io.tmpdir}"/> <!-- do not forget to delete this! -->
14.59 + <get src="${gfv3.url}/__asadmin/undeploy?name=${ant.project.name}"
14.60 + dest="${gfv3.results.file}"/>
14.61 + <delete file="${gfv3.results.file}"/>
14.62 + </target>
14.63 +</project>
15.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
15.2 +++ b/java/nekurak.net-rest/nbproject/build-impl.xml Tue Mar 23 00:50:39 2010 +0100
15.3 @@ -0,0 +1,855 @@
15.4 +<?xml version="1.0" encoding="UTF-8"?>
15.5 +<!--
15.6 + *** GENERATED FROM project.xml - DO NOT EDIT ***
15.7 + *** EDIT ../build.xml INSTEAD ***
15.8 +
15.9 + For the purpose of easier reading the script
15.10 + is divided into following sections:
15.11 + - initialization
15.12 + - compilation
15.13 + - dist
15.14 + - execution
15.15 + - debugging
15.16 + - javadoc
15.17 + - junit compilation
15.18 + - junit execution
15.19 + - junit debugging
15.20 + - cleanup
15.21 +
15.22 + -->
15.23 +<project xmlns:webproject1="http://www.netbeans.org/ns/web-project/1" xmlns:webproject2="http://www.netbeans.org/ns/web-project/2" xmlns:webproject3="http://www.netbeans.org/ns/web-project/3" basedir=".." default="default" name="nekurak.net-rest-impl">
15.24 + <import file="ant-deploy.xml"/>
15.25 + <fail message="Please build using Ant 1.7.1 or higher.">
15.26 + <condition>
15.27 + <not>
15.28 + <antversion atleast="1.7.1"/>
15.29 + </not>
15.30 + </condition>
15.31 + </fail>
15.32 + <target depends="dist,javadoc" description="Build whole project." name="default"/>
15.33 + <!--
15.34 + INITIALIZATION SECTION
15.35 + -->
15.36 + <target name="-pre-init">
15.37 + <!-- Empty placeholder for easier customization. -->
15.38 + <!-- You can override this target in the ../build.xml file. -->
15.39 + </target>
15.40 + <target depends="-pre-init" name="-init-private">
15.41 + <property file="nbproject/private/private.properties"/>
15.42 + </target>
15.43 + <target depends="-pre-init,-init-private" name="-init-user">
15.44 + <property file="${user.properties.file}"/>
15.45 + <!-- The two properties below are usually overridden -->
15.46 + <!-- by the active platform. Just a fallback. -->
15.47 + <property name="default.javac.source" value="1.4"/>
15.48 + <property name="default.javac.target" value="1.4"/>
15.49 + </target>
15.50 + <target depends="-pre-init,-init-private,-init-user" name="-init-project">
15.51 + <property file="nbproject/project.properties"/>
15.52 + </target>
15.53 + <target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property" if="dist.ear.dir" name="-do-ear-init"/>
15.54 + <target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property" name="-do-init">
15.55 + <condition property="have.tests">
15.56 + <or>
15.57 + <available file="${test.src.dir}"/>
15.58 + </or>
15.59 + </condition>
15.60 + <condition property="have.sources">
15.61 + <or>
15.62 + <available file="${src.dir}"/>
15.63 + </or>
15.64 + </condition>
15.65 + <condition property="netbeans.home+have.tests">
15.66 + <and>
15.67 + <isset property="netbeans.home"/>
15.68 + <isset property="have.tests"/>
15.69 + </and>
15.70 + </condition>
15.71 + <condition property="no.javadoc.preview">
15.72 + <isfalse value="${javadoc.preview}"/>
15.73 + </condition>
15.74 + <property name="javac.compilerargs" value=""/>
15.75 + <condition property="no.deps">
15.76 + <and>
15.77 + <istrue value="${no.dependencies}"/>
15.78 + </and>
15.79 + </condition>
15.80 + <condition property="no.dist.ear.dir">
15.81 + <not>
15.82 + <isset property="dist.ear.dir"/>
15.83 + </not>
15.84 + </condition>
15.85 + <property name="build.web.excludes" value="${build.classes.excludes}"/>
15.86 + <condition property="do.compile.jsps">
15.87 + <istrue value="${compile.jsps}"/>
15.88 + </condition>
15.89 + <condition property="do.debug.server">
15.90 + <or>
15.91 + <not>
15.92 + <isset property="debug.server"/>
15.93 + </not>
15.94 + <istrue value="${debug.server}"/>
15.95 + <and>
15.96 + <not>
15.97 + <istrue value="${debug.server}"/>
15.98 + </not>
15.99 + <not>
15.100 + <istrue value="${debug.client}"/>
15.101 + </not>
15.102 + </and>
15.103 + </or>
15.104 + </condition>
15.105 + <condition property="do.debug.client">
15.106 + <istrue value="${debug.client}"/>
15.107 + </condition>
15.108 + <condition property="do.display.browser">
15.109 + <istrue value="${display.browser}"/>
15.110 + </condition>
15.111 + <condition property="do.display.browser.debug">
15.112 + <and>
15.113 + <isset property="do.display.browser"/>
15.114 + <not>
15.115 + <isset property="do.debug.client"/>
15.116 + </not>
15.117 + </and>
15.118 + </condition>
15.119 + <available file="${conf.dir}/MANIFEST.MF" property="has.custom.manifest"/>
15.120 + <available file="${persistence.xml.dir}/persistence.xml" property="has.persistence.xml"/>
15.121 + <condition property="do.war.package.with.custom.manifest">
15.122 + <isset property="has.custom.manifest"/>
15.123 + </condition>
15.124 + <condition property="do.war.package.without.custom.manifest">
15.125 + <not>
15.126 + <isset property="has.custom.manifest"/>
15.127 + </not>
15.128 + </condition>
15.129 + <condition property="do.tmp.war.package.with.custom.manifest">
15.130 + <and>
15.131 + <isset property="has.custom.manifest"/>
15.132 + <or>
15.133 + <isfalse value="${directory.deployment.supported}"/>
15.134 + <isset property="dist.ear.dir"/>
15.135 + </or>
15.136 + </and>
15.137 + </condition>
15.138 + <condition property="do.tmp.war.package.without.custom.manifest">
15.139 + <and>
15.140 + <not>
15.141 + <isset property="has.custom.manifest"/>
15.142 + </not>
15.143 + <or>
15.144 + <isfalse value="${directory.deployment.supported}"/>
15.145 + <isset property="dist.ear.dir"/>
15.146 + </or>
15.147 + </and>
15.148 + </condition>
15.149 + <condition property="do.tmp.war.package">
15.150 + <or>
15.151 + <isfalse value="${directory.deployment.supported}"/>
15.152 + <isset property="dist.ear.dir"/>
15.153 + </or>
15.154 + </condition>
15.155 + <property name="build.meta.inf.dir" value="${build.web.dir}/META-INF"/>
15.156 + <condition else="" property="application.args.param" value="${application.args}">
15.157 + <and>
15.158 + <isset property="application.args"/>
15.159 + <not>
15.160 + <equals arg1="${application.args}" arg2="" trim="true"/>
15.161 + </not>
15.162 + </and>
15.163 + </condition>
15.164 + <property name="source.encoding" value="${file.encoding}"/>
15.165 + <condition property="javadoc.encoding.used" value="${javadoc.encoding}">
15.166 + <and>
15.167 + <isset property="javadoc.encoding"/>
15.168 + <not>
15.169 + <equals arg1="${javadoc.encoding}" arg2=""/>
15.170 + </not>
15.171 + </and>
15.172 + </condition>
15.173 + <property name="javadoc.encoding.used" value="${source.encoding}"/>
15.174 + <property name="includes" value="**"/>
15.175 + <property name="excludes" value=""/>
15.176 + <property name="runmain.jvmargs" value=""/>
15.177 + <path id="endorsed.classpath.path" path="${endorsed.classpath}"/>
15.178 + <condition else="" property="endorsed.classpath.cmd.line.arg" value="-Xbootclasspath/p:'${toString:endorsed.classpath.path}'">
15.179 + <length length="0" string="${endorsed.classpath}" when="greater"/>
15.180 + </condition>
15.181 + </target>
15.182 + <target depends="init" name="-init-cos" unless="deploy.on.save">
15.183 + <condition property="deploy.on.save" value="true">
15.184 + <istrue value="${j2ee.deploy.on.save}"/>
15.185 + </condition>
15.186 + </target>
15.187 + <target name="-post-init">
15.188 + <!-- Empty placeholder for easier customization. -->
15.189 + <!-- You can override this target in the ../build.xml file. -->
15.190 + </target>
15.191 + <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init" name="-init-check">
15.192 + <fail unless="src.dir">Must set src.dir</fail>
15.193 + <fail unless="test.src.dir">Must set test.src.dir</fail>
15.194 + <fail unless="build.dir">Must set build.dir</fail>
15.195 + <fail unless="build.web.dir">Must set build.web.dir</fail>
15.196 + <fail unless="build.generated.dir">Must set build.generated.dir</fail>
15.197 + <fail unless="dist.dir">Must set dist.dir</fail>
15.198 + <fail unless="build.classes.dir">Must set build.classes.dir</fail>
15.199 + <fail unless="dist.javadoc.dir">Must set dist.javadoc.dir</fail>
15.200 + <fail unless="build.test.classes.dir">Must set build.test.classes.dir</fail>
15.201 + <fail unless="build.test.results.dir">Must set build.test.results.dir</fail>
15.202 + <fail unless="build.classes.excludes">Must set build.classes.excludes</fail>
15.203 + <fail unless="dist.war">Must set dist.war</fail>
15.204 + <fail unless="j2ee.platform.classpath">
15.205 +The Java EE server classpath is not correctly set up. Your active server type is ${j2ee.server.type}.
15.206 +Either open the project in the IDE and assign the server or setup the server classpath manually.
15.207 +For example like this:
15.208 + ant -Duser.properties.file=<path_to_property_file> (where you put the property "j2ee.platform.classpath" in a .properties file)
15.209 +or ant -Dj2ee.platform.classpath=<server_classpath> (where no properties file is used)
15.210 + </fail>
15.211 + </target>
15.212 + <target name="-init-macrodef-property">
15.213 + <macrodef name="property" uri="http://www.netbeans.org/ns/web-project/1">
15.214 + <attribute name="name"/>
15.215 + <attribute name="value"/>
15.216 + <sequential>
15.217 + <property name="@{name}" value="${@{value}}"/>
15.218 + </sequential>
15.219 + </macrodef>
15.220 + </target>
15.221 + <target name="-init-macrodef-javac">
15.222 + <macrodef name="javac" uri="http://www.netbeans.org/ns/web-project/2">
15.223 + <attribute default="${src.dir}" name="srcdir"/>
15.224 + <attribute default="${build.classes.dir}" name="destdir"/>
15.225 + <attribute default="${javac.classpath}:${j2ee.platform.classpath}" name="classpath"/>
15.226 + <attribute default="${includes}" name="includes"/>
15.227 + <attribute default="${excludes}" name="excludes"/>
15.228 + <attribute default="${javac.debug}" name="debug"/>
15.229 + <attribute default="${empty.dir}" name="gensrcdir"/>
15.230 + <element name="customize" optional="true"/>
15.231 + <sequential>
15.232 + <property location="${build.dir}/empty" name="empty.dir"/>
15.233 + <mkdir dir="${empty.dir}"/>
15.234 + <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}">
15.235 + <src>
15.236 + <dirset dir="@{gensrcdir}" erroronmissingdir="false">
15.237 + <include name="*"/>
15.238 + </dirset>
15.239 + </src>
15.240 + <classpath>
15.241 + <path path="@{classpath}"/>
15.242 + </classpath>
15.243 + <compilerarg line="${endorsed.classpath.cmd.line.arg}"/>
15.244 + <compilerarg line="${javac.compilerargs}"/>
15.245 + <customize/>
15.246 + </javac>
15.247 + </sequential>
15.248 + </macrodef>
15.249 + </target>
15.250 + <target name="-init-macrodef-junit">
15.251 + <macrodef name="junit" uri="http://www.netbeans.org/ns/web-project/2">
15.252 + <attribute default="${includes}" name="includes"/>
15.253 + <attribute default="${excludes}" name="excludes"/>
15.254 + <attribute default="**" name="testincludes"/>
15.255 + <sequential>
15.256 + <junit dir="${basedir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" showoutput="true" tempdir="${java.io.tmpdir}">
15.257 + <batchtest todir="${build.test.results.dir}">
15.258 + <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
15.259 + <filename name="@{testincludes}"/>
15.260 + </fileset>
15.261 + </batchtest>
15.262 + <classpath>
15.263 + <path path="${run.test.classpath}:${j2ee.platform.classpath}:${j2ee.platform.embeddableejb.classpath}"/>
15.264 + </classpath>
15.265 + <syspropertyset>
15.266 + <propertyref prefix="test-sys-prop."/>
15.267 + <mapper from="test-sys-prop.*" to="*" type="glob"/>
15.268 + </syspropertyset>
15.269 + <formatter type="brief" usefile="false"/>
15.270 + <formatter type="xml"/>
15.271 + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
15.272 + <jvmarg line="${runmain.jvmargs}"/>
15.273 + </junit>
15.274 + </sequential>
15.275 + </macrodef>
15.276 + </target>
15.277 + <target name="-init-macrodef-java">
15.278 + <macrodef name="java" uri="http://www.netbeans.org/ns/web-project/1">
15.279 + <attribute default="${main.class}" name="classname"/>
15.280 + <attribute default="${debug.classpath}" name="classpath"/>
15.281 + <element name="customize" optional="true"/>
15.282 + <sequential>
15.283 + <java classname="@{classname}" fork="true">
15.284 + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
15.285 + <jvmarg line="${runmain.jvmargs}"/>
15.286 + <classpath>
15.287 + <path path="@{classpath}:${j2ee.platform.classpath}"/>
15.288 + </classpath>
15.289 + <syspropertyset>
15.290 + <propertyref prefix="run-sys-prop."/>
15.291 + <mapper from="run-sys-prop.*" to="*" type="glob"/>
15.292 + </syspropertyset>
15.293 + <customize/>
15.294 + </java>
15.295 + </sequential>
15.296 + </macrodef>
15.297 + </target>
15.298 + <target name="-init-macrodef-nbjsdebug">
15.299 + <macrodef name="nbjsdebugstart" uri="http://www.netbeans.org/ns/web-project/1">
15.300 + <attribute default="${client.url}" name="webUrl"/>
15.301 + <sequential>
15.302 + <nbjsdebugstart urlPart="${client.urlPart}" webUrl="@{webUrl}"/>
15.303 + </sequential>
15.304 + </macrodef>
15.305 + </target>
15.306 + <target depends="-init-debug-args" name="-init-macrodef-nbjpda">
15.307 + <macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/web-project/1">
15.308 + <attribute default="${main.class}" name="name"/>
15.309 + <attribute default="${debug.classpath}:${j2ee.platform.classpath}" name="classpath"/>
15.310 + <sequential>
15.311 + <nbjpdastart addressproperty="jpda.address" name="@{name}" transport="${debug-transport}">
15.312 + <classpath>
15.313 + <path path="@{classpath}"/>
15.314 + </classpath>
15.315 + </nbjpdastart>
15.316 + </sequential>
15.317 + </macrodef>
15.318 + <macrodef name="nbjpdareload" uri="http://www.netbeans.org/ns/web-project/1">
15.319 + <attribute default="${build.classes.dir}" name="dir"/>
15.320 + <sequential>
15.321 + <nbjpdareload>
15.322 + <fileset dir="@{dir}" includes="${fix.classes}">
15.323 + <include name="${fix.includes}*.class"/>
15.324 + </fileset>
15.325 + </nbjpdareload>
15.326 + </sequential>
15.327 + </macrodef>
15.328 + <macrodef name="nbjpdaappreloaded" uri="http://www.netbeans.org/ns/web-project/1">
15.329 + <sequential>
15.330 + <nbjpdaappreloaded/>
15.331 + </sequential>
15.332 + </macrodef>
15.333 + </target>
15.334 + <target name="-init-debug-args">
15.335 + <property name="version-output" value="java version "${ant.java.version}"/>
15.336 + <condition property="have-jdk-older-than-1.4">
15.337 + <or>
15.338 + <contains string="${version-output}" substring="java version "1.0"/>
15.339 + <contains string="${version-output}" substring="java version "1.1"/>
15.340 + <contains string="${version-output}" substring="java version "1.2"/>
15.341 + <contains string="${version-output}" substring="java version "1.3"/>
15.342 + </or>
15.343 + </condition>
15.344 + <condition else="-Xdebug" property="debug-args-line" value="-Xdebug -Xnoagent -Djava.compiler=none">
15.345 + <istrue value="${have-jdk-older-than-1.4}"/>
15.346 + </condition>
15.347 + <condition else="dt_socket" property="debug-transport-by-os" value="dt_shmem">
15.348 + <os family="windows"/>
15.349 + </condition>
15.350 + <condition else="${debug-transport-by-os}" property="debug-transport" value="${debug.transport}">
15.351 + <isset property="debug.transport"/>
15.352 + </condition>
15.353 + </target>
15.354 + <target depends="-init-debug-args" name="-init-macrodef-debug">
15.355 + <macrodef name="debug" uri="http://www.netbeans.org/ns/web-project/1">
15.356 + <attribute default="${main.class}" name="classname"/>
15.357 + <attribute default="${debug.classpath}:${j2ee.platform.classpath}" name="classpath"/>
15.358 + <attribute default="${application.args.param}" name="args"/>
15.359 + <element name="customize" optional="true"/>
15.360 + <sequential>
15.361 + <java classname="@{classname}" fork="true">
15.362 + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
15.363 + <jvmarg line="${debug-args-line}"/>
15.364 + <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>
15.365 + <jvmarg line="${runmain.jvmargs}"/>
15.366 + <classpath>
15.367 + <path path="@{classpath}"/>
15.368 + </classpath>
15.369 + <syspropertyset>
15.370 + <propertyref prefix="run-sys-prop."/>
15.371 + <mapper from="run-sys-prop.*" to="*" type="glob"/>
15.372 + </syspropertyset>
15.373 + <arg line="@{args}"/>
15.374 + <customize/>
15.375 + </java>
15.376 + </sequential>
15.377 + </macrodef>
15.378 + </target>
15.379 + <target name="-init-taskdefs">
15.380 + <fail unless="libs.CopyLibs.classpath">
15.381 +The libs.CopyLibs.classpath property is not set up.
15.382 +This property must point to
15.383 +org-netbeans-modules-java-j2seproject-copylibstask.jar file which is part
15.384 +of NetBeans IDE installation and is usually located at
15.385 +<netbeans_installation>/java<version>/ant/extra folder.
15.386 +Either open the project in the IDE and make sure CopyLibs library
15.387 +exists or setup the property manually. For example like this:
15.388 + ant -Dlibs.CopyLibs.classpath=a/path/to/org-netbeans-modules-java-j2seproject-copylibstask.jar
15.389 + </fail>
15.390 + <taskdef classpath="${libs.CopyLibs.classpath}" resource="org/netbeans/modules/java/j2seproject/copylibstask/antlib.xml"/>
15.391 + </target>
15.392 + <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" name="init"/>
15.393 + <!--
15.394 + COMPILATION SECTION
15.395 + -->
15.396 + <target depends="init" if="no.dist.ear.dir" name="deps-module-jar" unless="no.deps"/>
15.397 + <target depends="init" if="dist.ear.dir" name="deps-ear-jar" unless="no.deps"/>
15.398 + <target depends="init, deps-module-jar, deps-ear-jar" name="deps-jar" unless="no.deps"/>
15.399 + <target depends="init,deps-jar" name="-pre-pre-compile">
15.400 + <mkdir dir="${build.classes.dir}"/>
15.401 + </target>
15.402 + <target name="-pre-compile">
15.403 + <!-- Empty placeholder for easier customization. -->
15.404 + <!-- You can override this target in the ../build.xml file. -->
15.405 + </target>
15.406 + <target name="-copy-webdir">
15.407 + <copy todir="${build.web.dir}">
15.408 + <fileset dir="${web.docbase.dir}" excludes="${build.web.excludes},${excludes}" includes="${includes}"/>
15.409 + </copy>
15.410 + <copy todir="${build.web.dir}/WEB-INF">
15.411 + <fileset dir="${webinf.dir}" excludes="${build.web.excludes}"/>
15.412 + </copy>
15.413 + </target>
15.414 + <target depends="init, deps-jar, -pre-pre-compile, -pre-compile, -copy-manifest, -copy-persistence-xml, -copy-webdir, library-inclusion-in-archive,library-inclusion-in-manifest" if="have.sources" name="-do-compile">
15.415 + <webproject2:javac destdir="${build.classes.dir}" gensrcdir="${build.generated.sources.dir}"/>
15.416 + <copy todir="${build.classes.dir}">
15.417 + <fileset dir="${src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
15.418 + </copy>
15.419 + </target>
15.420 + <target if="has.custom.manifest" name="-copy-manifest">
15.421 + <mkdir dir="${build.meta.inf.dir}"/>
15.422 + <copy todir="${build.meta.inf.dir}">
15.423 + <fileset dir="${conf.dir}" includes="MANIFEST.MF"/>
15.424 + </copy>
15.425 + </target>
15.426 + <target if="has.persistence.xml" name="-copy-persistence-xml">
15.427 + <mkdir dir="${build.web.dir}/WEB-INF/classes/META-INF"/>
15.428 + <copy todir="${build.web.dir}/WEB-INF/classes/META-INF">
15.429 + <fileset dir="${persistence.xml.dir}" includes="persistence.xml"/>
15.430 + </copy>
15.431 + </target>
15.432 + <target name="-post-compile">
15.433 + <!-- Empty placeholder for easier customization. -->
15.434 + <!-- You can override this target in the ../build.xml file. -->
15.435 + </target>
15.436 + <target depends="init,deps-jar,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project." name="compile"/>
15.437 + <target name="-pre-compile-single">
15.438 + <!-- Empty placeholder for easier customization. -->
15.439 + <!-- You can override this target in the ../build.xml file. -->
15.440 + </target>
15.441 + <target depends="init,deps-jar,-pre-pre-compile" name="-do-compile-single">
15.442 + <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
15.443 + <webproject2:javac excludes="" gensrcdir="${build.generated.sources.dir}" includes="${javac.includes}"/>
15.444 + <copy todir="${build.classes.dir}">
15.445 + <fileset dir="${src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
15.446 + </copy>
15.447 + </target>
15.448 + <target name="-post-compile-single">
15.449 + <!-- Empty placeholder for easier customization. -->
15.450 + <!-- You can override this target in the ../build.xml file. -->
15.451 + </target>
15.452 + <target depends="init,deps-jar,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single" name="compile-single"/>
15.453 + <target depends="compile" description="Test compile JSP pages to expose compilation errors." if="do.compile.jsps" name="compile-jsps">
15.454 + <mkdir dir="${build.generated.dir}/src"/>
15.455 + <java classname="org.netbeans.modules.web.project.ant.JspC" failonerror="true" fork="true">
15.456 + <arg value="-uriroot"/>
15.457 + <arg file="${basedir}/${build.web.dir}"/>
15.458 + <arg value="-d"/>
15.459 + <arg file="${basedir}/${build.generated.dir}/src"/>
15.460 + <arg value="-die1"/>
15.461 + <arg value="-compilerSourceVM ${javac.source}"/>
15.462 + <arg value="-compilerTargetVM ${javac.target}"/>
15.463 + <arg value="-javaEncoding ${source.encoding}"/>
15.464 + <classpath path="${java.home}/../lib/tools.jar:${jspctask.classpath}:${jspcompilation.classpath}"/>
15.465 + </java>
15.466 + <mkdir dir="${build.generated.dir}/classes"/>
15.467 + <webproject2:javac classpath="${j2ee.platform.classpath}:${build.classes.dir}:${jspcompilation.classpath}" destdir="${build.generated.dir}/classes" srcdir="${build.generated.dir}/src"/>
15.468 + </target>
15.469 + <target depends="compile" if="jsp.includes" name="-do-compile-single-jsp">
15.470 + <fail unless="javac.jsp.includes">Must select some files in the IDE or set javac.jsp.includes</fail>
15.471 + <mkdir dir="${build.generated.dir}/src"/>
15.472 + <java classname="org.netbeans.modules.web.project.ant.JspCSingle" failonerror="true" fork="true">
15.473 + <arg value="-uriroot"/>
15.474 + <arg file="${basedir}/${build.web.dir}"/>
15.475 + <arg value="-d"/>
15.476 + <arg file="${basedir}/${build.generated.dir}/src"/>
15.477 + <arg value="-die1"/>
15.478 + <arg value="-jspc.files"/>
15.479 + <arg path="${jsp.includes}"/>
15.480 + <arg value="-compilerSourceVM ${javac.source}"/>
15.481 + <arg value="-compilerTargetVM ${javac.target}"/>
15.482 + <arg value="-javaEncoding ${source.encoding}"/>
15.483 + <classpath path="${java.home}/../lib/tools.jar:${jspctask.classpath}:${jspcompilation.classpath}"/>
15.484 + </java>
15.485 + <mkdir dir="${build.generated.dir}/classes"/>
15.486 + <webproject2:javac classpath="${j2ee.platform.classpath}:${build.classes.dir}:${jspcompilation.classpath}" destdir="${build.generated.dir}/classes" srcdir="${build.generated.dir}/src">
15.487 + <customize>
15.488 + <patternset includes="${javac.jsp.includes}"/>
15.489 + </customize>
15.490 + </webproject2:javac>
15.491 + </target>
15.492 + <target name="compile-single-jsp">
15.493 + <fail unless="jsp.includes">Must select a file in the IDE or set jsp.includes</fail>
15.494 + <antcall target="-do-compile-single-jsp"/>
15.495 + </target>
15.496 + <!--
15.497 + DIST BUILDING SECTION
15.498 + -->
15.499 + <target name="-pre-dist">
15.500 + <!-- Empty placeholder for easier customization. -->
15.501 + <!-- You can override this target in the ../build.xml file. -->
15.502 + </target>
15.503 + <target depends="init,compile,compile-jsps,-pre-dist" if="do.war.package.without.custom.manifest" name="-do-dist-without-manifest">
15.504 + <dirname file="${dist.war}" property="dist.jar.dir"/>
15.505 + <mkdir dir="${dist.jar.dir}"/>
15.506 + <jar compress="${jar.compress}" jarfile="${dist.war}">
15.507 + <fileset dir="${build.web.dir}"/>
15.508 + </jar>
15.509 + </target>
15.510 + <target depends="init,compile,compile-jsps,-pre-dist" if="do.war.package.with.custom.manifest" name="-do-dist-with-manifest">
15.511 + <dirname file="${dist.war}" property="dist.jar.dir"/>
15.512 + <mkdir dir="${dist.jar.dir}"/>
15.513 + <jar compress="${jar.compress}" jarfile="${dist.war}" manifest="${build.meta.inf.dir}/MANIFEST.MF">
15.514 + <fileset dir="${build.web.dir}"/>
15.515 + </jar>
15.516 + </target>
15.517 + <target depends="init,compile,compile-jsps,-pre-dist" if="do.tmp.war.package.without.custom.manifest" name="-do-tmp-dist-without-manifest">
15.518 + <dirname file="${dist.war}" property="dist.jar.dir"/>
15.519 + <mkdir dir="${dist.jar.dir}"/>
15.520 + <jar compress="${jar.compress}" jarfile="${dist.war}">
15.521 + <fileset dir="${build.web.dir}"/>
15.522 + </jar>
15.523 + </target>
15.524 + <target depends="init,compile,compile-jsps,-pre-dist" if="do.tmp.war.package.with.custom.manifest" name="-do-tmp-dist-with-manifest">
15.525 + <dirname file="${dist.war}" property="dist.jar.dir"/>
15.526 + <mkdir dir="${dist.jar.dir}"/>
15.527 + <jar compress="${jar.compress}" jarfile="${dist.war}" manifest="${build.meta.inf.dir}/MANIFEST.MF">
15.528 + <fileset dir="${build.web.dir}"/>
15.529 + </jar>
15.530 + </target>
15.531 + <target depends="init,compile,compile-jsps,-pre-dist,-do-dist-with-manifest,-do-dist-without-manifest" name="do-dist"/>
15.532 + <target depends="init" if="dist.ear.dir" name="library-inclusion-in-manifest">
15.533 + <mkdir dir="${build.web.dir}/META-INF"/>
15.534 + <manifest file="${build.web.dir}/META-INF/MANIFEST.MF" mode="update"/>
15.535 + </target>
15.536 + <target depends="init" name="library-inclusion-in-archive" unless="dist.ear.dir"/>
15.537 + <target depends="init" if="dist.ear.dir" name="-clean-webinf-lib">
15.538 + <delete dir="${build.web.dir}/WEB-INF/lib"/>
15.539 + </target>
15.540 + <target depends="init,-clean-webinf-lib,compile,compile-jsps,-pre-dist,library-inclusion-in-manifest" if="do.tmp.war.package" name="do-ear-dist">
15.541 + <dirname file="${dist.ear.war}" property="dist.jar.dir"/>
15.542 + <mkdir dir="${dist.jar.dir}"/>
15.543 + <jar compress="${jar.compress}" jarfile="${dist.ear.war}" manifest="${build.web.dir}/META-INF/MANIFEST.MF">
15.544 + <fileset dir="${build.web.dir}"/>
15.545 + </jar>
15.546 + </target>
15.547 + <target name="-post-dist">
15.548 + <!-- Empty placeholder for easier customization. -->
15.549 + <!-- You can override this target in the ../build.xml file. -->
15.550 + </target>
15.551 + <target depends="init,compile,-pre-dist,do-dist,-post-dist" description="Build distribution (WAR)." name="dist"/>
15.552 + <target depends="init,-clean-webinf-lib,-init-cos,compile,-pre-dist,do-ear-dist,-post-dist" description="Build distribution (WAR) to be packaged into an EAR." name="dist-ear"/>
15.553 + <!--
15.554 + EXECUTION SECTION
15.555 + -->
15.556 + <target depends="run-deploy,run-display-browser" description="Deploy to server and show in browser." name="run"/>
15.557 + <target name="-pre-run-deploy">
15.558 + <!-- Empty placeholder for easier customization. -->
15.559 + <!-- You can override this target in the ../build.xml file. -->
15.560 + </target>
15.561 + <target name="-post-run-deploy">
15.562 + <!-- Empty placeholder for easier customization. -->
15.563 + <!-- You can override this target in the ../build.xml file. -->
15.564 + </target>
15.565 + <target name="-pre-nbmodule-run-deploy">
15.566 + <!-- Empty placeholder for easier customization. -->
15.567 + <!-- This target can be overriden by NetBeans modules. Don't override it directly, use -pre-run-deploy task instead. -->
15.568 + </target>
15.569 + <target name="-post-nbmodule-run-deploy">
15.570 + <!-- Empty placeholder for easier customization. -->
15.571 + <!-- This target can be overriden by NetBeans modules. Don't override it directly, use -post-run-deploy task instead. -->
15.572 + </target>
15.573 + <target name="-run-deploy-am">
15.574 + <!-- Task to deploy to the Access Manager runtime. -->
15.575 + </target>
15.576 + <target depends="init,-init-cos,compile,compile-jsps,-do-compile-single-jsp,-pre-dist,-do-tmp-dist-with-manifest,-do-tmp-dist-without-manifest,-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">
15.577 + <nbjpdaappreloaded/>
15.578 + </target>
15.579 + <target if="netbeans.home" name="-run-deploy-nb">
15.580 + <nbdeploy clientUrlPart="${client.urlPart}" debugmode="false" forceRedeploy="${forceRedeploy}"/>
15.581 + </target>
15.582 + <target name="-init-deploy-ant" unless="netbeans.home">
15.583 + <property name="deploy.ant.archive" value="${dist.war}"/>
15.584 + <property name="deploy.ant.docbase.dir" value="${web.docbase.dir}"/>
15.585 + <property name="deploy.ant.resource.dir" value="${resource.dir}"/>
15.586 + <property name="deploy.ant.enabled" value="true"/>
15.587 + </target>
15.588 + <target depends="dist,-run-undeploy-nb,-init-deploy-ant,-undeploy-ant" name="run-undeploy"/>
15.589 + <target if="netbeans.home" name="-run-undeploy-nb">
15.590 + <fail message="Undeploy is not supported from within the IDE"/>
15.591 + </target>
15.592 + <target depends="init,-pre-dist,dist,-post-dist" name="verify">
15.593 + <nbverify file="${dist.war}"/>
15.594 + </target>
15.595 + <target depends="run-deploy,-init-display-browser,-display-browser-nb,-display-browser-cl" name="run-display-browser"/>
15.596 + <target if="do.display.browser" name="-init-display-browser">
15.597 + <condition property="do.display.browser.nb">
15.598 + <isset property="netbeans.home"/>
15.599 + </condition>
15.600 + <condition property="do.display.browser.cl">
15.601 + <isset property="deploy.ant.enabled"/>
15.602 + </condition>
15.603 + </target>
15.604 + <target if="do.display.browser.nb" name="-display-browser-nb">
15.605 + <nbbrowse url="${client.url}"/>
15.606 + </target>
15.607 + <target if="do.display.browser.cl" name="-get-browser" unless="browser">
15.608 + <condition property="browser" value="rundll32">
15.609 + <os family="windows"/>
15.610 + </condition>
15.611 + <condition else="" property="browser.args" value="url.dll,FileProtocolHandler">
15.612 + <os family="windows"/>
15.613 + </condition>
15.614 + <condition property="browser" value="/usr/bin/open">
15.615 + <os family="mac"/>
15.616 + </condition>
15.617 + <property environment="env"/>
15.618 + <condition property="browser" value="${env.BROWSER}">
15.619 + <isset property="env.BROWSER"/>
15.620 + </condition>
15.621 + <condition property="browser" value="/usr/bin/firefox">
15.622 + <available file="/usr/bin/firefox"/>
15.623 + </condition>
15.624 + <condition property="browser" value="/usr/local/firefox/firefox">
15.625 + <available file="/usr/local/firefox/firefox"/>
15.626 + </condition>
15.627 + <condition property="browser" value="/usr/bin/mozilla">
15.628 + <available file="/usr/bin/mozilla"/>
15.629 + </condition>
15.630 + <condition property="browser" value="/usr/local/mozilla/mozilla">
15.631 + <available file="/usr/local/mozilla/mozilla"/>
15.632 + </condition>
15.633 + <condition property="browser" value="/usr/sfw/lib/firefox/firefox">
15.634 + <available file="/usr/sfw/lib/firefox/firefox"/>
15.635 + </condition>
15.636 + <condition property="browser" value="/opt/csw/bin/firefox">
15.637 + <available file="/opt/csw/bin/firefox"/>
15.638 + </condition>
15.639 + <condition property="browser" value="/usr/sfw/lib/mozilla/mozilla">
15.640 + <available file="/usr/sfw/lib/mozilla/mozilla"/>
15.641 + </condition>
15.642 + <condition property="browser" value="/opt/csw/bin/mozilla">
15.643 + <available file="/opt/csw/bin/mozilla"/>
15.644 + </condition>
15.645 + </target>
15.646 + <target depends="-get-browser" if="do.display.browser.cl" name="-display-browser-cl">
15.647 + <fail unless="browser">
15.648 + Browser not found, cannot launch the deployed application. Try to set the BROWSER environment variable.
15.649 + </fail>
15.650 + <property name="browse.url" value="${deploy.ant.client.url}${client.urlPart}"/>
15.651 + <echo>Launching ${browse.url}</echo>
15.652 + <exec executable="${browser}" spawn="true">
15.653 + <arg line="${browser.args} ${browse.url}"/>
15.654 + </exec>
15.655 + </target>
15.656 + <target depends="init,-init-cos,compile-single" name="run-main">
15.657 + <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
15.658 + <webproject1:java classname="${run.class}"/>
15.659 + </target>
15.660 + <target depends="init,compile-test-single,-pre-test-run-single" name="run-test-with-main">
15.661 + <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
15.662 + <webproject1:java classname="${run.class}" classpath="${run.test.classpath}"/>
15.663 + </target>
15.664 + <!--
15.665 + DEBUGGING SECTION
15.666 + -->
15.667 + <target depends="init,-init-cos,compile,compile-jsps,-do-compile-single-jsp,-pre-dist,-do-tmp-dist-with-manifest,-do-tmp-dist-without-manifest" description="Debug project in IDE." if="netbeans.home" name="debug">
15.668 + <nbstartserver debugmode="true"/>
15.669 + <antcall target="connect-debugger"/>
15.670 + <nbdeploy clientUrlPart="${client.urlPart}" debugmode="true" forceRedeploy="true"/>
15.671 + <antcall target="debug-display-browser"/>
15.672 + <antcall target="connect-client-debugger"/>
15.673 + </target>
15.674 + <target if="do.debug.server" name="connect-debugger" unless="is.debugged">
15.675 + <nbjpdaconnect address="${jpda.address}" host="${jpda.host}" name="${name}" transport="${jpda.transport}">
15.676 + <classpath>
15.677 + <path path="${debug.classpath}:${j2ee.platform.classpath}"/>
15.678 + </classpath>
15.679 + <sourcepath>
15.680 + <path path="${web.docbase.dir}"/>
15.681 + </sourcepath>
15.682 + </nbjpdaconnect>
15.683 + </target>
15.684 + <target if="do.display.browser.debug" name="debug-display-browser">
15.685 + <nbbrowse url="${client.url}"/>
15.686 + </target>
15.687 + <target if="do.debug.client" name="connect-client-debugger">
15.688 + <webproject1:nbjsdebugstart webUrl="${client.url}"/>
15.689 + </target>
15.690 + <target depends="init,compile-test-single" if="netbeans.home" name="-debug-start-debuggee-main-test">
15.691 + <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
15.692 + <webproject1:debug classname="${debug.class}" classpath="${debug.test.classpath}"/>
15.693 + </target>
15.694 + <target depends="init,compile-test-single,-debug-start-debugger-main-test,-debug-start-debuggee-main-test" if="netbeans.home" name="debug-test-with-main"/>
15.695 + <target depends="init,compile,compile-jsps,-do-compile-single-jsp,debug" if="netbeans.home" name="debug-single"/>
15.696 + <target depends="init" if="netbeans.home" name="-debug-start-debugger-main-test">
15.697 + <webproject1:nbjpdastart classpath="${debug.test.classpath}" name="${debug.class}"/>
15.698 + </target>
15.699 + <target depends="init" if="netbeans.home" name="-debug-start-debugger">
15.700 + <webproject1:nbjpdastart name="${debug.class}"/>
15.701 + </target>
15.702 + <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-single">
15.703 + <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
15.704 + <webproject1:debug classname="${debug.class}"/>
15.705 + </target>
15.706 + <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-single" if="netbeans.home" name="debug-single-main"/>
15.707 + <target depends="init" name="-pre-debug-fix">
15.708 + <fail unless="fix.includes">Must set fix.includes</fail>
15.709 + <property name="javac.includes" value="${fix.includes}.java"/>
15.710 + </target>
15.711 + <target depends="init,-pre-debug-fix,compile-single" if="netbeans.home" name="-do-debug-fix">
15.712 + <webproject1:nbjpdareload/>
15.713 + </target>
15.714 + <target depends="init,-pre-debug-fix,-do-debug-fix" if="netbeans.home" name="debug-fix"/>
15.715 + <!--
15.716 + JAVADOC SECTION
15.717 + -->
15.718 + <target depends="init" name="javadoc-build">
15.719 + <mkdir dir="${dist.javadoc.dir}"/>
15.720 + <javadoc additionalparam="${javadoc.additionalparam}" author="${javadoc.author}" charset="UTF-8" destdir="${dist.javadoc.dir}" docencoding="UTF-8" encoding="${javadoc.encoding.used}" failonerror="true" noindex="${javadoc.noindex}" nonavbar="${javadoc.nonavbar}" notree="${javadoc.notree}" private="${javadoc.private}" source="${javac.source}" splitindex="${javadoc.splitindex}" use="${javadoc.use}" useexternalfile="true" version="${javadoc.version}" windowtitle="${javadoc.windowtitle}">
15.721 + <classpath>
15.722 + <path path="${javac.classpath}:${j2ee.platform.classpath}"/>
15.723 + </classpath>
15.724 + <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">
15.725 + <filename name="**/*.java"/>
15.726 + </fileset>
15.727 + <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">
15.728 + <include name="**/*.java"/>
15.729 + </fileset>
15.730 + </javadoc>
15.731 + </target>
15.732 + <target depends="init,javadoc-build" if="netbeans.home" name="javadoc-browse" unless="no.javadoc.preview">
15.733 + <nbbrowse file="${dist.javadoc.dir}/index.html"/>
15.734 + </target>
15.735 + <target depends="init,javadoc-build,javadoc-browse" description="Build Javadoc." name="javadoc"/>
15.736 + <!--
15.737 +
15.738 + JUNIT COMPILATION SECTION
15.739 + -->
15.740 + <target depends="init,compile" if="have.tests" name="-pre-pre-compile-test">
15.741 + <mkdir dir="${build.test.classes.dir}"/>
15.742 + <property name="j2ee.platform.embeddableejb.classpath" value=""/>
15.743 + </target>
15.744 + <target name="-pre-compile-test">
15.745 + <!-- Empty placeholder for easier customization. -->
15.746 + <!-- You can override this target in the ../build.xml file. -->
15.747 + </target>
15.748 + <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test" if="have.tests" name="-do-compile-test">
15.749 + <webproject2:javac classpath="${javac.test.classpath}:${j2ee.platform.classpath}:${j2ee.platform.embeddableejb.classpath}" debug="true" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/>
15.750 + <copy todir="${build.test.classes.dir}">
15.751 + <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
15.752 + </copy>
15.753 + </target>
15.754 + <target name="-post-compile-test">
15.755 + <!-- Empty placeholder for easier customization. -->
15.756 + <!-- You can override this target in the ../build.xml file. -->
15.757 + </target>
15.758 + <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-do-compile-test,-post-compile-test" name="compile-test"/>
15.759 + <target name="-pre-compile-test-single">
15.760 + <!-- Empty placeholder for easier customization. -->
15.761 + <!-- You can override this target in the ../build.xml file. -->
15.762 + </target>
15.763 + <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single" if="have.tests" name="-do-compile-test-single">
15.764 + <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
15.765 + <webproject2:javac classpath="${javac.test.classpath}:${j2ee.platform.classpath}:${j2ee.platform.embeddableejb.classpath}" debug="true" destdir="${build.test.classes.dir}" excludes="" includes="${javac.includes}" srcdir="${test.src.dir}"/>
15.766 + <copy todir="${build.test.classes.dir}">
15.767 + <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
15.768 + </copy>
15.769 + </target>
15.770 + <target name="-post-compile-test-single">
15.771 + <!-- Empty placeholder for easier customization. -->
15.772 + <!-- You can override this target in the ../build.xml file. -->
15.773 + </target>
15.774 + <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single" name="compile-test-single"/>
15.775 + <!--
15.776 +
15.777 + JUNIT EXECUTION SECTION
15.778 + -->
15.779 + <target depends="init" if="have.tests" name="-pre-test-run">
15.780 + <mkdir dir="${build.test.results.dir}"/>
15.781 + </target>
15.782 + <target depends="init,compile-test,-pre-test-run" if="have.tests" name="-do-test-run">
15.783 + <webproject2:junit testincludes="**/*Test.java"/>
15.784 + </target>
15.785 + <target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run">
15.786 + <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
15.787 + </target>
15.788 + <target depends="init" if="have.tests" name="test-report"/>
15.789 + <target depends="init" if="netbeans.home+have.tests" name="-test-browse"/>
15.790 + <target depends="init,compile-test,-pre-test-run,-do-test-run,test-report,-post-test-run,-test-browse" description="Run unit tests." name="test"/>
15.791 + <target depends="init" if="have.tests" name="-pre-test-run-single">
15.792 + <mkdir dir="${build.test.results.dir}"/>
15.793 + </target>
15.794 + <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single">
15.795 + <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
15.796 + <webproject2:junit excludes="" includes="${test.includes}"/>
15.797 + </target>
15.798 + <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single">
15.799 + <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
15.800 + </target>
15.801 + <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single,-post-test-run-single" description="Run single unit test." name="test-single"/>
15.802 + <!--
15.803 +
15.804 + JUNIT DEBUGGING SECTION
15.805 + -->
15.806 + <target depends="init,compile-test" if="have.tests" name="-debug-start-debuggee-test">
15.807 + <fail unless="test.class">Must select one file in the IDE or set test.class</fail>
15.808 + <property location="${build.test.results.dir}/TEST-${test.class}.xml" name="test.report.file"/>
15.809 + <delete file="${test.report.file}"/>
15.810 + <!-- must exist, otherwise the XML formatter would fail -->
15.811 + <mkdir dir="${build.test.results.dir}"/>
15.812 + <webproject1:debug args="${test.class}" classname="org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner" classpath="${ant.home}/lib/ant.jar:${ant.home}/lib/ant-junit.jar:${debug.test.classpath}:${j2ee.platform.embeddableejb.classpath}">
15.813 + <customize>
15.814 + <arg value="showoutput=true"/>
15.815 + <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.BriefJUnitResultFormatter"/>
15.816 + <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter,${test.report.file}"/>
15.817 + </customize>
15.818 + </webproject1:debug>
15.819 + </target>
15.820 + <target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test">
15.821 + <webproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/>
15.822 + </target>
15.823 + <target depends="init,compile-test,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
15.824 + <target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test">
15.825 + <webproject1:nbjpdareload dir="${build.test.classes.dir}"/>
15.826 + </target>
15.827 + <target depends="init,-pre-debug-fix,-do-debug-fix-test" if="netbeans.home" name="debug-fix-test"/>
15.828 + <!--
15.829 +
15.830 + CLEANUP SECTION
15.831 + -->
15.832 + <target depends="init" if="no.dist.ear.dir" name="deps-clean" unless="no.deps"/>
15.833 + <target depends="init" name="do-clean">
15.834 + <condition property="build.dir.to.clean" value="${build.web.dir}">
15.835 + <isset property="dist.ear.dir"/>
15.836 + </condition>
15.837 + <property name="build.dir.to.clean" value="${build.web.dir}"/>
15.838 + <delete includeEmptyDirs="true" quiet="true">
15.839 + <fileset dir="${build.dir.to.clean}/WEB-INF/lib"/>
15.840 + </delete>
15.841 + <delete dir="${build.dir}"/>
15.842 + <available file="${build.dir.to.clean}/WEB-INF/lib" property="status.clean-failed" type="dir"/>
15.843 + <delete dir="${dist.dir}"/>
15.844 + </target>
15.845 + <target depends="do-clean" if="status.clean-failed" name="check-clean">
15.846 + <echo message="Warning: unable to delete some files in ${build.web.dir}/WEB-INF/lib - they are probably locked by the J2EE server. "/>
15.847 + <echo level="info" message="To delete all files undeploy the module from Server Registry in Runtime tab and then use Clean again."/>
15.848 + </target>
15.849 + <target depends="init" if="netbeans.home" name="undeploy-clean">
15.850 + <nbundeploy failOnError="false" startServer="false"/>
15.851 + </target>
15.852 + <target name="-post-clean">
15.853 + <!-- Empty placeholder for easier customization. -->
15.854 + <!-- You can override this target in the ../build.xml file. -->
15.855 + </target>
15.856 + <target depends="init,undeploy-clean,deps-clean,do-clean,check-clean,-post-clean" description="Clean build products." name="clean"/>
15.857 + <target depends="clean" description="Clean build products." name="clean-ear"/>
15.858 +</project>
16.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
16.2 +++ b/java/nekurak.net-rest/nbproject/genfiles.properties Tue Mar 23 00:50:39 2010 +0100
16.3 @@ -0,0 +1,8 @@
16.4 +build.xml.data.CRC32=d32e8880
16.5 +build.xml.script.CRC32=fb1b7f84
16.6 +build.xml.stylesheet.CRC32=c0ebde35@1.21.2.1
16.7 +# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
16.8 +# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
16.9 +nbproject/build-impl.xml.data.CRC32=d32e8880
16.10 +nbproject/build-impl.xml.script.CRC32=45392f70
16.11 +nbproject/build-impl.xml.stylesheet.CRC32=b139b33b@1.21.2.1
17.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
17.2 +++ b/java/nekurak.net-rest/nbproject/project.properties Tue Mar 23 00:50:39 2010 +0100
17.3 @@ -0,0 +1,73 @@
17.4 +build.classes.dir=${build.web.dir}/WEB-INF/classes
17.5 +build.classes.excludes=**/*.java,**/*.form
17.6 +build.dir=build
17.7 +build.generated.dir=${build.dir}/generated
17.8 +build.generated.sources.dir=${build.dir}/generated-sources
17.9 +build.test.classes.dir=${build.dir}/test/classes
17.10 +build.test.results.dir=${build.dir}/test/results
17.11 +build.web.dir=${build.dir}/web
17.12 +build.web.excludes=${build.classes.excludes}
17.13 +client.urlPart=
17.14 +compile.jsps=false
17.15 +conf.dir=${source.root}/conf
17.16 +debug.classpath=${build.classes.dir}:${javac.classpath}
17.17 +debug.test.classpath=\
17.18 + ${run.test.classpath}
17.19 +display.browser=true
17.20 +dist.dir=dist
17.21 +dist.ear.war=${dist.dir}/${war.ear.name}
17.22 +dist.javadoc.dir=${dist.dir}/javadoc
17.23 +dist.war=${dist.dir}/${war.name}
17.24 +endorsed.classpath=\
17.25 + ${libs.javaee-endorsed-api-6.0.classpath}
17.26 +excludes=
17.27 +includes=**
17.28 +j2ee.deploy.on.save=false
17.29 +j2ee.platform=1.6-web
17.30 +j2ee.server.type=gfv3ee6
17.31 +jar.compress=false
17.32 +javac.classpath=
17.33 +# Space-separated list of extra javac options
17.34 +javac.compilerargs=
17.35 +javac.debug=true
17.36 +javac.deprecation=false
17.37 +javac.source=1.5
17.38 +javac.target=1.5
17.39 +javac.test.classpath=\
17.40 + ${javac.classpath}:\
17.41 + ${build.classes.dir}:\
17.42 + ${libs.junit.classpath}:\
17.43 + ${libs.junit_4.classpath}
17.44 +javadoc.additionalparam=
17.45 +javadoc.author=false
17.46 +javadoc.encoding=${source.encoding}
17.47 +javadoc.noindex=false
17.48 +javadoc.nonavbar=false
17.49 +javadoc.notree=false
17.50 +javadoc.preview=true
17.51 +javadoc.private=false
17.52 +javadoc.splitindex=true
17.53 +javadoc.use=true
17.54 +javadoc.version=false
17.55 +javadoc.windowtitle=
17.56 +jspcompilation.classpath=${jspc.classpath}:${javac.classpath}
17.57 +lib.dir=${web.docbase.dir}/WEB-INF/lib
17.58 +no.dependencies=false
17.59 +persistence.xml.dir=${conf.dir}
17.60 +platform.active=default_platform
17.61 +resource.dir=setup
17.62 +run.test.classpath=\
17.63 + ${javac.test.classpath}:\
17.64 + ${build.test.classes.dir}
17.65 +# Space-separated list of JVM arguments used when running a class with a main method or a unit test
17.66 +# (you may also define separate properties like run-sys-prop.name=value instead of -Dname=value):
17.67 +runmain.jvmargs=
17.68 +source.encoding=UTF-8
17.69 +source.root=src
17.70 +src.dir=${source.root}/java
17.71 +test.src.dir=test
17.72 +war.content.additional=
17.73 +war.ear.name=nekurak.net-rest.war
17.74 +war.name=nekurak.net-rest.war
17.75 +web.docbase.dir=web
17.76 +webinf.dir=web/WEB-INF
18.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
18.2 +++ b/java/nekurak.net-rest/nbproject/project.xml Tue Mar 23 00:50:39 2010 +0100
18.3 @@ -0,0 +1,18 @@
18.4 +<?xml version="1.0" encoding="UTF-8"?>
18.5 +<project xmlns="http://www.netbeans.org/ns/project/1">
18.6 + <type>org.netbeans.modules.web.project</type>
18.7 + <configuration>
18.8 + <data xmlns="http://www.netbeans.org/ns/web-project/3">
18.9 + <name>nekurak.net-rest</name>
18.10 + <minimum-ant-version>1.6.5</minimum-ant-version>
18.11 + <web-module-libraries/>
18.12 + <web-module-additional-libraries/>
18.13 + <source-roots>
18.14 + <root id="src.dir" name="Source Packages"/>
18.15 + </source-roots>
18.16 + <test-roots>
18.17 + <root id="test.src.dir" name="Test Packages"/>
18.18 + </test-roots>
18.19 + </data>
18.20 + </configuration>
18.21 +</project>
19.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
19.2 +++ b/java/nekurak.net-rest/web/WEB-INF/beans.xml Tue Mar 23 00:50:39 2010 +0100
19.3 @@ -0,0 +1,5 @@
19.4 +<?xml version="1.0" encoding="UTF-8"?>
19.5 +<beans xmlns="http://java.sun.com/xml/ns/javaee"
19.6 + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
19.7 + xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/beans_1_0.xsd">
19.8 +</beans>
20.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
20.2 +++ b/java/nekurak.net-rest/web/WEB-INF/sun-web.xml Tue Mar 23 00:50:39 2010 +0100
20.3 @@ -0,0 +1,11 @@
20.4 +<?xml version="1.0" encoding="UTF-8"?>
20.5 +<!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">
20.6 +<sun-web-app error-url="">
20.7 + <context-root>/nekurak.net-rest</context-root>
20.8 + <class-loader delegate="true"/>
20.9 + <jsp-config>
20.10 + <property name="keepgenerated" value="true">
20.11 + <description>Keep a copy of the generated servlet class' java code.</description>
20.12 + </property>
20.13 + </jsp-config>
20.14 +</sun-web-app>
21.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
21.2 +++ b/java/nekurak.net-rest/web/WEB-INF/web.xml Tue Mar 23 00:50:39 2010 +0100
21.3 @@ -0,0 +1,12 @@
21.4 +<?xml version="1.0" encoding="UTF-8"?>
21.5 +
21.6 +<web-app xmlns="http://java.sun.com/xml/ns/javaee"
21.7 + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
21.8 + xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
21.9 + version="3.0">
21.10 + <session-config>
21.11 + <session-timeout>
21.12 + 30
21.13 + </session-timeout>
21.14 + </session-config>
21.15 +</web-app>
22.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
22.2 +++ b/java/nekurak.net-rest/web/index.jsp Tue Mar 23 00:50:39 2010 +0100
22.3 @@ -0,0 +1,19 @@
22.4 +<%--
22.5 + Document : index
22.6 + Created on : 23.3.2010, 0:39:07
22.7 + Author : fiki
22.8 +--%>
22.9 +
22.10 +<%@page contentType="text/html" pageEncoding="UTF-8"%>
22.11 +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
22.12 + "http://www.w3.org/TR/html4/loose.dtd">
22.13 +
22.14 +<html>
22.15 + <head>
22.16 + <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
22.17 + <title>JSP Page</title>
22.18 + </head>
22.19 + <body>
22.20 + <h1>Hello World!</h1>
22.21 + </body>
22.22 +</html>
23.1 --- a/java/nekurak.net-web/nbproject/build-impl.xml Thu Mar 18 14:33:35 2010 +0100
23.2 +++ b/java/nekurak.net-web/nbproject/build-impl.xml Tue Mar 23 00:50:39 2010 +0100
23.3 @@ -18,6 +18,7 @@
23.4
23.5 -->
23.6 <project xmlns:webproject1="http://www.netbeans.org/ns/web-project/1" xmlns:webproject2="http://www.netbeans.org/ns/web-project/2" xmlns:webproject3="http://www.netbeans.org/ns/web-project/3" basedir=".." default="default" name="nekurak.net-web-impl">
23.7 + <import file="rest-build.xml"/>
23.8 <import file="ant-deploy.xml"/>
23.9 <fail message="Please build using Ant 1.7.1 or higher.">
23.10 <condition>
23.11 @@ -401,7 +402,7 @@
23.12 </ant>
23.13 </target>
23.14 <target depends="init, deps-module-jar, deps-ear-jar" name="deps-jar" unless="no.deps"/>
23.15 - <target depends="init,deps-jar" name="-pre-pre-compile">
23.16 + <target depends="init,deps-jar,generate-rest-config" name="-pre-pre-compile">
23.17 <mkdir dir="${build.classes.dir}"/>
23.18 </target>
23.19 <target name="-pre-compile">
23.20 @@ -536,11 +537,13 @@
23.21 <target depends="init,compile,compile-jsps,-pre-dist,-do-dist-with-manifest,-do-dist-without-manifest" name="do-dist"/>
23.22 <target depends="init" if="dist.ear.dir" name="library-inclusion-in-manifest">
23.23 <copyfiles files="${reference.nekurak_net-lib.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>
23.24 + <copyfiles files="${libs.restlib_gfv3ee6.classpath}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>
23.25 <mkdir dir="${build.web.dir}/META-INF"/>
23.26 <manifest file="${build.web.dir}/META-INF/MANIFEST.MF" mode="update"/>
23.27 </target>
23.28 <target depends="init" name="library-inclusion-in-archive" unless="dist.ear.dir">
23.29 <copyfiles files="${reference.nekurak_net-lib.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
23.30 + <copyfiles files="${libs.restlib_gfv3ee6.classpath}" todir="${build.web.dir}/WEB-INF/lib"/>
23.31 </target>
23.32 <target depends="init" if="dist.ear.dir" name="-clean-webinf-lib">
23.33 <delete dir="${build.web.dir}/WEB-INF/lib"/>
24.1 --- a/java/nekurak.net-web/nbproject/genfiles.properties Thu Mar 18 14:33:35 2010 +0100
24.2 +++ b/java/nekurak.net-web/nbproject/genfiles.properties Tue Mar 23 00:50:39 2010 +0100
24.3 @@ -3,6 +3,9 @@
24.4 build.xml.stylesheet.CRC32=c0ebde35@1.21.2.1
24.5 # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
24.6 # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
24.7 -nbproject/build-impl.xml.data.CRC32=84da1c7b
24.8 -nbproject/build-impl.xml.script.CRC32=6cc41288
24.9 +nbproject/build-impl.xml.data.CRC32=44af31d0
24.10 +nbproject/build-impl.xml.script.CRC32=aefcc545
24.11 nbproject/build-impl.xml.stylesheet.CRC32=b139b33b@1.21.2.1
24.12 +nbproject/rest-build.xml.data.CRC32=84da1c7b
24.13 +nbproject/rest-build.xml.script.CRC32=3db088b3
24.14 +nbproject/rest-build.xml.stylesheet.CRC32=ddd64843@1.4.1
25.1 --- a/java/nekurak.net-web/nbproject/project.properties Thu Mar 18 14:33:35 2010 +0100
25.2 +++ b/java/nekurak.net-web/nbproject/project.properties Tue Mar 23 00:50:39 2010 +0100
25.3 @@ -26,7 +26,8 @@
25.4 j2ee.server.type=gfv3ee6
25.5 jar.compress=false
25.6 javac.classpath=\
25.7 - ${reference.nekurak_net-lib.jar}
25.8 + ${reference.nekurak_net-lib.jar}:\
25.9 + ${libs.restlib_gfv3ee6.classpath}
25.10 # Space-separated list of extra javac options
25.11 javac.compilerargs=
25.12 javac.debug=true
25.13 @@ -58,6 +59,8 @@
25.14 project.nekurak_net-lib=../nekurak.net-lib
25.15 reference.nekurak_net-lib.jar=${project.nekurak_net-lib}/dist/nekurak.net-lib.jar
25.16 resource.dir=setup
25.17 +rest.config.type=dd
25.18 +rest.support.on=true
25.19 run.test.classpath=\
25.20 ${javac.test.classpath}:\
25.21 ${build.test.classes.dir}
26.1 --- a/java/nekurak.net-web/nbproject/project.xml Thu Mar 18 14:33:35 2010 +0100
26.2 +++ b/java/nekurak.net-web/nbproject/project.xml Tue Mar 23 00:50:39 2010 +0100
26.3 @@ -2,6 +2,11 @@
26.4 <project xmlns="http://www.netbeans.org/ns/project/1">
26.5 <type>org.netbeans.modules.web.project</type>
26.6 <configuration>
26.7 + <buildExtensions xmlns="http://www.netbeans.org/ns/ant-build-extender/1">
26.8 + <extension file="rest-build.xml" id="rest.4">
26.9 + <dependency dependsOn="generate-rest-config" target="-pre-pre-compile"/>
26.10 + </extension>
26.11 + </buildExtensions>
26.12 <data xmlns="http://www.netbeans.org/ns/web-project/3">
26.13 <name>nekurak.net-web</name>
26.14 <minimum-ant-version>1.6.5</minimum-ant-version>
26.15 @@ -10,6 +15,10 @@
26.16 <file>${reference.nekurak_net-lib.jar}</file>
26.17 <path-in-war>WEB-INF/lib</path-in-war>
26.18 </library>
26.19 + <library dirs="200">
26.20 + <file>${libs.restlib_gfv3ee6.classpath}</file>
26.21 + <path-in-war>WEB-INF/lib</path-in-war>
26.22 + </library>
26.23 </web-module-libraries>
26.24 <web-module-additional-libraries/>
26.25 <source-roots>
27.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
27.2 +++ b/java/nekurak.net-web/nbproject/rest-build.xml Tue Mar 23 00:50:39 2010 +0100
27.3 @@ -0,0 +1,60 @@
27.4 +<?xml version="1.0" encoding="UTF-8"?>
27.5 +<!--
27.6 + *** GENERATED - DO NOT EDIT ***
27.7 + -->
27.8 +<project name="nekurak.net-web-rest-build" basedir=".." xmlns:webproject3="http://www.netbeans.org/ns/web-project/3" xmlns:webproject2="http://www.netbeans.org/ns/web-project/2" xmlns:webproject1="http://www.netbeans.org/ns/web-project/1" xmlns:jaxrs="http://www.netbeans.org/ns/jax-rs/1">
27.9 + <target name="-check-trim">
27.10 + <condition property="do.trim">
27.11 + <and>
27.12 + <isset property="client.urlPart"/>
27.13 + <length string="${client.urlPart}" when="greater" length="0"/>
27.14 + </and>
27.15 + </condition>
27.16 + </target>
27.17 + <target name="-trim-url" if="do.trim">
27.18 + <pathconvert pathsep="/" property="rest.base.url">
27.19 + <propertyset>
27.20 + <propertyref name="client.url"/>
27.21 + </propertyset>
27.22 + <globmapper from="*${client.urlPart}" to="*/"/>
27.23 + </pathconvert>
27.24 + </target>
27.25 + <target name="-spare-url" unless="do.trim">
27.26 + <property name="rest.base.url" value="${client.url}"/>
27.27 + </target>
27.28 + <target name="test-restbeans" depends="run-deploy,-init-display-browser,-check-trim,-trim-url,-spare-url">
27.29 + <replace file="${restbeans.test.file}" token="${base.url.token}" value="${rest.base.url}||${rest.application.path}"/>
27.30 + <condition property="do.browse-url">
27.31 + <istrue value="${display.browser}"/>
27.32 + </condition>
27.33 + <antcall target="browse-url"/>
27.34 + </target>
27.35 + <target name="browse-url" if="do.browse-url">
27.36 + <nbbrowse url="${restbeans.test.url}"/>
27.37 + </target>
27.38 + <target name="check-rest-config-props" depends="-do-init">
27.39 + <condition property="do-generate-rest-config">
27.40 + <and>
27.41 + <equals arg1="${rest.config.type}" arg2="ide"/>
27.42 + <isset property="rest.resources.path"/>
27.43 + </and>
27.44 + </condition>
27.45 + </target>
27.46 + <target name="generate-rest-config" depends="check-rest-config-props" if="do-generate-rest-config">
27.47 + <mkdir dir="${build.generated.sources.dir}/rest/org/netbeans/rest/application/config/"/>
27.48 + <echo file="${build.generated.sources.dir}/rest/org/netbeans/rest/application/config/ApplicationConfig.java">/*
27.49 + * To change this template, choose Tools | Templates
27.50 + * and open the template in the editor.
27.51 + */
27.52 +
27.53 +package org.netbeans.rest.application.config;
27.54 +/**
27.55 + * This class is generated by the Netbeans IDE,
27.56 + * and registers all REST root resources created in the project.
27.57 + * Please, DO NOT EDIT this class !
27.58 + */
27.59 +@javax.ws.rs.ApplicationPath("${rest.resources.path}")
27.60 +public class ApplicationConfig extends javax.ws.rs.core.Application {
27.61 +}</echo>
27.62 + </target>
27.63 +</project>
28.1 --- a/java/nekurak.net-web/web/WEB-INF/web.xml Thu Mar 18 14:33:35 2010 +0100
28.2 +++ b/java/nekurak.net-web/web/WEB-INF/web.xml Tue Mar 23 00:50:39 2010 +0100
28.3 @@ -38,7 +38,7 @@
28.4 <param-name>adresar</param-name>
28.5 <param-value>/var/www/nekurak.net/fotky</param-value>
28.6 </init-param>
28.7 - <load-on-startup>1</load-on-startup>
28.8 + <load-on-startup>1</load-on-startup>
28.9 </servlet>
28.10 <!-- </definiceServletů> -->
28.11 <!-- <mapováníServletů> -->