Merged openesb/openesb-components into master
commit
6c10019b0f
Binary file not shown.
|
@ -0,0 +1,43 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!--
|
||||
Document : pom.xml
|
||||
Created on : 26 July, 2013, 12:34 PM
|
||||
Author : Paramjeet Singh, Logicoy
|
||||
Description:
|
||||
Maven project Archtype for OpenESB Service Engine Netbeans Plugin.
|
||||
-->
|
||||
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<groupId>open-jbi-components</groupId>
|
||||
<artifactId>ServiceEngine-Plugin-archetype</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
<packaging>maven-archetype</packaging>
|
||||
|
||||
<name>ServiceEngine-Plugin-archetype</name>
|
||||
|
||||
<build>
|
||||
<extensions>
|
||||
<extension>
|
||||
<groupId>org.apache.maven.archetype</groupId>
|
||||
<artifactId>archetype-packaging</artifactId>
|
||||
<version>2.2</version>
|
||||
</extension>
|
||||
</extensions>
|
||||
|
||||
<pluginManagement>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<artifactId>maven-archetype-plugin</artifactId>
|
||||
<version>2.2</version>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</pluginManagement>
|
||||
</build>
|
||||
|
||||
<description>Maven project Archtype for OpenESB Service Engine Netbeans Plugin</description>
|
||||
|
||||
<url>http://open-esb.org</url>
|
||||
</project>
|
|
@ -0,0 +1,81 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!--
|
||||
Document : archtype descripter
|
||||
Created on : 23 July, 2013, 12:34 PM
|
||||
Author : Paramjeet Singh, Logicoy
|
||||
Description:
|
||||
Maven project Archtype descripter for OpenESB Service Engine Plugin archtype, this contains All
|
||||
necessory logic for building the archType packages and classes.
|
||||
-->
|
||||
|
||||
|
||||
<archetype-descriptor xsi:schemaLocation="http://maven.apache.org/plugins/maven-archetype-plugin/archetype-descriptor/1.0.0 http://maven.apache.org/xsd/archetype-descriptor-1.0.0.xsd" name="ServiceEngine"
|
||||
xmlns="http://maven.apache.org/plugins/maven-archetype-plugin/archetype-descriptor/1.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<fileSets>
|
||||
<fileSet filtered="true" encoding="UTF-8">
|
||||
<directory>deploy-plugin/nbproject</directory>
|
||||
<includes>
|
||||
<include>**/*.xml</include>
|
||||
<include>**/*.properties</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
<fileSet filtered="true" encoding="UTF-8">
|
||||
<directory>deploy-plugin/src</directory>
|
||||
<includes>
|
||||
<include>**/*.html</include>
|
||||
<include>**/*.java</include>
|
||||
<include>**/*.xml</include>
|
||||
<include>**/*.properties</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
<fileSet filtered="true" encoding="UTF-8">
|
||||
<directory>nbproject</directory>
|
||||
<includes>
|
||||
<include>**/*.xml</include>
|
||||
<include>**/*.properties</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
<fileSet filtered="true" encoding="UTF-8">
|
||||
<directory>nbproject/private</directory>
|
||||
<includes>
|
||||
<include>**/*.xml</include>
|
||||
<include>**/*.properties</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
<fileSet filtered="true" encoding="UTF-8">
|
||||
<directory>deploy-plugin</directory>
|
||||
<includes>
|
||||
<include>**/*.xml</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
<fileSet encoding="UTF-8">
|
||||
<directory>deploy-plugin/src</directory>
|
||||
<includes>
|
||||
<include>**/*.xsl</include>
|
||||
<include>**/*.form</include>
|
||||
<include>**/*.wsdl</include>
|
||||
<include>**/*.png</include>
|
||||
<include>**/*.AntBasedProjectType</include>
|
||||
<include>**/*.CollocationQueryImplementation</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
<fileSet encoding="UTF-8">
|
||||
<directory>deploy-plugin</directory>
|
||||
<includes>
|
||||
<include>**/*.mf</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
<fileSet filtered="true" encoding="UTF-8">
|
||||
<directory></directory>
|
||||
<includes>
|
||||
<include>build.xml</include>
|
||||
<include>install-params.properties</include>
|
||||
<include>m2nbbuild-impl.xml</include>
|
||||
<include>m2nbbuild.properties</include>
|
||||
<include>m2nbbuild.xml</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
</fileSets>
|
||||
</archetype-descriptor>
|
|
@ -0,0 +1,72 @@
|
|||
#set( $symbol_pound = '#' )
|
||||
#set( $symbol_dollar = '$' )
|
||||
#set( $symbol_escape = '\' )
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- You may freely edit this file. See commented blocks below for -->
|
||||
<!-- some examples of how to customize the build. -->
|
||||
<!-- (If you delete it and reopen the project it will be recreated.) -->
|
||||
<project name="${artifactId}" default="default" basedir=".">
|
||||
<description>Builds, tests, and runs the project ${artifactId}.</description>
|
||||
<import file="nbproject/build-impl.xml"/>
|
||||
<!--
|
||||
|
||||
There exist several targets which are by default empty and which can be
|
||||
used for execution of your tasks. These targets are usually executed
|
||||
before and after some main targets. They are:
|
||||
|
||||
-pre-init: called before initialization of project properties
|
||||
-post-init: called after initialization of project properties
|
||||
-pre-compile: called before javac compilation
|
||||
-post-compile: called after javac compilation
|
||||
-pre-compile-single: called before javac compilation of single file
|
||||
-post-compile-single: called after javac compilation of single file
|
||||
-pre-compile-test: called before javac compilation of JUnit tests
|
||||
-post-compile-test: called after javac compilation of JUnit tests
|
||||
-pre-compile-test-single: called before javac compilation of single JUnit test
|
||||
-post-compile-test-single: called after javac compilation of single JUunit test
|
||||
-pre-jar: called before JAR building
|
||||
-post-jar: called after JAR building
|
||||
-post-clean: called after cleaning build products
|
||||
|
||||
(Targets beginning with '-' are not intended to be called on their own.)
|
||||
|
||||
Example of inserting an obfuscator after compilation could look like this:
|
||||
|
||||
<target name="-post-compile">
|
||||
<obfuscate>
|
||||
<fileset dir="${symbol_dollar}{build.classes.dir}"/>
|
||||
</obfuscate>
|
||||
</target>
|
||||
|
||||
For list of available properties check the imported
|
||||
nbproject/build-impl.xml file.
|
||||
|
||||
|
||||
Another way to customize the build is by overriding existing main targets.
|
||||
The targets of interest are:
|
||||
|
||||
-init-macrodef-javac: defines macro for javac compilation
|
||||
-init-macrodef-junit: defines macro for junit execution
|
||||
-init-macrodef-debug: defines macro for class debugging
|
||||
-init-macrodef-java: defines macro for class execution
|
||||
-do-jar-with-manifest: JAR building (if you are using a manifest)
|
||||
-do-jar-without-manifest: JAR building (if you are not using a manifest)
|
||||
run: execution of project
|
||||
-javadoc-build: Javadoc generation
|
||||
test-report: JUnit report generation
|
||||
|
||||
An example of overriding the target for project execution could look like this:
|
||||
|
||||
<target name="run" depends="${artifactId}-impl.jar">
|
||||
<exec dir="bin" executable="launcher.exe">
|
||||
<arg file="${symbol_dollar}{dist.jar}"/>
|
||||
</exec>
|
||||
</target>
|
||||
|
||||
Notice that the overridden target depends on the jar target and not only on
|
||||
the compile target as the regular run target does. Again, for a list of available
|
||||
properties which you can use, check the target you are overriding in the
|
||||
nbproject/build-impl.xml file.
|
||||
|
||||
-->
|
||||
</project>
|
|
@ -0,0 +1,38 @@
|
|||
#set( $symbol_pound = '#' )
|
||||
#set( $symbol_dollar = '$' )
|
||||
#set( $symbol_escape = '\' )
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<groupId>${package}</groupId>
|
||||
<artifactId>${artifactId}-archetype</artifactId>
|
||||
<version>${version}</version>
|
||||
<packaging>maven-archetype</packaging>
|
||||
|
||||
<name>${artifactId}-archetype</name>
|
||||
|
||||
<build>
|
||||
<extensions>
|
||||
<extension>
|
||||
<groupId>org.apache.maven.archetype</groupId>
|
||||
<artifactId>archetype-packaging</artifactId>
|
||||
<version>2.2</version>
|
||||
</extension>
|
||||
</extensions>
|
||||
|
||||
<pluginManagement>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<artifactId>maven-archetype-plugin</artifactId>
|
||||
<version>2.2</version>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</pluginManagement>
|
||||
</build>
|
||||
|
||||
<description>Maven project for JBI Component that contains the
|
||||
maven and netbeans build setup and component code to build and test the JBI Component.</description>
|
||||
|
||||
<url>http://open-esb.org</url>
|
||||
</project>
|
|
@ -0,0 +1,33 @@
|
|||
#set( $symbol_pound = '#' )
|
||||
#set( $symbol_dollar = '$' )
|
||||
#set( $symbol_escape = '\' )
|
||||
${symbol_pound}set( ${symbol_dollar}symbol_pound = '${symbol_pound}' )
|
||||
${symbol_pound}set( ${symbol_dollar}symbol_dollar = '${symbol_dollar}' )
|
||||
${symbol_pound}set( ${symbol_dollar}symbol_escape = '${symbol_escape}' )
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
*** GENERATED FROM project.xml - DO NOT EDIT ***
|
||||
*** EDIT ../build.xml INSTEAD ***
|
||||
-->
|
||||
<project name="serviceengine-impl" basedir="..">
|
||||
<property file="nbproject/private/platform-private.properties"/>
|
||||
<property file="nbproject/platform.properties"/>
|
||||
<macrodef name="property" uri="http://www.netbeans.org/ns/nb-module-project/2">
|
||||
<attribute name="name"/>
|
||||
<attribute name="value"/>
|
||||
<sequential>
|
||||
<property name="@{name}" value="${symbol_dollar}{symbol_dollar}{@{value}}"/>
|
||||
</sequential>
|
||||
</macrodef>
|
||||
<property file="${symbol_dollar}{symbol_dollar}{user.properties.file}"/>
|
||||
<nbmproject2:property name="harness.dir" value="nbplatform.${symbol_dollar}{symbol_dollar}{nbplatform.active}.harness.dir" xmlns:nbmproject2="http://www.netbeans.org/ns/nb-module-project/2"/>
|
||||
<nbmproject2:property name="netbeans.dest.dir" value="nbplatform.${symbol_dollar}{symbol_dollar}{nbplatform.active}.netbeans.dest.dir" xmlns:nbmproject2="http://www.netbeans.org/ns/nb-module-project/2"/>
|
||||
<fail message="You must define 'nbplatform.${symbol_dollar}{symbol_dollar}{nbplatform.active}.harness.dir'">
|
||||
<condition>
|
||||
<not>
|
||||
<available file="${symbol_dollar}{symbol_dollar}{harness.dir}" type="dir"/>
|
||||
</not>
|
||||
</condition>
|
||||
</fail>
|
||||
<import file="${symbol_dollar}{symbol_dollar}{harness.dir}/build.xml"/>
|
||||
</project>
|
|
@ -0,0 +1,146 @@
|
|||
#set( $symbol_pound = '#' )
|
||||
#set( $symbol_dollar = '$' )
|
||||
#set( $symbol_escape = '\' )
|
||||
${symbol_pound}set( ${symbol_dollar}symbol_pound = '${symbol_pound}' )
|
||||
${symbol_pound}set( ${symbol_dollar}symbol_dollar = '${symbol_dollar}' )
|
||||
${symbol_pound}set( ${symbol_dollar}symbol_escape = '${symbol_escape}' )
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://www.netbeans.org/ns/project/1">
|
||||
<type>org.netbeans.modules.apisupport.project</type>
|
||||
<configuration>
|
||||
<data xmlns="http://www.netbeans.org/ns/nb-module-project/2">
|
||||
<code-name-base>serviceengine</code-name-base>
|
||||
<standalone/>
|
||||
<module-dependencies>
|
||||
<dependency>
|
||||
<code-name-base>org.apache.tools.ant.module</code-name-base>
|
||||
<build-prerequisite/>
|
||||
<compile-dependency/>
|
||||
<run-dependency>
|
||||
<release-version>3</release-version>
|
||||
<specification-version>3.27.0.2</specification-version>
|
||||
</run-dependency>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<code-name-base>org.jdesktop.layout</code-name-base>
|
||||
<build-prerequisite/>
|
||||
<compile-dependency/>
|
||||
<run-dependency>
|
||||
<release-version>1</release-version>
|
||||
<specification-version>1.4</specification-version>
|
||||
</run-dependency>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<code-name-base>org.netbeans.modules.java.project</code-name-base>
|
||||
<build-prerequisite/>
|
||||
<compile-dependency/>
|
||||
<run-dependency>
|
||||
<release-version>1</release-version>
|
||||
<specification-version>1.12</specification-version>
|
||||
</run-dependency>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<code-name-base>org.netbeans.modules.project.ant</code-name-base>
|
||||
<build-prerequisite/>
|
||||
<compile-dependency/>
|
||||
<run-dependency>
|
||||
<release-version>1</release-version>
|
||||
<specification-version>1.16</specification-version>
|
||||
</run-dependency>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<code-name-base>org.netbeans.modules.projectapi</code-name-base>
|
||||
<build-prerequisite/>
|
||||
<compile-dependency/>
|
||||
<run-dependency>
|
||||
<release-version>1</release-version>
|
||||
<specification-version>1.13</specification-version>
|
||||
</run-dependency>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<code-name-base>org.netbeans.modules.projectuiapi</code-name-base>
|
||||
<build-prerequisite/>
|
||||
<compile-dependency/>
|
||||
<run-dependency>
|
||||
<release-version>1</release-version>
|
||||
<specification-version>1.24.0.6</specification-version>
|
||||
</run-dependency>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<code-name-base>org.netbeans.modules.queries</code-name-base>
|
||||
<build-prerequisite/>
|
||||
<compile-dependency/>
|
||||
<run-dependency>
|
||||
<release-version>1</release-version>
|
||||
<specification-version>1.10</specification-version>
|
||||
</run-dependency>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<code-name-base>org.openide.actions</code-name-base>
|
||||
<build-prerequisite/>
|
||||
<compile-dependency/>
|
||||
<run-dependency>
|
||||
<specification-version>6.6.0.1</specification-version>
|
||||
</run-dependency>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<code-name-base>org.openide.awt</code-name-base>
|
||||
<build-prerequisite/>
|
||||
<compile-dependency/>
|
||||
<run-dependency>
|
||||
<specification-version>6.11.0.1</specification-version>
|
||||
</run-dependency>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<code-name-base>org.openide.dialogs</code-name-base>
|
||||
<build-prerequisite/>
|
||||
<compile-dependency/>
|
||||
<run-dependency>
|
||||
<specification-version>7.5</specification-version>
|
||||
</run-dependency>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<code-name-base>org.openide.execution</code-name-base>
|
||||
<build-prerequisite/>
|
||||
<compile-dependency/>
|
||||
<run-dependency>
|
||||
<specification-version>1.10</specification-version>
|
||||
</run-dependency>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<code-name-base>org.openide.filesystems</code-name-base>
|
||||
<build-prerequisite/>
|
||||
<compile-dependency/>
|
||||
<run-dependency>
|
||||
<specification-version>7.3</specification-version>
|
||||
</run-dependency>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<code-name-base>org.openide.loaders</code-name-base>
|
||||
<build-prerequisite/>
|
||||
<compile-dependency/>
|
||||
<run-dependency>
|
||||
<specification-version>6.5</specification-version>
|
||||
</run-dependency>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<code-name-base>org.openide.nodes</code-name-base>
|
||||
<build-prerequisite/>
|
||||
<compile-dependency/>
|
||||
<run-dependency>
|
||||
<specification-version>7.2.0.1</specification-version>
|
||||
</run-dependency>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<code-name-base>org.openide.util</code-name-base>
|
||||
<build-prerequisite/>
|
||||
<compile-dependency/>
|
||||
<run-dependency>
|
||||
<specification-version>7.9.0.1</specification-version>
|
||||
</run-dependency>
|
||||
</dependency>
|
||||
</module-dependencies>
|
||||
<public-packages/>
|
||||
</data>
|
||||
</configuration>
|
||||
</project>
|
|
@ -0,0 +1,18 @@
|
|||
#set( $symbol_pound = '#' )
|
||||
#set( $symbol_dollar = '$' )
|
||||
#set( $symbol_escape = '\' )
|
||||
${symbol_pound}set( ${symbol_dollar}symbol_pound = '${symbol_pound}' )
|
||||
${symbol_pound}set( ${symbol_dollar}symbol_dollar = '${symbol_dollar}' )
|
||||
${symbol_pound}set( ${symbol_dollar}symbol_escape = '${symbol_escape}' )
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<soapenv:Envelope
|
||||
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
|
||||
xmlns:greet="http://www.sun.com/jbi/examples/sample-service/greetings/types/">
|
||||
<soapenv:Header/>
|
||||
<soapenv:Body>
|
||||
<greet:user xmlns:greet="http://www.sun.com/jbi/examples/sample-service/greetings/types/">
|
||||
<greet:first-name>Srinivasan</greet:first-name>
|
||||
<greet:last-name>Chikkala</greet:last-name>
|
||||
</greet:user>
|
||||
</soapenv:Body>
|
||||
</soapenv:Envelope>
|
|
@ -0,0 +1,18 @@
|
|||
#set( $symbol_pound = '#' )
|
||||
#set( $symbol_dollar = '$' )
|
||||
#set( $symbol_escape = '\' )
|
||||
${symbol_pound}set( ${symbol_dollar}symbol_pound = '${symbol_pound}' )
|
||||
${symbol_pound}set( ${symbol_dollar}symbol_dollar = '${symbol_dollar}' )
|
||||
${symbol_pound}set( ${symbol_dollar}symbol_escape = '${symbol_escape}' )
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<soapenv:Envelope
|
||||
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
|
||||
xmlns:part="http://www.sun.com/jbi/examples/sample-service/greetings/">
|
||||
<soapenv:Header/>
|
||||
<soapenv:Body>
|
||||
<part:userPart xmlns:greet="http://www.sun.com/jbi/examples/sample-service/greetings/types/">
|
||||
<greet:first-name>Srinivasan</greet:first-name>
|
||||
<greet:last-name>Chikkala</greet:last-name>
|
||||
</part:userPart>
|
||||
</soapenv:Body>
|
||||
</soapenv:Envelope>
|
|
@ -0,0 +1,143 @@
|
|||
#set( $symbol_pound = '#' )
|
||||
#set( $symbol_dollar = '$' )
|
||||
#set( $symbol_escape = '\' )
|
||||
${symbol_pound}set( ${symbol_dollar}symbol_pound = '${symbol_pound}' )
|
||||
${symbol_pound}set( ${symbol_dollar}symbol_dollar = '${symbol_dollar}' )
|
||||
${symbol_pound}set( ${symbol_dollar}symbol_escape = '${symbol_escape}' )
|
||||
<?xml version="1.0"?>
|
||||
<project name="testSA" default="default" basedir="." xmlns:jbi="http://www.sun.com/ns/jbi/jbi-ant/1" >
|
||||
|
||||
<target name="default" depends="package" description="compiles and packages the project."/>
|
||||
|
||||
<target name="-pre-init">
|
||||
<!-- Empty placeholder for easier customization. -->
|
||||
<!-- You can override this target in the build.xml file. -->
|
||||
</target>
|
||||
|
||||
<target name="-init-user" depends="-pre-init" >
|
||||
<echo message="loading user properties from ${symbol_dollar}{symbol_dollar}{user.properties.file}" />
|
||||
<property file="${symbol_dollar}{symbol_dollar}{user.properties.file}"/>
|
||||
</target>
|
||||
|
||||
<target name="-init-project" depends="-pre-init, -init-user" >
|
||||
<echo level="debug" message="loading build.properties" />
|
||||
<property file="build.properties"/>
|
||||
</target>
|
||||
|
||||
<target name="-do-init" depends="-pre-init, -init-user, -init-project" >
|
||||
<echo level="debug" message="-do-init called to initialize the build properties " />
|
||||
<property name="build.service.assembly.dir" location="${symbol_dollar}{symbol_dollar}{build.dir}/${symbol_dollar}{symbol_dollar}{service.assembly.name}" />
|
||||
<property name="build.service.assembly.zip" location="${symbol_dollar}{symbol_dollar}{build.dir}/${symbol_dollar}{symbol_dollar}{service.assembly.name}.zip" />
|
||||
</target>
|
||||
|
||||
<target name="-init-check" depends="-pre-init, -init-user, -init-project, -do-init">
|
||||
<fail unless="src.dir">Must set src.dir</fail>
|
||||
<fail unless="build.dir">Must set build.dir</fail>
|
||||
<fail unless="service.assembly.name">Must set service.assembly.name</fail>
|
||||
</target>
|
||||
|
||||
<target name="-init-su-macros"
|
||||
depends="-pre-init, -init-user, -init-project, -do-init" >
|
||||
|
||||
<macrodef name="jbi-su-package" uri="http://www.sun.com/ns/jbi/jbi-ant/1">
|
||||
<attribute name="suDir"/>
|
||||
<attribute name="suName"/>
|
||||
<element name="target-options" optional="true"/>
|
||||
<sequential>
|
||||
<ant inheritAll="false" antfile="@{suDir}/build.xml">
|
||||
<property name="build.dir" location="${symbol_dollar}{symbol_dollar}{build.dir}" />
|
||||
<property name="service.unit.name" value="@{suName}" />
|
||||
<target-options/>
|
||||
<target name="package"/>
|
||||
</ant>
|
||||
<echo level="debug" message ="Copying service unit @{suName} to SA build dir ${symbol_dollar}{symbol_dollar}{build.service.assembly.dir}" />
|
||||
<copy file="${symbol_dollar}{symbol_dollar}{build.dir}/@{suName}.zip" todir="${symbol_dollar}{symbol_dollar}{build.service.assembly.dir}" overwrite="true" />
|
||||
</sequential>
|
||||
</macrodef>
|
||||
|
||||
<macrodef name="jbi-su-clean" uri="http://www.sun.com/ns/jbi/jbi-ant/1">
|
||||
<attribute name="suDir"/>
|
||||
<attribute name="suName"/>
|
||||
<element name="target-options" optional="true"/>
|
||||
<sequential>
|
||||
<ant inheritAll="false" antfile="@{suDir}/build.xml">
|
||||
<property name="build.dir" location="${symbol_dollar}{symbol_dollar}{build.dir}" />
|
||||
<property name="service.unit.name" value="@{suName}" />
|
||||
<target-options/>
|
||||
<target name="clean"/>
|
||||
</ant>
|
||||
</sequential>
|
||||
</macrodef>
|
||||
|
||||
</target>
|
||||
|
||||
<!-- Init project -->
|
||||
<target name="init"
|
||||
depends="-pre-init, -init-user, -init-project, -do-init, -init-check, -init-su-macros"
|
||||
description="initilizes the build settings">
|
||||
</target>
|
||||
|
||||
<!--
|
||||
===================
|
||||
COMPILATION SECTION
|
||||
===================
|
||||
-->
|
||||
<target name="deps-package" depends="init" unless="no.deps">
|
||||
<mkdir dir="${symbol_dollar}{symbol_dollar}{build.dir}"/>
|
||||
<mkdir dir="${symbol_dollar}{symbol_dollar}{build.service.assembly.dir}"/>
|
||||
<!-- for each testSU package -->
|
||||
<!-- package testSUBC -->
|
||||
<jbi:jbi-su-package suDir="${symbol_dollar}{symbol_dollar}{project.testSUBC}" suName="${symbol_dollar}{symbol_dollar}{service.unit.name.testSUBC}" />
|
||||
<!-- package testSUSE -->
|
||||
<jbi:jbi-su-package suDir="${symbol_dollar}{symbol_dollar}{project.testSUSE}" suName="${symbol_dollar}{symbol_dollar}{service.unit.name.testSUSE}" />
|
||||
</target>
|
||||
|
||||
<!-- SA Compile target -->
|
||||
<target name="compile" depends="init, deps-package" description="Compile Service Assembly">
|
||||
<echo level="debug" message ="Compiling Service Assembly" />
|
||||
<mkdir dir="${symbol_dollar}{symbol_dollar}{build.service.assembly.dir}"/>
|
||||
<copy file="${symbol_dollar}{symbol_dollar}{src.dir}/META-INF/jbi.xml" todir="${symbol_dollar}{symbol_dollar}{build.service.assembly.dir}/META-INF" overwrite="true" />
|
||||
</target>
|
||||
|
||||
<!--
|
||||
===================
|
||||
PACKAGING SECTION
|
||||
===================
|
||||
-->
|
||||
<target name="-pre-package" depends="init, deps-package"
|
||||
description="Copy the deps su to the build dir">
|
||||
</target>
|
||||
|
||||
<!-- SA Package target -->
|
||||
<target name="package" depends="init, compile, -pre-package"
|
||||
description="Package the Service Assembly">
|
||||
<echo level="debug" message ="Packaging Service Assembly" />
|
||||
<zip destfile="${symbol_dollar}{symbol_dollar}{build.service.assembly.zip}" basedir="${symbol_dollar}{symbol_dollar}{build.service.assembly.dir}" />
|
||||
</target>
|
||||
|
||||
<!--
|
||||
===============
|
||||
CLEANUP SECTION
|
||||
===============
|
||||
-->
|
||||
<target name="deps-clean" depends="init" unless="no.deps">
|
||||
<!-- clean testSUBC -->
|
||||
<jbi:jbi-su-clean suDir="${symbol_dollar}{symbol_dollar}{project.testSUBC}" suName="${symbol_dollar}{symbol_dollar}{service.unit.name.testSUBC}" />
|
||||
<!-- clean testSUSE -->
|
||||
<jbi:jbi-su-clean suDir="${symbol_dollar}{symbol_dollar}{project.testSUSE}" suName="${symbol_dollar}{symbol_dollar}{service.unit.name.testSUSE}" />
|
||||
</target>
|
||||
|
||||
<!-- Clean target -->
|
||||
<target name="clean" depends="init, deps-clean"
|
||||
description="Clean the Service Assembly" >
|
||||
<delete dir="${symbol_dollar}{symbol_dollar}{build.dir}"/>
|
||||
<delete dir="${symbol_dollar}{symbol_dollar}{dist.dir}"/>
|
||||
<echo level="debug" message ="Cleaned Service Assembly" />
|
||||
</target>
|
||||
|
||||
<!-- Help target -->
|
||||
<target name="help" depends="init" description="Display Help on Service Assembly">
|
||||
<echo message ="Builds Service Assembly ${symbol_dollar}{symbol_dollar}{dist.zip}" />
|
||||
</target>
|
||||
|
||||
</project>
|
|
@ -0,0 +1,47 @@
|
|||
#set( $symbol_pound = '#' )
|
||||
#set( $symbol_dollar = '$' )
|
||||
#set( $symbol_escape = '\' )
|
||||
${symbol_pound}set( ${symbol_dollar}symbol_pound = '${symbol_pound}' )
|
||||
${symbol_pound}set( ${symbol_dollar}symbol_dollar = '${symbol_dollar}' )
|
||||
${symbol_pound}set( ${symbol_dollar}symbol_escape = '${symbol_escape}' )
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<jbi version="1"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns="http://java.sun.com/xml/ns/jbi"
|
||||
xmlns:greet="http://www.sun.com/jbi/examples/sample-service/greetings/"
|
||||
>
|
||||
<service-assembly>
|
||||
<identification>
|
||||
<name>${symbol_dollar}{artifactId}_TestSA</name>
|
||||
<description>This is a test Service Assembly to test Engine</description>
|
||||
</identification>
|
||||
|
||||
<service-unit>
|
||||
<identification>
|
||||
<name>${symbol_dollar}{artifactId}_TestSUBC</name>
|
||||
<description>This service unit enables soap inbound endpoint for a service in service engine</description>
|
||||
</identification>
|
||||
<target>
|
||||
<artifacts-zip>testSUBC.zip</artifacts-zip>
|
||||
<component-name>sun-http-binding</component-name>
|
||||
</target>
|
||||
</service-unit>
|
||||
<service-unit>
|
||||
<identification>
|
||||
<name>${symbol_dollar}{artifactId}_TestSUSE</name>
|
||||
<description>This service unit enables greetings service provider in service engine</description>
|
||||
</identification>
|
||||
<target>
|
||||
<artifacts-zip>testSUSE.zip</artifacts-zip>
|
||||
<component-name>${symbol_dollar}{artifactId}</component-name>
|
||||
</target>
|
||||
</service-unit>
|
||||
<connections>
|
||||
<connection>
|
||||
<consumer endpoint-name="port" service-name="greet:greetService"/>
|
||||
<provider endpoint-name="${symbol_dollar}{artifactId}_JBIPort" service-name="greet:greetService"/>
|
||||
</connection>
|
||||
</connections>
|
||||
|
||||
</service-assembly>
|
||||
</jbi>
|
|
@ -0,0 +1,77 @@
|
|||
#set( $symbol_pound = '#' )
|
||||
#set( $symbol_dollar = '$' )
|
||||
#set( $symbol_escape = '\' )
|
||||
${symbol_pound}set( ${symbol_dollar}symbol_pound = '${symbol_pound}' )
|
||||
${symbol_pound}set( ${symbol_dollar}symbol_dollar = '${symbol_dollar}' )
|
||||
${symbol_pound}set( ${symbol_dollar}symbol_escape = '${symbol_escape}' )
|
||||
<?xml version="1.0"?>
|
||||
<project name="testSUBC" default="default" basedir=".">
|
||||
|
||||
<target name="default" depends="package" description="compiles and packages the project."/>
|
||||
|
||||
<target name="-pre-init">
|
||||
<!-- Empty placeholder for easier customization. -->
|
||||
</target>
|
||||
|
||||
<target name="-init-user" depends="-pre-init" >
|
||||
<echo level="debug" message="loading user properties from ${symbol_dollar}{symbol_dollar}{user.properties.file}" />
|
||||
<property file="${symbol_dollar}{symbol_dollar}{user.properties.file}"/>
|
||||
</target>
|
||||
|
||||
<target name="-init-project" depends="-pre-init, -init-user" >
|
||||
<echo level="debug" message="loading build.properties" />
|
||||
<property file="build.properties"/>
|
||||
</target>
|
||||
|
||||
<target name="-do-init" depends="-pre-init, -init-user, -init-project" >
|
||||
<echo level="debug" message="Nothing to -do-init" />
|
||||
<property name="build.service.unit.dir" location="${symbol_dollar}{symbol_dollar}{build.dir}/${symbol_dollar}{symbol_dollar}{service.unit.name}" />
|
||||
<property name="build.service.unit.zip" location="${symbol_dollar}{symbol_dollar}{build.dir}/${symbol_dollar}{symbol_dollar}{service.unit.name}.zip" />
|
||||
</target>
|
||||
|
||||
<target name="-init-check" depends="-pre-init, -init-user, -init-project,-do-init">
|
||||
<fail unless="src.dir">Must set src.dir</fail>
|
||||
<fail unless="build.dir">Must set build.dir</fail>
|
||||
<fail unless="service.unit.name">Must set service.unit.name</fail>
|
||||
</target>
|
||||
|
||||
<!-- Init project -->
|
||||
<target name="init"
|
||||
depends="-pre-init, -init-user, -init-project,-do-init, -init-check"
|
||||
description="initilizes the build settings">
|
||||
</target>
|
||||
|
||||
<target name="-post-compile-su">
|
||||
<!-- Empty placeholder for easier customization. -->
|
||||
<!-- You can override this target in the build.xml file. -->
|
||||
</target>
|
||||
|
||||
<!-- Clean target -->
|
||||
<target name="clean" depends="init" description="Clean the Service Unit" >
|
||||
<echo level="debug" message ="Cleaning the Service Unit" />
|
||||
<delete dir="${symbol_dollar}{symbol_dollar}{build.dir}"/>
|
||||
</target>
|
||||
|
||||
<!-- Compile target -->
|
||||
<target name="compile" depends="init" description="Compile Service Unit">
|
||||
<echo level="debug" message ="Compiling Service Unit" />
|
||||
<mkdir dir="${symbol_dollar}{symbol_dollar}{build.service.unit.dir}"/>
|
||||
<copy file="${symbol_dollar}{symbol_dollar}{src.dir}/META-INF/jbi.xml" todir="${symbol_dollar}{symbol_dollar}{build.service.unit.dir}/META-INF" overwrite="true" />
|
||||
<copy todir="${symbol_dollar}{symbol_dollar}{build.service.unit.dir}" overwrite="true" >
|
||||
<fileset dir="${symbol_dollar}{symbol_dollar}{src.dir}" >
|
||||
</fileset>
|
||||
</copy>
|
||||
</target>
|
||||
|
||||
<!-- Package target -->
|
||||
<target name="package" depends="init, compile" description="Package the Service Unit" >
|
||||
<echo level="debug" message ="Packaging Service Unit" />
|
||||
<zip destfile="${symbol_dollar}{symbol_dollar}{build.service.unit.zip}" basedir="${symbol_dollar}{symbol_dollar}{build.service.unit.dir}" />
|
||||
</target>
|
||||
|
||||
<!-- Help target -->
|
||||
<target name="help" depends="init" description="Display Help on Service Unit">
|
||||
<echo message ="Builds Service Unit ${symbol_dollar}{symbol_dollar}{build.service.unit.zip}" />
|
||||
</target>
|
||||
|
||||
</project>
|
|
@ -0,0 +1,20 @@
|
|||
#set( $symbol_pound = '#' )
|
||||
#set( $symbol_dollar = '$' )
|
||||
#set( $symbol_escape = '\' )
|
||||
${symbol_pound}set( ${symbol_dollar}symbol_pound = '${symbol_pound}' )
|
||||
${symbol_pound}set( ${symbol_dollar}symbol_dollar = '${symbol_dollar}' )
|
||||
${symbol_pound}set( ${symbol_dollar}symbol_escape = '${symbol_escape}' )
|
||||
<?xml version='1.0' encoding="UTF-8" standalone="yes" ?>
|
||||
<jbi version="1.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns="http://java.sun.com/xml/ns/jbi"
|
||||
xmlns:greet="http://www.sun.com/jbi/examples/sample-service/greetings/"
|
||||
>
|
||||
<services binding-component="true">
|
||||
<consumes service-name="greet:greetService"
|
||||
interface-name="greet:greetings"
|
||||
endpoint-name="port">
|
||||
</consumes>
|
||||
</services>
|
||||
</jbi>
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
#set( $symbol_pound = '#' )
|
||||
#set( $symbol_dollar = '$' )
|
||||
#set( $symbol_escape = '\' )
|
||||
${symbol_pound}set( ${symbol_dollar}symbol_pound = '${symbol_pound}' )
|
||||
${symbol_pound}set( ${symbol_dollar}symbol_dollar = '${symbol_dollar}' )
|
||||
${symbol_pound}set( ${symbol_dollar}symbol_escape = '${symbol_escape}' )
|
||||
<?xml version='1.0' encoding="UTF-8" standalone="yes" ?>
|
||||
<jbi version="1.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns="http://java.sun.com/xml/ns/jbi"
|
||||
xmlns:greet="http://www.sun.com/jbi/examples/sample-service/greetings/"
|
||||
>
|
||||
<services binding-component="true">
|
||||
<consumes service-name="greet:greetService"
|
||||
interface-name="greet:greetings"
|
||||
endpoint-name="port">
|
||||
</consumes>
|
||||
</services>
|
||||
</jbi>
|
||||
|
|
@ -0,0 +1,77 @@
|
|||
#set( $symbol_pound = '#' )
|
||||
#set( $symbol_dollar = '$' )
|
||||
#set( $symbol_escape = '\' )
|
||||
${symbol_pound}set( ${symbol_dollar}symbol_pound = '${symbol_pound}' )
|
||||
${symbol_pound}set( ${symbol_dollar}symbol_dollar = '${symbol_dollar}' )
|
||||
${symbol_pound}set( ${symbol_dollar}symbol_escape = '${symbol_escape}' )
|
||||
<?xml version="1.0"?>
|
||||
<project name="testSUSE" default="default" basedir=".">
|
||||
|
||||
<target name="default" depends="package" description="compiles and packages the project."/>
|
||||
|
||||
<target name="-pre-init">
|
||||
<!-- Empty placeholder for easier customization. -->
|
||||
</target>
|
||||
|
||||
<target name="-init-user" depends="-pre-init" >
|
||||
<echo level="debug" message="loading user properties from ${symbol_dollar}{symbol_dollar}{user.properties.file}" />
|
||||
<property file="${symbol_dollar}{symbol_dollar}{user.properties.file}"/>
|
||||
</target>
|
||||
|
||||
<target name="-init-project" depends="-pre-init, -init-user" >
|
||||
<echo level="debug" message="loading build.properties" />
|
||||
<property file="build.properties"/>
|
||||
</target>
|
||||
|
||||
<target name="-do-init" depends="-pre-init, -init-user, -init-project" >
|
||||
<echo level="debug" message="Nothing to -do-init" />
|
||||
<property name="build.service.unit.dir" location="${symbol_dollar}{symbol_dollar}{build.dir}/${symbol_dollar}{symbol_dollar}{service.unit.name}" />
|
||||
<property name="build.service.unit.zip" location="${symbol_dollar}{symbol_dollar}{build.dir}/${symbol_dollar}{symbol_dollar}{service.unit.name}.zip" />
|
||||
</target>
|
||||
|
||||
<target name="-init-check" depends="-pre-init, -init-user, -init-project,-do-init">
|
||||
<fail unless="src.dir">Must set src.dir</fail>
|
||||
<fail unless="build.dir">Must set build.dir</fail>
|
||||
<fail unless="service.unit.name">Must set service.unit.name</fail>
|
||||
</target>
|
||||
|
||||
<!-- Init project -->
|
||||
<target name="init"
|
||||
depends="-pre-init, -init-user, -init-project,-do-init, -init-check"
|
||||
description="initilizes the build settings">
|
||||
</target>
|
||||
|
||||
<target name="-post-compile-su">
|
||||
<!-- Empty placeholder for easier customization. -->
|
||||
<!-- You can override this target in the build.xml file. -->
|
||||
</target>
|
||||
|
||||
<!-- Clean target -->
|
||||
<target name="clean" depends="init" description="Clean the Service Unit" >
|
||||
<echo level="debug" message ="Cleaning the Service Unit" />
|
||||
<delete dir="${symbol_dollar}{symbol_dollar}{build.dir}"/>
|
||||
</target>
|
||||
|
||||
<!-- Compile target -->
|
||||
<target name="compile" depends="init" description="Compile Service Unit">
|
||||
<echo level="debug" message ="Compiling Service Unit" />
|
||||
<mkdir dir="${symbol_dollar}{symbol_dollar}{build.service.unit.dir}"/>
|
||||
<copy file="${symbol_dollar}{symbol_dollar}{src.dir}/META-INF/jbi.xml" todir="${symbol_dollar}{symbol_dollar}{build.service.unit.dir}/META-INF" overwrite="true" />
|
||||
<copy todir="${symbol_dollar}{symbol_dollar}{build.service.unit.dir}" overwrite="true" >
|
||||
<fileset dir="${symbol_dollar}{symbol_dollar}{src.dir}" >
|
||||
</fileset>
|
||||
</copy>
|
||||
</target>
|
||||
|
||||
<!-- Package target -->
|
||||
<target name="package" depends="init, compile" description="Package the Service Unit" >
|
||||
<echo level="debug" message ="Packaging Service Unit" />
|
||||
<zip destfile="${symbol_dollar}{symbol_dollar}{build.service.unit.zip}" basedir="${symbol_dollar}{symbol_dollar}{build.service.unit.dir}" />
|
||||
</target>
|
||||
|
||||
<!-- Help target -->
|
||||
<target name="help" depends="init" description="Display Help on Service Unit">
|
||||
<echo message ="Builds Service Unit ${symbol_dollar}{symbol_dollar}{build.service.unit.zip}" />
|
||||
</target>
|
||||
|
||||
</project>
|
|
@ -0,0 +1,20 @@
|
|||
#set( $symbol_pound = '#' )
|
||||
#set( $symbol_dollar = '$' )
|
||||
#set( $symbol_escape = '\' )
|
||||
${symbol_pound}set( ${symbol_dollar}symbol_pound = '${symbol_pound}' )
|
||||
${symbol_pound}set( ${symbol_dollar}symbol_dollar = '${symbol_dollar}' )
|
||||
${symbol_pound}set( ${symbol_dollar}symbol_escape = '${symbol_escape}' )
|
||||
<?xml version='1.0' encoding="UTF-8" standalone="yes" ?>
|
||||
<jbi version="1.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns="http://java.sun.com/xml/ns/jbi"
|
||||
xmlns:greet="http://www.sun.com/jbi/examples/sample-service/greetings/"
|
||||
>
|
||||
<services binding-component="false">
|
||||
<provides service-name="greet:greetService"
|
||||
interface-name="greet:greetings"
|
||||
endpoint-name="${symbol_dollar}{artifactId}_JBIPort">
|
||||
</provides>
|
||||
</services>
|
||||
</jbi>
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
#set( $symbol_pound = '#' )
|
||||
#set( $symbol_dollar = '$' )
|
||||
#set( $symbol_escape = '\' )
|
||||
${symbol_pound}set( ${symbol_dollar}symbol_pound = '${symbol_pound}' )
|
||||
${symbol_pound}set( ${symbol_dollar}symbol_dollar = '${symbol_dollar}' )
|
||||
${symbol_pound}set( ${symbol_dollar}symbol_escape = '${symbol_escape}' )
|
||||
<?xml version='1.0' encoding="UTF-8" standalone="yes" ?>
|
||||
<jbi version="1.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns="http://java.sun.com/xml/ns/jbi"
|
||||
xmlns:greet="http://www.sun.com/jbi/examples/sample-service/greetings/"
|
||||
>
|
||||
<services binding-component="false">
|
||||
<provides service-name="greet:greetService"
|
||||
interface-name="greet:greetings"
|
||||
endpoint-name="${symbol_dollar}{artifactId}_JBIPort">
|
||||
</provides>
|
||||
</services>
|
||||
</jbi>
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
#set( $symbol_pound = '#' )
|
||||
#set( $symbol_dollar = '$' )
|
||||
#set( $symbol_escape = '\' )
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- You may freely edit this file. See harness/README in the NetBeans platform -->
|
||||
<!-- for some information on what you could do (e.g. targets to override). -->
|
||||
<!-- If you delete this file and reopen the project it will be recreated. -->
|
||||
<project name="${artifactId}" default="netbeans" basedir=".">
|
||||
<description>Builds, tests, and runs the project ${artifactId}.</description>
|
||||
<import file="nbproject/build-impl.xml"/>
|
||||
</project>
|
|
@ -0,0 +1,6 @@
|
|||
Manifest-Version: 1.0
|
||||
OpenIDE-Module: ${artifactId}
|
||||
OpenIDE-Module-Layer: ${artifactId}/layer.xml
|
||||
OpenIDE-Module-Localizing-Bundle: ${artifactId}/Bundle.properties
|
||||
OpenIDE-Module-Specification-Version: 1.0
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
#set( $symbol_pound = '#' )
|
||||
#set( $symbol_dollar = '$' )
|
||||
#set( $symbol_escape = '\' )
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
*** GENERATED FROM project.xml - DO NOT EDIT ***
|
||||
*** EDIT ../build.xml INSTEAD ***
|
||||
-->
|
||||
<project name="serviceengine-impl" basedir="..">
|
||||
<property file="nbproject/private/platform-private.properties"/>
|
||||
<property file="nbproject/platform.properties"/>
|
||||
<macrodef name="property" uri="http://www.netbeans.org/ns/nb-module-project/2">
|
||||
<attribute name="name"/>
|
||||
<attribute name="value"/>
|
||||
<sequential>
|
||||
<property name="@{name}" value="${symbol_dollar}{@{value}}"/>
|
||||
</sequential>
|
||||
</macrodef>
|
||||
<property file="${symbol_dollar}{user.properties.file}"/>
|
||||
<nbmproject2:property name="harness.dir" value="nbplatform.${symbol_dollar}{nbplatform.active}.harness.dir" xmlns:nbmproject2="http://www.netbeans.org/ns/nb-module-project/2"/>
|
||||
<nbmproject2:property name="netbeans.dest.dir" value="nbplatform.${symbol_dollar}{nbplatform.active}.netbeans.dest.dir" xmlns:nbmproject2="http://www.netbeans.org/ns/nb-module-project/2"/>
|
||||
<fail message="You must define 'nbplatform.${symbol_dollar}{nbplatform.active}.harness.dir'">
|
||||
<condition>
|
||||
<not>
|
||||
<available file="${symbol_dollar}{harness.dir}" type="dir"/>
|
||||
</not>
|
||||
</condition>
|
||||
</fail>
|
||||
<import file="${symbol_dollar}{harness.dir}/build.xml"/>
|
||||
</project>
|
|
@ -0,0 +1,11 @@
|
|||
#set( $symbol_pound = '#' )
|
||||
#set( $symbol_dollar = '$' )
|
||||
#set( $symbol_escape = '\' )
|
||||
build.xml.data.CRC32=10d1596b
|
||||
build.xml.script.CRC32=11ff9e8e
|
||||
build.xml.stylesheet.CRC32=a56c6a5b@2.50.1
|
||||
${symbol_pound} This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
|
||||
${symbol_pound} 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=10d1596b
|
||||
nbproject/build-impl.xml.script.CRC32=a0f936cd
|
||||
nbproject/build-impl.xml.stylesheet.CRC32=68e521fc@2.50.1
|
|
@ -0,0 +1,4 @@
|
|||
#set( $symbol_pound = '#' )
|
||||
#set( $symbol_dollar = '$' )
|
||||
#set( $symbol_escape = '\' )
|
||||
nbplatform.active=default
|
|
@ -0,0 +1,4 @@
|
|||
#set( $symbol_pound = '#' )
|
||||
#set( $symbol_dollar = '$' )
|
||||
#set( $symbol_escape = '\' )
|
||||
user.properties.file=D:${symbol_escape}${symbol_escape}softwares${symbol_escape}${symbol_escape}openesb_logicoy_last_working57${symbol_escape}${symbol_escape}.netbeans${symbol_escape}${symbol_escape}openesb${symbol_escape}${symbol_escape}build.properties
|
|
@ -0,0 +1,7 @@
|
|||
#set( $symbol_pound = '#' )
|
||||
#set( $symbol_dollar = '$' )
|
||||
#set( $symbol_escape = '\' )
|
||||
javac.compilerargs=-Xlint -Xlint:-serial
|
||||
javac.source=1.5
|
||||
nbm.homepage=http://www.netbeans.org
|
||||
nbm.module.author=logicoyparam
|
|
@ -0,0 +1,151 @@
|
|||
#set( $symbol_pound = '#' )
|
||||
#set( $symbol_dollar = '$' )
|
||||
#set( $symbol_escape = '\' )
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://www.netbeans.org/ns/project/1">
|
||||
<type>org.netbeans.modules.apisupport.project</type>
|
||||
<configuration>
|
||||
<data xmlns="http://www.netbeans.org/ns/nb-module-project/2">
|
||||
<code-name-base>${artifactId}</code-name-base>
|
||||
<standalone/>
|
||||
<module-dependencies>
|
||||
<dependency>
|
||||
<code-name-base>org.apache.tools.ant.module</code-name-base>
|
||||
<build-prerequisite/>
|
||||
<compile-dependency/>
|
||||
<run-dependency>
|
||||
<release-version>3</release-version>
|
||||
<specification-version>3.27.0.2</specification-version>
|
||||
</run-dependency>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<code-name-base>org.jdesktop.layout</code-name-base>
|
||||
<build-prerequisite/>
|
||||
<compile-dependency/>
|
||||
<run-dependency>
|
||||
<release-version>1</release-version>
|
||||
<specification-version>1.4</specification-version>
|
||||
</run-dependency>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<code-name-base>org.netbeans.modules.java.project</code-name-base>
|
||||
<build-prerequisite/>
|
||||
<compile-dependency/>
|
||||
<run-dependency>
|
||||
<release-version>1</release-version>
|
||||
<specification-version>1.12</specification-version>
|
||||
</run-dependency>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<code-name-base>org.netbeans.modules.project.ant</code-name-base>
|
||||
<build-prerequisite/>
|
||||
<compile-dependency/>
|
||||
<run-dependency>
|
||||
<release-version>1</release-version>
|
||||
<specification-version>1.16</specification-version>
|
||||
</run-dependency>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<code-name-base>org.netbeans.modules.projectapi</code-name-base>
|
||||
<build-prerequisite/>
|
||||
<compile-dependency/>
|
||||
<run-dependency>
|
||||
<release-version>1</release-version>
|
||||
<specification-version>1.13</specification-version>
|
||||
</run-dependency>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<code-name-base>org.netbeans.modules.projectuiapi</code-name-base>
|
||||
<build-prerequisite/>
|
||||
<compile-dependency/>
|
||||
<run-dependency>
|
||||
<release-version>1</release-version>
|
||||
<specification-version>1.24.0.6</specification-version>
|
||||
</run-dependency>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<code-name-base>org.netbeans.modules.queries</code-name-base>
|
||||
<build-prerequisite/>
|
||||
<compile-dependency/>
|
||||
<run-dependency>
|
||||
<release-version>1</release-version>
|
||||
<specification-version>1.10</specification-version>
|
||||
</run-dependency>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<code-name-base>org.openide.actions</code-name-base>
|
||||
<build-prerequisite/>
|
||||
<compile-dependency/>
|
||||
<run-dependency>
|
||||
<specification-version>6.6.0.1</specification-version>
|
||||
</run-dependency>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<code-name-base>org.openide.awt</code-name-base>
|
||||
<build-prerequisite/>
|
||||
<compile-dependency/>
|
||||
<run-dependency>
|
||||
<specification-version>6.11.0.1</specification-version>
|
||||
</run-dependency>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<code-name-base>org.openide.dialogs</code-name-base>
|
||||
<build-prerequisite/>
|
||||
<compile-dependency/>
|
||||
<run-dependency>
|
||||
<specification-version>7.5</specification-version>
|
||||
</run-dependency>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<code-name-base>org.openide.execution</code-name-base>
|
||||
<build-prerequisite/>
|
||||
<compile-dependency/>
|
||||
<run-dependency>
|
||||
<specification-version>1.10</specification-version>
|
||||
</run-dependency>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<code-name-base>org.openide.filesystems</code-name-base>
|
||||
<build-prerequisite/>
|
||||
<compile-dependency/>
|
||||
<run-dependency>
|
||||
<specification-version>7.3</specification-version>
|
||||
</run-dependency>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<code-name-base>org.openide.loaders</code-name-base>
|
||||
<build-prerequisite/>
|
||||
<compile-dependency/>
|
||||
<run-dependency>
|
||||
<specification-version>6.5</specification-version>
|
||||
</run-dependency>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<code-name-base>org.openide.nodes</code-name-base>
|
||||
<build-prerequisite/>
|
||||
<compile-dependency/>
|
||||
<run-dependency>
|
||||
<specification-version>7.2.0.1</specification-version>
|
||||
</run-dependency>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<code-name-base>org.openide.util</code-name-base>
|
||||
<build-prerequisite/>
|
||||
<compile-dependency/>
|
||||
<run-dependency>
|
||||
<specification-version>7.9.0.1</specification-version>
|
||||
</run-dependency>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<code-name-base>org.openide.util.lookup</code-name-base>
|
||||
<build-prerequisite/>
|
||||
<compile-dependency/>
|
||||
<run-dependency>
|
||||
<specification-version>8.15.2</specification-version>
|
||||
</run-dependency>
|
||||
</dependency>
|
||||
</module-dependencies>
|
||||
<public-packages/>
|
||||
</data>
|
||||
</configuration>
|
||||
</project>
|
|
@ -0,0 +1 @@
|
|||
serviceengine.project.SEPluginProjectType
|
|
@ -0,0 +1 @@
|
|||
org.netbeans.modules.compapp.projects.base.queries.SameDriveCollocationQuery
|
|
@ -0,0 +1,15 @@
|
|||
# binding component deployment plugin resource bundle
|
||||
# binding deploy plugin
|
||||
OpenIDE-Module-Name=JBI Deployment Plugin[${artifactId}]
|
||||
# deployment plugin
|
||||
OpenIDE-Module-Short-Description=Service engine deployment plugin for ${artifactId}
|
||||
# deployment plugin for adding wsdl extensions related to the binding component to the wsdl editor
|
||||
OpenIDE-Module-Long-Description=Deployment plugin for creating service units related to this service engine in composite application
|
||||
# category
|
||||
OpenIDE-Module-Display-Category=CAPS
|
||||
|
||||
# plugin project template
|
||||
Templates/Project/SOA/${artifactId}JBIModule.xml=${artifactId} JBI Module
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE filesystem PUBLIC "-//NetBeans//DTD Filesystem 1.1//EN" "http://www.netbeans.org/dtds/filesystem-1_1.dtd">
|
||||
<filesystem>
|
||||
<folder name="Templates">
|
||||
<folder name="Project">
|
||||
<folder name="SOA">
|
||||
<file name="paramv4sepluginJBIModule.xml" url="/serviceengine/project/resources/se-jbi-module.xml">
|
||||
<attr name="SystemFileSystem.localizingBundle" stringvalue="serviceengine.Bundle"/>
|
||||
<attr name="SystemFileSystem.icon" urlvalue="nbresloc:/serviceengine/project/resources/projectIcon.png"/>
|
||||
<attr name="instantiatingIterator" methodvalue="serviceengine.project.wizard.SEPluginProjectWizardIterator.createIterator"/>
|
||||
<attr name="instantiatingWizardURL" urlvalue="nbresloc:/serviceengine/project/wizard/SEPluginProjectDescription.html"/>
|
||||
<attr name="templateCategory" stringvalue="jbi-se-plugin-prj-types"/>
|
||||
<attr name="template" boolvalue="true"/>
|
||||
</file>
|
||||
</folder>
|
||||
</folder>
|
||||
</folder>
|
||||
|
||||
<folder name="JbiComponents">
|
||||
<!-- JBI Component -->
|
||||
<file name="paramv4seplugin">
|
||||
<attr name="id" stringvalue="paramv4seplugin"/>
|
||||
<attr name="type" stringvalue="Engine"/>
|
||||
<attr name="description" stringvalue="Description of service engine : paramv4seplugin"/>
|
||||
</file>
|
||||
</folder>
|
||||
|
||||
</filesystem>
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
LBL_Node_Sources=Sources
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,408 @@
|
|||
/*
|
||||
* SEPluginProject.java
|
||||
*
|
||||
*/
|
||||
package net.openesb.component.${artifactId}.project;
|
||||
|
||||
import java.beans.PropertyChangeListener;
|
||||
import java.beans.PropertyChangeSupport;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import javax.swing.Icon;
|
||||
import javax.swing.ImageIcon;
|
||||
import org.netbeans.api.project.FileOwnerQuery;
|
||||
import org.netbeans.api.project.Project;
|
||||
import org.netbeans.api.project.ProjectInformation;
|
||||
import org.netbeans.api.project.ProjectManager;
|
||||
import org.netbeans.api.project.Sources;
|
||||
import org.netbeans.api.project.ant.AntArtifact;
|
||||
import net.openesb.component.${artifactId}.project.customizer.SEPluginProjectCustomizerProvider;
|
||||
import org.netbeans.spi.java.project.support.ui.BrokenReferencesSupport;
|
||||
import org.netbeans.spi.project.AuxiliaryConfiguration;
|
||||
import org.netbeans.spi.project.SubprojectProvider;
|
||||
import org.netbeans.spi.project.ant.AntArtifactProvider;
|
||||
import org.netbeans.spi.project.support.ant.AntProjectEvent;
|
||||
import org.netbeans.spi.project.support.ant.AntProjectHelper;
|
||||
import org.netbeans.spi.project.support.ant.AntProjectListener;
|
||||
import org.netbeans.spi.project.support.ant.EditableProperties;
|
||||
import org.netbeans.spi.project.support.ant.GeneratedFilesHelper;
|
||||
import org.netbeans.spi.project.support.ant.ProjectXmlSavedHook;
|
||||
import org.netbeans.spi.project.support.ant.PropertyEvaluator;
|
||||
import org.netbeans.spi.project.support.ant.ReferenceHelper;
|
||||
import org.netbeans.spi.project.support.ant.SourcesHelper;
|
||||
import org.netbeans.spi.project.ui.PrivilegedTemplates;
|
||||
import org.netbeans.spi.project.ui.ProjectOpenedHook;
|
||||
import org.netbeans.spi.project.ui.RecommendedTemplates;
|
||||
import org.netbeans.spi.queries.FileBuiltQueryImplementation;
|
||||
import org.netbeans.spi.queries.SharabilityQueryImplementation;
|
||||
import org.openide.ErrorManager;
|
||||
import org.openide.filesystems.FileObject;
|
||||
import org.openide.util.Lookup;
|
||||
import org.openide.util.Mutex;
|
||||
import org.openide.util.NbBundle;
|
||||
import org.openide.util.Utilities;
|
||||
import org.openide.util.lookup.Lookups;
|
||||
import org.w3c.dom.Element;
|
||||
import org.w3c.dom.Node;
|
||||
import org.w3c.dom.NodeList;
|
||||
import org.w3c.dom.Text;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author chikkala
|
||||
*/
|
||||
public final class SEPluginProject implements Project, AntProjectListener {
|
||||
|
||||
private static final Icon PROJECT_ICON = new ImageIcon(Utilities.loadImage(SEPluginProjectProperties.SE_PLUGIN_PROJECT_ICON_PATH)); // NOI18N
|
||||
private AntProjectHelper helper;
|
||||
private PropertyEvaluator evaluator;
|
||||
private ReferenceHelper refHelper;
|
||||
private GeneratedFilesHelper genFilesHelper;
|
||||
private Lookup lookup;
|
||||
|
||||
public SEPluginProject(AntProjectHelper helper) throws IOException {
|
||||
this.helper = helper;
|
||||
this.evaluator = createEvaluator();
|
||||
AuxiliaryConfiguration aux = helper.createAuxiliaryConfiguration();
|
||||
this.refHelper = new ReferenceHelper(helper, aux, helper.getStandardPropertyEvaluator());
|
||||
this.genFilesHelper = new GeneratedFilesHelper(helper);
|
||||
this.lookup = createLookup(aux);
|
||||
helper.addAntProjectListener(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "SEPluginProject[" + getProjectDirectory() + "]"; // NOI18N
|
||||
}
|
||||
|
||||
public FileObject getProjectDirectory() {
|
||||
return helper.getProjectDirectory();
|
||||
}
|
||||
|
||||
public Lookup getLookup() {
|
||||
return lookup;
|
||||
}
|
||||
|
||||
public void configurationXmlChanged(AntProjectEvent event) {
|
||||
if (event.getPath().equals(AntProjectHelper.PROJECT_XML_PATH)) {
|
||||
// Could be various kinds of changes, but name & displayName might have changed.
|
||||
Info info = (Info) getLookup().lookup(ProjectInformation.class);
|
||||
info.firePropertyChange(ProjectInformation.PROP_NAME);
|
||||
info.firePropertyChange(ProjectInformation.PROP_DISPLAY_NAME);
|
||||
}
|
||||
//TODO: add other configuration xml change event handling code.
|
||||
}
|
||||
|
||||
public void propertiesChanged(AntProjectEvent event) {
|
||||
//TODO: add property change event processing.
|
||||
}
|
||||
|
||||
public AntProjectHelper getAntProjectHelper() {
|
||||
return helper;
|
||||
}
|
||||
|
||||
public ReferenceHelper getReferenceHelper() {
|
||||
return this.refHelper;
|
||||
}
|
||||
|
||||
public PropertyEvaluator getEvaluator() {
|
||||
return this.evaluator;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return configured project name.
|
||||
*/
|
||||
@SuppressWarnings(value = "unchecked")
|
||||
public String getName() {
|
||||
return (String) ProjectManager.mutex().readAccess(new Mutex.Action() {
|
||||
public Object run() {
|
||||
Element data = helper.getPrimaryConfigurationData(true);
|
||||
|
||||
NodeList nl = data.getElementsByTagNameNS(SEPluginProjectType.PROJECT_CONFIGURATION_NAMESPACE, "name");
|
||||
if (nl.getLength() == 1) {
|
||||
nl = nl.item(0).getChildNodes();
|
||||
if (nl.getLength() == 1 && nl.item(0).getNodeType() == Node.TEXT_NODE) {
|
||||
return ((Text) nl.item(0)).getNodeValue();
|
||||
}
|
||||
}
|
||||
return "???"; // NOI18N
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Store configured project name.
|
||||
*/
|
||||
@SuppressWarnings(value = "unchecked")
|
||||
public void setName(final String name) {
|
||||
ProjectManager.mutex().writeAccess(new Mutex.Action() {
|
||||
public Object run() {
|
||||
Element data = helper.getPrimaryConfigurationData(true);
|
||||
|
||||
NodeList nl = data.getElementsByTagNameNS(SEPluginProjectType.PROJECT_CONFIGURATION_NAMESPACE, "name");
|
||||
Element nameEl;
|
||||
if (nl.getLength() == 1) {
|
||||
nameEl = (Element) nl.item(0);
|
||||
NodeList deadKids = nameEl.getChildNodes();
|
||||
while (deadKids.getLength() > 0) {
|
||||
nameEl.removeChild(deadKids.item(0));
|
||||
}
|
||||
} else {
|
||||
nameEl = data.getOwnerDocument().createElementNS(SEPluginProjectType.PROJECT_CONFIGURATION_NAMESPACE, "name");
|
||||
data.insertBefore(nameEl, data.getChildNodes().item(0));
|
||||
}
|
||||
nameEl.appendChild(data.getOwnerDocument().createTextNode(name));
|
||||
helper.putPrimaryConfigurationData(data, true);
|
||||
return null;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private PropertyEvaluator createEvaluator() {
|
||||
//TODO: might need to use a custom evaluator to handle active platform substitutions...
|
||||
return helper.getStandardPropertyEvaluator();
|
||||
}
|
||||
|
||||
private FileBuiltQueryImplementation createFileBuiltQuery() {
|
||||
return helper.createGlobFileBuiltQuery(getEvaluator(),
|
||||
new String[]{"${src.dir}/*.java"}, // NOI18N
|
||||
new String[]{"${build.classes.dir}/*.class"} // NOI18N
|
||||
);
|
||||
}
|
||||
|
||||
private SharabilityQueryImplementation createSharabilityQuery() {
|
||||
return helper.createSharabilityQuery(getEvaluator(),
|
||||
new String[]{"${src.dir}"}, // NOI18N
|
||||
new String[]{"${build.dir}"} // NOI18N
|
||||
);
|
||||
}
|
||||
|
||||
private Sources getSources() {
|
||||
final SourcesHelper sourcesHelper = new SourcesHelper(helper, getEvaluator());
|
||||
//TODO: add pricipal and typed source roots if required.
|
||||
String srcLabel = NbBundle.getMessage(SEPluginProject.class, "LBL_Node_Sources"); //NOI18N
|
||||
|
||||
String srcLoc = "${" + SEPluginProjectProperties.SRC_DIR + "}";
|
||||
sourcesHelper.addPrincipalSourceRoot(srcLoc, srcLabel, null, null);
|
||||
sourcesHelper.addTypedSourceRoot(srcLoc, SEPluginProjectProperties.SOURCES_TYPE_XML,
|
||||
srcLabel, null, null);
|
||||
ProjectManager.mutex().postWriteRequest(new Runnable() {
|
||||
public void run() {
|
||||
sourcesHelper.registerExternalRoots(FileOwnerQuery.EXTERNAL_ALGORITHM_TRANSIENT);
|
||||
}
|
||||
});
|
||||
return sourcesHelper.createSources();
|
||||
}
|
||||
|
||||
private Lookup createLookup(AuxiliaryConfiguration aux) {
|
||||
|
||||
SubprojectProvider spp = refHelper.createSubprojectProvider();
|
||||
return Lookups.fixed(new Object[]{
|
||||
this, // to lookup this project from externally obtained Project
|
||||
aux,
|
||||
helper.createCacheDirectoryProvider(),
|
||||
spp,
|
||||
new Info(),
|
||||
new SEPluginProjectActionProvider(this, helper, refHelper),
|
||||
new SEPluginProjectLogicalViewProvider(this, helper, getEvaluator(), spp, refHelper),
|
||||
new SEPluginProjectCustomizerProvider(this, helper, refHelper),
|
||||
new AntArtifactProviderImpl(),
|
||||
new ProjectXmlSavedHookImpl(),
|
||||
new ProjectOpenedHookImpl(),
|
||||
new RecommendedTemplatesImpl(),
|
||||
new SEPluginProjectOperations(this),
|
||||
getSources(),
|
||||
createSharabilityQuery(),
|
||||
createFileBuiltQuery()
|
||||
});
|
||||
}
|
||||
// Private inner classes -------------------------------------------------------
|
||||
|
||||
/**
|
||||
* @see org.netbeans.api.project.ProjectInformation
|
||||
*/
|
||||
private final class Info implements ProjectInformation {
|
||||
|
||||
private final PropertyChangeSupport pcs = new PropertyChangeSupport(this);
|
||||
|
||||
Info() {
|
||||
}
|
||||
|
||||
void firePropertyChange(String prop) {
|
||||
pcs.firePropertyChange(prop, null, null);
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return SEPluginProject.this.getName();
|
||||
}
|
||||
|
||||
public String getDisplayName() {
|
||||
return SEPluginProject.this.getName();
|
||||
}
|
||||
|
||||
public Icon getIcon() {
|
||||
return PROJECT_ICON;
|
||||
}
|
||||
|
||||
public Project getProject() {
|
||||
return SEPluginProject.this;
|
||||
}
|
||||
|
||||
public void addPropertyChangeListener(PropertyChangeListener listener) {
|
||||
pcs.addPropertyChangeListener(listener);
|
||||
}
|
||||
|
||||
public void removePropertyChangeListener(PropertyChangeListener listener) {
|
||||
pcs.removePropertyChangeListener(listener);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.netbeans.spi.project.support.ant.ProjectXmlSavedHook
|
||||
*/
|
||||
private final class ProjectXmlSavedHookImpl extends ProjectXmlSavedHook {
|
||||
|
||||
ProjectXmlSavedHookImpl() {
|
||||
}
|
||||
|
||||
protected void projectXmlSaved() throws IOException {
|
||||
genFilesHelper.refreshBuildScript(
|
||||
GeneratedFilesHelper.BUILD_IMPL_XML_PATH,
|
||||
SEPluginProject.class.getResource("resources/build-impl.xsl"),
|
||||
false);
|
||||
genFilesHelper.refreshBuildScript(
|
||||
GeneratedFilesHelper.BUILD_XML_PATH,
|
||||
SEPluginProject.class.getResource("resources/build.xsl"),
|
||||
false);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.netbeans.spi.project.ui.ProjectOpenedHook
|
||||
*/
|
||||
private final class ProjectOpenedHookImpl extends ProjectOpenedHook {
|
||||
|
||||
// TODO m
|
||||
ProjectOpenedHookImpl() {
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
protected void projectOpened() {
|
||||
|
||||
try {
|
||||
// Check up on build scripts.
|
||||
genFilesHelper.refreshBuildScript(
|
||||
GeneratedFilesHelper.BUILD_IMPL_XML_PATH,
|
||||
SEPluginProject.class.getResource("resources/build-impl.xsl"),
|
||||
true);
|
||||
genFilesHelper.refreshBuildScript(
|
||||
GeneratedFilesHelper.BUILD_XML_PATH,
|
||||
SEPluginProject.class.getResource("resources/build.xsl"),
|
||||
true);
|
||||
} catch (IOException e) {
|
||||
ErrorManager.getDefault().notify(ErrorManager.INFORMATIONAL, e);
|
||||
}
|
||||
|
||||
// Make it easier to run headless builds on the same machine at least.
|
||||
ProjectManager.mutex().writeAccess(new Mutex.Action() {
|
||||
public Object run() {
|
||||
EditableProperties ep = helper.getProperties(AntProjectHelper.PRIVATE_PROPERTIES_PATH);
|
||||
File buildProperties = new File(System.getProperty("netbeans.user"), "build.properties"); // NOI18N
|
||||
ep.setProperty("user.properties.file", buildProperties.getAbsolutePath()); //NOI18N
|
||||
helper.putProperties(AntProjectHelper.PRIVATE_PROPERTIES_PATH, ep);
|
||||
//TODO: add any other resolved private properties. for example, the project paths and lib paths
|
||||
try {
|
||||
ProjectManager.getDefault().saveProject(SEPluginProject.this);
|
||||
} catch (IOException e) {
|
||||
ErrorManager.getDefault().notify(e);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
});
|
||||
|
||||
SEPluginProjectLogicalViewProvider logicalViewProvider =
|
||||
SEPluginProject.this.getLookup().lookup(SEPluginProjectLogicalViewProvider.class);
|
||||
if (logicalViewProvider != null && logicalViewProvider.hasBrokenLinks()) {
|
||||
BrokenReferencesSupport.showAlert();
|
||||
}
|
||||
}
|
||||
|
||||
protected void projectClosed() {
|
||||
// Probably unnecessary, but just in case:
|
||||
try {
|
||||
ProjectManager.getDefault().saveProject(SEPluginProject.this);
|
||||
} catch (IOException e) {
|
||||
ErrorManager.getDefault().notify(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.netbeans.spi.project.ui.RecommendedTemplates
|
||||
* @see org.netbeans.spi.project.ui.PrivilegedTemplates
|
||||
*/
|
||||
private static final class RecommendedTemplatesImpl implements RecommendedTemplates, PrivilegedTemplates {
|
||||
|
||||
// List of primarily supported templates
|
||||
private static final String[] TYPES = new String[]{
|
||||
/* TODO: add any other recommended templates
|
||||
"java-classes", // NOI18N
|
||||
"ejb-types", // NOI18N
|
||||
"java-beans", // NOI18N
|
||||
"oasis-XML-catalogs", // NOI18N
|
||||
"XML", // NOI18N
|
||||
"ant-script", // NOI18N
|
||||
"ant-task", // NOI18N
|
||||
"simple-files" // NOI18N
|
||||
*/
|
||||
"SOA",
|
||||
"XML", // NOI18N
|
||||
"simple-files" // NOI18N
|
||||
};
|
||||
private static final String[] PRIVILEGED_NAMES = new String[]{
|
||||
/* TODO: add any other privileged names
|
||||
"Templates/Classes/Class.java", // NOI18N
|
||||
"Templates/Classes/Package", // NOI18N
|
||||
"Templates/Classes/Interface.java" // NOI18N
|
||||
*/
|
||||
"Templates/XML/XmlDocument.xml", // NOI18N
|
||||
"Templates/XML/XmlSchema.xsd", // NOI18N
|
||||
"Templates/XML/WSDL.wsdl", // NOI18N
|
||||
"Templates/Other/properties.properties" // NOI18N
|
||||
};
|
||||
|
||||
public String[] getRecommendedTypes() {
|
||||
return TYPES;
|
||||
}
|
||||
|
||||
public String[] getPrivilegedTemplates() {
|
||||
return PRIVILEGED_NAMES;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Exports the main JAR as an official build product for use from other
|
||||
* scripts. The type of the artifact will be {@link AntArtifact#TYPE_JAR}.
|
||||
*
|
||||
* @see org.netbeans.spi.project.ant.AntArtifactProvider
|
||||
*/
|
||||
private final class AntArtifactProviderImpl implements AntArtifactProvider {
|
||||
|
||||
public AntArtifact[] getBuildArtifacts() {
|
||||
return new AntArtifact[]{
|
||||
helper.createSimpleAntArtifact(
|
||||
SEPluginProjectProperties.ARTIFACT_TYPE_JBI_SU_PREFIX
|
||||
+ helper.getStandardPropertyEvaluator().getProperty(SEPluginProjectProperties.JBI_SU_TARGET_NAME),
|
||||
SEPluginProjectProperties.JBI_SU_ZIP,
|
||||
helper.getStandardPropertyEvaluator(),
|
||||
SEPluginProjectProperties.BUILD_TARGET_DIST,
|
||||
SEPluginProjectProperties.BUILD_TARGET_CLEAN),
|
||||
helper.createSimpleAntArtifact(SEPluginProjectProperties.ARTIFACT_TYPE_JAR,
|
||||
SEPluginProjectProperties.JBI_SU_ZIP,
|
||||
helper.getStandardPropertyEvaluator(),
|
||||
SEPluginProjectProperties.BUILD_TARGET_DIST,
|
||||
SEPluginProjectProperties.BUILD_TARGET_CLEAN)
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,136 @@
|
|||
/*
|
||||
* SEPluginProjectActionProvider.java
|
||||
*
|
||||
*/
|
||||
package net.openesb.component.${artifactId}.project;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Properties;
|
||||
import org.apache.tools.ant.module.api.support.ActionUtils;
|
||||
import org.netbeans.spi.project.ActionProvider;
|
||||
import org.netbeans.spi.project.support.ant.AntProjectHelper;
|
||||
import org.netbeans.spi.project.support.ant.GeneratedFilesHelper;
|
||||
import org.netbeans.spi.project.support.ant.ReferenceHelper;
|
||||
import org.netbeans.spi.project.ui.support.DefaultProjectOperations;
|
||||
import org.openide.DialogDisplayer;
|
||||
import org.openide.ErrorManager;
|
||||
import org.openide.NotifyDescriptor;
|
||||
import org.openide.filesystems.FileObject;
|
||||
import org.openide.util.Lookup;
|
||||
import org.openide.util.NbBundle;
|
||||
|
||||
/**
|
||||
* Action provider of the SE Plugin projects.
|
||||
*
|
||||
* @author chikkala
|
||||
*/
|
||||
public class SEPluginProjectActionProvider implements ActionProvider {
|
||||
|
||||
// Commands available from SE Plugin Project
|
||||
private static final String[] supportedActions = {COMMAND_BUILD, COMMAND_CLEAN, COMMAND_REBUILD, COMMAND_DELETE, COMMAND_COPY, COMMAND_MOVE, COMMAND_RENAME};
|
||||
private SEPluginProject project;
|
||||
// Ant project helper of the project
|
||||
private AntProjectHelper antProjectHelper;
|
||||
private ReferenceHelper refHelper;
|
||||
/**
|
||||
* Map from commands to ant targets
|
||||
*/
|
||||
private Map<String, String[]> commands;
|
||||
|
||||
public SEPluginProjectActionProvider(SEPluginProject project, AntProjectHelper antProjectHelper, ReferenceHelper refHelper) {
|
||||
commands = new HashMap<String, String[]>();
|
||||
commands.put(COMMAND_BUILD, new String[]{"dist"}); // NOI18N
|
||||
commands.put(COMMAND_CLEAN, new String[]{"clean"}); // NOI18N
|
||||
commands.put(COMMAND_REBUILD, new String[]{"clean", "dist"}); // NOI18N
|
||||
//TODO: Add any other ant targets to commands map.
|
||||
//commands.put(COMMAND_DEPLOY, new String[] {"run"}); // NOI18N
|
||||
this.antProjectHelper = antProjectHelper;
|
||||
this.project = project;
|
||||
this.refHelper = refHelper;
|
||||
}
|
||||
|
||||
public String[] getSupportedActions() {
|
||||
return supportedActions;
|
||||
}
|
||||
|
||||
public void invokeAction(final String command, final Lookup context) throws IllegalArgumentException {
|
||||
|
||||
if (COMMAND_COPY.equals(command)) {
|
||||
DefaultProjectOperations.performDefaultCopyOperation(project);
|
||||
return;
|
||||
}
|
||||
|
||||
if (COMMAND_MOVE.equals(command)) {
|
||||
DefaultProjectOperations.performDefaultMoveOperation(project);
|
||||
return;
|
||||
}
|
||||
|
||||
if (COMMAND_RENAME.equals(command)) {
|
||||
DefaultProjectOperations.performDefaultRenameOperation(project, null);
|
||||
return;
|
||||
}
|
||||
if (COMMAND_DELETE.equals(command)) {
|
||||
DefaultProjectOperations.performDefaultDeleteOperation(project);
|
||||
return;
|
||||
}
|
||||
|
||||
Runnable action = new Runnable() {
|
||||
public void run() {
|
||||
Properties p = new Properties();
|
||||
String[] targetNames;
|
||||
|
||||
targetNames = getTargetNames(command, context, p);
|
||||
if (targetNames == null) {
|
||||
return;
|
||||
}
|
||||
if (targetNames.length == 0) {
|
||||
targetNames = null;
|
||||
}
|
||||
if (p.keySet().size() == 0) {
|
||||
p = null;
|
||||
}
|
||||
try {
|
||||
FileObject buildFo = findBuildXml();
|
||||
if (buildFo == null || !buildFo.isValid()) {
|
||||
//The build.xml was deleted after the isActionEnabled was called
|
||||
NotifyDescriptor nd = new NotifyDescriptor.Message(NbBundle.getMessage(SEPluginProjectActionProvider.class,
|
||||
"LBL_No_Build_XML_Found"), NotifyDescriptor.WARNING_MESSAGE);
|
||||
DialogDisplayer.getDefault().notify(nd);
|
||||
} else {
|
||||
ActionUtils.runTarget(buildFo, targetNames, p);
|
||||
}
|
||||
} catch (IOException e) {
|
||||
ErrorManager.getDefault().notify(e);
|
||||
}
|
||||
}
|
||||
};
|
||||
//TODO: add code if needed that requires the execution to wait for some other task to complete.
|
||||
action.run(); // execute the task to invoke the ant target for the command
|
||||
|
||||
}
|
||||
|
||||
public boolean isActionEnabled(String command, Lookup context) throws IllegalArgumentException {
|
||||
if (findBuildXml() == null) {
|
||||
return false;
|
||||
}
|
||||
//TODO: Add any commands enabling check logic if required.
|
||||
return true;
|
||||
}
|
||||
|
||||
public FileObject findBuildXml() {
|
||||
return project.getProjectDirectory().getFileObject(GeneratedFilesHelper.BUILD_XML_PATH);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array of targets or null to stop execution; can return empty
|
||||
* array
|
||||
*/
|
||||
public String[] getTargetNames(String command, Lookup context, Properties p) throws IllegalArgumentException {
|
||||
String[] targetNames = commands.get(command);
|
||||
//TODO: add any special code that requires adding new target names or setting the
|
||||
// external properties p passed during the ant exection if required.
|
||||
return targetNames;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,182 @@
|
|||
/*
|
||||
* SEPluginProjectGenerator.java
|
||||
*
|
||||
*/
|
||||
package net.openesb.component.${artifactId}.project;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import org.netbeans.api.project.Project;
|
||||
import org.netbeans.api.project.ProjectManager;
|
||||
import org.netbeans.spi.project.support.ant.AntProjectHelper;
|
||||
import org.netbeans.spi.project.support.ant.EditableProperties;
|
||||
import org.netbeans.spi.project.support.ant.ProjectGenerator;
|
||||
import org.netbeans.spi.project.support.ant.PropertyUtils;
|
||||
import org.openide.filesystems.FileObject;
|
||||
import org.openide.filesystems.FileStateInvalidException;
|
||||
import org.openide.filesystems.FileUtil;
|
||||
import org.w3c.dom.Document;
|
||||
import org.w3c.dom.Element;
|
||||
|
||||
/**
|
||||
* Creates a Deployment Plugin Project for Service Engine.
|
||||
*
|
||||
* @author chikkala
|
||||
*/
|
||||
public class SEPluginProjectGenerator {
|
||||
|
||||
private File mPrjDir;
|
||||
private String mPrjName;
|
||||
private String mSUName;
|
||||
private String mSUDesc;
|
||||
private String mSUTarget;
|
||||
|
||||
public SEPluginProjectGenerator() {
|
||||
this.mSUName = SEPluginProjectProperties.JBI_SU_NAME_VALUE;
|
||||
this.mSUDesc = SEPluginProjectProperties.JBI_SU_DESCRIPTION_VALUE;
|
||||
this.mSUTarget = SEPluginProjectProperties.JBI_SU_TARGET_NAME_VALUE;
|
||||
}
|
||||
|
||||
public File getProjectDirectory() {
|
||||
return this.mPrjDir;
|
||||
}
|
||||
|
||||
public String getProjectName() {
|
||||
return this.mPrjName;
|
||||
}
|
||||
|
||||
public String getSUName() {
|
||||
return this.mSUName;
|
||||
}
|
||||
|
||||
public void setSUName(String suName) {
|
||||
this.mSUName = suName;
|
||||
}
|
||||
|
||||
public String getSUDescription() {
|
||||
return this.mSUDesc;
|
||||
}
|
||||
|
||||
public void setSUDescription(String suDesc) {
|
||||
this.mSUDesc = suDesc;
|
||||
}
|
||||
|
||||
public String getSUTarget() {
|
||||
return this.mSUTarget;
|
||||
}
|
||||
|
||||
public void setSUTarget(String suTarget) {
|
||||
this.mSUTarget = suTarget;
|
||||
}
|
||||
|
||||
private void createPrimaryConfigurationData(AntProjectHelper prjHelper) {
|
||||
|
||||
Element data = prjHelper.getPrimaryConfigurationData(true);
|
||||
Document doc = data.getOwnerDocument();
|
||||
|
||||
Element nameEl = doc.createElementNS(SEPluginProjectType.PROJECT_CONFIGURATION_NAMESPACE, "name"); // NOI18N
|
||||
nameEl.appendChild(doc.createTextNode(this.getProjectName()));
|
||||
data.appendChild(nameEl);
|
||||
|
||||
prjHelper.putPrimaryConfigurationData(data, true);
|
||||
}
|
||||
|
||||
private void createProjectPrivateProperties(AntProjectHelper prjHelper) {
|
||||
|
||||
EditableProperties ep = prjHelper.getProperties(AntProjectHelper.PRIVATE_PROPERTIES_PATH);
|
||||
|
||||
//TODO: add any project private properties here.
|
||||
// ep.setProperty("application.args", ""); // NOI18N
|
||||
prjHelper.putProperties(AntProjectHelper.PRIVATE_PROPERTIES_PATH, ep);
|
||||
}
|
||||
|
||||
private void createProjectProperties(AntProjectHelper prjHelper) {
|
||||
|
||||
EditableProperties ep = prjHelper.getProperties(AntProjectHelper.PROJECT_PROPERTIES_PATH);
|
||||
|
||||
ep.setProperty(SEPluginProjectProperties.SRC_DIR, SEPluginProjectProperties.SRC_DIR_VALUE);
|
||||
ep.setComment(SEPluginProjectProperties.SRC_DIR, new String[]{"# service unit source directory "}, false); // NOI18N
|
||||
ep.setProperty(SEPluginProjectProperties.BUILD_DIR, SEPluginProjectProperties.BUILD_DIR_VALUE);
|
||||
|
||||
ep.setProperty(SEPluginProjectProperties.BUILD_DIR, SEPluginProjectProperties.BUILD_DIR_VALUE);
|
||||
|
||||
ep.setProperty(SEPluginProjectProperties.JBI_SU_ZIP, SEPluginProjectProperties.JBI_SU_ZIP_VALUE);
|
||||
|
||||
ep.setProperty(SEPluginProjectProperties.JBI_SU_NAME, getSUName());
|
||||
ep.setProperty(SEPluginProjectProperties.JBI_SU_DESCRIPTION, getSUDescription());
|
||||
ep.setProperty(SEPluginProjectProperties.JBI_SU_TARGET_NAME, getSUTarget());
|
||||
|
||||
// save properties to file.
|
||||
prjHelper.putProperties(AntProjectHelper.PROJECT_PROPERTIES_PATH, ep);
|
||||
}
|
||||
|
||||
public AntProjectHelper createProject(File prjDir, String prjName) throws IOException {
|
||||
AntProjectHelper prjHelper = null;
|
||||
|
||||
this.mPrjDir = prjDir;
|
||||
this.mPrjName = prjName;
|
||||
if (SEPluginProjectProperties.JBI_SU_NAME_VALUE.equals(this.getSUName())) {
|
||||
// default value. so set the su name to project name.
|
||||
String suName = PropertyUtils.getUsablePropertyName(this.getProjectName());
|
||||
this.setSUName(suName);
|
||||
}
|
||||
|
||||
FileObject prjDirFO = createProjectDir(this.getProjectDirectory());
|
||||
|
||||
prjHelper = ProjectGenerator.createProject(prjDirFO, SEPluginProjectType.TYPE);
|
||||
|
||||
createPrimaryConfigurationData(prjHelper);
|
||||
createProjectProperties(prjHelper);
|
||||
createProjectPrivateProperties(prjHelper);
|
||||
|
||||
FileObject srcFolder = FileUtil.createFolder(prjDirFO, SEPluginProjectProperties.SRC_DIR_VALUE); // NOI18N
|
||||
|
||||
// create su jbi.xml
|
||||
SEPluginProjectProperties.createDefaultSUDescriptor(srcFolder);
|
||||
|
||||
//TODO: create any service unit specifc default artifacts here.
|
||||
|
||||
Project p = ProjectManager.getDefault().findProject(prjDirFO);
|
||||
ProjectManager.getDefault().saveProject(p);
|
||||
|
||||
return prjHelper;
|
||||
}
|
||||
|
||||
private static FileObject createProjectDir(File dir) throws IOException {
|
||||
FileObject dirFO;
|
||||
if (!dir.exists()) {
|
||||
//Refresh before mkdir not to depend on window focus, refreshFileSystem does not work correctly
|
||||
refreshFolder(dir);
|
||||
if (!dir.mkdirs()) {
|
||||
throw new IOException("Can not create project folder."); //NOI18N
|
||||
}
|
||||
refreshFileSystem(dir);
|
||||
}
|
||||
dirFO = FileUtil.toFileObject(dir);
|
||||
assert dirFO != null : "No such dir on disk: " + dir; // NOI18N
|
||||
assert dirFO.isFolder() : "Not really a dir: " + dir; // NOI18N
|
||||
return dirFO;
|
||||
}
|
||||
|
||||
private static void refreshFileSystem(final File dir) throws FileStateInvalidException {
|
||||
File rootF = dir;
|
||||
while (rootF.getParentFile() != null) {
|
||||
rootF = rootF.getParentFile();
|
||||
}
|
||||
FileObject dirFO = FileUtil.toFileObject(rootF);
|
||||
assert dirFO != null : "At least disk roots must be mounted! " + rootF; // NOI18N
|
||||
dirFO.getFileSystem().refresh(false);
|
||||
}
|
||||
|
||||
private static void refreshFolder(File dir) {
|
||||
while (!dir.exists()) {
|
||||
dir = dir.getParentFile();
|
||||
}
|
||||
FileObject fo = FileUtil.toFileObject(dir);
|
||||
if (fo != null) {
|
||||
fo.getChildren();
|
||||
fo.refresh();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,81 @@
|
|||
/*
|
||||
* SEPluginProjectLogicalViewProvider.java
|
||||
*
|
||||
*/
|
||||
package net.openesb.component.${artifactId}.project;
|
||||
|
||||
import org.netbeans.api.project.FileOwnerQuery;
|
||||
import org.netbeans.api.project.Project;
|
||||
import net.openesb.component.${artifactId}.project.node.SEPluginProjectNode;
|
||||
import org.netbeans.spi.java.project.support.ui.BrokenReferencesSupport;
|
||||
import org.netbeans.spi.java.project.support.ui.PackageView;
|
||||
import org.netbeans.spi.project.SubprojectProvider;
|
||||
import org.netbeans.spi.project.support.ant.AntProjectHelper;
|
||||
import org.netbeans.spi.project.support.ant.PropertyEvaluator;
|
||||
import org.netbeans.spi.project.support.ant.ReferenceHelper;
|
||||
import org.netbeans.spi.project.ui.LogicalViewProvider;
|
||||
import org.openide.filesystems.FileObject;
|
||||
import org.openide.nodes.Node;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author chikkala
|
||||
*/
|
||||
public class SEPluginProjectLogicalViewProvider implements LogicalViewProvider {
|
||||
|
||||
private final Project mProject;
|
||||
private final AntProjectHelper mHelper;
|
||||
private final PropertyEvaluator mEvaluator;
|
||||
private final SubprojectProvider mSpp;
|
||||
private final ReferenceHelper mResolver;
|
||||
|
||||
public SEPluginProjectLogicalViewProvider(Project project, AntProjectHelper helper, PropertyEvaluator evaluator, SubprojectProvider spp, ReferenceHelper resolver) {
|
||||
this.mProject = project;
|
||||
assert project != null;
|
||||
this.mHelper = helper;
|
||||
assert helper != null;
|
||||
this.mEvaluator = evaluator;
|
||||
assert evaluator != null;
|
||||
this.mSpp = spp;
|
||||
assert spp != null;
|
||||
this.mResolver = resolver;
|
||||
}
|
||||
|
||||
public Node createLogicalView() {
|
||||
return new SEPluginProjectNode(this.mProject, this.mHelper, this.mEvaluator, this.mSpp, this.mResolver);
|
||||
}
|
||||
|
||||
public Node findPath(Node root, Object target) {
|
||||
Project project = root.getLookup().lookup(Project.class);
|
||||
if (project == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
if (target instanceof FileObject) {
|
||||
FileObject fo = (FileObject) target;
|
||||
Project owner = FileOwnerQuery.getOwner(fo);
|
||||
if (!project.equals(owner)) {
|
||||
return null; // Don't waste time if project does not own the fo
|
||||
}
|
||||
|
||||
Node[] nodes = root.getChildren().getNodes(true);
|
||||
for (int i = 0; i < nodes.length; i++) {
|
||||
Node result = PackageView.findPath(nodes[i], target);
|
||||
if (result != null) {
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
private String[] getBreakableProperties() {
|
||||
String[] breakableProps = new String[0];
|
||||
return breakableProps;
|
||||
}
|
||||
|
||||
public boolean hasBrokenLinks() {
|
||||
return BrokenReferencesSupport.isBroken(mHelper, mResolver, getBreakableProperties(), new String[]{SEPluginProjectProperties.DEFAULT_PLATFORM});
|
||||
}
|
||||
}
|
|
@ -0,0 +1,114 @@
|
|||
/*
|
||||
* SEPluginProjectOperations.java
|
||||
*
|
||||
*/
|
||||
package net.openesb.component.${artifactId}.project;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Properties;
|
||||
import org.apache.tools.ant.module.api.support.ActionUtils;
|
||||
import org.netbeans.api.project.Project;
|
||||
import org.netbeans.spi.project.ActionProvider;
|
||||
import org.netbeans.spi.project.CopyOperationImplementation;
|
||||
import org.netbeans.spi.project.DeleteOperationImplementation;
|
||||
import org.netbeans.spi.project.MoveOperationImplementation;
|
||||
import org.netbeans.spi.project.support.ant.GeneratedFilesHelper;
|
||||
import org.openide.filesystems.FileObject;
|
||||
import org.openide.util.Lookup;
|
||||
import org.openide.util.lookup.Lookups;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author chikkala
|
||||
*/
|
||||
public class SEPluginProjectOperations implements DeleteOperationImplementation, CopyOperationImplementation, MoveOperationImplementation {
|
||||
|
||||
private SEPluginProject project;
|
||||
|
||||
public SEPluginProjectOperations(SEPluginProject project) {
|
||||
this.project = project;
|
||||
}
|
||||
|
||||
public void notifyDeleting() throws IOException {
|
||||
SEPluginProjectActionProvider ap = project.getLookup().lookup(SEPluginProjectActionProvider.class);
|
||||
|
||||
assert ap != null;
|
||||
|
||||
Lookup context = Lookups.fixed(new Object[0]);
|
||||
Properties p = new Properties();
|
||||
String[] targetNames = ap.getTargetNames(ActionProvider.COMMAND_CLEAN, context, p);
|
||||
FileObject buildXML = project.getProjectDirectory().getFileObject(GeneratedFilesHelper.BUILD_XML_PATH);
|
||||
|
||||
assert targetNames != null;
|
||||
assert targetNames.length > 0;
|
||||
|
||||
ActionUtils.runTarget(buildXML, targetNames, p).waitFinished();
|
||||
}
|
||||
|
||||
public void notifyDeleted() throws IOException {
|
||||
project.getAntProjectHelper().notifyDeleted();
|
||||
}
|
||||
|
||||
public List<FileObject> getMetadataFiles() {
|
||||
FileObject projectDirectory = project.getProjectDirectory();
|
||||
List<FileObject> files = new ArrayList<FileObject>();
|
||||
|
||||
addFile(projectDirectory, "nbproject", files); // NOI18N
|
||||
addFile(projectDirectory, "build.xml", files); // NOI18N
|
||||
addFile(projectDirectory, "manifest.mf", files); // NOI18N
|
||||
addFile(projectDirectory, projectDirectory.getName(), files); //NOI18N
|
||||
|
||||
return files;
|
||||
}
|
||||
|
||||
public List<FileObject> getDataFiles() {
|
||||
List<FileObject> files = new ArrayList<FileObject>();
|
||||
FileObject projectDirectory = project.getProjectDirectory();
|
||||
FileObject srcDirFO = SEPluginProjectProperties.getSourceDirectory(project);
|
||||
files.add(srcDirFO);
|
||||
return files;
|
||||
}
|
||||
|
||||
public void notifyCopying() throws IOException {
|
||||
// do nothing.
|
||||
// This does copy the old distribution file over though, which is
|
||||
// probably OK because "ant clean" will clean it up.
|
||||
}
|
||||
|
||||
public void notifyCopied(Project original, File originalPath, String newName) throws IOException {
|
||||
if (original == null) {
|
||||
// do nothing for the original project.
|
||||
return;
|
||||
}
|
||||
|
||||
project.getReferenceHelper().fixReferences(originalPath);
|
||||
|
||||
String oldName = project.getName();
|
||||
project.setName(newName);
|
||||
}
|
||||
|
||||
public void notifyMoving() throws IOException {
|
||||
notifyDeleting();
|
||||
}
|
||||
|
||||
public void notifyMoved(Project original, File originalPath, String newName) throws IOException {
|
||||
if (original == null) {
|
||||
project.getAntProjectHelper().notifyDeleted();
|
||||
return;
|
||||
}
|
||||
String oldName = project.getName();
|
||||
project.setName(newName);
|
||||
project.getReferenceHelper().fixReferences(originalPath);
|
||||
}
|
||||
|
||||
private static void addFile(FileObject projectDirectory, String fileName, List<FileObject> result) {
|
||||
FileObject file = projectDirectory.getFileObject(fileName);
|
||||
|
||||
if (file != null) {
|
||||
result.add(file);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,149 @@
|
|||
/*
|
||||
* SEPluginProjectProperties.java
|
||||
*
|
||||
*/
|
||||
package net.openesb.component.${artifactId}.project;
|
||||
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.io.PrintWriter;
|
||||
import java.io.StringWriter;
|
||||
import org.netbeans.spi.project.support.ant.AntProjectHelper;
|
||||
import org.openide.filesystems.FileLock;
|
||||
import org.openide.filesystems.FileObject;
|
||||
import org.openide.filesystems.FileObject;
|
||||
import org.openide.filesystems.FileUtil;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author chikkala
|
||||
*/
|
||||
public class SEPluginProjectProperties {
|
||||
|
||||
public static final String DEFAULT_PLATFORM = "default_platform"; // NOI18N
|
||||
public static final String SOURCES_TYPE_XML = "xml";
|
||||
public static final String SOURCES_TYPE_JAVA = "java";
|
||||
public static final String SE_PLUGIN_PROJECT_ICON_PATH = "serviceengine/project/resources/projectIcon.png"; // NOI18N"
|
||||
/**
|
||||
* comp app callable ant build targets see
|
||||
* SEPluginProject.AntArtifactProviderImpl for more info. When a composite
|
||||
* application project builds the service assembly it calls these targets to
|
||||
* build a service unit added by this project.
|
||||
*/
|
||||
public static final String BUILD_TARGET_DIST = "dist_se"; // NOI18N
|
||||
public static final String BUILD_TARGET_CLEAN = "clean"; // NOI18N
|
||||
/**
|
||||
* Ant artifact type value required for plugin to compapp project see
|
||||
* SEPluginProject.AntArtifactProviderImpl for more info. The value used is
|
||||
* "CAPS.asa:<TargetComponentName> where <TargetComponentName> is the name
|
||||
* of the service engine to which the service unit created by this project
|
||||
* will be deployed.
|
||||
*/
|
||||
public static final String ARTIFACT_TYPE_JBI_SU_PREFIX = "CAPS.asa:"; // NOI18N
|
||||
/**
|
||||
* service unit target property. The value is the component name of the
|
||||
* service engine to which the service unit created by this project will be
|
||||
* deployed.
|
||||
*/
|
||||
public static final String JBI_SU_TARGET_NAME = "jbi.su.target.name"; // NOI18N
|
||||
/**
|
||||
* Name of the service engine
|
||||
*/
|
||||
public static final String JBI_SU_TARGET_NAME_VALUE = "paramv4seplugin"; // NOI18N
|
||||
public static final String ARTIFACT_TYPE_JAR = "jar"; // NOI18N
|
||||
public static final String JBI_SU_NAME = "jbi.su.name"; // NOI18N
|
||||
public static final String JBI_SU_NAME_VALUE = "ServiceUnit"; // NOI18N
|
||||
public static final String JBI_SU_DESCRIPTION = "jbi.su.description"; // NOI18N
|
||||
public static final String JBI_SU_DESCRIPTION_VALUE = "Service unit description"; // NOI18N
|
||||
public static final String JBI_SU_ZIP = "jbi.su.zip";
|
||||
/**
|
||||
* bug in the comp app project build system prevents us to define the
|
||||
* service unit archive file name and location to be any thing. You must
|
||||
* define a hardcoded name for the su archive. TODO: will use the
|
||||
* ${build.dir}/${jbi.su.name}.zip when compapp bug is fixed.
|
||||
*/
|
||||
public static final String JBI_SU_ZIP_VALUE = "${build.dir}/SEDeployment.jar";
|
||||
// public static final String JBI_SU_ZIP_VALUE = "${build.dir}/${jbi.su.name}.zip";
|
||||
/**
|
||||
* these properties can be used in the build script that produces the
|
||||
* service unit archive file.
|
||||
*/
|
||||
public static final String JAR_COMPRESS = "jar.compress"; // NOI18N
|
||||
public static final String BUILD_FILES_EXCLUDES = "build.files.excludes"; // NOI18N
|
||||
public static final String BUILD_DIR = "build.dir"; // NOI18N
|
||||
public static final String BUILD_DIR_VALUE = "build"; // NOI18N
|
||||
public static final String JBI_SU_BUILD_DIR_VALUE = "${build.dir}/${jbi.su.name}"; // NOI18N
|
||||
public static final String SRC_DIR = "src.dir"; // NOI18N
|
||||
public static final String SRC_DIR_VALUE = "src"; // NOI18N
|
||||
public static final String SU_JBI_XML_PATH = "META-INF/jbi.xml"; // NOI18N
|
||||
|
||||
public static FileObject getSourceDirectory(SEPluginProject project) {
|
||||
AntProjectHelper helper = project.getAntProjectHelper();
|
||||
String srcDir = helper.getStandardPropertyEvaluator().getProperty(SRC_DIR); // NOI18N
|
||||
return helper.resolveFileObject(srcDir);
|
||||
}
|
||||
|
||||
public static FileObject createDefaultSUDescriptor(FileObject srcFolder) throws IOException {
|
||||
FileObject jbiXmlFO = null;
|
||||
|
||||
StringWriter writer = new StringWriter();
|
||||
PrintWriter out = new PrintWriter(writer);
|
||||
out.println("<?xml version='1.0' encoding=\"UTF-8\" standalone=\"yes\" ?>");
|
||||
out.println("<jbi version=\"1.0\"");
|
||||
out.println(" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"");
|
||||
out.println(" xmlns=\"http://java.sun.com/xml/ns/jbi\"");
|
||||
out.println(">");
|
||||
out.println(" <services binding-component=\"false\">");
|
||||
out.println(" <!-- TODO: add <provides> and <consumes> elements here -->");
|
||||
out.println(" <!--");
|
||||
out.println(" <provides service-name=\"ns1:MyService\"");
|
||||
out.println(" interface-name=\"ns1:MyPortType\"");
|
||||
out.println(" endpoint-name=\"paramv4seplugin_JBIPort\">");
|
||||
out.println(" </provides>");
|
||||
out.println(" -->");
|
||||
out.println(" </services>");
|
||||
out.println("</jbi>");
|
||||
out.close();
|
||||
writer.close();
|
||||
|
||||
jbiXmlFO = FileUtil.createData(srcFolder, SU_JBI_XML_PATH);
|
||||
saveToFileObject(jbiXmlFO, writer.getBuffer());
|
||||
|
||||
return jbiXmlFO;
|
||||
}
|
||||
|
||||
public static void saveToFileObject(FileObject outFO, StringBuffer srcBuff) {
|
||||
FileLock outLock = null;
|
||||
OutputStream outS = null;
|
||||
InputStream inS = null;
|
||||
|
||||
try {
|
||||
inS = new ByteArrayInputStream(srcBuff.toString().getBytes());
|
||||
outLock = outFO.lock();
|
||||
outS = outFO.getOutputStream(outLock);
|
||||
FileUtil.copy(inS, outS);
|
||||
} catch (Exception ex) {
|
||||
ex.printStackTrace();
|
||||
} finally {
|
||||
if (inS != null) {
|
||||
try {
|
||||
inS.close();
|
||||
} catch (Exception ex) {
|
||||
//ingore
|
||||
}
|
||||
}
|
||||
if (outS != null) {
|
||||
try {
|
||||
outS.close();
|
||||
} catch (Exception ex) {
|
||||
//ingore
|
||||
}
|
||||
}
|
||||
if (outLock != null) {
|
||||
outLock.releaseLock();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,55 @@
|
|||
/*
|
||||
* SEPluginProjectProperties.java
|
||||
*/
|
||||
package net.openesb.component.${artifactId}.project;
|
||||
|
||||
import java.io.IOException;
|
||||
import org.netbeans.api.project.Project;
|
||||
import org.netbeans.spi.project.support.ant.AntBasedProjectType;
|
||||
import org.netbeans.spi.project.support.ant.AntProjectHelper;
|
||||
|
||||
/**
|
||||
* Factory for simple service engine deployment plugin project projects.
|
||||
*
|
||||
* @author chikkala
|
||||
*/
|
||||
public final class SEPluginProjectType implements AntBasedProjectType {
|
||||
|
||||
/**
|
||||
*/
|
||||
public static final String TYPE = "serviceengine.project.type"; // NOI18N
|
||||
/**
|
||||
*/
|
||||
public static final String PROJECT_CONFIGURATION_NAMESPACE = "http://www.netbeans.org/ns/jbimodules/paramv4seplugin/1"; // NOI18N
|
||||
/**
|
||||
*/
|
||||
public static final String PROJECT_CONFIGURATION_NAME = "data"; // NOI18N
|
||||
/**
|
||||
*/
|
||||
public static final String PRIVATE_CONFIGURATION_NAME = "data"; // NOI18N
|
||||
/**
|
||||
*/
|
||||
public static final String PRIVATE_CONFIGURATION_NAMESPACE = "http://www.netbeans.org/ns/jbimodules/paramv4seplugin/private/1"; // NOI18N
|
||||
|
||||
/**
|
||||
* Do nothing, just a service.
|
||||
*/
|
||||
public SEPluginProjectType() {
|
||||
}
|
||||
|
||||
public String getType() {
|
||||
return TYPE;
|
||||
}
|
||||
|
||||
public Project createProject(AntProjectHelper helper) throws IOException {
|
||||
return new SEPluginProject(helper);
|
||||
}
|
||||
|
||||
public String getPrimaryConfigurationDataElementName(boolean shared) {
|
||||
return shared ? PROJECT_CONFIGURATION_NAME : PRIVATE_CONFIGURATION_NAME;
|
||||
}
|
||||
|
||||
public String getPrimaryConfigurationDataElementNamespace(boolean shared) {
|
||||
return shared ? PROJECT_CONFIGURATION_NAMESPACE : PRIVATE_CONFIGURATION_NAMESPACE;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
# CustomizerDialog
|
||||
LBL_Customizer_Title=Project Properties - {0}
|
||||
# cutomizer node labels
|
||||
LBL_Config_General=General
|
||||
LBL_Config_BuildCategories=Build
|
||||
LBL_Config_Compile=Compile
|
||||
LBL_Config_Package=Package
|
||||
|
||||
# Cutomizer node panel strings
|
||||
# sample cutomizer panel
|
||||
# General cutomizer panel
|
||||
LBL_config.general.su.name=Name:
|
||||
LBL_config.general.su.desc=Description:
|
||||
LBL_config.general.su.target=Target JBI Component\:
|
||||
LBL_config.general.su.target.value.unknown=Unknown
|
||||
LBL_config.package.su.zip=&Service Unit Archive File\:
|
||||
LBL_config.package.build.files.exludes=&Exclude from archive file\:
|
||||
LBL_config.package.build.files.exludes.message=(can not exclude jbi.xml)
|
||||
CHKB_config.package.jar.compress=&Compress Archive File
|
|
@ -0,0 +1,128 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
|
||||
<Form version="1.4" maxVersion="1.4" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
|
||||
<AuxValues>
|
||||
<AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/>
|
||||
<AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/>
|
||||
<AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="2"/>
|
||||
<AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
|
||||
<AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
|
||||
<AuxValue name="designerSize" type="java.awt.Dimension" value="-84,-19,0,5,115,114,0,18,106,97,118,97,46,97,119,116,46,68,105,109,101,110,115,105,111,110,65,-114,-39,-41,-84,95,68,20,2,0,2,73,0,6,104,101,105,103,104,116,73,0,5,119,105,100,116,104,120,112,0,0,1,-117,0,0,1,-102"/>
|
||||
</AuxValues>
|
||||
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout"/>
|
||||
<SubComponents>
|
||||
<Component class="javax.swing.JLabel" name="mSUTargetLBL">
|
||||
<Properties>
|
||||
<Property name="labelFor" type="java.awt.Component" editor="org.netbeans.modules.form.ComponentChooserEditor">
|
||||
<ComponentRef name="mSUTargetValueLBL"/>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="net/openesb/component/${artifactId}/project/customizer/Bundle.properties" key="LBL_config.general.su.target" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
<Property name="toolTipText" type="java.lang.String" value=""/>
|
||||
</Properties>
|
||||
<AccessibilityProperties>
|
||||
<Property name="AccessibleContext.accessibleName" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="net/openesb/component/${artifactId}/project/customizer/Bundle.properties" key="LBL_config.general.su.target" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</AccessibilityProperties>
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
|
||||
<GridBagConstraints gridX="0" gridY="0" gridWidth="1" gridHeight="1" fill="2" ipadX="5" ipadY="5" insetsTop="12" insetsLeft="2" insetsBottom="2" insetsRight="4" anchor="18" weightX="0.0" weightY="0.0"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="mSUTargetValueLBL">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="net/openesb/component/${artifactId}/project/customizer/Bundle.properties" key="LBL_config.general.su.target.value.unknown" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<AccessibilityProperties>
|
||||
<Property name="AccessibleContext.accessibleName" type="java.lang.String" value=""/>
|
||||
</AccessibilityProperties>
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
|
||||
<GridBagConstraints gridX="1" gridY="0" gridWidth="1" gridHeight="1" fill="2" ipadX="5" ipadY="5" insetsTop="12" insetsLeft="2" insetsBottom="2" insetsRight="4" anchor="18" weightX="1.0" weightY="0.0"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="mSUNameLBL">
|
||||
<Properties>
|
||||
<Property name="horizontalAlignment" type="int" value="2"/>
|
||||
<Property name="labelFor" type="java.awt.Component" editor="org.netbeans.modules.form.ComponentChooserEditor">
|
||||
<ComponentRef name="mSUNameTF"/>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="net/openesb/component/${artifactId}/project/customizer/Bundle.properties" key="LBL_config.general.su.name" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
<Property name="toolTipText" type="java.lang.String" value=""/>
|
||||
<Property name="horizontalTextPosition" type="int" value="2"/>
|
||||
</Properties>
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
|
||||
<GridBagConstraints gridX="0" gridY="1" gridWidth="1" gridHeight="1" fill="2" ipadX="5" ipadY="5" insetsTop="2" insetsLeft="2" insetsBottom="2" insetsRight="4" anchor="18" weightX="0.0" weightY="0.0"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
</Component>
|
||||
<Component class="javax.swing.JTextField" name="mSUNameTF">
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
|
||||
<GridBagConstraints gridX="1" gridY="1" gridWidth="1" gridHeight="1" fill="2" ipadX="5" ipadY="5" insetsTop="2" insetsLeft="2" insetsBottom="2" insetsRight="4" anchor="18" weightX="1.0" weightY="0.0"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="mSUDescriptionLBL">
|
||||
<Properties>
|
||||
<Property name="horizontalAlignment" type="int" value="2"/>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="net/openesb/component/${artifactId}/project/customizer/Bundle.properties" key="LBL_config.general.su.desc" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
<Property name="toolTipText" type="java.lang.String" value=""/>
|
||||
</Properties>
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
|
||||
<GridBagConstraints gridX="0" gridY="2" gridWidth="1" gridHeight="1" fill="2" ipadX="5" ipadY="5" insetsTop="2" insetsLeft="2" insetsBottom="2" insetsRight="4" anchor="18" weightX="0.0" weightY="0.0"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
</Component>
|
||||
<Container class="javax.swing.JScrollPane" name="mSUDescriptionScrollPane">
|
||||
<Properties>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[4, 40]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
|
||||
<GridBagConstraints gridX="1" gridY="2" gridWidth="1" gridHeight="1" fill="2" ipadX="5" ipadY="5" insetsTop="2" insetsLeft="2" insetsBottom="2" insetsRight="4" anchor="18" weightX="1.0" weightY="0.0"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
|
||||
<SubComponents>
|
||||
<Component class="javax.swing.JTextArea" name="mSUDescriptionTA">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="SansSerif" size="12" style="0"/>
|
||||
</Property>
|
||||
<Property name="margin" type="java.awt.Insets" editor="org.netbeans.beaninfo.editors.InsetsEditor">
|
||||
<Insets value="[1, 1, 1, 1]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
<Component class="javax.swing.JLabel" name="mFillLBL">
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
|
||||
<GridBagConstraints gridX="0" gridY="5" gridWidth="1" gridHeight="1" fill="3" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="10" weightX="0.0" weightY="1.0"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Form>
|
|
@ -0,0 +1,178 @@
|
|||
/*
|
||||
* CustomizerGeneral.java
|
||||
*/
|
||||
package net.openesb.component.${artifactId}.project.customizer;
|
||||
|
||||
import javax.swing.JPanel;
|
||||
import javax.swing.text.BadLocationException;
|
||||
import javax.swing.text.Document;
|
||||
import org.openide.util.HelpCtx;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author chikkala
|
||||
*/
|
||||
public class CustomizerGeneral extends JPanel implements HelpCtx.Provider {
|
||||
|
||||
private SEPluginProjectCustomizerModel uiModel;
|
||||
|
||||
public CustomizerGeneral(SEPluginProjectCustomizerModel uiModel) {
|
||||
|
||||
this.uiModel = uiModel;
|
||||
|
||||
initComponents();
|
||||
|
||||
initTargetComponent(uiModel.getSUTargetModel());
|
||||
|
||||
this.mSUNameTF.setDocument(uiModel.getSUNameModel());
|
||||
this.mSUDescriptionTA.setDocument(uiModel.getSUDescriptionModel());
|
||||
|
||||
}
|
||||
|
||||
public HelpCtx getHelpCtx() {
|
||||
return new HelpCtx(CustomizerGeneral.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* This method is called from within the constructor to initialize the form.
|
||||
* WARNING: Do NOT modify this code. The content of this method is always
|
||||
* regenerated by the Form Editor.
|
||||
*/
|
||||
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
|
||||
private void initComponents() {
|
||||
java.awt.GridBagConstraints gridBagConstraints;
|
||||
|
||||
mSUTargetLBL = new javax.swing.JLabel();
|
||||
mSUTargetValueLBL = new javax.swing.JLabel();
|
||||
mSUNameLBL = new javax.swing.JLabel();
|
||||
mSUNameTF = new javax.swing.JTextField();
|
||||
mSUDescriptionLBL = new javax.swing.JLabel();
|
||||
mSUDescriptionScrollPane = new javax.swing.JScrollPane();
|
||||
mSUDescriptionTA = new javax.swing.JTextArea();
|
||||
mFillLBL = new javax.swing.JLabel();
|
||||
|
||||
setLayout(new java.awt.GridBagLayout());
|
||||
|
||||
mSUTargetLBL.setLabelFor(mSUTargetValueLBL);
|
||||
mSUTargetLBL.setText(org.openide.util.NbBundle.getMessage(CustomizerGeneral.class, "LBL_config.general.su.target")); // NOI18N
|
||||
mSUTargetLBL.setToolTipText("");
|
||||
gridBagConstraints = new java.awt.GridBagConstraints();
|
||||
gridBagConstraints.gridx = 0;
|
||||
gridBagConstraints.gridy = 0;
|
||||
gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
|
||||
gridBagConstraints.ipadx = 5;
|
||||
gridBagConstraints.ipady = 5;
|
||||
gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
|
||||
gridBagConstraints.insets = new java.awt.Insets(12, 2, 2, 4);
|
||||
add(mSUTargetLBL, gridBagConstraints);
|
||||
mSUTargetLBL.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(CustomizerGeneral.class, "LBL_config.general.su.target")); // NOI18N
|
||||
|
||||
mSUTargetValueLBL.setText(org.openide.util.NbBundle.getMessage(CustomizerGeneral.class, "LBL_config.general.su.target.value.unknown")); // NOI18N
|
||||
gridBagConstraints = new java.awt.GridBagConstraints();
|
||||
gridBagConstraints.gridx = 1;
|
||||
gridBagConstraints.gridy = 0;
|
||||
gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
|
||||
gridBagConstraints.ipadx = 5;
|
||||
gridBagConstraints.ipady = 5;
|
||||
gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
|
||||
gridBagConstraints.weightx = 1.0;
|
||||
gridBagConstraints.insets = new java.awt.Insets(12, 2, 2, 4);
|
||||
add(mSUTargetValueLBL, gridBagConstraints);
|
||||
mSUTargetValueLBL.getAccessibleContext().setAccessibleName("");
|
||||
|
||||
mSUNameLBL.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
|
||||
mSUNameLBL.setLabelFor(mSUNameTF);
|
||||
mSUNameLBL.setText(org.openide.util.NbBundle.getMessage(CustomizerGeneral.class, "LBL_config.general.su.name")); // NOI18N
|
||||
mSUNameLBL.setToolTipText("");
|
||||
mSUNameLBL.setHorizontalTextPosition(javax.swing.SwingConstants.LEFT);
|
||||
gridBagConstraints = new java.awt.GridBagConstraints();
|
||||
gridBagConstraints.gridx = 0;
|
||||
gridBagConstraints.gridy = 1;
|
||||
gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
|
||||
gridBagConstraints.ipadx = 5;
|
||||
gridBagConstraints.ipady = 5;
|
||||
gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
|
||||
gridBagConstraints.insets = new java.awt.Insets(2, 2, 2, 4);
|
||||
add(mSUNameLBL, gridBagConstraints);
|
||||
gridBagConstraints = new java.awt.GridBagConstraints();
|
||||
gridBagConstraints.gridx = 1;
|
||||
gridBagConstraints.gridy = 1;
|
||||
gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
|
||||
gridBagConstraints.ipadx = 5;
|
||||
gridBagConstraints.ipady = 5;
|
||||
gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
|
||||
gridBagConstraints.weightx = 1.0;
|
||||
gridBagConstraints.insets = new java.awt.Insets(2, 2, 2, 4);
|
||||
add(mSUNameTF, gridBagConstraints);
|
||||
|
||||
mSUDescriptionLBL.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
|
||||
mSUDescriptionLBL.setText(org.openide.util.NbBundle.getMessage(CustomizerGeneral.class, "LBL_config.general.su.desc")); // NOI18N
|
||||
mSUDescriptionLBL.setToolTipText("");
|
||||
gridBagConstraints = new java.awt.GridBagConstraints();
|
||||
gridBagConstraints.gridx = 0;
|
||||
gridBagConstraints.gridy = 2;
|
||||
gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
|
||||
gridBagConstraints.ipadx = 5;
|
||||
gridBagConstraints.ipady = 5;
|
||||
gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
|
||||
gridBagConstraints.insets = new java.awt.Insets(2, 2, 2, 4);
|
||||
add(mSUDescriptionLBL, gridBagConstraints);
|
||||
|
||||
mSUDescriptionScrollPane.setPreferredSize(new java.awt.Dimension(4, 40));
|
||||
|
||||
mSUDescriptionTA.setFont(new java.awt.Font("SansSerif", 0, 12)); // NOI18N
|
||||
mSUDescriptionTA.setMargin(new java.awt.Insets(1, 1, 1, 1));
|
||||
mSUDescriptionScrollPane.setViewportView(mSUDescriptionTA);
|
||||
|
||||
gridBagConstraints = new java.awt.GridBagConstraints();
|
||||
gridBagConstraints.gridx = 1;
|
||||
gridBagConstraints.gridy = 2;
|
||||
gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
|
||||
gridBagConstraints.ipadx = 5;
|
||||
gridBagConstraints.ipady = 5;
|
||||
gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
|
||||
gridBagConstraints.weightx = 1.0;
|
||||
gridBagConstraints.insets = new java.awt.Insets(2, 2, 2, 4);
|
||||
add(mSUDescriptionScrollPane, gridBagConstraints);
|
||||
gridBagConstraints = new java.awt.GridBagConstraints();
|
||||
gridBagConstraints.gridx = 0;
|
||||
gridBagConstraints.gridy = 5;
|
||||
gridBagConstraints.fill = java.awt.GridBagConstraints.VERTICAL;
|
||||
gridBagConstraints.weighty = 1.0;
|
||||
add(mFillLBL, gridBagConstraints);
|
||||
}// </editor-fold>//GEN-END:initComponents
|
||||
// Variables declaration - do not modify//GEN-BEGIN:variables
|
||||
private javax.swing.JLabel mFillLBL;
|
||||
private javax.swing.JLabel mSUDescriptionLBL;
|
||||
private javax.swing.JScrollPane mSUDescriptionScrollPane;
|
||||
private javax.swing.JTextArea mSUDescriptionTA;
|
||||
private javax.swing.JLabel mSUNameLBL;
|
||||
private javax.swing.JTextField mSUNameTF;
|
||||
private javax.swing.JLabel mSUTargetLBL;
|
||||
private javax.swing.JLabel mSUTargetValueLBL;
|
||||
// End of variables declaration//GEN-END:variables
|
||||
|
||||
private void setDocumentText(Document doc, String text) {
|
||||
try {
|
||||
doc.remove(0, doc.getLength());
|
||||
doc.insertString(0, text, null);
|
||||
} catch (BadLocationException ex) {
|
||||
ex.printStackTrace();
|
||||
// ingore
|
||||
}
|
||||
}
|
||||
|
||||
private String getDocumentText(Document doc) {
|
||||
try {
|
||||
return doc.getText(0, doc.getLength());
|
||||
} catch (BadLocationException ex) {
|
||||
ex.printStackTrace();
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
private void initTargetComponent(Document doc) {
|
||||
String targetComp = getDocumentText(doc);
|
||||
this.mSUTargetValueLBL.setText(targetComp);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,117 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
|
||||
<Form version="1.2" maxVersion="1.2" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
|
||||
<AuxValues>
|
||||
<AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/>
|
||||
<AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/>
|
||||
<AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="true"/>
|
||||
<AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
|
||||
<AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
|
||||
<AuxValue name="designerSize" type="java.awt.Dimension" value="-84,-19,0,5,115,114,0,18,106,97,118,97,46,97,119,116,46,68,105,109,101,110,115,105,111,110,65,-114,-39,-41,-84,95,68,20,2,0,2,73,0,6,104,101,105,103,104,116,73,0,5,119,105,100,116,104,120,112,0,0,1,44,0,0,1,-112"/>
|
||||
</AuxValues>
|
||||
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout"/>
|
||||
<SubComponents>
|
||||
<Component class="javax.swing.JLabel" name="mZipFileLBL">
|
||||
<Properties>
|
||||
<Property name="labelFor" type="java.awt.Component" editor="org.netbeans.modules.form.ComponentChooserEditor">
|
||||
<ComponentRef name="mZipFileTF"/>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="net/openesb/component/${artifactId}/project/customizer/Bundle.properties" key="LBL_config.package.su.zip" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<AuxValues>
|
||||
<AuxValue name="generateMnemonicsCode" type="java.lang.Boolean" value="true"/>
|
||||
</AuxValues>
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
|
||||
<GridBagConstraints gridX="-1" gridY="-1" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="12" insetsRight="12" anchor="18" weightX="0.0" weightY="0.0"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
</Component>
|
||||
<Component class="javax.swing.JTextField" name="mZipFileTF">
|
||||
<Properties>
|
||||
<Property name="editable" type="boolean" value="false"/>
|
||||
</Properties>
|
||||
<AccessibilityProperties>
|
||||
<Property name="AccessibleContext.accessibleDescription" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/netbeans/modules/java/j2seproject/ui/customizer/Bundle.properties" key="AD_jTextFieldDistDir" replaceFormat="org.openide.util.NbBundle.getBundle({sourceFileName}.class).getString("{key}")"/>
|
||||
</Property>
|
||||
</AccessibilityProperties>
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
|
||||
<GridBagConstraints gridX="-1" gridY="-1" gridWidth="0" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="12" insetsRight="0" anchor="10" weightX="1.0" weightY="0.0"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="mExcludesLBL">
|
||||
<Properties>
|
||||
<Property name="labelFor" type="java.awt.Component" editor="org.netbeans.modules.form.ComponentChooserEditor">
|
||||
<ComponentRef name="mExcludesTF"/>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="net/openesb/component/${artifactId}/project/customizer/Bundle.properties" key="LBL_config.package.build.files.exludes" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<AuxValues>
|
||||
<AuxValue name="generateMnemonicsCode" type="java.lang.Boolean" value="true"/>
|
||||
</AuxValues>
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
|
||||
<GridBagConstraints gridX="0" gridY="1" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="12" anchor="18" weightX="0.0" weightY="0.0"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
</Component>
|
||||
<Component class="javax.swing.JTextField" name="mExcludesTF">
|
||||
<AccessibilityProperties>
|
||||
<Property name="AccessibleContext.accessibleDescription" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/netbeans/modules/java/j2seproject/ui/customizer/Bundle.properties" key="AD_jTextFieldExcludes" replaceFormat="org.openide.util.NbBundle.getBundle({sourceFileName}.class).getString("{key}")"/>
|
||||
</Property>
|
||||
</AccessibilityProperties>
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
|
||||
<GridBagConstraints gridX="1" gridY="1" gridWidth="0" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="10" weightX="1.0" weightY="0.0"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
</Component>
|
||||
<Component class="javax.swing.JCheckBox" name="mCompressChkBox">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="net/openesb/component/${artifactId}/project/customizer/Bundle.properties" key="CHKB_config.package.jar.compress" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<AccessibilityProperties>
|
||||
<Property name="AccessibleContext.accessibleDescription" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/netbeans/modules/jbi/apisupport/project/ui/customizer/Bundle.properties" key="AD_jCheckBoxCompress" replaceFormat="org.openide.util.NbBundle.getBundle({sourceFileName}.class).getString("{key}")"/>
|
||||
</Property>
|
||||
</AccessibilityProperties>
|
||||
<AuxValues>
|
||||
<AuxValue name="generateMnemonicsCode" type="java.lang.Boolean" value="true"/>
|
||||
</AuxValues>
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
|
||||
<GridBagConstraints gridX="0" gridY="3" gridWidth="0" gridHeight="0" fill="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="18" weightX="0.0" weightY="1.0"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="mExcludeMessageLBL">
|
||||
<Properties>
|
||||
<Property name="labelFor" type="java.awt.Component" editor="org.netbeans.modules.form.ComponentChooserEditor">
|
||||
<ComponentRef name="mExcludesTF"/>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="net/openesb/component/${artifactId}/project/customizer/Bundle.properties" key="LBL_config.package.build.files.exludes.message" replaceFormat="org.openide.util.NbBundle.getBundle({sourceFileName}.class).getString("{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
|
||||
<GridBagConstraints gridX="1" gridY="2" gridWidth="0" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="6" insetsRight="0" anchor="18" weightX="0.0" weightY="0.0"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Form>
|
|
@ -0,0 +1,114 @@
|
|||
/*
|
||||
* CustomizerPackage
|
||||
*/
|
||||
package net.openesb.component.${artifactId}.project.customizer;
|
||||
|
||||
import javax.swing.JPanel;
|
||||
import org.openide.util.HelpCtx;
|
||||
|
||||
/**
|
||||
* Customizer for general project attributes.
|
||||
*
|
||||
* @author chikkala
|
||||
*/
|
||||
public class CustomizerPackage extends JPanel implements HelpCtx.Provider {
|
||||
|
||||
private SEPluginProjectCustomizerModel uiModel;
|
||||
|
||||
public CustomizerPackage(SEPluginProjectCustomizerModel uiModel) {
|
||||
this.uiModel = uiModel;
|
||||
initComponents();
|
||||
|
||||
mZipFileTF.setDocument(uiModel.getSUZipModel());
|
||||
mExcludesTF.setDocument(uiModel.getBuildFilesExcludesModel());
|
||||
|
||||
uiModel.getJarCompressModel().setMnemonic(mCompressChkBox.getMnemonic());
|
||||
mCompressChkBox.setModel(uiModel.getJarCompressModel());
|
||||
}
|
||||
|
||||
public HelpCtx getHelpCtx() {
|
||||
return new HelpCtx(CustomizerPackage.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* This method is called from within the constructor to initialize the form.
|
||||
* WARNING: Do NOT modify this code. The content of this method is always
|
||||
* regenerated by the Form Editor.
|
||||
*/
|
||||
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
|
||||
private void initComponents() {
|
||||
java.awt.GridBagConstraints gridBagConstraints;
|
||||
|
||||
mZipFileLBL = new javax.swing.JLabel();
|
||||
mZipFileTF = new javax.swing.JTextField();
|
||||
mExcludesLBL = new javax.swing.JLabel();
|
||||
mExcludesTF = new javax.swing.JTextField();
|
||||
mCompressChkBox = new javax.swing.JCheckBox();
|
||||
mExcludeMessageLBL = new javax.swing.JLabel();
|
||||
|
||||
setLayout(new java.awt.GridBagLayout());
|
||||
|
||||
mZipFileLBL.setLabelFor(mZipFileTF);
|
||||
org.openide.awt.Mnemonics.setLocalizedText(mZipFileLBL, org.openide.util.NbBundle.getMessage(CustomizerPackage.class, "LBL_config.package.su.zip")); // NOI18N
|
||||
gridBagConstraints = new java.awt.GridBagConstraints();
|
||||
gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
|
||||
gridBagConstraints.insets = new java.awt.Insets(0, 0, 12, 12);
|
||||
add(mZipFileLBL, gridBagConstraints);
|
||||
|
||||
mZipFileTF.setEditable(false);
|
||||
gridBagConstraints = new java.awt.GridBagConstraints();
|
||||
gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
|
||||
gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
|
||||
gridBagConstraints.weightx = 1.0;
|
||||
gridBagConstraints.insets = new java.awt.Insets(0, 0, 12, 0);
|
||||
add(mZipFileTF, gridBagConstraints);
|
||||
mZipFileTF.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getBundle(CustomizerPackage.class).getString("AD_jTextFieldDistDir")); // NOI18N
|
||||
|
||||
mExcludesLBL.setLabelFor(mExcludesTF);
|
||||
org.openide.awt.Mnemonics.setLocalizedText(mExcludesLBL, org.openide.util.NbBundle.getMessage(CustomizerPackage.class, "LBL_config.package.build.files.exludes")); // NOI18N
|
||||
gridBagConstraints = new java.awt.GridBagConstraints();
|
||||
gridBagConstraints.gridx = 0;
|
||||
gridBagConstraints.gridy = 1;
|
||||
gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
|
||||
gridBagConstraints.insets = new java.awt.Insets(0, 0, 0, 12);
|
||||
add(mExcludesLBL, gridBagConstraints);
|
||||
gridBagConstraints = new java.awt.GridBagConstraints();
|
||||
gridBagConstraints.gridx = 1;
|
||||
gridBagConstraints.gridy = 1;
|
||||
gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
|
||||
gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
|
||||
gridBagConstraints.weightx = 1.0;
|
||||
add(mExcludesTF, gridBagConstraints);
|
||||
mExcludesTF.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getBundle(CustomizerPackage.class).getString("AD_jTextFieldExcludes")); // NOI18N
|
||||
|
||||
org.openide.awt.Mnemonics.setLocalizedText(mCompressChkBox, org.openide.util.NbBundle.getMessage(CustomizerPackage.class, "CHKB_config.package.jar.compress")); // NOI18N
|
||||
gridBagConstraints = new java.awt.GridBagConstraints();
|
||||
gridBagConstraints.gridx = 0;
|
||||
gridBagConstraints.gridy = 3;
|
||||
gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
|
||||
gridBagConstraints.gridheight = java.awt.GridBagConstraints.REMAINDER;
|
||||
gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
|
||||
gridBagConstraints.weighty = 1.0;
|
||||
add(mCompressChkBox, gridBagConstraints);
|
||||
mCompressChkBox.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getBundle(CustomizerPackage.class).getString("AD_jCheckBoxCompress")); // NOI18N
|
||||
|
||||
mExcludeMessageLBL.setLabelFor(mExcludesTF);
|
||||
org.openide.awt.Mnemonics.setLocalizedText(mExcludeMessageLBL, org.openide.util.NbBundle.getBundle(CustomizerPackage.class).getString("LBL_config.package.build.files.exludes.message")); // NOI18N
|
||||
gridBagConstraints = new java.awt.GridBagConstraints();
|
||||
gridBagConstraints.gridx = 1;
|
||||
gridBagConstraints.gridy = 2;
|
||||
gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
|
||||
gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
|
||||
gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
|
||||
gridBagConstraints.insets = new java.awt.Insets(0, 0, 6, 0);
|
||||
add(mExcludeMessageLBL, gridBagConstraints);
|
||||
}// </editor-fold>//GEN-END:initComponents
|
||||
// Variables declaration - do not modify//GEN-BEGIN:variables
|
||||
private javax.swing.JCheckBox mCompressChkBox;
|
||||
private javax.swing.JLabel mExcludeMessageLBL;
|
||||
private javax.swing.JLabel mExcludesLBL;
|
||||
private javax.swing.JTextField mExcludesTF;
|
||||
private javax.swing.JLabel mZipFileLBL;
|
||||
private javax.swing.JTextField mZipFileTF;
|
||||
// End of variables declaration//GEN-END:variables
|
||||
}
|
|
@ -0,0 +1,125 @@
|
|||
/*
|
||||
* SEPluginProjectCustomizerModel.java
|
||||
*
|
||||
*/
|
||||
package net.openesb.component.${artifactId}.project.customizer;
|
||||
|
||||
import java.io.IOException;
|
||||
import javax.swing.ButtonModel;
|
||||
import javax.swing.text.Document;
|
||||
import org.netbeans.api.project.Project;
|
||||
import org.netbeans.api.project.ProjectManager;
|
||||
import net.openesb.component.${artifactId}.project.SEPluginProjectProperties;
|
||||
import org.netbeans.spi.project.support.ant.AntProjectHelper;
|
||||
import org.netbeans.spi.project.support.ant.EditableProperties;
|
||||
import org.netbeans.spi.project.support.ant.PropertyEvaluator;
|
||||
import org.netbeans.spi.project.support.ant.ReferenceHelper;
|
||||
import org.netbeans.spi.project.support.ant.ui.StoreGroup;
|
||||
import org.openide.ErrorManager;
|
||||
import org.openide.filesystems.FileObject;
|
||||
import org.openide.util.Mutex;
|
||||
import org.openide.util.MutexException;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author chikkala
|
||||
*/
|
||||
public class SEPluginProjectCustomizerModel {
|
||||
|
||||
private Project mProject;
|
||||
private AntProjectHelper mAntPrjHelper;
|
||||
private ReferenceHelper mRefHelper;
|
||||
private StoreGroup mPrjPropsStore;
|
||||
private Document mSUTargetModel;
|
||||
private Document mSUNameModel;
|
||||
private Document mSUDescModel;
|
||||
private Document mSUZipModel;
|
||||
private ButtonModel mSUZipCompressModel;
|
||||
private Document mBuildFilesExcludesModel;
|
||||
|
||||
/**
|
||||
* Creates a new instance of Customizer UI Model and initializes it
|
||||
*/
|
||||
public SEPluginProjectCustomizerModel(Project project, AntProjectHelper antProjectHelper, ReferenceHelper refHelper) {
|
||||
this.mProject = project;
|
||||
this.mAntPrjHelper = antProjectHelper;
|
||||
this.mRefHelper = refHelper;
|
||||
this.mPrjPropsStore = new StoreGroup();
|
||||
init();
|
||||
}
|
||||
|
||||
public Document getSUTargetModel() {
|
||||
return this.mSUTargetModel;
|
||||
}
|
||||
|
||||
public Document getSUNameModel() {
|
||||
return this.mSUNameModel;
|
||||
}
|
||||
|
||||
public Document getSUDescriptionModel() {
|
||||
return this.mSUDescModel;
|
||||
}
|
||||
|
||||
public Document getSUZipModel() {
|
||||
return this.mSUZipModel;
|
||||
}
|
||||
|
||||
public ButtonModel getJarCompressModel() {
|
||||
return this.mSUZipCompressModel;
|
||||
}
|
||||
|
||||
public Document getBuildFilesExcludesModel() {
|
||||
return this.mBuildFilesExcludesModel;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes the visual models
|
||||
*/
|
||||
private void init() {
|
||||
// initialize visual models from project properties
|
||||
PropertyEvaluator evaluator = this.mAntPrjHelper.getStandardPropertyEvaluator();
|
||||
// cutomizer-general
|
||||
this.mSUTargetModel = this.mPrjPropsStore.createStringDocument(evaluator, SEPluginProjectProperties.JBI_SU_TARGET_NAME);
|
||||
this.mSUNameModel = this.mPrjPropsStore.createStringDocument(evaluator, SEPluginProjectProperties.JBI_SU_NAME);
|
||||
this.mSUDescModel = this.mPrjPropsStore.createStringDocument(evaluator, SEPluginProjectProperties.JBI_SU_DESCRIPTION);
|
||||
// customizer-package
|
||||
this.mSUZipModel = this.mPrjPropsStore.createStringDocument(evaluator, SEPluginProjectProperties.JBI_SU_ZIP);
|
||||
this.mSUZipCompressModel = this.mPrjPropsStore.createToggleButtonModel(evaluator, SEPluginProjectProperties.JAR_COMPRESS);
|
||||
this.mBuildFilesExcludesModel = this.mPrjPropsStore.createStringDocument(evaluator, SEPluginProjectProperties.BUILD_FILES_EXCLUDES);
|
||||
}
|
||||
|
||||
/**
|
||||
* Save visual models to project properties and other metadata
|
||||
*/
|
||||
public void save() {
|
||||
|
||||
try {
|
||||
// Store properties
|
||||
@SuppressWarnings("unchecked")
|
||||
Boolean result = (Boolean) ProjectManager.mutex().writeAccess(new Mutex.ExceptionAction() {
|
||||
final FileObject projectDir = mAntPrjHelper.getProjectDirectory();
|
||||
|
||||
public Object run() throws IOException {
|
||||
//TODO: regenreate any project build script and project metadata if required.
|
||||
// store project properties.
|
||||
storeProperties();
|
||||
return Boolean.TRUE;
|
||||
}
|
||||
});
|
||||
// and save project if required.
|
||||
if (result == Boolean.TRUE) {
|
||||
ProjectManager.getDefault().saveProject(mProject);
|
||||
}
|
||||
} catch (MutexException e) {
|
||||
ErrorManager.getDefault().notify((IOException) e.getException());
|
||||
} catch (IOException ex) {
|
||||
ErrorManager.getDefault().notify(ex);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void storeProperties() throws IOException {
|
||||
EditableProperties projectProperties = mAntPrjHelper.getProperties(AntProjectHelper.PROJECT_PROPERTIES_PATH);
|
||||
this.mPrjPropsStore.store(projectProperties);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,230 @@
|
|||
/*
|
||||
* SEPluginProjectCustomizerProvider.java
|
||||
*
|
||||
*/
|
||||
package net.openesb.component.${artifactId}.project.customizer;
|
||||
|
||||
import java.awt.Dialog;
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.ActionListener;
|
||||
import java.awt.event.WindowAdapter;
|
||||
import java.awt.event.WindowEvent;
|
||||
import java.text.MessageFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.ResourceBundle;
|
||||
import javax.swing.JComponent;
|
||||
import javax.swing.JPanel;
|
||||
import org.netbeans.api.project.Project;
|
||||
import org.netbeans.api.project.ProjectUtils;
|
||||
import org.netbeans.spi.project.support.ant.AntProjectHelper;
|
||||
import org.netbeans.spi.project.support.ant.ReferenceHelper;
|
||||
import org.netbeans.spi.project.ui.CustomizerProvider;
|
||||
import org.netbeans.spi.project.ui.support.ProjectCustomizer;
|
||||
import org.openide.util.NbBundle;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author chikkala
|
||||
*/
|
||||
public class SEPluginProjectCustomizerProvider implements CustomizerProvider {
|
||||
|
||||
// Option indexes
|
||||
private static final int OPTION_OK = 0;
|
||||
private static final int OPTION_CANCEL = OPTION_OK + 1;
|
||||
// Option command names
|
||||
private static final String COMMAND_OK = "OK"; // NOI18N
|
||||
private static final String COMMAND_CANCEL = "CANCEL"; // NOI18N
|
||||
// Categories
|
||||
private static final String GENERAL = "General"; // NOI18N
|
||||
private static final String BUILD_CATEGORIES = "Build"; // NOI18N
|
||||
private static final String COMPILE = "Compile"; // NOI18N
|
||||
private static final String PACKAGE = "Package"; // NOI18N
|
||||
private Project project;
|
||||
private AntProjectHelper antProjectHelper;
|
||||
private ReferenceHelper refHelper;
|
||||
private SEPluginProjectCustomizerModel uiModel;
|
||||
private List<ProjectCustomizer.Category> categories;
|
||||
private ProjectCustomizer.CategoryComponentProvider panelProvider;
|
||||
private static Map<Project, Dialog> project2Dialog = new HashMap<Project, Dialog>();
|
||||
|
||||
public SEPluginProjectCustomizerProvider(Project project, AntProjectHelper antProjectHelper, ReferenceHelper refHelper) {
|
||||
this.project = project;
|
||||
this.refHelper = refHelper;
|
||||
this.antProjectHelper = antProjectHelper;
|
||||
}
|
||||
|
||||
public void showCustomizer() {
|
||||
showCustomizer(null);
|
||||
}
|
||||
|
||||
public void showCustomizer(String preselectedCategory) {
|
||||
showCustomizer(preselectedCategory, null);
|
||||
}
|
||||
|
||||
public void showCustomizer(String preselectedCategory, String preselectedSubCategory) {
|
||||
|
||||
Dialog dialog = project2Dialog.get(project);
|
||||
if (dialog != null) {
|
||||
dialog.setVisible(true);
|
||||
return;
|
||||
} else {
|
||||
SEPluginProjectCustomizerModel model = new SEPluginProjectCustomizerModel(project, antProjectHelper, refHelper);
|
||||
init(model);
|
||||
|
||||
OptionListener listener = new OptionListener(project, uiModel);
|
||||
|
||||
if (preselectedCategory != null && preselectedSubCategory != null) {
|
||||
for (ProjectCustomizer.Category category : categories) {
|
||||
if (preselectedCategory.equals(category.getName())) {
|
||||
JComponent component = panelProvider.create(category);
|
||||
if (component instanceof SubCategoryProvider) {
|
||||
((SubCategoryProvider) component).showSubCategory(preselectedSubCategory);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
dialog = ProjectCustomizer.createCustomizerDialog(
|
||||
categories.toArray(new ProjectCustomizer.Category[categories.size()]),
|
||||
panelProvider, preselectedCategory, listener, null);
|
||||
dialog.addWindowListener(listener);
|
||||
dialog.setTitle(MessageFormat.format(NbBundle.getMessage(SEPluginProjectCustomizerProvider.class, "LBL_Customizer_Title"), new Object[]{ProjectUtils.getInformation(project).getDisplayName()}));
|
||||
|
||||
project2Dialog.put(project, dialog);
|
||||
dialog.setVisible(true);
|
||||
}
|
||||
}
|
||||
|
||||
private void init(SEPluginProjectCustomizerModel uiModel) {
|
||||
|
||||
this.uiModel = uiModel;
|
||||
categories = new ArrayList<ProjectCustomizer.Category>();
|
||||
panelProvider = new PanelProvider(createCategoriesMap());
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for categories
|
||||
*/
|
||||
protected List<ProjectCustomizer.Category> getCategories() {
|
||||
return categories;
|
||||
}
|
||||
|
||||
/**
|
||||
* This api is called when showCustomizer is invoked and if customizer
|
||||
* provider is not fully initialized. The default implementation creates
|
||||
* Project Reference and XML Catalog Categories. Subclasses can override
|
||||
* this and may or may not call super depending upon, the categories are
|
||||
* desired in project customizer.
|
||||
*/
|
||||
protected Map<ProjectCustomizer.Category, JComponent> createCategoriesMap() {
|
||||
|
||||
ResourceBundle bundle = NbBundle.getBundle(SEPluginProjectCustomizerProvider.class);
|
||||
|
||||
ProjectCustomizer.Category generalNode = ProjectCustomizer.Category.create(
|
||||
GENERAL,
|
||||
bundle.getString("LBL_Config_General"), // NOI18N
|
||||
null,
|
||||
(ProjectCustomizer.Category[]) null);
|
||||
ProjectCustomizer.Category packageNode = ProjectCustomizer.Category.create(
|
||||
PACKAGE,
|
||||
bundle.getString("LBL_Config_Package"), // NOI18N
|
||||
null,
|
||||
(ProjectCustomizer.Category[]) null);
|
||||
/* //TODO: add new category if required
|
||||
ProjectCustomizer.Category compileNode = ProjectCustomizer.Category.create(
|
||||
COMPILE,
|
||||
bundle.getString( "LBL_Config_Compile" ), // NOI18N
|
||||
null,
|
||||
(ProjectCustomizer.Category[])null);
|
||||
*/
|
||||
ProjectCustomizer.Category[] buildCategories = new ProjectCustomizer.Category[]{packageNode};
|
||||
// TODO: add other categories to build if required.
|
||||
// buildCategories = new ProjectCustomizer.Category[] {compileNode, packageNode };
|
||||
ProjectCustomizer.Category buildCategoriesNode = ProjectCustomizer.Category.create(
|
||||
BUILD_CATEGORIES,
|
||||
bundle.getString("LBL_Config_BuildCategories"), // NOI18N
|
||||
null,
|
||||
buildCategories);
|
||||
|
||||
getCategories().add(generalNode);
|
||||
getCategories().add(buildCategoriesNode);
|
||||
|
||||
Map<ProjectCustomizer.Category, JComponent> panels =
|
||||
new HashMap<ProjectCustomizer.Category, JComponent>();
|
||||
|
||||
panels.put(generalNode, new CustomizerGeneral(uiModel));
|
||||
panels.put(packageNode, new CustomizerPackage(uiModel));
|
||||
// panels.put(compileNode, new CustomizerCompile(uiModel));
|
||||
|
||||
return panels;
|
||||
}
|
||||
|
||||
/**
|
||||
* CategoryComponentProvider provider class. It stores categories and there
|
||||
* corresponding UI in a map. An instance of PanelProvider is stored in
|
||||
* CustomizerProviderImpl instance
|
||||
*/
|
||||
private static class PanelProvider implements ProjectCustomizer.CategoryComponentProvider {
|
||||
|
||||
private JPanel EMPTY_PANEL = new JPanel();
|
||||
private Map<ProjectCustomizer.Category, JComponent> panels;
|
||||
|
||||
PanelProvider(Map<ProjectCustomizer.Category, JComponent> panels) {
|
||||
this.panels = panels;
|
||||
}
|
||||
|
||||
public JComponent create(ProjectCustomizer.Category category) {
|
||||
JComponent panel = panels.get(category);
|
||||
return panel == null ? EMPTY_PANEL : panel;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Listens to the actions on the Customizer's option buttons
|
||||
*/
|
||||
private class OptionListener extends WindowAdapter implements ActionListener {
|
||||
|
||||
private Project project;
|
||||
private SEPluginProjectCustomizerModel uiModel;
|
||||
|
||||
OptionListener(Project project, SEPluginProjectCustomizerModel uiModel) {
|
||||
this.project = project;
|
||||
this.uiModel = uiModel;
|
||||
}
|
||||
|
||||
// Listening to OK button ----------------------------------------------
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
// Store the properties into project
|
||||
this.uiModel.save();
|
||||
// Close & dispose the the dialog
|
||||
Dialog dialog = project2Dialog.get(project);
|
||||
if (dialog != null) {
|
||||
dialog.setVisible(false);
|
||||
dialog.dispose();
|
||||
}
|
||||
}
|
||||
|
||||
// Listening to window events ------------------------------------------
|
||||
public void windowClosed(WindowEvent e) {
|
||||
project2Dialog.remove(project);
|
||||
}
|
||||
|
||||
public void windowClosing(WindowEvent e) {
|
||||
//Dispose the dialog otherwsie the {@link WindowAdapter#windowClosed}
|
||||
//may not be called
|
||||
Dialog dialog = project2Dialog.get(project);
|
||||
if (dialog != null) {
|
||||
dialog.setVisible(false);
|
||||
dialog.dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static interface SubCategoryProvider {
|
||||
|
||||
public void showSubCategory(String name);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
LBL_Fix_Broken_Links_Action=Resolve Reference Problems...
|
||||
|
||||
#Actions
|
||||
LBL_CleanAction_Name=Clean Project
|
||||
LBL_BuildAction_Name=Build Project
|
||||
LBL_RebuildAction_Name=Clean and Build Project
|
||||
LBL_RunAction_Name=Run Project
|
||||
LBL_DebugAction_Name=Debug Project
|
||||
LBL_JavadocAction_Name=Generate Javadoc for Project
|
||||
LBL_TestAction_Name=Test Component
|
||||
LBL_Properties_Action=Properties
|
||||
LBL_AddProject_Action=Add Project...
|
||||
LBL_AddLibrary_Action=Add Library...
|
||||
LBL_AddFolder_Action=Add JAR/Folder...
|
||||
|
||||
|
|
@ -0,0 +1,350 @@
|
|||
/*
|
||||
* SEPluginProjectNode.java
|
||||
*
|
||||
*/
|
||||
package net.openesb.component.${artifactId}.project.node;
|
||||
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.beans.PropertyChangeEvent;
|
||||
import java.beans.PropertyChangeListener;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.ResourceBundle;
|
||||
import javax.swing.AbstractAction;
|
||||
import javax.swing.Action;
|
||||
import javax.swing.JSeparator;
|
||||
import org.netbeans.api.project.Project;
|
||||
import org.netbeans.api.project.ProjectUtils;
|
||||
import net.openesb.component.${artifactId}.project.SEPluginProjectProperties;
|
||||
import org.netbeans.spi.java.project.support.ui.BrokenReferencesSupport;
|
||||
import org.netbeans.spi.project.ActionProvider;
|
||||
import org.netbeans.spi.project.SubprojectProvider;
|
||||
import org.netbeans.spi.project.support.ant.AntProjectHelper;
|
||||
import org.netbeans.spi.project.support.ant.PropertyEvaluator;
|
||||
import org.netbeans.spi.project.support.ant.ReferenceHelper;
|
||||
import org.netbeans.spi.project.ui.support.CommonProjectActions;
|
||||
import org.netbeans.spi.project.ui.support.DefaultProjectOperations;
|
||||
import org.netbeans.spi.project.ui.support.ProjectSensitiveActions;
|
||||
import org.openide.actions.FindAction;
|
||||
import org.openide.filesystems.FileAttributeEvent;
|
||||
import org.openide.filesystems.FileChangeListener;
|
||||
import org.openide.filesystems.FileEvent;
|
||||
import org.openide.filesystems.FileObject;
|
||||
import org.openide.filesystems.FileRenameEvent;
|
||||
import org.openide.loaders.DataObject;
|
||||
import org.openide.nodes.AbstractNode;
|
||||
import org.openide.nodes.Children;
|
||||
import org.openide.nodes.FilterNode;
|
||||
import org.openide.nodes.Node;
|
||||
import org.openide.util.HelpCtx;
|
||||
import org.openide.util.Lookup;
|
||||
import org.openide.util.NbBundle;
|
||||
import org.openide.util.actions.SystemAction;
|
||||
import org.openide.util.lookup.Lookups;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author chikkala
|
||||
*/
|
||||
public class SEPluginProjectNode extends AbstractNode {
|
||||
|
||||
private Project project;
|
||||
private AntProjectHelper helper;
|
||||
private PropertyEvaluator evaluator;
|
||||
private SubprojectProvider spp;
|
||||
private ReferenceHelper resolver;
|
||||
private Action brokenLinksAction;
|
||||
private boolean broken;
|
||||
|
||||
public SEPluginProjectNode(Project project, AntProjectHelper helper, PropertyEvaluator evaluator, SubprojectProvider spp, ReferenceHelper resolver) {
|
||||
super(new SEPluginProjectNodeChildren(project, helper, evaluator), Lookups.singleton(project));
|
||||
setIconBaseWithExtension(SEPluginProjectProperties.SE_PLUGIN_PROJECT_ICON_PATH);
|
||||
super.setName(ProjectUtils.getInformation(project).getDisplayName());
|
||||
|
||||
this.project = project;
|
||||
assert project != null;
|
||||
this.helper = helper;
|
||||
assert helper != null;
|
||||
this.evaluator = evaluator;
|
||||
assert evaluator != null;
|
||||
this.spp = spp;
|
||||
assert spp != null;
|
||||
this.resolver = resolver;
|
||||
|
||||
if (hasBrokenLinks(helper, resolver)) {
|
||||
broken = true;
|
||||
brokenLinksAction = new BrokenLinksAction();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public HelpCtx getHelpCtx() {
|
||||
return HelpCtx.DEFAULT_HELP;
|
||||
// TODO: new HelpCtx("se_deploy_plugin_project_about"); // NOI18N
|
||||
}
|
||||
|
||||
@Override
|
||||
public Action[] getActions(boolean context) {
|
||||
if (context) {
|
||||
return super.getActions(true);
|
||||
} else {
|
||||
return getAdditionalActions();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canRename() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setName(String s) {
|
||||
DefaultProjectOperations.performDefaultRenameOperation(project, s);
|
||||
}
|
||||
|
||||
private String[] getBreakableProperties() {
|
||||
String[] breakableProps = new String[0];
|
||||
return breakableProps;
|
||||
}
|
||||
|
||||
public boolean hasBrokenLinks(AntProjectHelper helper, ReferenceHelper resolver) {
|
||||
return BrokenReferencesSupport.isBroken(helper, resolver, getBreakableProperties(), new String[]{SEPluginProjectProperties.DEFAULT_PLATFORM});
|
||||
}
|
||||
|
||||
private Action[] getAdditionalActions() {
|
||||
|
||||
ResourceBundle bundle = NbBundle.getBundle(SEPluginProjectNode.class);
|
||||
|
||||
List<Action> actions = new ArrayList<Action>();
|
||||
|
||||
actions.add(CommonProjectActions.newFileAction());
|
||||
actions.add(null);
|
||||
actions.add(ProjectSensitiveActions.projectCommandAction(ActionProvider.COMMAND_BUILD, bundle.getString("LBL_BuildAction_Name"), null)); // NOI18N
|
||||
actions.add(ProjectSensitiveActions.projectCommandAction(ActionProvider.COMMAND_REBUILD, bundle.getString("LBL_RebuildAction_Name"), null)); // NOI18N
|
||||
actions.add(ProjectSensitiveActions.projectCommandAction(ActionProvider.COMMAND_CLEAN, bundle.getString("LBL_CleanAction_Name"), null)); // NOI18N
|
||||
//TODO: add additional plugin specific actions
|
||||
actions.add(null);
|
||||
actions.add(CommonProjectActions.setAsMainProjectAction());
|
||||
actions.add(CommonProjectActions.openSubprojectsAction());
|
||||
actions.add(CommonProjectActions.closeProjectAction());
|
||||
actions.add(null);
|
||||
actions.add(CommonProjectActions.renameProjectAction());
|
||||
actions.add(CommonProjectActions.moveProjectAction());
|
||||
actions.add(CommonProjectActions.copyProjectAction());
|
||||
actions.add(CommonProjectActions.deleteProjectAction());
|
||||
actions.add(null);
|
||||
actions.add(SystemAction.get(FindAction.class));
|
||||
// add actions from layer filesystem configuration
|
||||
addFromLayers(actions, "Projects/Actions"); //NOI18N
|
||||
actions.add(null);
|
||||
actions.add(brokenLinksAction);
|
||||
actions.add(CommonProjectActions.customizeProjectAction());
|
||||
|
||||
return actions.toArray(new Action[actions.size()]);
|
||||
}
|
||||
|
||||
private void addFromLayers(List<Action> actions, String path) {
|
||||
Lookup look = Lookups.forPath(path);
|
||||
for (Object next : look.lookupAll(Object.class)) {
|
||||
if (next instanceof Action) {
|
||||
actions.add((Action) next);
|
||||
} else if (next instanceof JSeparator) {
|
||||
actions.add(null);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* This action is created only when project has broken references. Once
|
||||
* these are resolved the action is disabled.
|
||||
*/
|
||||
private class BrokenLinksAction extends AbstractAction implements PropertyChangeListener {
|
||||
|
||||
public BrokenLinksAction() {
|
||||
evaluator.addPropertyChangeListener(this);
|
||||
putValue(Action.NAME, NbBundle.getMessage(SEPluginProjectNode.class, "LBL_Fix_Broken_Links_Action"));
|
||||
}
|
||||
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
/*
|
||||
BrokenReferencesSupport.showCustomizer(helper, resolver, BREAKABLE_PROPERTIES, new String[]{SEPluginProjectProperties.DEFAULT_PLATFORM});
|
||||
if (!hasBrokenLinks(helper, resolver)) {
|
||||
disable();
|
||||
}
|
||||
*/
|
||||
// do nothing...
|
||||
}
|
||||
|
||||
public void propertyChange(PropertyChangeEvent evt) {
|
||||
if (!broken) {
|
||||
disable();
|
||||
return;
|
||||
}
|
||||
broken = hasBrokenLinks(helper, resolver);
|
||||
if (!broken) {
|
||||
disable();
|
||||
}
|
||||
}
|
||||
|
||||
private void disable() {
|
||||
broken = false;
|
||||
setEnabled(false);
|
||||
evaluator.removePropertyChangeListener(this);
|
||||
fireIconChange();
|
||||
fireOpenedIconChange();
|
||||
}
|
||||
}
|
||||
|
||||
private static final class SEPluginProjectNodeChildren extends Children.Keys implements FileChangeListener {
|
||||
|
||||
private static final String KEY_SU_JBI_XML = "SU_JBI_XML_Key"; // NOI18N
|
||||
private static final String KEY_SOURCE_DIR = "SourceDirKey"; // NOI18N
|
||||
private Project project;
|
||||
private AntProjectHelper helper;
|
||||
private PropertyEvaluator evaluator;
|
||||
|
||||
public SEPluginProjectNodeChildren(Project project, AntProjectHelper helper, PropertyEvaluator evaluator) {
|
||||
this.project = project;
|
||||
assert project != null;
|
||||
this.helper = helper;
|
||||
assert helper != null;
|
||||
this.evaluator = evaluator;
|
||||
assert evaluator != null;
|
||||
}
|
||||
|
||||
private FileObject getSourceFolder() {
|
||||
String srcDir = helper.getStandardPropertyEvaluator().getProperty(SEPluginProjectProperties.SRC_DIR); // NOI18N
|
||||
return helper.resolveFileObject(srcDir);
|
||||
}
|
||||
|
||||
private FileObject getJbiXml(FileObject srcDirFO) {
|
||||
FileObject jbiXmlFO = null;
|
||||
if (srcDirFO == null) {
|
||||
return null;
|
||||
}
|
||||
jbiXmlFO = srcDirFO.getFileObject(SEPluginProjectProperties.SU_JBI_XML_PATH);
|
||||
if (jbiXmlFO == null) {
|
||||
// create default jbi.xml
|
||||
try {
|
||||
jbiXmlFO = SEPluginProjectProperties.createDefaultSUDescriptor(srcDirFO);
|
||||
} catch (Exception ex) {
|
||||
ex.printStackTrace();
|
||||
}
|
||||
}
|
||||
return jbiXmlFO;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
protected void addNotify() {
|
||||
super.addNotify();
|
||||
FileObject projectDirFO = project.getProjectDirectory();
|
||||
if (projectDirFO != null) {
|
||||
projectDirFO.addFileChangeListener(this);
|
||||
}
|
||||
FileObject srcDirFO = getSourceFolder();
|
||||
if (srcDirFO != null) {
|
||||
srcDirFO.addFileChangeListener(this);
|
||||
}
|
||||
setKeys(getKeys());
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
protected void removeNotify() {
|
||||
|
||||
setKeys(Collections.emptySet());
|
||||
|
||||
FileObject projectDirFO = project.getProjectDirectory();
|
||||
if (projectDirFO != null) {
|
||||
projectDirFO.removeFileChangeListener(this);
|
||||
}
|
||||
FileObject srcDirFO = getSourceFolder();
|
||||
if (srcDirFO != null) {
|
||||
srcDirFO.removeFileChangeListener(this);
|
||||
}
|
||||
|
||||
super.removeNotify();
|
||||
}
|
||||
|
||||
private Collection<Object> getKeys() {
|
||||
//when the project is deleted externally do not try to create children, the source groups
|
||||
//are not valid
|
||||
if (project.getProjectDirectory() == null || !project.getProjectDirectory().isValid()) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
|
||||
List<Object> result = new ArrayList<Object>();
|
||||
|
||||
FileObject srcDirFO = null;
|
||||
FileObject jbiXmlFO = null;
|
||||
|
||||
srcDirFO = getSourceFolder();
|
||||
if (srcDirFO != null) {
|
||||
jbiXmlFO = getJbiXml(srcDirFO);
|
||||
}
|
||||
if (jbiXmlFO != null) {
|
||||
result.add(KEY_SU_JBI_XML);
|
||||
}
|
||||
|
||||
if (srcDirFO != null) {
|
||||
result.add(KEY_SOURCE_DIR);
|
||||
}
|
||||
|
||||
//TODO: add any other top level node keys here.
|
||||
return result;
|
||||
}
|
||||
|
||||
protected Node createNode(FileObject fo) {
|
||||
try {
|
||||
DataObject dataObj = DataObject.find(fo);
|
||||
return new FilterNode(dataObj.getNodeDelegate());
|
||||
} catch (Exception ex) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
protected Node[] createNodes(Object key) {
|
||||
List<Node> newNodes = new ArrayList<Node>();
|
||||
if (KEY_SU_JBI_XML.equals(key)) {
|
||||
FileObject srcDirFO = getSourceFolder();
|
||||
FileObject jbiXmlFO = getJbiXml(srcDirFO);
|
||||
newNodes.add(createNode(jbiXmlFO));
|
||||
} else if (KEY_SOURCE_DIR.equals(key)) {
|
||||
FileObject srcDirFO = getSourceFolder();
|
||||
newNodes.add(createNode(srcDirFO));
|
||||
}
|
||||
return newNodes.toArray(new Node[newNodes.size()]);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public void fileFolderCreated(FileEvent evt) {
|
||||
setKeys(getKeys());
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public void fileDataCreated(FileEvent evt) {
|
||||
setKeys(getKeys());
|
||||
}
|
||||
|
||||
public void fileChanged(FileEvent evt) {
|
||||
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public void fileDeleted(FileEvent evt) {
|
||||
setKeys(getKeys());
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public void fileRenamed(FileRenameEvent evt) {
|
||||
setKeys(getKeys());
|
||||
}
|
||||
|
||||
public void fileAttributeChanged(FileAttributeEvent evt) {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,208 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
The contents of this file are subject to the terms of the Common Development
|
||||
and Distribution License (the License). You may not use this file except in
|
||||
compliance with the License.
|
||||
|
||||
You can obtain a copy of the License at http://www.netbeans.org/cddl.html
|
||||
or http://www.netbeans.org/cddl.txt.
|
||||
|
||||
When distributing Covered Code, include this CDDL Header Notice in each file
|
||||
and include the License file at http://www.netbeans.org/cddl.txt.
|
||||
If applicable, add the following below the CDDL Header, with the fields
|
||||
enclosed by brackets [] replaced by your own identifying information:
|
||||
"Portions Copyrighted [year] [name of copyright owner]"
|
||||
|
||||
The Original Software is NetBeans. The Initial Developer of the Original
|
||||
Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
|
||||
Microsystems, Inc. All Rights Reserved.
|
||||
-->
|
||||
<xsl:stylesheet version="1.0"
|
||||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
xmlns:p="http://www.netbeans.org/ns/project/1"
|
||||
xmlns:xalan="http://xml.apache.org/xslt"
|
||||
xmlns:jbiproject="http://www.netbeans.org/ns/jbimodules/ServiceEngine/1"
|
||||
xmlns:projdeps="http://www.netbeans.org/ns/ant-project-references/1"
|
||||
xmlns:projdeps2="http://www.netbeans.org/ns/ant-project-references/2"
|
||||
exclude-result-prefixes="xalan p projdeps projdeps2">
|
||||
<!-- XXX should use namespaces for NB in-VM tasks from ant/browsetask and debuggerjpda/ant (Ant 1.6.1 and higher only) -->
|
||||
<xsl:output method="xml" indent="yes" encoding="UTF-8" xalan:indent-amount="4"/>
|
||||
<xsl:template match="/">
|
||||
|
||||
<xsl:comment><![CDATA[
|
||||
*** GENERATED FROM project.xml - DO NOT EDIT ***
|
||||
*** EDIT ../build.xml INSTEAD ***
|
||||
|
||||
For the purpose of easier reading the script
|
||||
is divided into following sections:
|
||||
|
||||
- initialization
|
||||
- compilation
|
||||
- jar
|
||||
- cleanup
|
||||
|
||||
]]>
|
||||
</xsl:comment>
|
||||
|
||||
<xsl:variable name="name" select="/p:project/p:configuration/jbiproject:data/jbiproject:name"/>
|
||||
<!-- Synch with build-impl.xsl: -->
|
||||
<xsl:variable name="codename" select="translate($name, ' ', '_')"/>
|
||||
<project name="{$codename}-impl">
|
||||
<xsl:attribute name="default">default</xsl:attribute>
|
||||
<xsl:attribute name="basedir">..</xsl:attribute>
|
||||
|
||||
<target name="default">
|
||||
<xsl:attribute name="depends">jar</xsl:attribute>
|
||||
<xsl:attribute name="description">Build whole project.</xsl:attribute>
|
||||
</target>
|
||||
|
||||
<xsl:comment>
|
||||
======================
|
||||
INITIALIZATION SECTION
|
||||
======================
|
||||
</xsl:comment>
|
||||
|
||||
<target name="-pre-init">
|
||||
<xsl:comment> Empty placeholder for easier customization. </xsl:comment>
|
||||
<xsl:comment> You can override this target in the ../build.xml file. </xsl:comment>
|
||||
</target>
|
||||
|
||||
<target name="-init-private">
|
||||
<xsl:attribute name="depends">-pre-init</xsl:attribute>
|
||||
<property file="nbproject/private/private.properties"/>
|
||||
</target>
|
||||
|
||||
<target name="-init-user">
|
||||
<xsl:attribute name="depends">-pre-init,-init-private</xsl:attribute>
|
||||
<property file="${{user.properties.file}}"/>
|
||||
</target>
|
||||
|
||||
<target name="-init-project">
|
||||
<xsl:attribute name="depends">-pre-init,-init-private,-init-user</xsl:attribute>
|
||||
<property file="nbproject/project.properties"/>
|
||||
</target>
|
||||
|
||||
<target name="-do-init">
|
||||
<xsl:attribute name="depends">-pre-init,-init-private,-init-user,-init-project</xsl:attribute>
|
||||
<property name="build.jbi.su.dir" location="${{build.dir}}/${{jbi.su.name}}" />
|
||||
</target>
|
||||
|
||||
<target name="-post-init">
|
||||
<xsl:comment> Empty placeholder for easier customization. </xsl:comment>
|
||||
<xsl:comment> You can override this target in the ../build.xml file. </xsl:comment>
|
||||
</target>
|
||||
|
||||
<target name="-init-check">
|
||||
<xsl:attribute name="depends">-pre-init,-init-private,-init-user,-init-project,-do-init</xsl:attribute>
|
||||
<fail unless="src.dir">Must set src.dir</fail>
|
||||
<fail unless="build.dir">Must set build.dir</fail>
|
||||
<fail unless="jbi.su.name">Must set jbi.su.name</fail>
|
||||
<fail unless="jbi.su.zip">Must set jbi.su.zip</fail>
|
||||
</target>
|
||||
|
||||
<target name="init">
|
||||
<xsl:attribute name="depends">-pre-init,-init-private,-init-user,-init-project,-do-init,-post-init,-init-check</xsl:attribute>
|
||||
</target>
|
||||
|
||||
<xsl:comment>
|
||||
===================
|
||||
COMPILATION SECTION
|
||||
===================
|
||||
</xsl:comment>
|
||||
|
||||
<target name="-pre-pre-compile">
|
||||
<xsl:attribute name="depends">init</xsl:attribute>
|
||||
<mkdir dir="${{build.jbi.su.dir}}"/>
|
||||
</target>
|
||||
|
||||
<target name="-pre-compile">
|
||||
<xsl:comment> Empty placeholder for easier customization. </xsl:comment>
|
||||
<xsl:comment> You can override this target in the ../build.xml file. </xsl:comment>
|
||||
</target>
|
||||
|
||||
<target name="-do-compile">
|
||||
<xsl:attribute name="depends">init,-pre-pre-compile,-pre-compile</xsl:attribute>
|
||||
<mkdir dir="${{build.jbi.su.dir}}"/>
|
||||
<copy file="${{src.dir}}/META-INF/jbi.xml" todir="${{build.jbi.su.dir}}/META-INF" overwrite="true" />
|
||||
<copy todir="${{build.jbi.su.dir}}" overwrite="true" >
|
||||
<fileset dir="${{src.dir}}" >
|
||||
</fileset>
|
||||
</copy>
|
||||
</target>
|
||||
|
||||
<target name="-post-compile">
|
||||
<xsl:comment> Empty placeholder for easier customization. </xsl:comment>
|
||||
<xsl:comment> You can override this target in the ../build.xml file. </xsl:comment>
|
||||
</target>
|
||||
|
||||
<target name="compile">
|
||||
<xsl:attribute name="depends">init,-pre-pre-compile,-pre-compile,-do-compile,-post-compile</xsl:attribute>
|
||||
<xsl:attribute name="description">Compile project.</xsl:attribute>
|
||||
</target>
|
||||
|
||||
<xsl:comment>
|
||||
====================
|
||||
JAR BUILDING SECTION
|
||||
====================
|
||||
</xsl:comment>
|
||||
|
||||
<target name="-pre-pre-jar">
|
||||
<xsl:attribute name="depends">init</xsl:attribute>
|
||||
<mkdir dir="${{build.dir}}"/>
|
||||
</target>
|
||||
|
||||
<target name="-pre-jar">
|
||||
<xsl:comment> Empty placeholder for easier customization. </xsl:comment>
|
||||
<xsl:comment> You can override this target in the ../build.xml file. </xsl:comment>
|
||||
</target>
|
||||
|
||||
<target name="-do-jar">
|
||||
<xsl:attribute name="depends">init,compile,-pre-pre-jar,-pre-jar</xsl:attribute>
|
||||
<zip destfile="${{jbi.su.zip}}" basedir="${{build.jbi.su.dir}}" />
|
||||
</target>
|
||||
|
||||
<target name="-post-jar">
|
||||
<xsl:comment> Empty placeholder for easier customization. </xsl:comment>
|
||||
<xsl:comment> You can override this target in the ../build.xml file. </xsl:comment>
|
||||
</target>
|
||||
|
||||
<target name="jar">
|
||||
<xsl:attribute name="depends">init,compile,-pre-jar,-do-jar,-post-jar</xsl:attribute>
|
||||
<xsl:attribute name="description">Build JAR.</xsl:attribute>
|
||||
</target>
|
||||
|
||||
<target name="dist">
|
||||
<xsl:attribute name="depends">init,jar</xsl:attribute>
|
||||
</target>
|
||||
|
||||
<target name="dist_se">
|
||||
<xsl:attribute name="depends">init,jar</xsl:attribute>
|
||||
</target>
|
||||
|
||||
<xsl:comment>
|
||||
===============
|
||||
CLEANUP SECTION
|
||||
===============
|
||||
</xsl:comment>
|
||||
|
||||
<target name="-do-clean">
|
||||
<xsl:attribute name="depends">init</xsl:attribute>
|
||||
<delete dir="${{build.dir}}"/>
|
||||
<!-- XXX explicitly delete all build.* and dist.* dirs in case they are not subdirs -->
|
||||
</target>
|
||||
|
||||
<target name="-post-clean">
|
||||
<xsl:comment> Empty placeholder for easier customization. </xsl:comment>
|
||||
<xsl:comment> You can override this target in the ../build.xml file. </xsl:comment>
|
||||
</target>
|
||||
|
||||
<target name="clean">
|
||||
<xsl:attribute name="depends">init,-do-clean,-post-clean</xsl:attribute>
|
||||
<xsl:attribute name="description">Clean build products.</xsl:attribute>
|
||||
</target>
|
||||
|
||||
</project>
|
||||
|
||||
</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
|
@ -0,0 +1,120 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
The contents of this file are subject to the terms of the Common Development
|
||||
and Distribution License (the License). You may not use this file except in
|
||||
compliance with the License.
|
||||
|
||||
You can obtain a copy of the License at http://www.netbeans.org/cddl.html
|
||||
or http://www.netbeans.org/cddl.txt.
|
||||
|
||||
When distributing Covered Code, include this CDDL Header Notice in each file
|
||||
and include the License file at http://www.netbeans.org/cddl.txt.
|
||||
If applicable, add the following below the CDDL Header, with the fields
|
||||
enclosed by brackets [] replaced by your own identifying information:
|
||||
"Portions Copyrighted [year] [name of copyright owner]"
|
||||
|
||||
The Original Software is NetBeans. The Initial Developer of the Original
|
||||
Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
|
||||
Microsystems, Inc. All Rights Reserved.
|
||||
-->
|
||||
<xsl:stylesheet version="1.0"
|
||||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
xmlns:project="http://www.netbeans.org/ns/project/1"
|
||||
xmlns:jbiproject="http://www.netbeans.org/ns/jbimodules/ServiceEngine/1"
|
||||
xmlns:xalan="http://xml.apache.org/xslt"
|
||||
exclude-result-prefixes="xalan project jbiproject">
|
||||
<xsl:output method="xml" indent="yes" encoding="UTF-8" xalan:indent-amount="4"/>
|
||||
<xsl:template match="/">
|
||||
|
||||
<!-- Annoyingly, the JAXP impl in JRE 1.4.2 seems to randomly reorder attrs. -->
|
||||
<!-- (I.e. the DOM tree gets them in an unspecified order?) -->
|
||||
<!-- As a workaround, use xsl:attribute for all but the first attr. -->
|
||||
<!-- This seems to produce them in the order you want. -->
|
||||
<!-- Tedious, but appears to do the job. -->
|
||||
<!-- Important for build.xml, which is very visible; not so much for build-impl.xml. -->
|
||||
|
||||
<xsl:comment> You may freely edit this file. See commented blocks below for </xsl:comment>
|
||||
<xsl:comment> some examples of how to customize the build. </xsl:comment>
|
||||
<xsl:comment> (If you delete it and reopen the project it will be recreated.) </xsl:comment>
|
||||
|
||||
<xsl:variable name="name" select="/project:project/project:configuration/jbiproject:data/jbiproject:name"/>
|
||||
<!-- Synch with build-impl.xsl: -->
|
||||
<!-- XXX really should translate all chars that are *not* safe (cf. PropertyUtils.getUsablePropertyName): -->
|
||||
<xsl:variable name="codename" select="translate($name, ' ', '_')"/>
|
||||
<project name="{$codename}">
|
||||
<xsl:attribute name="default">default</xsl:attribute>
|
||||
<xsl:attribute name="basedir">.</xsl:attribute>
|
||||
<description>Builds, tests, and runs the project
|
||||
<xsl:value-of select="$name"/>.
|
||||
</description>
|
||||
<import file="nbproject/build-impl.xml"/>
|
||||
|
||||
<xsl:comment><![CDATA[
|
||||
|
||||
There exist several targets which are by default empty and which can be
|
||||
used for execution of your tasks. These targets are usually executed
|
||||
before and after some main targets. They are:
|
||||
|
||||
-pre-init: called before initialization of project properties
|
||||
-post-init: called after initialization of project properties
|
||||
-pre-compile: called before javac compilation
|
||||
-post-compile: called after javac compilation
|
||||
-pre-compile-single: called before javac compilation of single file
|
||||
-post-compile-single: called after javac compilation of single file
|
||||
-pre-compile-test: called before javac compilation of JUnit tests
|
||||
-post-compile-test: called after javac compilation of JUnit tests
|
||||
-pre-compile-test-single: called before javac compilation of single JUnit test
|
||||
-post-compile-test-single: called after javac compilation of single JUunit test
|
||||
-pre-jar: called before JAR building
|
||||
-post-jar: called after JAR building
|
||||
-post-clean: called after cleaning build products
|
||||
|
||||
(Targets beginning with '-' are not intended to be called on their own.)
|
||||
|
||||
Example of inserting an obfuscator after compilation could look like this:
|
||||
|
||||
<target name="-post-compile">
|
||||
<obfuscate>
|
||||
<fileset dir="${build.classes.dir}"/>
|
||||
</obfuscate>
|
||||
</target>
|
||||
|
||||
For list of available properties check the imported
|
||||
nbproject/build-impl.xml file.
|
||||
|
||||
|
||||
Another way to customize the build is by overriding existing main targets.
|
||||
The targets of interest are:
|
||||
|
||||
-init-macrodef-javac: defines macro for javac compilation
|
||||
-init-macrodef-junit: defines macro for junit execution
|
||||
-init-macrodef-debug: defines macro for class debugging
|
||||
-init-macrodef-java: defines macro for class execution
|
||||
-do-jar-with-manifest: JAR building (if you are using a manifest)
|
||||
-do-jar-without-manifest: JAR building (if you are not using a manifest)
|
||||
run: execution of project
|
||||
-javadoc-build: Javadoc generation
|
||||
test-report: JUnit report generation
|
||||
|
||||
An example of overriding the target for project execution could look like this:
|
||||
|
||||
<target name="run" depends="]]>
|
||||
<xsl:value-of select="$codename"/><![CDATA[-impl.jar">
|
||||
<exec dir="bin" executable="launcher.exe">
|
||||
<arg file="${dist.jar}"/>
|
||||
</exec>
|
||||
</target>
|
||||
|
||||
Notice that the overridden target depends on the jar target and not only on
|
||||
the compile target as the regular run target does. Again, for a list of available
|
||||
properties which you can use, check the target you are overriding in the
|
||||
nbproject/build-impl.xml file.
|
||||
|
||||
]]>
|
||||
</xsl:comment>
|
||||
|
||||
</project>
|
||||
|
||||
</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
Binary file not shown.
After Width: | Height: | Size: 450 B |
|
@ -0,0 +1,3 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://www.netbeans.org/ns/project/1">
|
||||
</project>
|
|
@ -0,0 +1,9 @@
|
|||
LBL_CreateProjectStep=Name and Location
|
||||
|
||||
LBL_ProjectName=Project &Name:
|
||||
|
||||
LBL_ProjectLocation=Project &Location:
|
||||
|
||||
LBL_ProjectFolder=Project &Folder:
|
||||
|
||||
LBL_Browse=Br&owse...
|
|
@ -0,0 +1,8 @@
|
|||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
</head>
|
||||
<body>
|
||||
Service Engine deploment plugin project
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,238 @@
|
|||
/*
|
||||
* SEPluginProjectWizardIterator.java
|
||||
*/
|
||||
package net.openesb.component.${artifactId}.project.wizard;
|
||||
|
||||
import java.awt.Component;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.text.MessageFormat;
|
||||
import java.util.HashMap;
|
||||
import java.util.LinkedHashSet;
|
||||
import java.util.Map;
|
||||
import java.util.NoSuchElementException;
|
||||
import java.util.Set;
|
||||
import javax.swing.JComponent;
|
||||
import javax.swing.event.ChangeListener;
|
||||
import net.openesb.component.${artifactId}.project.SEPluginProjectGenerator;
|
||||
import net.openesb.component.${artifactId}.project.SEPluginProjectProperties;
|
||||
import org.netbeans.spi.project.support.ant.AntProjectHelper;
|
||||
import org.netbeans.spi.project.ui.support.ProjectChooser;
|
||||
import org.netbeans.spi.project.ui.templates.support.Templates;
|
||||
import org.openide.WizardDescriptor;
|
||||
import org.openide.filesystems.FileLock;
|
||||
import org.openide.filesystems.FileObject;
|
||||
import org.openide.filesystems.FileUtil;
|
||||
import org.openide.filesystems.Repository;
|
||||
import org.openide.loaders.DataFolder;
|
||||
import org.openide.loaders.DataObject;
|
||||
import org.openide.util.NbBundle;
|
||||
|
||||
public class SEPluginProjectWizardIterator implements WizardDescriptor.InstantiatingIterator {
|
||||
|
||||
public final static String PROJECT_DIR = "projdir";
|
||||
public final static String PROJECT_NAME = "name";
|
||||
public final static String DEF_PROJECT_NAME_VALUE = "JBIModule";
|
||||
private int index;
|
||||
private WizardDescriptor.Panel[] panels;
|
||||
private WizardDescriptor wiz;
|
||||
|
||||
public SEPluginProjectWizardIterator() {
|
||||
}
|
||||
|
||||
public static SEPluginProjectWizardIterator createIterator() {
|
||||
return new SEPluginProjectWizardIterator();
|
||||
}
|
||||
|
||||
private WizardDescriptor.Panel[] createPanels() {
|
||||
return new WizardDescriptor.Panel[]{
|
||||
new SEPluginProjectWizardPanel()
|
||||
};
|
||||
}
|
||||
|
||||
private String[] createSteps() {
|
||||
return new String[]{
|
||||
NbBundle.getMessage(SEPluginProjectWizardIterator.class, "LBL_CreateProjectStep")
|
||||
};
|
||||
}
|
||||
|
||||
public Set<Object> instantiate(/*ProgressHandle handle*/) throws IOException {
|
||||
|
||||
Set<Object> resultSet = createSEDeployPluginProject();
|
||||
// save the current projects folder
|
||||
File dirF = FileUtil.normalizeFile((File) wiz.getProperty(PROJECT_DIR));
|
||||
File parent = dirF.getParentFile();
|
||||
if (parent != null && parent.exists()) {
|
||||
ProjectChooser.setProjectsFolder(parent);
|
||||
}
|
||||
return resultSet;
|
||||
}
|
||||
|
||||
public void initialize(WizardDescriptor wiz) {
|
||||
this.wiz = wiz;
|
||||
|
||||
try {
|
||||
FileObject templateFO = Templates.getTemplate(wiz);
|
||||
DataObject templateDO = DataObject.find(templateFO);
|
||||
this.wiz.putProperty(PROJECT_NAME, templateDO.getName());
|
||||
} catch (Exception ex) {
|
||||
this.wiz.putProperty(PROJECT_NAME, DEF_PROJECT_NAME_VALUE);
|
||||
}
|
||||
|
||||
index = 0;
|
||||
panels = createPanels();
|
||||
// Make sure list of steps is accurate.
|
||||
String[] steps = createSteps();
|
||||
for (int i = 0; i < panels.length; i++) {
|
||||
Component c = panels[i].getComponent();
|
||||
if (steps[i] == null) {
|
||||
// Default step name to component name of panel.
|
||||
// Mainly useful for getting the name of the target
|
||||
// chooser to appear in the list of steps.
|
||||
steps[i] = c.getName();
|
||||
}
|
||||
if (c instanceof JComponent) { // assume Swing components
|
||||
JComponent jc = (JComponent) c;
|
||||
// Step #.
|
||||
jc.putClientProperty("WizardPanel_contentSelectedIndex", new Integer(i));
|
||||
// Step name (actually the whole list for reference).
|
||||
jc.putClientProperty("WizardPanel_contentData", steps);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void uninitialize(WizardDescriptor wiz) {
|
||||
this.wiz.putProperty(PROJECT_DIR, null);
|
||||
this.wiz.putProperty(PROJECT_NAME, null);
|
||||
this.wiz = null;
|
||||
panels = null;
|
||||
}
|
||||
|
||||
public String name() {
|
||||
return MessageFormat.format("{0} of {1}",
|
||||
new Object[]{new Integer(index + 1), new Integer(panels.length)});
|
||||
}
|
||||
|
||||
public boolean hasNext() {
|
||||
return index < panels.length - 1;
|
||||
}
|
||||
|
||||
public boolean hasPrevious() {
|
||||
return index > 0;
|
||||
}
|
||||
|
||||
public void nextPanel() {
|
||||
if (!hasNext()) {
|
||||
throw new NoSuchElementException();
|
||||
}
|
||||
index++;
|
||||
}
|
||||
|
||||
public void previousPanel() {
|
||||
if (!hasPrevious()) {
|
||||
throw new NoSuchElementException();
|
||||
}
|
||||
index--;
|
||||
}
|
||||
|
||||
public WizardDescriptor.Panel current() {
|
||||
return panels[index];
|
||||
}
|
||||
|
||||
// If nothing unusual changes in the middle of the wizard, simply:
|
||||
public final void addChangeListener(ChangeListener l) {
|
||||
}
|
||||
|
||||
public final void removeChangeListener(ChangeListener l) {
|
||||
}
|
||||
|
||||
protected Set<Object> createSEDeployPluginProject() throws IOException {
|
||||
|
||||
Set<Object> resultSet = new LinkedHashSet<Object>();
|
||||
|
||||
File prjDirFile = FileUtil.normalizeFile((File) wiz.getProperty(PROJECT_DIR));
|
||||
String prjName = (String) wiz.getProperty(PROJECT_NAME);
|
||||
|
||||
SEPluginProjectGenerator prjGenerator = new SEPluginProjectGenerator();
|
||||
AntProjectHelper h = prjGenerator.createProject(prjDirFile, prjName);
|
||||
|
||||
FileObject projectDirFO = h.getProjectDirectory();
|
||||
resultSet.add(projectDirFO);
|
||||
|
||||
Set<Object> defArtifacts = createProjectSpecificArtifacts(projectDirFO);
|
||||
resultSet.addAll(defArtifacts);
|
||||
|
||||
return resultSet;
|
||||
}
|
||||
|
||||
private FileObject copyResource(FileObject dirFO, String name, String resourcePath) throws IOException {
|
||||
FileObject dataFO = null;
|
||||
FileLock outLock = null;
|
||||
OutputStream outS = null;
|
||||
InputStream inS = null;
|
||||
|
||||
try {
|
||||
inS = this.getClass().getResourceAsStream(resourcePath);
|
||||
dataFO = FileUtil.createData(dirFO, name);
|
||||
outLock = dataFO.lock();
|
||||
outS = dataFO.getOutputStream(outLock);
|
||||
FileUtil.copy(inS, outS);
|
||||
} catch (Exception ex) {
|
||||
ex.printStackTrace();
|
||||
} finally {
|
||||
if (inS != null) {
|
||||
try {
|
||||
inS.close();
|
||||
} catch (Exception ex) {
|
||||
//ingore
|
||||
}
|
||||
}
|
||||
if (outS != null) {
|
||||
try {
|
||||
outS.close();
|
||||
} catch (Exception ex) {
|
||||
//ingore
|
||||
}
|
||||
}
|
||||
if (outLock != null) {
|
||||
outLock.releaseLock();
|
||||
}
|
||||
}
|
||||
return dataFO;
|
||||
}
|
||||
|
||||
protected Set<Object> createProjectSpecificArtifacts(FileObject projectDirFO) throws IOException {
|
||||
Set<Object> resultSet = new LinkedHashSet<Object>();
|
||||
//TODO: create any default service unit artifacts needed.
|
||||
try {
|
||||
|
||||
FileObject srcDirFO = projectDirFO.getFileObject(SEPluginProjectProperties.SRC_DIR_VALUE);
|
||||
resultSet.add(srcDirFO);
|
||||
|
||||
// create service unit jbi descriptor
|
||||
FileObject metaInfDirFO = FileUtil.createFolder(srcDirFO, "META-INF");
|
||||
FileObject jbiXmlFO = copyResource(metaInfDirFO, "jbi.xml", "resources/jbi.xml");
|
||||
resultSet.add(jbiXmlFO);
|
||||
|
||||
// create any service unit artifacts such as wsdl files and configuration files
|
||||
|
||||
// list of su artifacts to be created from the resources directory
|
||||
String[] suArtifacts = {"xsltmap.properties","goodbye.xsl","hello.xsl","Greetings.wsdl"};
|
||||
|
||||
for (String suArtifact : suArtifacts) {
|
||||
FileObject suArtifactFO = copyResource(srcDirFO, suArtifact, "resources/" + suArtifact);
|
||||
resultSet.add(suArtifactFO);
|
||||
}
|
||||
|
||||
//TODO: add any addtional default service unit artifacts here.
|
||||
// FileObject suArtifactFO = copyResource(srcDirFO, "su-artifact.xml", "resources/su-artifact.xml");
|
||||
// resultSet.add(suArtifactFO);
|
||||
|
||||
} catch (Exception ex) {
|
||||
ex.printStackTrace();
|
||||
}
|
||||
return resultSet;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,93 @@
|
|||
/*
|
||||
* SEPluginProjectWizardPanel.java
|
||||
*/
|
||||
package net.openesb.component.${artifactId}.project.wizard;
|
||||
|
||||
import java.awt.Component;
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
import java.util.Set;
|
||||
import javax.swing.event.ChangeEvent;
|
||||
import javax.swing.event.ChangeListener;
|
||||
import org.openide.WizardDescriptor;
|
||||
import org.openide.WizardValidationException;
|
||||
import org.openide.util.HelpCtx;
|
||||
import org.openide.util.NbBundle;
|
||||
|
||||
/**
|
||||
* Panel just asking for basic info.
|
||||
*/
|
||||
public class SEPluginProjectWizardPanel implements WizardDescriptor.Panel,
|
||||
WizardDescriptor.ValidatingPanel, WizardDescriptor.FinishablePanel {
|
||||
|
||||
private WizardDescriptor wizardDescriptor;
|
||||
private SEPluginProjectWizardPanelVisual component;
|
||||
|
||||
/**
|
||||
* Creates a new instance of templateWizardPanel
|
||||
*/
|
||||
public SEPluginProjectWizardPanel() {
|
||||
}
|
||||
|
||||
public Component getComponent() {
|
||||
if (component == null) {
|
||||
component = new SEPluginProjectWizardPanelVisual(this);
|
||||
component.setName(NbBundle.getMessage(SEPluginProjectWizardPanel.class, "LBL_CreateProjectStep"));
|
||||
}
|
||||
return component;
|
||||
}
|
||||
|
||||
public HelpCtx getHelp() {
|
||||
return new HelpCtx(SEPluginProjectWizardPanel.class);
|
||||
}
|
||||
|
||||
public boolean isValid() {
|
||||
getComponent();
|
||||
return component.valid(wizardDescriptor);
|
||||
}
|
||||
private final Set/*<ChangeListener>*/ listeners = new HashSet(1); // or can use ChangeSupport in NB 6.0
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public final void addChangeListener(ChangeListener l) {
|
||||
synchronized (listeners) {
|
||||
listeners.add(l);
|
||||
}
|
||||
}
|
||||
|
||||
public final void removeChangeListener(ChangeListener l) {
|
||||
synchronized (listeners) {
|
||||
listeners.remove(l);
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
protected final void fireChangeEvent() {
|
||||
Iterator it;
|
||||
synchronized (listeners) {
|
||||
it = new HashSet(listeners).iterator();
|
||||
}
|
||||
ChangeEvent ev = new ChangeEvent(this);
|
||||
while (it.hasNext()) {
|
||||
((ChangeListener) it.next()).stateChanged(ev);
|
||||
}
|
||||
}
|
||||
|
||||
public void readSettings(Object settings) {
|
||||
wizardDescriptor = (WizardDescriptor) settings;
|
||||
component.read(wizardDescriptor);
|
||||
}
|
||||
|
||||
public void storeSettings(Object settings) {
|
||||
WizardDescriptor d = (WizardDescriptor) settings;
|
||||
component.store(d);
|
||||
}
|
||||
|
||||
public boolean isFinishPanel() {
|
||||
return true;
|
||||
}
|
||||
|
||||
public void validate() throws WizardValidationException {
|
||||
getComponent();
|
||||
component.validate(wizardDescriptor);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,120 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
|
||||
<Form version="1.3" maxVersion="1.3" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
|
||||
<AuxValues>
|
||||
<AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/>
|
||||
<AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/>
|
||||
<AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="true"/>
|
||||
<AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="2"/>
|
||||
<AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
|
||||
<AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
|
||||
</AuxValues>
|
||||
|
||||
<Layout>
|
||||
<DimensionLayout dim="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" attributes="0">
|
||||
<EmptySpace min="-2" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="projectNameLabel" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="projectLocationLabel" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="createdFolderLabel" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace min="-2" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="projectNameTextField" alignment="1" pref="191" max="32767" attributes="0"/>
|
||||
<Component id="projectLocationTextField" alignment="1" pref="191" max="32767" attributes="0"/>
|
||||
<Component id="createdFolderTextField" alignment="1" pref="191" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace min="-2" max="-2" attributes="0"/>
|
||||
<Component id="browseButton" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
<DimensionLayout dim="1">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="projectNameLabel" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="projectNameTextField" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="projectLocationLabel" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="projectLocationTextField" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="browseButton" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="createdFolderLabel" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="createdFolderTextField" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace pref="213" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
</Layout>
|
||||
<SubComponents>
|
||||
<Component class="javax.swing.JLabel" name="projectNameLabel">
|
||||
<Properties>
|
||||
<Property name="labelFor" type="java.awt.Component" editor="org.netbeans.modules.form.ComponentChooserEditor">
|
||||
<ComponentRef name="projectNameTextField"/>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="net/openesb/component/${artifactId}/project/wizard/Bundle.properties" key="LBL_ProjectName" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<AuxValues>
|
||||
<AuxValue name="generateMnemonicsCode" type="java.lang.Boolean" value="true"/>
|
||||
</AuxValues>
|
||||
</Component>
|
||||
<Component class="javax.swing.JTextField" name="projectNameTextField">
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="projectLocationLabel">
|
||||
<Properties>
|
||||
<Property name="labelFor" type="java.awt.Component" editor="org.netbeans.modules.form.ComponentChooserEditor">
|
||||
<ComponentRef name="projectLocationTextField"/>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="net/openesb/component/${artifactId}/project/wizard/Bundle.properties" key="LBL_ProjectLocation" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<AuxValues>
|
||||
<AuxValue name="generateMnemonicsCode" type="java.lang.Boolean" value="true"/>
|
||||
</AuxValues>
|
||||
</Component>
|
||||
<Component class="javax.swing.JTextField" name="projectLocationTextField">
|
||||
</Component>
|
||||
<Component class="javax.swing.JButton" name="browseButton">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="net/openesb/component/${artifactId}/project/wizard/Bundle.properties" key="LBL_Browse" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
<Property name="actionCommand" type="java.lang.String" value="BROWSE"/>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="browseButtonActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="createdFolderLabel">
|
||||
<Properties>
|
||||
<Property name="labelFor" type="java.awt.Component" editor="org.netbeans.modules.form.ComponentChooserEditor">
|
||||
<ComponentRef name="createdFolderTextField"/>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="net/openesb/component/${artifactId}/project/wizard/Bundle.properties" key="LBL_ProjectFolder" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JTextField" name="createdFolderTextField">
|
||||
<Properties>
|
||||
<Property name="editable" type="boolean" value="false"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Form>
|
|
@ -0,0 +1,259 @@
|
|||
/*
|
||||
* SEPluginProjectWizardPanelVisual.java
|
||||
*/
|
||||
package net.openesb.component.${artifactId}.project.wizard;
|
||||
|
||||
import java.io.File;
|
||||
import javax.swing.JFileChooser;
|
||||
import javax.swing.JPanel;
|
||||
import javax.swing.event.DocumentEvent;
|
||||
import javax.swing.event.DocumentListener;
|
||||
import javax.swing.text.Document;
|
||||
import org.netbeans.spi.project.ui.support.ProjectChooser;
|
||||
import org.openide.WizardDescriptor;
|
||||
import org.openide.WizardValidationException;
|
||||
import org.openide.filesystems.FileUtil;
|
||||
|
||||
public class SEPluginProjectWizardPanelVisual extends JPanel implements DocumentListener {
|
||||
|
||||
public static final String PROP_PROJECT_NAME = "projectName";
|
||||
private SEPluginProjectWizardPanel panel;
|
||||
|
||||
public SEPluginProjectWizardPanelVisual(SEPluginProjectWizardPanel panel) {
|
||||
initComponents();
|
||||
this.panel = panel;
|
||||
// Register listener on the textFields to make the automatic updates
|
||||
projectNameTextField.getDocument().addDocumentListener(this);
|
||||
projectLocationTextField.getDocument().addDocumentListener(this);
|
||||
}
|
||||
|
||||
public String getProjectName() {
|
||||
return this.projectNameTextField.getText();
|
||||
}
|
||||
|
||||
/**
|
||||
* This method is called from within the constructor to initialize the form.
|
||||
* WARNING: Do NOT modify this code. The content of this method is always
|
||||
* regenerated by the Form Editor.
|
||||
*/
|
||||
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
|
||||
private void initComponents() {
|
||||
|
||||
projectNameLabel = new javax.swing.JLabel();
|
||||
projectNameTextField = new javax.swing.JTextField();
|
||||
projectLocationLabel = new javax.swing.JLabel();
|
||||
projectLocationTextField = new javax.swing.JTextField();
|
||||
browseButton = new javax.swing.JButton();
|
||||
createdFolderLabel = new javax.swing.JLabel();
|
||||
createdFolderTextField = new javax.swing.JTextField();
|
||||
|
||||
projectNameLabel.setLabelFor(projectNameTextField);
|
||||
org.openide.awt.Mnemonics.setLocalizedText(projectNameLabel, org.openide.util.NbBundle.getMessage(SEPluginProjectWizardPanelVisual.class, "LBL_ProjectName")); // NOI18N
|
||||
|
||||
projectLocationLabel.setLabelFor(projectLocationTextField);
|
||||
org.openide.awt.Mnemonics.setLocalizedText(projectLocationLabel, org.openide.util.NbBundle.getMessage(SEPluginProjectWizardPanelVisual.class, "LBL_ProjectLocation")); // NOI18N
|
||||
|
||||
org.openide.awt.Mnemonics.setLocalizedText(browseButton, org.openide.util.NbBundle.getMessage(SEPluginProjectWizardPanelVisual.class, "LBL_Browse")); // NOI18N
|
||||
browseButton.setActionCommand("BROWSE");
|
||||
browseButton.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
browseButtonActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
createdFolderLabel.setLabelFor(createdFolderTextField);
|
||||
org.openide.awt.Mnemonics.setLocalizedText(createdFolderLabel, org.openide.util.NbBundle.getMessage(SEPluginProjectWizardPanelVisual.class, "LBL_ProjectFolder")); // NOI18N
|
||||
|
||||
createdFolderTextField.setEditable(false);
|
||||
|
||||
org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(this);
|
||||
this.setLayout(layout);
|
||||
layout.setHorizontalGroup(
|
||||
layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
|
||||
.add(layout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
|
||||
.add(projectNameLabel)
|
||||
.add(projectLocationLabel)
|
||||
.add(createdFolderLabel))
|
||||
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
|
||||
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
|
||||
.add(org.jdesktop.layout.GroupLayout.TRAILING, projectNameTextField, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 191, Short.MAX_VALUE)
|
||||
.add(org.jdesktop.layout.GroupLayout.TRAILING, projectLocationTextField, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 191, Short.MAX_VALUE)
|
||||
.add(org.jdesktop.layout.GroupLayout.TRAILING, createdFolderTextField, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 191, Short.MAX_VALUE))
|
||||
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
|
||||
.add(browseButton)
|
||||
.addContainerGap())
|
||||
);
|
||||
layout.setVerticalGroup(
|
||||
layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
|
||||
.add(layout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
|
||||
.add(projectNameLabel)
|
||||
.add(projectNameTextField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
|
||||
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
|
||||
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
|
||||
.add(projectLocationLabel)
|
||||
.add(projectLocationTextField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
|
||||
.add(browseButton))
|
||||
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
|
||||
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
|
||||
.add(createdFolderLabel)
|
||||
.add(createdFolderTextField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
|
||||
.addContainerGap(213, Short.MAX_VALUE))
|
||||
);
|
||||
}// </editor-fold>//GEN-END:initComponents
|
||||
|
||||
private void browseButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_browseButtonActionPerformed
|
||||
String command = evt.getActionCommand();
|
||||
if ("BROWSE".equals(command)) {
|
||||
JFileChooser chooser = new JFileChooser();
|
||||
FileUtil.preventFileChooserSymlinkTraversal(chooser, null);
|
||||
chooser.setDialogTitle("Select Project Location");
|
||||
chooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
|
||||
String path = this.projectLocationTextField.getText();
|
||||
if (path.length() > 0) {
|
||||
File f = new File(path);
|
||||
if (f.exists()) {
|
||||
chooser.setSelectedFile(f);
|
||||
}
|
||||
}
|
||||
if (JFileChooser.APPROVE_OPTION == chooser.showOpenDialog(this)) {
|
||||
File projectDir = chooser.getSelectedFile();
|
||||
projectLocationTextField.setText(FileUtil.normalizeFile(projectDir).getAbsolutePath());
|
||||
}
|
||||
panel.fireChangeEvent();
|
||||
}
|
||||
|
||||
}//GEN-LAST:event_browseButtonActionPerformed
|
||||
// Variables declaration - do not modify//GEN-BEGIN:variables
|
||||
private javax.swing.JButton browseButton;
|
||||
private javax.swing.JLabel createdFolderLabel;
|
||||
private javax.swing.JTextField createdFolderTextField;
|
||||
private javax.swing.JLabel projectLocationLabel;
|
||||
private javax.swing.JTextField projectLocationTextField;
|
||||
private javax.swing.JLabel projectNameLabel;
|
||||
private javax.swing.JTextField projectNameTextField;
|
||||
// End of variables declaration//GEN-END:variables
|
||||
|
||||
public void addNotify() {
|
||||
super.addNotify();
|
||||
//same problem as in 31086, initial focus on Cancel button
|
||||
projectNameTextField.requestFocus();
|
||||
}
|
||||
|
||||
boolean valid(WizardDescriptor wizardDescriptor) {
|
||||
|
||||
if (projectNameTextField.getText().length() == 0) {
|
||||
wizardDescriptor.putProperty("WizardPanel_errorMessage",
|
||||
"Project Name is not a valid folder name.");
|
||||
return false; // Display name not specified
|
||||
}
|
||||
File f = FileUtil.normalizeFile(new File(projectLocationTextField.getText()).getAbsoluteFile());
|
||||
if (!f.isDirectory()) {
|
||||
String message = "Project Folder is not a valid path.";
|
||||
wizardDescriptor.putProperty("WizardPanel_errorMessage", message);
|
||||
return false;
|
||||
}
|
||||
final File destFolder = FileUtil.normalizeFile(new File(createdFolderTextField.getText()).getAbsoluteFile());
|
||||
|
||||
File projLoc = destFolder;
|
||||
while (projLoc != null && !projLoc.exists()) {
|
||||
projLoc = projLoc.getParentFile();
|
||||
}
|
||||
if (projLoc == null || !projLoc.canWrite()) {
|
||||
wizardDescriptor.putProperty("WizardPanel_errorMessage",
|
||||
"Project Folder cannot be created.");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (FileUtil.toFileObject(projLoc) == null) {
|
||||
String message = "Project Folder is not a valid path.";
|
||||
wizardDescriptor.putProperty("WizardPanel_errorMessage", message);
|
||||
return false;
|
||||
}
|
||||
|
||||
File[] kids = destFolder.listFiles();
|
||||
if (destFolder.exists() && kids != null && kids.length > 0) {
|
||||
// Folder exists and is not empty
|
||||
wizardDescriptor.putProperty("WizardPanel_errorMessage",
|
||||
"Project Folder already exists and is not empty.");
|
||||
return false;
|
||||
}
|
||||
wizardDescriptor.putProperty("WizardPanel_errorMessage", "");
|
||||
return true;
|
||||
}
|
||||
|
||||
void store(WizardDescriptor d) {
|
||||
String name = projectNameTextField.getText().trim();
|
||||
String folder = createdFolderTextField.getText().trim();
|
||||
|
||||
d.putProperty("projdir", new File(folder));
|
||||
d.putProperty("name", name);
|
||||
}
|
||||
|
||||
void read(WizardDescriptor settings) {
|
||||
File projectLocation = (File) settings.getProperty(SEPluginProjectWizardIterator.PROJECT_DIR);
|
||||
if (projectLocation == null || projectLocation.getParentFile() == null || !projectLocation.getParentFile().isDirectory()) {
|
||||
projectLocation = ProjectChooser.getProjectsFolder();
|
||||
} else {
|
||||
projectLocation = projectLocation.getParentFile();
|
||||
}
|
||||
this.projectLocationTextField.setText(projectLocation.getAbsolutePath());
|
||||
|
||||
String projectName = (String) settings.getProperty(SEPluginProjectWizardIterator.PROJECT_NAME);
|
||||
if (projectName == null) {
|
||||
projectName = SEPluginProjectWizardIterator.DEF_PROJECT_NAME_VALUE;
|
||||
}
|
||||
this.projectNameTextField.setText(projectName);
|
||||
this.projectNameTextField.selectAll();
|
||||
}
|
||||
|
||||
void validate(WizardDescriptor d) throws WizardValidationException {
|
||||
// nothing to validate
|
||||
}
|
||||
|
||||
// Implementation of DocumentListener --------------------------------------
|
||||
public void changedUpdate(DocumentEvent e) {
|
||||
updateTexts(e);
|
||||
if (this.projectNameTextField.getDocument() == e.getDocument()) {
|
||||
firePropertyChange(PROP_PROJECT_NAME, null, this.projectNameTextField.getText());
|
||||
}
|
||||
}
|
||||
|
||||
public void insertUpdate(DocumentEvent e) {
|
||||
updateTexts(e);
|
||||
if (this.projectNameTextField.getDocument() == e.getDocument()) {
|
||||
firePropertyChange(PROP_PROJECT_NAME, null, this.projectNameTextField.getText());
|
||||
}
|
||||
}
|
||||
|
||||
public void removeUpdate(DocumentEvent e) {
|
||||
updateTexts(e);
|
||||
if (this.projectNameTextField.getDocument() == e.getDocument()) {
|
||||
firePropertyChange(PROP_PROJECT_NAME, null, this.projectNameTextField.getText());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Handles changes in the Project name and project directory,
|
||||
*/
|
||||
private void updateTexts(DocumentEvent e) {
|
||||
|
||||
Document doc = e.getDocument();
|
||||
|
||||
if (doc == projectNameTextField.getDocument() || doc == projectLocationTextField.getDocument()) {
|
||||
// Change in the project name
|
||||
|
||||
String projectName = projectNameTextField.getText();
|
||||
String projectFolder = projectLocationTextField.getText();
|
||||
|
||||
//if (projectFolder.trim().length() == 0 || projectFolder.equals(oldName)) {
|
||||
createdFolderTextField.setText(projectFolder + File.separatorChar + projectName);
|
||||
//}
|
||||
|
||||
}
|
||||
panel.fireChangeEvent(); // Notify that the panel changed
|
||||
}
|
||||
}
|
|
@ -0,0 +1,89 @@
|
|||
<definitions name="Greetings"
|
||||
targetNamespace="http://www.sun.com/jbi/examples/sample-service/greetings/"
|
||||
xmlns:tns="http://www.sun.com/jbi/examples/sample-service/greetings/"
|
||||
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns="http://schemas.xmlsoap.org/wsdl/"
|
||||
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
|
||||
xmlns:greet="http://www.sun.com/jbi/examples/sample-service/greetings/types/" >
|
||||
|
||||
<types>
|
||||
<xsd:schema
|
||||
targetNamespace="http://www.sun.com/jbi/examples/sample-service/greetings/types/"
|
||||
xmlns:greet="http://www.sun.com/jbi/examples/sample-service/greetings/types/"
|
||||
elementFormDefault="qualified" >
|
||||
<xsd:element name="user" type="greet:UserType"/>
|
||||
<xsd:element name="hello" type="greet:GreetingsType"/>
|
||||
<xsd:element name="goodbye" type="greet:GreetingsType"/>
|
||||
<xsd:complexType name="UserType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="first-name" type="xsd:string"/>
|
||||
<xsd:element name="last-name" type="xsd:string"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="GreetingsType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="first-name" type="xsd:string"/>
|
||||
<xsd:element name="last-name" type="xsd:string"/>
|
||||
<xsd:element name="greetings" type="xsd:string"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
</xsd:schema>
|
||||
</types>
|
||||
|
||||
<message name="userMessage">
|
||||
<part name="userPart" element="greet:user" />
|
||||
</message>
|
||||
|
||||
<message name="helloMessage">
|
||||
<part name="helloPart" element="greet:hello" />
|
||||
</message>
|
||||
|
||||
<message name="goodbyeUserMessage">
|
||||
<part name="userPart" type="greet:UserType" />
|
||||
</message>
|
||||
|
||||
<message name="goodbyeMessage">
|
||||
<part name="goodbyePart" element="greet:goodbye" />
|
||||
</message>
|
||||
|
||||
|
||||
<portType name="greetings">
|
||||
<operation name="sayHello">
|
||||
<input name="sayHelloInput" message="tns:userMessage"></input>
|
||||
<output name="sayHelloOutput" message="tns:helloMessage"></output>
|
||||
</operation>
|
||||
<operation name="sayGoodbye">
|
||||
<input name="sayGoodbyeInput" message="tns:goodbyeUserMessage"></input>
|
||||
<output name="sayGoodbyeOutput" message="tns:goodbyeMessage"></output>
|
||||
</operation>
|
||||
</portType>
|
||||
|
||||
<binding name="Binding" type="tns:greetings">
|
||||
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
|
||||
<operation name="sayHello">
|
||||
<soap:operation soapAction="sayHello" />
|
||||
<input name="sayHelloInput">
|
||||
<soap:body use="literal"/>
|
||||
</input>
|
||||
<output name="sayHelloOutput">
|
||||
<soap:body use="literal"/>
|
||||
</output>
|
||||
</operation>
|
||||
<operation name="sayGoodbye">
|
||||
<soap:operation soapAction="sayGoodbye" />
|
||||
<input name="sayGoodbyeInput">
|
||||
<soap:body use="literal"/>
|
||||
</input>
|
||||
<output name="sayGoodbyeOutput">
|
||||
<soap:body use="literal"/>
|
||||
</output>
|
||||
</operation>
|
||||
</binding>
|
||||
|
||||
<service name="greetService">
|
||||
<port name="port" binding="tns:Binding">
|
||||
<soap:address location="http://localhost:12010//ServiceEngine/greetings"/>
|
||||
</port>
|
||||
</service>
|
||||
|
||||
</definitions>
|
|
@ -0,0 +1,31 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<xsl:stylesheet version="1.0"
|
||||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
xmlns:jbiwrp="http://java.sun.com/xml/ns/jbi/wsdl-11-wrapper"
|
||||
xmlns:greet="http://www.sun.com/jbi/examples/sample-service/greetings/types/"
|
||||
>
|
||||
<xsl:output method="xml" indent="yes"/>
|
||||
|
||||
<xsl:template match="@*|node()">
|
||||
<xsl:copy>
|
||||
<xsl:apply-templates select="@*|node()"/>
|
||||
</xsl:copy>
|
||||
</xsl:template>
|
||||
<!-- locate value element and replace the text with greetings -->
|
||||
<xsl:template match="jbiwrp:part">
|
||||
<jbiwrp:part>
|
||||
<greet:goodbye>
|
||||
<greet:first-name>
|
||||
<xsl:value-of select="greet:first-name"/>
|
||||
</greet:first-name>
|
||||
<greet:last-name>
|
||||
<xsl:value-of select="greet:last-name"/>
|
||||
</greet:last-name>
|
||||
<greet:greetings>Goodbye
|
||||
<xsl:value-of select="greet:first-name"/>! Have a great time.
|
||||
</greet:greetings>
|
||||
</greet:goodbye>
|
||||
</jbiwrp:part>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<xsl:stylesheet version="1.0"
|
||||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
xmlns:jbiwrp="http://java.sun.com/xml/ns/jbi/wsdl-11-wrapper"
|
||||
xmlns:greet="http://www.sun.com/jbi/examples/sample-service/greetings/types/"
|
||||
>
|
||||
<xsl:output method="xml" indent="yes"/>
|
||||
|
||||
<xsl:template match="@*|node()">
|
||||
<xsl:copy>
|
||||
<xsl:apply-templates select="@*|node()"/>
|
||||
</xsl:copy>
|
||||
</xsl:template>
|
||||
<xsl:template match="greet:user">
|
||||
<greet:hello>
|
||||
<greet:first-name>
|
||||
<xsl:value-of select="greet:first-name"/>
|
||||
</greet:first-name>
|
||||
<greet:last-name>
|
||||
<xsl:value-of select="greet:last-name"/>
|
||||
</greet:last-name>
|
||||
<greet:greetings>Hello
|
||||
<xsl:value-of select="greet:last-name"/>!
|
||||
</greet:greetings>
|
||||
</greet:hello>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>
|
||||
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
<?xml version='1.0' encoding="UTF-8" standalone="yes" ?>
|
||||
<jbi version="1.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns="http://java.sun.com/xml/ns/jbi"
|
||||
xmlns:greet="http://www.sun.com/jbi/examples/sample-service/greetings/"
|
||||
>
|
||||
<services binding-component="false">
|
||||
<provides service-name="greet:greetService"
|
||||
interface-name="greet:greetings"
|
||||
endpoint-name="${artifactId}_JBIPort">
|
||||
</provides>
|
||||
</services>
|
||||
</jbi>
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
# properties will be used to find the xslt file that will be used for invoking a
|
||||
# service operation.
|
||||
# The "xsltmap.properties" file should contain two types of properties
|
||||
# 1. for namespace prefix to namespaceURI map that starts with "xmlns." prefix like
|
||||
# "xmlns.tns-prefix=http://www.sun.com/jbi/examples/sample-service/echo"
|
||||
# 2. a service description to xslt file properties with syntax like
|
||||
# "{tns-prefix}service-name=xslt_file_name" and
|
||||
# "{tns-prefix}service-name.{tns-prefix}operation-name=xslt_file_name" and
|
||||
# "{tns-prefix}service-name.{tns-prefix}interface-name.operation-name=xslt_file_name" .
|
||||
# the service description property is a "." delimited tokens that represents
|
||||
# a serive or interface qname and a operation name. To locate xslt file either with
|
||||
# service qname or service qname and operaton or serivice qname and interface qname
|
||||
# and operation, all the three properties specified above should be there for each xslt file.
|
||||
#
|
||||
|
||||
xmlns.greet1=http://www.sun.com/jbi/examples/sample-service/greetings/
|
||||
xmlns.greet2=http://www.sun.com/jbi/examples/sample-service/greetings/
|
||||
xmlns.greettypes=http://www.sun.com/jbi/examples/sample-service/greetings/types
|
||||
# just service level default settings
|
||||
{greet2}greetService=hello.xsl
|
||||
# service and operation
|
||||
{greet2}greetService.{greet1}sayHello=hello.xsl
|
||||
# service, interface, operation
|
||||
{greet2}greetService.{greet1}greetings.sayHello=hello.xsl
|
||||
# service and operation
|
||||
{greet2}greetService.{greet1}sayGoodbye=goodbye.xsl
|
||||
# service, interface, operation
|
||||
{greet2}greetService.{greet1}greetings.sayGoodbye=goodbye.xsl
|
|
@ -0,0 +1,3 @@
|
|||
#set( $symbol_pound = '#' )
|
||||
#set( $symbol_dollar = '$' )
|
||||
#set( $symbol_escape = '\' )
|
|
@ -0,0 +1,132 @@
|
|||
#set( $symbol_pound = '#' )
|
||||
#set( $symbol_dollar = '$' )
|
||||
#set( $symbol_escape = '\' )
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
*** GENERATED FROM netbeans IDE project - DO NOT EDIT ***
|
||||
*** EDIT ./m2nbbuild.xml INSTEAD ***
|
||||
-->
|
||||
<!-- NOTE: this file is only used in m2nbbuild.xml to build the netbeans project
|
||||
from Maven2 build lifecycle. It will be re-generated/updated from netbeans IDE
|
||||
when the project is opened in the IDE.
|
||||
|
||||
-->
|
||||
<project name="m2nbbuild-impl" default="package" basedir="."
|
||||
xmlns:mvn2nb ="http://www.netbeans.org/ns/mvn2nb/1"
|
||||
xmlns:mvn="urn:maven-artifact-ant" >
|
||||
<description>This project compile, package and test the JBI Components when invoked from Maven2.</description>
|
||||
|
||||
<target name="default" depends="test, package" description="Build and test whole project."/>
|
||||
|
||||
<target name="-pre-init">
|
||||
<!-- Empty placeholder for easier customization. -->
|
||||
<!-- You can override this target in the ./m2nbbuild.xml file. -->
|
||||
</target>
|
||||
|
||||
<target name="-do-init" depends="-pre-init" >
|
||||
<!-- load maven-ant-tasks-2.0.7 task definitions -->
|
||||
<typedef resource="org/apache/maven/artifact/ant/antlib.xml" uri="urn:maven-artifact-ant" classpathref="maven.runtime.classpath"/>
|
||||
<!-- load this project's pom.xml -->
|
||||
<mvn:pom file="pom.xml" id="mvn.prj"/>
|
||||
<!-- load this project's netbeans project properties -->
|
||||
<property file="nbproject/project.properties" prefix="nb.prj"/>
|
||||
<!-- maven distribution jar file path -->
|
||||
<property name="mvn.prj.dist.jar.resolved" location="${symbol_dollar}{mvn.prj.build.directory}/${symbol_dollar}{mvn.prj.build.finalName}.${symbol_dollar}{mvn.prj.packaging}" />
|
||||
<!-- netbeans project distribution jar file path -->
|
||||
<property name="nb.prj.dist.jar.resolved" location="${symbol_dollar}{nb.prj.dist.jar}" />
|
||||
<!--
|
||||
this macro executes a particular target in the netbeans project build
|
||||
script as if it is invoked from the command line. It sets the user.properties.file
|
||||
to the m2nbbuild.properties which will have the required build properties set for
|
||||
building the netbeans project from command line.
|
||||
The content of the m2nbbuild.properties resolves any properties that will be passed
|
||||
through build.properties in the netbeans user.dir when the project is executed from
|
||||
inside the IDE.
|
||||
Users can set all the libraries classpaths w.r.t local maven repository in the
|
||||
m2nbbuild.properties
|
||||
-->
|
||||
<macrodef name="nbbuild" uri="http://www.netbeans.org/ns/mvn2nb/1">
|
||||
<attribute name="target" default="default"/>
|
||||
<sequential>
|
||||
<echo message="Executing netbeans build target @{target}"/>
|
||||
<ant inheritAll="false" inheritRefs="false" target="@{target}" >
|
||||
<property name="user.properties.file" location="m2nbbuild.properties" />
|
||||
<property name="m2nbbuild.setup" value="true" />
|
||||
</ant>
|
||||
</sequential>
|
||||
</macrodef>
|
||||
|
||||
</target>
|
||||
|
||||
<target name="-init-check" depends="-pre-init, -do-init">
|
||||
</target>
|
||||
|
||||
<target name="-post-init">
|
||||
<!-- Empty placeholder for easier customization. -->
|
||||
<!-- You can override this target in the ./m2nbbuild.xml file. -->
|
||||
</target>
|
||||
|
||||
<!-- initilizes the build settings -->
|
||||
<target name="init"
|
||||
depends="-pre-init, -do-init, -post-init, -init-check" >
|
||||
</target>
|
||||
|
||||
<target name="compile" depends="init"
|
||||
description="compiles jbi component source" >
|
||||
<mvn2nb:nbbuild target="compile" />
|
||||
</target>
|
||||
|
||||
<!-- This execution cycle is added for organizing package structure as per new
|
||||
service engine user is creating from archtype -->
|
||||
<target name="postArchTypeGen" depends="init" description="Post arch type generate task">
|
||||
<mvn2nb:nbbuild target="postArchTypeGen" />
|
||||
</target>
|
||||
|
||||
<target name="package" depends="init"
|
||||
description="compile and packages jbi component sources into installer zip archive file" >
|
||||
<mvn2nb:nbbuild target="jar" />
|
||||
<copy overwrite="true"
|
||||
file="${symbol_dollar}{nb.prj.dist.jar.resolved}"
|
||||
toFile="${symbol_dollar}{mvn.prj.dist.jar.resolved}" />
|
||||
</target>
|
||||
|
||||
<target name="-do-clean" depends="init">
|
||||
<mvn2nb:nbbuild target="clean" />
|
||||
</target>
|
||||
|
||||
<target name="-post-clean">
|
||||
<!-- Empty placeholder for easier customization. -->
|
||||
<!-- You can override this target in the ../build.xml file. -->
|
||||
</target>
|
||||
|
||||
<target name="clean" depends="init, -do-clean, -post-clean" description="clean up" />
|
||||
|
||||
<!-- testing the JBI Component -->
|
||||
|
||||
<target name="test-compile" depends="init"
|
||||
description="compile the test source " >
|
||||
<mvn2nb:nbbuild target="compile-test" />
|
||||
</target>
|
||||
|
||||
<!-- run junit tests -->
|
||||
|
||||
<target name="test" depends="init"
|
||||
description="run unit tests on the jbi component" >
|
||||
<!--
|
||||
<mvn2nb:nbbuild target="test" />
|
||||
-->
|
||||
</target>
|
||||
|
||||
<!-- run integration tests -->
|
||||
|
||||
<target name="integration-test" depends="init"
|
||||
description="run integration tests on the jbi component" >
|
||||
<!--
|
||||
<mvn2nb:nbbuild target="integration-test" />
|
||||
-->
|
||||
<mvn2nb:nbbuild target="install" />
|
||||
<mvn2nb:nbbuild target="test" />
|
||||
<mvn2nb:nbbuild target="uninstall" />
|
||||
</target>
|
||||
|
||||
</project>
|
|
@ -0,0 +1,48 @@
|
|||
#set( $symbol_pound = '#' )
|
||||
#set( $symbol_dollar = '$' )
|
||||
#set( $symbol_escape = '\' )
|
||||
${symbol_pound} build properties file to set/override the properties of the netbeans project
|
||||
${symbol_pound} build properties when the netbeans build is called from the maven build lifecycle.
|
||||
${symbol_pound} Netbeans project when build from the IDE, uses a build.properties from the user.dir
|
||||
${symbol_pound} of the Netbeans IDE to resolve some of the properties used in the project such as
|
||||
${symbol_pound} the libraries classpath.
|
||||
${symbol_pound} When invoking the Netbeans project build from maven, this build.properties file
|
||||
${symbol_pound} is not available. So, you can add the properties defined in ide build properties
|
||||
${symbol_pound} that this project uses here.
|
||||
${symbol_pound}
|
||||
|
||||
${symbol_pound} default local repository settings. If the repository location is different
|
||||
${symbol_pound} -D command line option should override this (e.g. mvn -Dmaven.repo.local=/my/m2/repository
|
||||
maven.repo.local=${symbol_dollar}{user.home}/.m2/repository
|
||||
${symbol_pound} begin jbi admin settings
|
||||
${symbol_pound} set the below properties if you want to override the properties from nbproject/project.properties
|
||||
${symbol_pound} that sets the application server admin settings.
|
||||
${symbol_pound}
|
||||
${symbol_pound} jbi.as.home=C:/Sun/glassfish-v2-b58g
|
||||
${symbol_pound} jbi.host=localhost
|
||||
${symbol_pound} jbi.port=4848
|
||||
${symbol_pound} jbi.username=admin
|
||||
${symbol_pound} jbi.password=adminadmin
|
||||
${symbol_pound} end jbi admin settings
|
||||
${symbol_pound}
|
||||
|
||||
${symbol_pound} classpath settings
|
||||
junit.ant.task.classpath=${symbol_dollar}{maven.repo.local}/ant/ant-junit/1.6.5/ant-junit-1.6.5.jar
|
||||
junit.runtime.classpath=${symbol_dollar}{maven.repo.local}/junit/junit/3.8.2/junit-3.8.2.jar
|
||||
libs.junit.classpath=${symbol_dollar}{junit.runtime.classpath}:${symbol_dollar}{junit.ant.task.classpath}
|
||||
libs.jbi-cdk-ant-tasks.classpath=${symbol_dollar}{maven.repo.local}/open-esb/jbi-cdk/jbi-cdk-ant-tasks/${version}/jbi-cdk-ant-tasks-${version}.jar
|
||||
|
||||
libs.jbi.classpath=${symbol_dollar}{maven.repo.local}/open-esb/jbi/1.0/jbi-1.0.jar
|
||||
libs.wsdl4j.162.classpath=${symbol_dollar}{maven.repo.local}/wsdl4j/wsdl4j/1.6.2/wsdl4j-1.6.2.jar
|
||||
${symbol_pound} libs.jaxws21.classpath=${symbol_dollar}{jbi.as.home}/lib/javaee.jar:${symbol_dollar}{jbi.as.home}/lib/webservices-rt.jar
|
||||
libs.jaxws21.classpath=${symbol_escape}
|
||||
${symbol_dollar}{maven.repo.local}/javax/activation/activation/1.1/activation-1.1.jar:${symbol_escape}
|
||||
${symbol_dollar}{maven.repo.local}/javax/xml/soap/saaj-api/1.3/saaj-api-1.3.jar:${symbol_escape}
|
||||
${symbol_dollar}{maven.repo.local}/javax/xml/ws/jaxws-api/2.1/jaxws-api-2.1.jar:${symbol_escape}
|
||||
${symbol_dollar}{maven.repo.local}/com/sun/xml/messaging/saaj/saaj-impl/1.3/saaj-impl-1.3.jar:${symbol_escape}
|
||||
${symbol_dollar}{maven.repo.local}/com/sun/xml/ws/jaxws-rt/2.1.2/jaxws-rt-2.1.2.jar
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,37 @@
|
|||
#set( $symbol_pound = '#' )
|
||||
#set( $symbol_dollar = '$' )
|
||||
#set( $symbol_escape = '\' )
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- NOTE: this file is only used from pom.xml to build the netbeans project
|
||||
from Maven2 build lifecycle. -->
|
||||
<!-- You may freely edit this file. See commented blocks below for -->
|
||||
<!-- some examples of how to customize the build. -->
|
||||
<project name="m2nbbuild" default="default" basedir=".">
|
||||
<description>This project compile, package and test the JBI Components when invoked from Maven2.</description>
|
||||
<import file="m2nbbuild-impl.xml"/>
|
||||
<!--
|
||||
|
||||
There exist some targets which are by default empty and which can be
|
||||
used for execution of your tasks. These targets are usually executed
|
||||
before and after some main targets. They are:
|
||||
|
||||
-pre-init: called before initialization of project properties
|
||||
-post-init: called after initialization of project properties
|
||||
-post-clean: called after cleaning build products
|
||||
|
||||
(Targets beginning with '-' are not intended to be called on their own.)
|
||||
|
||||
Example of updating the n2nbbuild.properties file before lauching the
|
||||
netbeans build to set the user level properties like jbi.as.home etc from
|
||||
the environment variables could look like this:
|
||||
|
||||
<target name="-pre-init">
|
||||
<property environment="env"/>
|
||||
<propertyfile file="m2build.properties" >
|
||||
<entry key="jbi.as.home" value="${symbol_dollar}{env.AS_INSTALL}"/>
|
||||
</propertyfile>
|
||||
</target>
|
||||
|
||||
-->
|
||||
|
||||
</project>
|
|
@ -0,0 +1,574 @@
|
|||
#set( $symbol_pound = '#' )
|
||||
#set( $symbol_dollar = '$' )
|
||||
#set( $symbol_escape = '\' )
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
*** GENERATED FROM project.xml - DO NOT EDIT ***
|
||||
*** EDIT ../build.xml INSTEAD ***
|
||||
|
||||
For the purpose of easier reading the script
|
||||
is divided into following sections:
|
||||
|
||||
- initialization
|
||||
- compilation
|
||||
- jar
|
||||
- execution
|
||||
- debugging
|
||||
- javadoc
|
||||
- junit compilation
|
||||
- junit execution
|
||||
- junit debugging
|
||||
- cleanup
|
||||
|
||||
-->
|
||||
<project name="${artifactId}-impl" default="default" basedir=".." xmlns:jbiproject="http://www.netbeans.org/ns/jbi-component-project/1">
|
||||
<import file="jbiadmin-impl.xml"/>
|
||||
<target name="default" depends="test,jar,javadoc" description="Build and test whole project."/>
|
||||
<!--
|
||||
======================
|
||||
INITIALIZATION SECTION
|
||||
======================
|
||||
-->
|
||||
<target name="-pre-init">
|
||||
<!-- Empty placeholder for easier customization. -->
|
||||
<!-- You can override this target in the ../build.xml file. -->
|
||||
</target>
|
||||
<target name="-init-private" depends="-pre-init">
|
||||
<property file="nbproject/private/private.properties"/>
|
||||
</target>
|
||||
<target name="-init-user" depends="-pre-init,-init-private">
|
||||
<property file="${symbol_dollar}{user.properties.file}"/>
|
||||
<!-- 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"/>
|
||||
</target>
|
||||
<target name="-init-project" depends="-pre-init,-init-private,-init-user">
|
||||
<property file="nbproject/project.properties"/>
|
||||
</target>
|
||||
<target name="-do-init" depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property">
|
||||
<available file="${symbol_dollar}{manifest.file}" property="manifest.available"/>
|
||||
<condition property="manifest.available+main.class">
|
||||
<and>
|
||||
<isset property="manifest.available"/>
|
||||
<isset property="main.class"/>
|
||||
<not>
|
||||
<equals arg1="${symbol_dollar}{main.class}" arg2="" trim="true"/>
|
||||
</not>
|
||||
</and>
|
||||
</condition>
|
||||
<condition property="manifest.available+main.class+mkdist.available">
|
||||
<and>
|
||||
<istrue value="${symbol_dollar}{manifest.available+main.class}"/>
|
||||
<isset property="libs.CopyLibs.classpath"/>
|
||||
</and>
|
||||
</condition>
|
||||
<condition property="have.tests">
|
||||
<or>
|
||||
<available file="${symbol_dollar}{test.src.dir}"/>
|
||||
</or>
|
||||
</condition>
|
||||
<condition property="have.sources">
|
||||
<or>
|
||||
<available file="${symbol_dollar}{src.dir}"/>
|
||||
</or>
|
||||
</condition>
|
||||
<condition property="netbeans.home+have.tests">
|
||||
<and>
|
||||
<isset property="netbeans.home"/>
|
||||
<isset property="have.tests"/>
|
||||
</and>
|
||||
</condition>
|
||||
<condition property="no.javadoc.preview">
|
||||
<isfalse value="${symbol_dollar}{javadoc.preview}"/>
|
||||
</condition>
|
||||
<property name="run.jvmargs" value=""/>
|
||||
<property name="javac.compilerargs" value=""/>
|
||||
<property name="work.dir" value="${symbol_dollar}{basedir}"/>
|
||||
<condition property="no.deps">
|
||||
<and>
|
||||
<istrue value="${symbol_dollar}{no.dependencies}"/>
|
||||
</and>
|
||||
</condition>
|
||||
<property name="javac.debug" value="true"/>
|
||||
<property name="javadoc.preview" value="true"/>
|
||||
</target>
|
||||
<target name="-post-init">
|
||||
<!-- Empty placeholder for easier customization. -->
|
||||
<!-- You can override this target in the ../build.xml file. -->
|
||||
</target>
|
||||
<target name="-init-check" depends="-pre-init,-init-private,-init-user,-init-project,-do-init">
|
||||
<fail unless="src.dir">Must set src.dir</fail>
|
||||
<fail unless="test.src.dir">Must set test.src.dir</fail>
|
||||
<fail unless="build.dir">Must set build.dir</fail>
|
||||
<fail unless="dist.dir">Must set dist.dir</fail>
|
||||
<fail unless="build.classes.dir">Must set build.classes.dir</fail>
|
||||
<fail unless="dist.javadoc.dir">Must set dist.javadoc.dir</fail>
|
||||
<fail unless="build.test.classes.dir">Must set build.test.classes.dir</fail>
|
||||
<fail unless="build.test.results.dir">Must set build.test.results.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-macrodef-property">
|
||||
<macrodef name="property" uri="http://www.netbeans.org/ns/jbi-component-project/1">
|
||||
<attribute name="name"/>
|
||||
<attribute name="value"/>
|
||||
<sequential>
|
||||
<property name="@{name}" value="${symbol_dollar}{@{value}}"/>
|
||||
</sequential>
|
||||
</macrodef>
|
||||
</target>
|
||||
<target name="-init-macrodef-javac">
|
||||
<macrodef name="javac" uri="http://www.netbeans.org/ns/jbi-component-project/1">
|
||||
<attribute name="srcdir" default="${symbol_dollar}{src.dir}"/>
|
||||
<attribute name="destdir" default="${symbol_dollar}{build.classes.dir}"/>
|
||||
<attribute name="classpath" default="${symbol_dollar}{javac.classpath}"/>
|
||||
<attribute name="debug" default="${symbol_dollar}{javac.debug}"/>
|
||||
<element name="customize" optional="true"/>
|
||||
<sequential>
|
||||
<javac srcdir="@{srcdir}" destdir="@{destdir}" debug="@{debug}" deprecation="${symbol_dollar}{javac.deprecation}" source="${symbol_dollar}{javac.source}" target="${symbol_dollar}{javac.target}" fork="yes" includeantruntime="false">
|
||||
<classpath>
|
||||
<path path="@{classpath}"/>
|
||||
</classpath>
|
||||
<compilerarg line="${symbol_dollar}{javac.compilerargs}"/>
|
||||
<customize/>
|
||||
</javac>
|
||||
</sequential>
|
||||
</macrodef>
|
||||
</target>
|
||||
<target name="-init-macrodef-junit">
|
||||
<macrodef name="junit" uri="http://www.netbeans.org/ns/jbi-component-project/1">
|
||||
<attribute name="includes" default="**/*Test.java"/>
|
||||
<sequential>
|
||||
<junit showoutput="true" fork="true" dir="${symbol_dollar}{basedir}" failureproperty="tests.failed" errorproperty="tests.failed">
|
||||
<batchtest todir="${symbol_dollar}{build.test.results.dir}">
|
||||
<fileset dir="${symbol_dollar}{test.src.dir}" includes="@{includes}"/>
|
||||
</batchtest>
|
||||
<classpath>
|
||||
<path path="${symbol_dollar}{run.test.classpath}"/>
|
||||
</classpath>
|
||||
<syspropertyset>
|
||||
<propertyref prefix="test-sys-prop."/>
|
||||
<mapper type="glob" from="test-sys-prop.*" to="*"/>
|
||||
</syspropertyset>
|
||||
<formatter type="brief" usefile="false"/>
|
||||
<formatter type="xml"/>
|
||||
<jvmarg line="${symbol_dollar}{run.jvmargs}"/>
|
||||
</junit>
|
||||
</sequential>
|
||||
</macrodef>
|
||||
</target>
|
||||
<target name="-init-macrodef-nbjpda">
|
||||
<macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/jbi-component-project/1">
|
||||
<attribute name="name" default="${symbol_dollar}{main.class}"/>
|
||||
<attribute name="classpath" default="${symbol_dollar}{debug.classpath}"/>
|
||||
<attribute name="stopclassname" default=""/>
|
||||
<sequential>
|
||||
<nbjpdastart transport="dt_socket" addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}">
|
||||
<classpath>
|
||||
<path path="@{classpath}"/>
|
||||
</classpath>
|
||||
</nbjpdastart>
|
||||
</sequential>
|
||||
</macrodef>
|
||||
<macrodef name="nbjpdareload" uri="http://www.netbeans.org/ns/jbi-component-project/1">
|
||||
<attribute name="dir" default="${symbol_dollar}{build.classes.dir}"/>
|
||||
<sequential>
|
||||
<nbjpdareload>
|
||||
<fileset includes="${symbol_dollar}{fix.includes}*.class" dir="@{dir}"/>
|
||||
</nbjpdareload>
|
||||
</sequential>
|
||||
</macrodef>
|
||||
</target>
|
||||
<target name="-init-macrodef-debug">
|
||||
<macrodef name="debug" uri="http://www.netbeans.org/ns/jbi-component-project/1">
|
||||
<attribute name="classname" default="${symbol_dollar}{main.class}"/>
|
||||
<attribute name="classpath" default="${symbol_dollar}{debug.classpath}"/>
|
||||
<element name="customize" optional="true"/>
|
||||
<sequential>
|
||||
<java fork="true" classname="@{classname}" dir="${symbol_dollar}{work.dir}">
|
||||
<jvmarg value="-Xdebug"/>
|
||||
<jvmarg value="-Xnoagent"/>
|
||||
<jvmarg value="-Djava.compiler=none"/>
|
||||
<jvmarg value="-Xrunjdwp:transport=dt_socket,address=${symbol_dollar}{jpda.address}"/>
|
||||
<jvmarg line="${symbol_dollar}{run.jvmargs}"/>
|
||||
<classpath>
|
||||
<path path="@{classpath}"/>
|
||||
</classpath>
|
||||
<syspropertyset>
|
||||
<propertyref prefix="run-sys-prop."/>
|
||||
<mapper type="glob" from="run-sys-prop.*" to="*"/>
|
||||
</syspropertyset>
|
||||
<customize/>
|
||||
</java>
|
||||
</sequential>
|
||||
</macrodef>
|
||||
</target>
|
||||
<target name="-init-macrodef-java">
|
||||
<macrodef name="java" uri="http://www.netbeans.org/ns/jbi-component-project/1">
|
||||
<attribute name="classname" default="${symbol_dollar}{main.class}"/>
|
||||
<element name="customize" optional="true"/>
|
||||
<sequential>
|
||||
<java fork="true" classname="@{classname}" dir="${symbol_dollar}{work.dir}">
|
||||
<jvmarg line="${symbol_dollar}{run.jvmargs}"/>
|
||||
<classpath>
|
||||
<path path="${symbol_dollar}{run.classpath}"/>
|
||||
</classpath>
|
||||
<syspropertyset>
|
||||
<propertyref prefix="run-sys-prop."/>
|
||||
<mapper type="glob" from="run-sys-prop.*" to="*"/>
|
||||
</syspropertyset>
|
||||
<customize/>
|
||||
</java>
|
||||
</sequential>
|
||||
</macrodef>
|
||||
</target>
|
||||
<target name="-init-presetdef-jar">
|
||||
<presetdef name="jar" uri="http://www.netbeans.org/ns/jbi-component-project/1">
|
||||
<jar jarfile="${symbol_dollar}{dist.jar}" compress="${symbol_dollar}{jar.compress}">
|
||||
<jbiproject:fileset dir="${symbol_dollar}{build.classes.dir}"/>
|
||||
</jar>
|
||||
</presetdef>
|
||||
</target>
|
||||
<target name="init" 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-nbjpda,-init-macrodef-debug,-init-macrodef-java,-init-presetdef-jar"/>
|
||||
<!--
|
||||
===================
|
||||
COMPILATION SECTION
|
||||
===================
|
||||
-->
|
||||
<target name="deps-jar" depends="init" unless="no.deps"/>
|
||||
<target name="-pre-pre-compile" depends="init,deps-jar">
|
||||
<mkdir dir="${symbol_dollar}{build.classes.dir}"/>
|
||||
</target>
|
||||
<target name="-pre-compile">
|
||||
<!-- Empty placeholder for easier customization. -->
|
||||
<!-- You can override this target in the ../build.xml file. -->
|
||||
</target>
|
||||
<target name="-do-compile" depends="init,deps-jar,-pre-pre-compile,-pre-compile" if="have.sources">
|
||||
<jbiproject:javac/>
|
||||
<copy todir="${symbol_dollar}{build.classes.dir}">
|
||||
<fileset dir="${symbol_dollar}{src.dir}" excludes="${symbol_dollar}{build.classes.excludes}"/>
|
||||
</copy>
|
||||
</target>
|
||||
<target name="-post-compile">
|
||||
<!-- Empty placeholder for easier customization. -->
|
||||
<!-- You can override this target in the ../build.xml file. -->
|
||||
</target>
|
||||
<target name="compile" depends="init,deps-jar,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project."/>
|
||||
<target name="-pre-compile-single">
|
||||
<!-- Empty placeholder for easier customization. -->
|
||||
<!-- You can override this target in the ../build.xml file. -->
|
||||
</target>
|
||||
<target name="-do-compile-single" depends="init,deps-jar,-pre-pre-compile">
|
||||
<fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
|
||||
<jbiproject:javac>
|
||||
<customize>
|
||||
<patternset includes="${symbol_dollar}{javac.includes}"/>
|
||||
</customize>
|
||||
</jbiproject:javac>
|
||||
</target>
|
||||
<target name="-post-compile-single">
|
||||
<!-- Empty placeholder for easier customization. -->
|
||||
<!-- You can override this target in the ../build.xml file. -->
|
||||
</target>
|
||||
<target name="compile-single" depends="init,deps-jar,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single"/>
|
||||
<!--
|
||||
====================
|
||||
JAR BUILDING SECTION
|
||||
====================
|
||||
-->
|
||||
<target name="-pre-pre-jar" depends="init">
|
||||
<dirname property="dist.jar.dir" file="${symbol_dollar}{dist.jar}"/>
|
||||
<mkdir dir="${symbol_dollar}{dist.jar.dir}"/>
|
||||
<dirname property="build.predist.jar.dir" file="${symbol_dollar}{build.predist.jar}"/>
|
||||
<mkdir dir="${symbol_dollar}{build.predist.dir}"/>
|
||||
</target>
|
||||
<target name="-pre-jar">
|
||||
<!-- Empty placeholder for easier customization. -->
|
||||
<!-- You can override this target in the ../build.xml file. -->
|
||||
</target>
|
||||
<target name="-do-jar-with-libraries" depends="init,compile,-pre-pre-jar,-pre-jar">
|
||||
<property name="build.classes.dir.resolved" location="${symbol_dollar}{build.classes.dir}"/>
|
||||
<property name="libs.jbi.classpath.resolved" location="${symbol_dollar}{libs.jbi.classpath}"/>
|
||||
<pathconvert property="run.classpath.without.build.classes.dir">
|
||||
<path path="${symbol_dollar}{run.classpath}"/>
|
||||
<map from="${symbol_dollar}{build.classes.dir.resolved}" to=""/>
|
||||
<map from="${symbol_dollar}{libs.jbi.classpath.resolved}" to=""/>
|
||||
</pathconvert>
|
||||
<jar destfile="${symbol_dollar}{build.predist.jar}">
|
||||
<fileset dir="${symbol_dollar}{build.classes.dir}"/>
|
||||
</jar>
|
||||
<taskdef classname="com.sun.jbi.cdk.ant.CopyFiles" name="copyfiles" classpath="${symbol_dollar}{libs.jbi-cdk-ant-tasks.classpath}"/>
|
||||
<copyfiles todir="${symbol_dollar}{build.predist.dir}/lib" files="${symbol_dollar}{jbi.component.lib.classpath}"/>
|
||||
</target>
|
||||
<target name="-do-jbi-comp-zip" depends="init,compile,-pre-pre-jar,-pre-jar,-do-jar-with-libraries">
|
||||
<zip destfile="${symbol_dollar}{dist.jar}">
|
||||
<zipfileset dir="${symbol_dollar}{conf.dir}"/>
|
||||
<zipfileset file="${symbol_dollar}{build.predist.jar}"/>
|
||||
<zipfileset dir="${symbol_dollar}{build.predist.dir}/lib" prefix="lib"/>
|
||||
</zip>
|
||||
</target>
|
||||
<target name="-post-jar">
|
||||
<!-- Empty placeholder for easier customization. -->
|
||||
<!-- You can override this target in the ../build.xml file. -->
|
||||
</target>
|
||||
<target name="jar" depends="init,compile,-pre-jar,-do-jar-with-libraries,-do-jbi-comp-zip,-post-jar" description="Build JAR."/>
|
||||
<!--
|
||||
=================
|
||||
EXECUTION SECTION
|
||||
=================
|
||||
-->
|
||||
<target name="run" depends="init,compile" description="Run a main class.">
|
||||
<jbiproject:java>
|
||||
<customize>
|
||||
<arg line="${symbol_dollar}{application.args}"/>
|
||||
</customize>
|
||||
</jbiproject:java>
|
||||
</target>
|
||||
<target name="run-single" depends="init,compile-single">
|
||||
<fail unless="run.class">Must select one file in the IDE or set run.class</fail>
|
||||
<jbiproject:java classname="${symbol_dollar}{run.class}"/>
|
||||
</target>
|
||||
<!--
|
||||
=================
|
||||
DEBUGGING SECTION
|
||||
=================
|
||||
-->
|
||||
<target name="-debug-start-debugger" if="netbeans.home" depends="init">
|
||||
<jbiproject:nbjpdastart name="${symbol_dollar}{debug.class}"/>
|
||||
</target>
|
||||
<target name="-debug-start-debuggee" depends="init,compile">
|
||||
<jbiproject:debug>
|
||||
<customize>
|
||||
<arg line="${symbol_dollar}{application.args}"/>
|
||||
</customize>
|
||||
</jbiproject:debug>
|
||||
</target>
|
||||
<target name="debug" if="netbeans.home" depends="init,compile,-debug-start-debugger,-debug-start-debuggee" description="Debug project in IDE."/>
|
||||
<target name="-debug-start-debugger-stepinto" if="netbeans.home" depends="init">
|
||||
<jbiproject:nbjpdastart stopclassname="${symbol_dollar}{main.class}"/>
|
||||
</target>
|
||||
<target name="debug-stepinto" if="netbeans.home" depends="init,compile,-debug-start-debugger-stepinto,-debug-start-debuggee"/>
|
||||
<target name="-debug-start-debuggee-single" if="netbeans.home" depends="init,compile-single">
|
||||
<fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
|
||||
<jbiproject:debug classname="${symbol_dollar}{debug.class}"/>
|
||||
</target>
|
||||
<target name="debug-single" if="netbeans.home" depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-single"/>
|
||||
<target name="-pre-debug-fix" depends="init">
|
||||
<fail unless="fix.includes">Must set fix.includes</fail>
|
||||
<property name="javac.includes" value="${symbol_dollar}{fix.includes}.java"/>
|
||||
</target>
|
||||
<target name="-do-debug-fix" if="netbeans.home" depends="init,-pre-debug-fix,compile-single">
|
||||
<jbiproject:nbjpdareload/>
|
||||
</target>
|
||||
<target name="debug-fix" if="netbeans.home" depends="init,-pre-debug-fix,-do-debug-fix"/>
|
||||
<target name="connect-debugger" unless="is.debugged">
|
||||
<nbjpdaconnect address="${symbol_dollar}{jpda.address}" host="${symbol_dollar}{jpda.host}" name="${symbol_dollar}{name}" transport="${symbol_dollar}{jpda.transport}">
|
||||
<classpath>
|
||||
<path path="${symbol_dollar}{debug.classpath}"/>
|
||||
</classpath>
|
||||
<sourcepath>
|
||||
<path path="${symbol_dollar}{web.docbase.dir}"/>
|
||||
</sourcepath>
|
||||
</nbjpdaconnect>
|
||||
</target>
|
||||
<!--
|
||||
===============
|
||||
JAVADOC SECTION
|
||||
===============
|
||||
-->
|
||||
<target name="-javadoc-build" depends="init">
|
||||
<mkdir dir="${symbol_dollar}{dist.javadoc.dir}"/>
|
||||
<javadoc destdir="${symbol_dollar}{dist.javadoc.dir}" source="${symbol_dollar}{javac.source}" notree="${symbol_dollar}{javadoc.notree}" use="${symbol_dollar}{javadoc.use}" nonavbar="${symbol_dollar}{javadoc.nonavbar}" noindex="${symbol_dollar}{javadoc.noindex}" splitindex="${symbol_dollar}{javadoc.splitindex}" author="${symbol_dollar}{javadoc.author}" version="${symbol_dollar}{javadoc.version}" windowtitle="${symbol_dollar}{javadoc.windowtitle}" private="${symbol_dollar}{javadoc.private}" additionalparam="${symbol_dollar}{javadoc.additionalparam}" failonerror="true" useexternalfile="true">
|
||||
<classpath>
|
||||
<path path="${symbol_dollar}{javac.classpath}"/>
|
||||
</classpath>
|
||||
<sourcepath>
|
||||
<pathelement location="${symbol_dollar}{src.dir}"/>
|
||||
</sourcepath>
|
||||
<packageset dir="${symbol_dollar}{src.dir}" includes="*/**"/>
|
||||
<fileset dir="${symbol_dollar}{src.dir}" includes="*.java"/>
|
||||
</javadoc>
|
||||
</target>
|
||||
<target name="-javadoc-browse" if="netbeans.home" unless="no.javadoc.preview" depends="init,-javadoc-build">
|
||||
<nbbrowse file="${symbol_dollar}{dist.javadoc.dir}/index.html"/>
|
||||
</target>
|
||||
<target name="javadoc" depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc."/>
|
||||
<!--
|
||||
=========================
|
||||
JUNIT COMPILATION SECTION
|
||||
=========================
|
||||
-->
|
||||
<target name="-pre-pre-compile-test" if="have.tests" depends="init,compile">
|
||||
<mkdir dir="${symbol_dollar}{build.test.classes.dir}"/>
|
||||
</target>
|
||||
<target name="-pre-compile-test">
|
||||
<!-- Empty placeholder for easier customization. -->
|
||||
<!-- You can override this target in the ../build.xml file. -->
|
||||
</target>
|
||||
<target name="-do-compile-test" if="have.tests" depends="init,compile,-pre-pre-compile-test,-pre-compile-test">
|
||||
<jbiproject:javac srcdir="${symbol_dollar}{test.src.dir}" destdir="${symbol_dollar}{build.test.classes.dir}" debug="true" classpath="${symbol_dollar}{javac.test.classpath}"/>
|
||||
<copy todir="${symbol_dollar}{build.test.classes.dir}">
|
||||
<fileset dir="${symbol_dollar}{test.src.dir}" excludes="**/*.java"/>
|
||||
</copy>
|
||||
</target>
|
||||
<target name="-post-compile-test">
|
||||
<!-- Empty placeholder for easier customization. -->
|
||||
<!-- You can override this target in the ../build.xml file. -->
|
||||
</target>
|
||||
<target name="compile-test" depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-do-compile-test,-post-compile-test"/>
|
||||
<target name="-pre-compile-test-single">
|
||||
<!-- Empty placeholder for easier customization. -->
|
||||
<!-- You can override this target in the ../build.xml file. -->
|
||||
</target>
|
||||
<target name="-do-compile-test-single" if="have.tests" depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single">
|
||||
<fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
|
||||
<jbiproject:javac srcdir="${symbol_dollar}{test.src.dir}" destdir="${symbol_dollar}{build.test.classes.dir}" debug="true" classpath="${symbol_dollar}{javac.test.classpath}">
|
||||
<customize>
|
||||
<patternset includes="${symbol_dollar}{javac.includes}"/>
|
||||
</customize>
|
||||
</jbiproject:javac>
|
||||
<copy todir="${symbol_dollar}{build.test.classes.dir}">
|
||||
<fileset dir="${symbol_dollar}{test.src.dir}" excludes="**/*.java"/>
|
||||
</copy>
|
||||
</target>
|
||||
<target name="-post-compile-test-single">
|
||||
<!-- Empty placeholder for easier customization. -->
|
||||
<!-- You can override this target in the ../build.xml file. -->
|
||||
</target>
|
||||
<target name="compile-test-single" depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single"/>
|
||||
<!--
|
||||
=======================
|
||||
JUNIT EXECUTION SECTION
|
||||
=======================
|
||||
-->
|
||||
<target name="-pre-test-run" if="have.tests" depends="init">
|
||||
<mkdir dir="${symbol_dollar}{build.test.results.dir}"/>
|
||||
<antcall inheritall="true" target="run-deploy-test-sa"/>
|
||||
</target>
|
||||
<target name="-do-test-run" if="have.tests" depends="init,compile-test,-pre-test-run">
|
||||
<jbiproject:junit/>
|
||||
</target>
|
||||
<target name="-post-test-run" if="have.tests" depends="init,compile-test,-pre-test-run,-do-test-run">
|
||||
<antcall inheritall="true" target="run-undeploy-test-sa"/>
|
||||
<fail if="tests.failed">Some tests failed; see details above.</fail>
|
||||
</target>
|
||||
<target name="test-report" if="have.tests" depends="init"/>
|
||||
<target name="-test-browse" if="netbeans.home+have.tests" depends="init"/>
|
||||
<target name="test" depends="init,compile-test,-pre-test-run,-do-test-run,test-report,-post-test-run,-test-browse" description="Run unit tests."/>
|
||||
<target name="-pre-test-run-single" if="have.tests" depends="init">
|
||||
<mkdir dir="${symbol_dollar}{build.test.results.dir}"/>
|
||||
</target>
|
||||
<target name="-do-test-run-single" if="have.tests" depends="init,compile-test-single,-pre-test-run-single">
|
||||
<fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
|
||||
<jbiproject:junit includes="${symbol_dollar}{test.includes}"/>
|
||||
</target>
|
||||
<target name="-post-test-run-single" if="have.tests" depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single">
|
||||
<fail if="tests.failed">Some tests failed; see details above.</fail>
|
||||
</target>
|
||||
<target name="test-single" depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single,-post-test-run-single" description="Run single unit test."/>
|
||||
<!--
|
||||
=======================
|
||||
JUNIT DEBUGGING SECTION
|
||||
=======================
|
||||
-->
|
||||
<target name="-debug-start-debuggee-test" if="have.tests" depends="init,compile-test">
|
||||
<fail unless="test.class">Must select one file in the IDE or set test.class</fail>
|
||||
<jbiproject:debug classname="junit.textui.TestRunner" classpath="${symbol_dollar}{debug.test.classpath}">
|
||||
<customize>
|
||||
<arg line="${symbol_dollar}{test.class}"/>
|
||||
</customize>
|
||||
</jbiproject:debug>
|
||||
</target>
|
||||
<target name="-debug-start-debugger-test" if="netbeans.home+have.tests" depends="init,compile-test">
|
||||
<jbiproject:nbjpdastart name="${symbol_dollar}{test.class}" classpath="${symbol_dollar}{debug.test.classpath}"/>
|
||||
</target>
|
||||
<target name="debug-test" depends="init,compile-test,-debug-start-debugger-test,-debug-start-debuggee-test"/>
|
||||
<target name="-do-debug-fix-test" if="netbeans.home" depends="init,-pre-debug-fix,compile-test-single">
|
||||
<jbiproject:nbjpdareload dir="${symbol_dollar}{build.test.classes.dir}"/>
|
||||
</target>
|
||||
<target name="debug-fix-test" if="netbeans.home" depends="init,-pre-debug-fix,-do-debug-fix-test"/>
|
||||
<!--
|
||||
===============
|
||||
CLEANUP SECTION
|
||||
===============
|
||||
-->
|
||||
<target name="deps-clean" depends="init" unless="no.deps"/>
|
||||
<target name="-do-clean" depends="init">
|
||||
<delete dir="${symbol_dollar}{build.dir}"/>
|
||||
<delete dir="${symbol_dollar}{dist.dir}"/>
|
||||
</target>
|
||||
<target name="-post-clean">
|
||||
<!-- Empty placeholder for easier customization. -->
|
||||
<!-- You can override this target in the ../build.xml file. -->
|
||||
</target>
|
||||
<target name="clean" depends="init,deps-clean,-do-clean,-post-clean" description="Clean build products."/>
|
||||
|
||||
<!-- This execution cycle is added for organizing package structure as per new
|
||||
service engine user is creating from archtype -->
|
||||
|
||||
<target name="postArchTypeGen" description="Post task after archtype Gen">
|
||||
<echo>Inside: postArchTypeGen - Post task is getting executed!</echo>
|
||||
|
||||
<mkdir dir="deploy-plugin/src/net/openesb/component/${artifactId}" />
|
||||
<mkdir dir="deploy-plugin/src/net/openesb/component/${artifactId}/project" />
|
||||
<mkdir dir="deploy-plugin/src/net/openesb/component/${artifactId}/project/customizer" />
|
||||
<mkdir dir="deploy-plugin/src/net/openesb/component/${artifactId}/project/node" />
|
||||
<mkdir dir="deploy-plugin/src/net/openesb/component/${artifactId}/project/resources" />
|
||||
<mkdir dir="deploy-plugin/src/net/openesb/component/${artifactId}/project/wizard" />
|
||||
<mkdir dir="deploy-plugin/src/net/openesb/component/${artifactId}/project/wizard/resources" />
|
||||
|
||||
<copy todir="deploy-plugin/src/net/openesb/component/${artifactId}">
|
||||
<fileset dir="deploy-plugin/src/net/openesb/component/cname">
|
||||
<include name="*"/>
|
||||
</fileset>
|
||||
</copy>
|
||||
|
||||
<copy todir="deploy-plugin/src/net/openesb/component/${artifactId}/project">
|
||||
<fileset dir="deploy-plugin/src/net/openesb/component/cname/project">
|
||||
<include name="*"/>
|
||||
</fileset>
|
||||
</copy>
|
||||
|
||||
<copy todir="deploy-plugin/src/net/openesb/component/${artifactId}/project/customizer">
|
||||
<fileset dir="deploy-plugin/src/net/openesb/component/cname/project/customizer">
|
||||
<include name="*"/>
|
||||
</fileset>
|
||||
</copy>
|
||||
|
||||
<copy todir="deploy-plugin/src/net/openesb/component/${artifactId}/project/node">
|
||||
<fileset dir="deploy-plugin/src/net/openesb/component/cname/project/node">
|
||||
<include name="*"/>
|
||||
</fileset>
|
||||
</copy>
|
||||
|
||||
<copy todir="deploy-plugin/src/net/openesb/component/${artifactId}/project/resources">
|
||||
<fileset dir="deploy-plugin/src/net/openesb/component/cname/project/resources">
|
||||
<include name="*"/>
|
||||
</fileset>
|
||||
</copy>
|
||||
|
||||
<copy todir="deploy-plugin/src/net/openesb/component/${artifactId}/project/wizard">
|
||||
<fileset dir="deploy-plugin/src/net/openesb/component/cname/project/wizard">
|
||||
<include name="*"/>
|
||||
</fileset>
|
||||
</copy>
|
||||
|
||||
<copy todir="deploy-plugin/src/net/openesb/component/${artifactId}/project/wizard/resources">
|
||||
<fileset dir="deploy-plugin/src/net/openesb/component/${artifactId}/project/wizard/resources">
|
||||
<include name="*"/>
|
||||
</fileset>
|
||||
</copy>
|
||||
|
||||
<delete dir="deploy-plugin/src/net/openesb/component/cname" />
|
||||
<delete file="build.xml" />
|
||||
<delete file="install-params.properties" />
|
||||
<delete file="m2nbbuild-impl.xml" />
|
||||
<delete file="m2nbbuild.properties" />
|
||||
<delete file="m2nbbuild.xml" />
|
||||
<delete file="pom.xml" />
|
||||
<delete dir="nbproject" />
|
||||
|
||||
<echo>Inside: postArchTypeGen - Post task executed successfully!</echo>
|
||||
</target>
|
||||
</project>
|
|
@ -0,0 +1,11 @@
|
|||
#set( $symbol_pound = '#' )
|
||||
#set( $symbol_dollar = '$' )
|
||||
#set( $symbol_escape = '\' )
|
||||
build.xml.data.CRC32=d291c685
|
||||
build.xml.script.CRC32=5eca2350
|
||||
build.xml.stylesheet.CRC32=8add101f@1.0
|
||||
${symbol_pound} This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
|
||||
${symbol_pound} 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=d291c685
|
||||
nbproject/build-impl.xml.script.CRC32=e3f75085
|
||||
nbproject/build-impl.xml.stylesheet.CRC32=4ed53ee0@1.0
|
|
@ -0,0 +1,504 @@
|
|||
#set( $symbol_pound = '#' )
|
||||
#set( $symbol_dollar = '$' )
|
||||
#set( $symbol_escape = '\' )
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
Copyright (c) 2004-2005 Sun Microsystems Inc., All Rights Reserved.
|
||||
-->
|
||||
<!--
|
||||
@author chikkala
|
||||
-->
|
||||
<project basedir="." default="help" name="jbi_admin" >
|
||||
<description>
|
||||
This ant script contains the jbi ant tasks and the targets and properties using
|
||||
which the jbi admin commands can be performed.
|
||||
</description>
|
||||
<target name="-init-jbiadmin-taskdefs" >
|
||||
<!-- jbi ant task definitions -->
|
||||
<!-- BEGIN - Jbi Ant Task definitions -->
|
||||
<!-- jbi component tasks definitions -->
|
||||
<taskdef name="jbi-install-component" classname="com.sun.jbi.ui.ant.JbiInstallComponentTask" classpath="${symbol_dollar}{jbi.ant.tasks.classpath}" />
|
||||
<taskdef name="jbi-uninstall-component" classname="com.sun.jbi.ui.ant.JbiUninstallComponentTask" classpath="${symbol_dollar}{jbi.ant.tasks.classpath}" />
|
||||
<taskdef name="jbi-start-component" classname="com.sun.jbi.ui.ant.JbiStartComponentTask" classpath="${symbol_dollar}{jbi.ant.tasks.classpath}" />
|
||||
<taskdef name="jbi-stop-component" classname="com.sun.jbi.ui.ant.JbiStopComponentTask" classpath="${symbol_dollar}{jbi.ant.tasks.classpath}" />
|
||||
<taskdef name="jbi-shut-down-component" classname="com.sun.jbi.ui.ant.JbiShutdownComponentTask" classpath="${symbol_dollar}{jbi.ant.tasks.classpath}" />
|
||||
<!-- jbi shared library task definitions -->
|
||||
<taskdef name="jbi-install-shared-library" classname="com.sun.jbi.ui.ant.JbiInstallSharedLibraryTask" classpath="${symbol_dollar}{jbi.ant.tasks.classpath}" />
|
||||
<taskdef name="jbi-uninstall-shared-library" classname="com.sun.jbi.ui.ant.JbiUninstallSharedLibraryTask" classpath="${symbol_dollar}{jbi.ant.tasks.classpath}" />
|
||||
<!-- jbi service assembly deployment tasks definitions -->
|
||||
<taskdef name="jbi-deploy-service-assembly" classname="com.sun.jbi.ui.ant.JbiDeployServiceAssemblyTask" classpath="${symbol_dollar}{jbi.ant.tasks.classpath}" />
|
||||
<taskdef name="jbi-undeploy-service-assembly" classname="com.sun.jbi.ui.ant.JbiUndeployServiceAssemblyTask" classpath="${symbol_dollar}{jbi.ant.tasks.classpath}" />
|
||||
<taskdef name="jbi-start-service-assembly" classname="com.sun.jbi.ui.ant.JbiStartServiceAssemblyTask" classpath="${symbol_dollar}{jbi.ant.tasks.classpath}" />
|
||||
<taskdef name="jbi-stop-service-assembly" classname="com.sun.jbi.ui.ant.JbiStopServiceAssemblyTask" classpath="${symbol_dollar}{jbi.ant.tasks.classpath}" />
|
||||
<taskdef name="jbi-shut-down-service-assembly" classname="com.sun.jbi.ui.ant.JbiShutdownServiceAssemblyTask" classpath="${symbol_dollar}{jbi.ant.tasks.classpath}" />
|
||||
<!-- jbi query tasks definitions -->
|
||||
<taskdef name="jbi-list-service-engines" classname="com.sun.jbi.ui.ant.JbiList${artifactId}sTask" classpath="${symbol_dollar}{jbi.ant.tasks.classpath}" />
|
||||
<taskdef name="jbi-list-binding-components" classname="com.sun.jbi.ui.ant.JbiListBindingComponentsTask" classpath="${symbol_dollar}{jbi.ant.tasks.classpath}" />
|
||||
<taskdef name="jbi-list-shared-libraries" classname="com.sun.jbi.ui.ant.JbiListSharedLibrariesTask" classpath="${symbol_dollar}{jbi.ant.tasks.classpath}" />
|
||||
<taskdef name="jbi-list-service-assemblies" classname="com.sun.jbi.ui.ant.JbiListServiceAssembliesTask" classpath="${symbol_dollar}{jbi.ant.tasks.classpath}" />
|
||||
<!-- END - Jbi Ant Task definitions -->
|
||||
|
||||
<available property="jbi.upgrade.comp.available" classname="com.sun.jbi.ui.ant.JbiUpgradeComponentTask" classpath="${symbol_dollar}{jbi.ant.tasks.classpath}" />
|
||||
|
||||
</target>
|
||||
|
||||
<target name="-init-jbiadmin-target-properties" >
|
||||
<!-- properties used as attribute values for ant tasks -->
|
||||
|
||||
<!-- default username. command line args may override this value. -->
|
||||
<property name="jbi.username" value="admin" />
|
||||
<!-- default password. command line args may override this value. -->
|
||||
<property name="jbi.password" value="adminadmin" />
|
||||
<!-- default host. command line args may override this value. -->
|
||||
<property name="jbi.host" value="localhost" />
|
||||
<!-- default port. command line args may override this value. -->
|
||||
<property name="jbi.port" value="8686" />
|
||||
|
||||
<!-- default value for throwing build exception on task failure.
|
||||
command line args may override this value-->
|
||||
<property name="jbi.task.fail.on.error" value="true" />
|
||||
|
||||
<!-- default value for forcing the task to complete the work even under error condition.
|
||||
this option is being used in the shut-down-component to change the component's state
|
||||
to shutdown even under error conditions.
|
||||
command line args may override this value-->
|
||||
<property name="jbi.force.task" value="false" />
|
||||
|
||||
<!-- default component state value. null or empty for any component state in query tasks -->
|
||||
<property name="jbi.component.state" value="" />
|
||||
|
||||
<!-- default service assembly state value. null or empty for any service assembly state in query tasks -->
|
||||
<property name="jbi.service.assembly.state" value="" />
|
||||
|
||||
<!-- default component name value. null or empty for no component dependency in query tasks where either
|
||||
service engine or binding component name can be specified -->
|
||||
<property name="jbi.component.name" value="" />
|
||||
|
||||
<!-- default service engine name value. null or empty for no service engine name in list-service-engines query task -->
|
||||
<property name="jbi.service.engine.name" value="" />
|
||||
|
||||
<!-- default binding component name value. null or empty for no binding component name in list-binding-components query task -->
|
||||
<property name="jbi.binding.component.name" value="" />
|
||||
|
||||
<!-- default shared library name value. null or empty for no shared library dependency in query tasks -->
|
||||
<property name="jbi.shared.library.name" value="" />
|
||||
|
||||
<!-- default service assembly name value. null or empty for no service assembly dependency in query tasks-->
|
||||
<property name="jbi.service.assembly.name" value="" />
|
||||
|
||||
<!--
|
||||
installer file attribute value. set using command line args.
|
||||
<property name="jbi.install.file" value="mydir/my_comp/installer.zip" />
|
||||
|
||||
for name/value installation configuration parameters in a file.
|
||||
set using command line args.
|
||||
<property name="jbi.install.params.file" value="mydir/my_comp/params.properties" />
|
||||
|
||||
deployment file attribute value. set using command line args.
|
||||
<property name="jbi.deploy.file" value="mydir/my_comp/serviec-assembly.zip" />
|
||||
|
||||
this property should exist to display the list task output in xml text.
|
||||
Note that the value of the property is not important.
|
||||
If the property exists, the list tasks displays the output in xml text.
|
||||
If not exists, the list tasks display the results in a formatted plain text.
|
||||
This property may be set using command line args.
|
||||
<property name="jbi.list.xml.output" value="xml" />
|
||||
|
||||
When user sets this ("jbi.list.xml.output" ) property, the list task output
|
||||
will be saved as xml text into the property "jbi.list.output" for display.
|
||||
Note that the "jbi.list.output" should not be set as ant user property ( with -D option )
|
||||
|
||||
-->
|
||||
</target>
|
||||
|
||||
<target name="-init-jbiadmin" depends="-init-jbiadmin-taskdefs, -init-jbiadmin-target-properties" ></target>
|
||||
|
||||
<!-- Install targets -->
|
||||
<!-- this target should not be called from out side the install target -->
|
||||
<target name="-install-component-without-params" unless="jbi.install.params.file"
|
||||
description="Installs service engine or binding component with installation parameters">
|
||||
<echo message ="Installing a component" />
|
||||
<echo message =" jmx connection info: (host=${symbol_dollar}{jbi.host}, port=${symbol_dollar}{jbi.port}, username=${symbol_dollar}{jbi.username})" />
|
||||
<echo message =" file=${symbol_dollar}{jbi.install.file}" />
|
||||
<jbi-install-component
|
||||
username="${symbol_dollar}{jbi.username}" password="${symbol_dollar}{jbi.password}"
|
||||
host="${symbol_dollar}{jbi.host}" port="${symbol_dollar}{jbi.port}"
|
||||
failOnError="${symbol_dollar}{jbi.task.fail.on.error}"
|
||||
file="${symbol_dollar}{jbi.install.file}"
|
||||
/>
|
||||
</target>
|
||||
|
||||
<!-- this target should not be called from out side the install target -->
|
||||
<target name="-install-component-with-params" if="jbi.install.params.file"
|
||||
description="Installs Service Engine or Binding Component without installtion parameters">
|
||||
<echo message ="Installing a component" />
|
||||
<echo message =" jmx connection info: (host=${symbol_dollar}{jbi.host}, port=${symbol_dollar}{jbi.port}, username=${symbol_dollar}{jbi.username})" />
|
||||
<echo message =" file=${symbol_dollar}{jbi.install.file}" />
|
||||
<jbi-install-component
|
||||
username="${symbol_dollar}{jbi.username}" password="${symbol_dollar}{jbi.password}"
|
||||
host="${symbol_dollar}{jbi.host}" port="${symbol_dollar}{jbi.port}"
|
||||
file="${symbol_dollar}{jbi.install.file}"
|
||||
failOnError="${symbol_dollar}{jbi.task.fail.on.error}"
|
||||
params="${symbol_dollar}{jbi.install.params.file}"
|
||||
/>
|
||||
</target>
|
||||
|
||||
<!-- main install target for installing a component -->
|
||||
<target name="install-component" depends="-init-jbiadmin, -install-component-without-params, -install-component-with-params"
|
||||
description="Installs service engine or binding component">
|
||||
</target>
|
||||
|
||||
<target name="-upgrade-with-upgrade-comp" depends="-init-jbiadmin" if="jbi.upgrade.comp.available"
|
||||
description="Upgrade service engine or binding component">
|
||||
<taskdef name="jbi-upgrade-component" classname="com.sun.jbi.ui.ant.JbiUpgradeComponentTask" classpath="${symbol_dollar}{jbi.ant.tasks.classpath}" />
|
||||
<echo message ="Upgrading a component" />
|
||||
<echo message =" jmx connection info: (host=${symbol_dollar}{jbi.host}, port=${symbol_dollar}{jbi.port}, username=${symbol_dollar}{jbi.username})" />
|
||||
<echo message =" name=${symbol_dollar}{jbi.component.name}" />
|
||||
<echo message =" file=${symbol_dollar}{jbi.install.file}" />
|
||||
<jbi-upgrade-component
|
||||
username="${symbol_dollar}{jbi.username}" password="${symbol_dollar}{jbi.password}"
|
||||
host="${symbol_dollar}{jbi.host}" port="${symbol_dollar}{jbi.port}"
|
||||
failOnError="${symbol_dollar}{jbi.task.fail.on.error}"
|
||||
name="${symbol_dollar}{jbi.component.name}"
|
||||
file="${symbol_dollar}{jbi.install.file}"
|
||||
/>
|
||||
</target>
|
||||
|
||||
<target name="-upgrade-with-update-comp" depends="-init-jbiadmin" unless="jbi.upgrade.comp.available"
|
||||
description="Upgrade service engine or binding component">
|
||||
<taskdef name="jbi-update-component" classname="com.sun.jbi.ui.ant.JbiUpdateComponentTask" classpath="${symbol_dollar}{jbi.ant.tasks.classpath}" />
|
||||
<echo message ="Updating a component" />
|
||||
<echo message =" jmx connection info: (host=${symbol_dollar}{jbi.host}, port=${symbol_dollar}{jbi.port}, username=${symbol_dollar}{jbi.username})" />
|
||||
<echo message =" name=${symbol_dollar}{jbi.component.name}" />
|
||||
<echo message =" file=${symbol_dollar}{jbi.install.file}" />
|
||||
<jbi-update-component
|
||||
username="${symbol_dollar}{jbi.username}" password="${symbol_dollar}{jbi.password}"
|
||||
host="${symbol_dollar}{jbi.host}" port="${symbol_dollar}{jbi.port}"
|
||||
failOnError="${symbol_dollar}{jbi.task.fail.on.error}"
|
||||
name="${symbol_dollar}{jbi.component.name}"
|
||||
file="${symbol_dollar}{jbi.install.file}"
|
||||
/>
|
||||
</target>
|
||||
|
||||
<target name="upgrade-component" depends="-init-jbiadmin, -upgrade-with-upgrade-comp, -upgrade-with-update-comp"
|
||||
description="Upgrade service engine or binding component">
|
||||
</target>
|
||||
|
||||
|
||||
<!-- install target for installing a shared library -->
|
||||
<target name="install-shared-library" depends="-init-jbiadmin"
|
||||
description="Installs shared library">
|
||||
<echo message ="Installing a shared library" />
|
||||
<echo message =" jmx connection info: (host=${symbol_dollar}{jbi.host}, port=${symbol_dollar}{jbi.port}, username=${symbol_dollar}{jbi.username})" />
|
||||
<echo message =" file=${symbol_dollar}{jbi.install.file}" />
|
||||
<jbi-install-shared-library
|
||||
username="${symbol_dollar}{jbi.username}" password="${symbol_dollar}{jbi.password}"
|
||||
host="${symbol_dollar}{jbi.host}" port="${symbol_dollar}{jbi.port}"
|
||||
failOnError="${symbol_dollar}{jbi.task.fail.on.error}"
|
||||
file="${symbol_dollar}{jbi.install.file}"
|
||||
/>
|
||||
</target>
|
||||
|
||||
<!-- uninstall target for uninstalling a component -->
|
||||
<target name="uninstall-component" depends="-init-jbiadmin"
|
||||
description="Uninstalls service engine or binding component">
|
||||
<echo message ="Uninstalling a component" />
|
||||
<echo message =" jmx connection info: (host=${symbol_dollar}{jbi.host}, port=${symbol_dollar}{jbi.port}, username=${symbol_dollar}{jbi.username})" />
|
||||
<echo message =" name=${symbol_dollar}{jbi.component.name}" />
|
||||
<jbi-uninstall-component
|
||||
username="${symbol_dollar}{jbi.username}" password="${symbol_dollar}{jbi.password}"
|
||||
host="${symbol_dollar}{jbi.host}" port="${symbol_dollar}{jbi.port}"
|
||||
failOnError="${symbol_dollar}{jbi.task.fail.on.error}"
|
||||
name="${symbol_dollar}{jbi.component.name}"
|
||||
/>
|
||||
</target>
|
||||
|
||||
<!-- uninstall target for uninstalling a shared library -->
|
||||
<target name="uninstall-shared-library" depends="-init-jbiadmin"
|
||||
description="Uninstalls shared library">
|
||||
<echo message ="Uninstalling a shared library" />
|
||||
<echo message =" jmx connection info: (host=${symbol_dollar}{jbi.host}, port=${symbol_dollar}{jbi.port}, username=${symbol_dollar}{jbi.username})" />
|
||||
<echo message =" name=${symbol_dollar}{jbi.shared.library.name}" />
|
||||
<jbi-uninstall-shared-library
|
||||
username="${symbol_dollar}{jbi.username}" password="${symbol_dollar}{jbi.password}"
|
||||
host="${symbol_dollar}{jbi.host}" port="${symbol_dollar}{jbi.port}"
|
||||
failOnError="${symbol_dollar}{jbi.task.fail.on.error}"
|
||||
name="${symbol_dollar}{jbi.shared.library.name}"
|
||||
/>
|
||||
</target>
|
||||
|
||||
<!-- start component target -->
|
||||
<target name="start-component" depends="-init-jbiadmin"
|
||||
description="Starts service engine or binding component">
|
||||
<echo message ="Starting a component" />
|
||||
<echo message =" jmx connection info: (host=${symbol_dollar}{jbi.host}, port=${symbol_dollar}{jbi.port}, username=${symbol_dollar}{jbi.username})" />
|
||||
<echo message =" name=${symbol_dollar}{jbi.component.name}" />
|
||||
<jbi-start-component
|
||||
username="${symbol_dollar}{jbi.username}" password="${symbol_dollar}{jbi.password}"
|
||||
host="${symbol_dollar}{jbi.host}" port="${symbol_dollar}{jbi.port}"
|
||||
failOnError="${symbol_dollar}{jbi.task.fail.on.error}"
|
||||
name="${symbol_dollar}{jbi.component.name}"
|
||||
/>
|
||||
</target>
|
||||
|
||||
<!-- stop component target -->
|
||||
<target name="stop-component" depends="-init-jbiadmin"
|
||||
description="Stops service engine or binding component">
|
||||
<echo message ="Stopping a component" />
|
||||
<echo message =" jmx connection info: (host=${symbol_dollar}{jbi.host}, port=${symbol_dollar}{jbi.port}, username=${symbol_dollar}{jbi.username})" />
|
||||
<echo message =" name=${symbol_dollar}{jbi.component.name}" />
|
||||
<jbi-stop-component
|
||||
username="${symbol_dollar}{jbi.username}" password="${symbol_dollar}{jbi.password}"
|
||||
host="${symbol_dollar}{jbi.host}" port="${symbol_dollar}{jbi.port}"
|
||||
failOnError="${symbol_dollar}{jbi.task.fail.on.error}"
|
||||
name="${symbol_dollar}{jbi.component.name}"
|
||||
/>
|
||||
</target>
|
||||
|
||||
<!-- shutdown component target -->
|
||||
<target name="shut-down-component" depends="-init-jbiadmin"
|
||||
description="shuts down service engine or binding component">
|
||||
<echo message ="Shutting down a component" />
|
||||
<echo message =" jmx connection info: (host=${symbol_dollar}{jbi.host}, port=${symbol_dollar}{jbi.port}, username=${symbol_dollar}{jbi.username})" />
|
||||
<echo message =" name=${symbol_dollar}{jbi.component.name}" />
|
||||
<jbi-shut-down-component
|
||||
username="${symbol_dollar}{jbi.username}" password="${symbol_dollar}{jbi.password}"
|
||||
host="${symbol_dollar}{jbi.host}" port="${symbol_dollar}{jbi.port}"
|
||||
failOnError="${symbol_dollar}{jbi.task.fail.on.error}"
|
||||
force="${symbol_dollar}{jbi.force.task}"
|
||||
name="${symbol_dollar}{jbi.component.name}"
|
||||
/>
|
||||
</target>
|
||||
|
||||
<!-- deployment targets -->
|
||||
<!-- deploy service assembly target -->
|
||||
<target name="deploy-service-assembly" depends="-init-jbiadmin"
|
||||
description="Deploys Service assembly">
|
||||
<echo message ="Deploying a service assembly" />
|
||||
<echo message =" jmx connection info: (host=${symbol_dollar}{jbi.host}, port=${symbol_dollar}{jbi.port}, username=${symbol_dollar}{jbi.username})" />
|
||||
<echo message =" file=${symbol_dollar}{jbi.deploy.file}" />
|
||||
<jbi-deploy-service-assembly
|
||||
username="${symbol_dollar}{jbi.username}" password="${symbol_dollar}{jbi.password}"
|
||||
host="${symbol_dollar}{jbi.host}" port="${symbol_dollar}{jbi.port}"
|
||||
failOnError="${symbol_dollar}{jbi.task.fail.on.error}"
|
||||
file="${symbol_dollar}{jbi.deploy.file}"
|
||||
/>
|
||||
</target>
|
||||
|
||||
<!-- undeploy service assembly target -->
|
||||
<target name="undeploy-service-assembly" depends="-init-jbiadmin"
|
||||
description="Undeploys service assembly">
|
||||
<echo message ="Undeploying a service assembly" />
|
||||
<echo message =" jmx connection info: (host=${symbol_dollar}{jbi.host}, port=${symbol_dollar}{jbi.port}, username=${symbol_dollar}{jbi.username})" />
|
||||
<echo message =" name=${symbol_dollar}{jbi.service.assembly.name}" />
|
||||
<jbi-undeploy-service-assembly
|
||||
username="${symbol_dollar}{jbi.username}" password="${symbol_dollar}{jbi.password}"
|
||||
host="${symbol_dollar}{jbi.host}" port="${symbol_dollar}{jbi.port}"
|
||||
failOnError="${symbol_dollar}{jbi.task.fail.on.error}"
|
||||
name="${symbol_dollar}{jbi.service.assembly.name}"
|
||||
/>
|
||||
</target>
|
||||
|
||||
<!-- start service assembly target -->
|
||||
<target name="start-service-assembly" depends="-init-jbiadmin"
|
||||
description="starts service assembly">
|
||||
<echo message ="Starting a service assembly" />
|
||||
<echo message =" jmx connection info: (host=${symbol_dollar}{jbi.host}, port=${symbol_dollar}{jbi.port}, username=${symbol_dollar}{jbi.username})" />
|
||||
<echo message =" name=${symbol_dollar}{jbi.service.assembly.name}" />
|
||||
<jbi-start-service-assembly
|
||||
username="${symbol_dollar}{jbi.username}" password="${symbol_dollar}{jbi.password}"
|
||||
host="${symbol_dollar}{jbi.host}" port="${symbol_dollar}{jbi.port}"
|
||||
failOnError="${symbol_dollar}{jbi.task.fail.on.error}"
|
||||
name="${symbol_dollar}{jbi.service.assembly.name}"
|
||||
/>
|
||||
</target>
|
||||
|
||||
<!-- stop service assembly target -->
|
||||
<target name="stop-service-assembly" depends="-init-jbiadmin"
|
||||
description="stops service assembly">
|
||||
<echo message ="Stopping a service assembly" />
|
||||
<echo message =" jmx connection info: (host=${symbol_dollar}{jbi.host}, port=${symbol_dollar}{jbi.port}, username=${symbol_dollar}{jbi.username})" />
|
||||
<echo message =" name=${symbol_dollar}{jbi.service.assembly.name}" />
|
||||
<jbi-stop-service-assembly
|
||||
username="${symbol_dollar}{jbi.username}" password="${symbol_dollar}{jbi.password}"
|
||||
host="${symbol_dollar}{jbi.host}" port="${symbol_dollar}{jbi.port}"
|
||||
failOnError="${symbol_dollar}{jbi.task.fail.on.error}"
|
||||
name="${symbol_dollar}{jbi.service.assembly.name}"
|
||||
/>
|
||||
</target>
|
||||
|
||||
<!-- shutdown service assembly target -->
|
||||
<target name="shut-down-service-assembly" depends="-init-jbiadmin"
|
||||
description="shuts down service assembly">
|
||||
<echo message ="Shutting down a service assembly" />
|
||||
<echo message =" jmx connection info: (host=${symbol_dollar}{jbi.host}, port=${symbol_dollar}{jbi.port}, username=${symbol_dollar}{jbi.username})" />
|
||||
<echo message =" name=${symbol_dollar}{jbi.service.assembly.name}" />
|
||||
<jbi-shut-down-service-assembly
|
||||
username="${symbol_dollar}{jbi.username}" password="${symbol_dollar}{jbi.password}"
|
||||
host="${symbol_dollar}{jbi.host}" port="${symbol_dollar}{jbi.port}"
|
||||
failOnError="${symbol_dollar}{jbi.task.fail.on.error}"
|
||||
name="${symbol_dollar}{jbi.service.assembly.name}"
|
||||
/>
|
||||
</target>
|
||||
|
||||
|
||||
<!-- Query targets -->
|
||||
<!-- lists info on the service engines -->
|
||||
<target name="-list-service-engines-in-xml-ouput" if="jbi.list.xml.output"
|
||||
description="List Service Engines in xml text output" >
|
||||
<jbi-list-service-engines
|
||||
username="${symbol_dollar}{jbi.username}" password="${symbol_dollar}{jbi.password}"
|
||||
host="${symbol_dollar}{jbi.host}" port="${symbol_dollar}{jbi.port}"
|
||||
failOnError="${symbol_dollar}{jbi.task.fail.on.error}"
|
||||
serviceEngineName="${symbol_dollar}{jbi.service.engine.name}"
|
||||
state="${symbol_dollar}{jbi.component.state}"
|
||||
sharedLibraryName="${symbol_dollar}{jbi.shared.library.name}"
|
||||
serviceAssemblyName="${symbol_dollar}{jbi.service.assembly.name}"
|
||||
xmlOutput="jbi.list.output"
|
||||
/>
|
||||
<echo message="${symbol_dollar}{jbi.list.output}" />
|
||||
</target>
|
||||
|
||||
<target name="-list-service-engines-in-text-output" unless="jbi.list.xml.output"
|
||||
description="List Service Engines in formatted plain text">
|
||||
<jbi-list-service-engines
|
||||
username="${symbol_dollar}{jbi.username}" password="${symbol_dollar}{jbi.password}"
|
||||
host="${symbol_dollar}{jbi.host}" port="${symbol_dollar}{jbi.port}"
|
||||
failOnError="${symbol_dollar}{jbi.task.fail.on.error}"
|
||||
serviceEngineName="${symbol_dollar}{jbi.service.engine.name}"
|
||||
state="${symbol_dollar}{jbi.component.state}"
|
||||
sharedLibraryName="${symbol_dollar}{jbi.shared.library.name}"
|
||||
serviceAssemblyName="${symbol_dollar}{jbi.service.assembly.name}"
|
||||
/>
|
||||
</target>
|
||||
|
||||
<target name="list-service-engines"
|
||||
description="List Service Engines"
|
||||
depends="-init-jbiadmin, -list-service-engines-in-xml-ouput,
|
||||
-list-service-engines-in-text-output"
|
||||
/>
|
||||
|
||||
<!-- lists info on the binding components -->
|
||||
<target name="-list-binding-components-in-xml-ouput" if="jbi.list.xml.output"
|
||||
description="List Binding Components ">
|
||||
<jbi-list-binding-components
|
||||
username="${symbol_dollar}{jbi.username}" password="${symbol_dollar}{jbi.password}"
|
||||
host="${symbol_dollar}{jbi.host}" port="${symbol_dollar}{jbi.port}"
|
||||
failOnError="${symbol_dollar}{jbi.task.fail.on.error}"
|
||||
bindingComponentName="${symbol_dollar}{jbi.binding.component.name}"
|
||||
state="${symbol_dollar}{jbi.component.state}"
|
||||
sharedLibraryName="${symbol_dollar}{jbi.shared.library.name}"
|
||||
serviceAssemblyName="${symbol_dollar}{jbi.service.assembly.name}"
|
||||
xmlOutput="jbi.list.output"
|
||||
/>
|
||||
<echo message="${symbol_dollar}{jbi.list.output}" />
|
||||
</target>
|
||||
|
||||
<target name="-list-binding-components-in-text-output" unless="jbi.list.xml.output"
|
||||
description="List Binding Components ">
|
||||
<jbi-list-binding-components
|
||||
username="${symbol_dollar}{jbi.username}" password="${symbol_dollar}{jbi.password}"
|
||||
host="${symbol_dollar}{jbi.host}" port="${symbol_dollar}{jbi.port}"
|
||||
failOnError="${symbol_dollar}{jbi.task.fail.on.error}"
|
||||
bindingComponentName="${symbol_dollar}{jbi.binding.component.name}"
|
||||
state="${symbol_dollar}{jbi.component.state}"
|
||||
sharedLibraryName="${symbol_dollar}{jbi.shared.library.name}"
|
||||
serviceAssemblyName="${symbol_dollar}{jbi.service.assembly.name}"
|
||||
/>
|
||||
</target>
|
||||
|
||||
<target name="list-binding-components"
|
||||
description="List Binding Components"
|
||||
depends="-init-jbiadmin, -list-binding-components-in-xml-ouput,
|
||||
-list-binding-components-in-text-output"
|
||||
/>
|
||||
|
||||
<!-- lists info on the shared libraries -->
|
||||
<target name="-list-shared-libraries-in-xml-ouput" if="jbi.list.xml.output"
|
||||
description="List Shared Libraries">
|
||||
<jbi-list-shared-libraries
|
||||
username="${symbol_dollar}{jbi.username}" password="${symbol_dollar}{jbi.password}"
|
||||
host="${symbol_dollar}{jbi.host}" port="${symbol_dollar}{jbi.port}"
|
||||
failOnError="${symbol_dollar}{jbi.task.fail.on.error}"
|
||||
sharedLibraryName="${symbol_dollar}{jbi.shared.library.name}"
|
||||
componentName="${symbol_dollar}{jbi.component.name}"
|
||||
xmlOutput="jbi.list.output"
|
||||
/>
|
||||
<echo message="${symbol_dollar}{jbi.list.output}" />
|
||||
</target>
|
||||
|
||||
<target name="-list-shared-libraries-in-text-output" unless="jbi.list.xml.output"
|
||||
description="List Shared Libraries">
|
||||
<jbi-list-shared-libraries
|
||||
username="${symbol_dollar}{jbi.username}" password="${symbol_dollar}{jbi.password}"
|
||||
host="${symbol_dollar}{jbi.host}" port="${symbol_dollar}{jbi.port}"
|
||||
failOnError="${symbol_dollar}{jbi.task.fail.on.error}"
|
||||
sharedLibraryName="${symbol_dollar}{jbi.shared.library.name}"
|
||||
componentName="${symbol_dollar}{jbi.component.name}"
|
||||
/>
|
||||
</target>
|
||||
|
||||
<target name="list-shared-libraries"
|
||||
description="List Shared Libraries"
|
||||
depends="-init-jbiadmin, -list-shared-libraries-in-xml-ouput,
|
||||
-list-shared-libraries-in-text-output"
|
||||
/>
|
||||
|
||||
|
||||
<!-- lists info on the service assemblies deployed -->
|
||||
<target name="-list-service-assemblies-in-xml-ouput" if="jbi.list.xml.output"
|
||||
description="List Service Assemblies">
|
||||
<jbi-list-service-assemblies
|
||||
username="${symbol_dollar}{jbi.username}" password="${symbol_dollar}{jbi.password}"
|
||||
host="${symbol_dollar}{jbi.host}" port="${symbol_dollar}{jbi.port}"
|
||||
failOnError="${symbol_dollar}{jbi.task.fail.on.error}"
|
||||
serviceAssemblyName="${symbol_dollar}{jbi.service.assembly.name}"
|
||||
state="${symbol_dollar}{jbi.service.assembly.state}"
|
||||
componentName="${symbol_dollar}{jbi.component.name}"
|
||||
xmlOutput="jbi.list.output"
|
||||
/>
|
||||
<echo message="${symbol_dollar}{jbi.list.output}" />
|
||||
</target>
|
||||
|
||||
<target name="-list-service-assemblies-in-text-output" unless="jbi.list.xml.output"
|
||||
description="List Service Assemblies">
|
||||
<jbi-list-service-assemblies
|
||||
username="${symbol_dollar}{jbi.username}" password="${symbol_dollar}{jbi.password}"
|
||||
host="${symbol_dollar}{jbi.host}" port="${symbol_dollar}{jbi.port}"
|
||||
failOnError="${symbol_dollar}{jbi.task.fail.on.error}"
|
||||
serviceAssemblyName="${symbol_dollar}{jbi.service.assembly.name}"
|
||||
state="${symbol_dollar}{jbi.service.assembly.state}"
|
||||
componentName="${symbol_dollar}{jbi.component.name}"
|
||||
/>
|
||||
</target>
|
||||
|
||||
<target name="list-service-assemblies"
|
||||
description="List Service Assemblies"
|
||||
depends="-init-jbiadmin, -list-service-assemblies-in-xml-ouput,
|
||||
-list-service-assemblies-in-text-output"
|
||||
/>
|
||||
|
||||
|
||||
<!-- undocumented target : calls all the query tasks -->
|
||||
<target name="list-all"
|
||||
description="List Details about All Components and Deployments "
|
||||
depends = "list-service-engines,
|
||||
list-binding-components,
|
||||
list-shared-libraries,
|
||||
list-service-assemblies " >
|
||||
</target>
|
||||
|
||||
<!-- help target -->
|
||||
<target name="usage" depends="help" />
|
||||
<target name="help" description="Help information">
|
||||
<echo>
|
||||
|
||||
Usage : ant -f <fullpath>/jbi_admin.xml [options] [target]
|
||||
options: -D<property>=<value>
|
||||
Specify a property/value pairs as options that are valid for the target.
|
||||
target : ant target name in jbi_admin.xml
|
||||
|
||||
</echo>
|
||||
</target>
|
||||
|
||||
</project>
|
|
@ -0,0 +1,339 @@
|
|||
#set( $symbol_pound = '#' )
|
||||
#set( $symbol_dollar = '$' )
|
||||
#set( $symbol_escape = '\' )
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project name="jbiadmin-impl" default="jbi_component_admin-help" basedir=".." xmlns:jbi="http://www.sun.com/ns/jbi/jbi-ant/1" >
|
||||
<description>Install, uninstall, reinstall, start, stop, shutdown jbi components.</description>
|
||||
|
||||
<!--
|
||||
======================
|
||||
INITIALIZATION SECTION
|
||||
======================
|
||||
-->
|
||||
|
||||
<target name="-init-admin-setup" depends="init" >
|
||||
<!--
|
||||
jbi properties that are set in project.properties file
|
||||
<property name="jbi.install.file" location="${symbol_dollar}{dist.jar}" />
|
||||
<property name="jbi.deploy.file" location="../testSA/${symbol_dollar}{dist.jar}" />
|
||||
<property name="jbi.component.name" value="${symbol_dollar}{jbi.component.name}" />
|
||||
<property name="jbi.host" location="localhost" />
|
||||
<property name="jbi.port" value="8686" />
|
||||
<property name="jbi.username" value="admin" />
|
||||
<property name="jbi.password" value="adminadmin" />
|
||||
-->
|
||||
<property name="jbi.task.fail.on.error" value="true" />
|
||||
<!-- jbi admin ant script settings -->
|
||||
<property name="jbi.admin.xml" location="nbproject/jbi_admin.xml" />
|
||||
|
||||
</target>
|
||||
|
||||
<target name="-init-admin-setup-check" >
|
||||
<!--
|
||||
<fail unless="jbi.as.home">Must set jbi.as.home</fail>
|
||||
-->
|
||||
<fail unless="jbi.host">Must set jbi.host</fail>
|
||||
<fail unless="jbi.port">Must set jbi.port</fail>
|
||||
<fail unless="jbi.username">Must set jbi.username</fail>
|
||||
<fail unless="jbi.password">Must set jbi.password</fail>
|
||||
</target>
|
||||
|
||||
<target name="-init-macrodef-jbi-admin">
|
||||
<macrodef name="jbi-admin" uri="http://www.sun.com/ns/jbi/jbi-ant/1">
|
||||
<attribute name="target"/>
|
||||
<attribute name="host" default="${symbol_dollar}{jbi.host}"/>
|
||||
<attribute name="port" default="${symbol_dollar}{jbi.port}"/>
|
||||
<attribute name="username" default="${symbol_dollar}{jbi.username}"/>
|
||||
<attribute name="password" default="${symbol_dollar}{jbi.password}"/>
|
||||
<attribute name="failOnError" default="true"/>
|
||||
<element name="target-options" optional="true"/>
|
||||
<sequential>
|
||||
<ant inheritAll="false" dir="${symbol_dollar}{basedir}" antfile="${symbol_dollar}{jbi.admin.xml}">
|
||||
<property name="jbi.ant.tasks.classpath" value="${symbol_dollar}{jbi.ant.tasks.classpath}"/>
|
||||
<property name="jbi.host" value="@{host}"/>
|
||||
<property name="jbi.port" value="@{port}"/>
|
||||
<property name="jbi.username" value="@{username}"/>
|
||||
<property name="jbi.password" value="@{password}"/>
|
||||
<property name="jbi.task.fail.on.error" value="@{failOnError}"/>
|
||||
<target-options/>
|
||||
<target name="@{target}"/>
|
||||
</ant>
|
||||
</sequential>
|
||||
</macrodef>
|
||||
|
||||
</target>
|
||||
|
||||
<target name="-admin-setup" depends="init, -init-admin-setup, -init-admin-setup-check, -init-macrodef-jbi-admin" />
|
||||
|
||||
|
||||
<!--
|
||||
================================
|
||||
COMPONENT ADMINISTRATION SECTION
|
||||
================================
|
||||
-->
|
||||
|
||||
<target name="start" depends="init, -admin-setup" >
|
||||
<jbi:jbi-admin target="start-component" failOnError="${symbol_dollar}{jbi.task.fail.on.error}" >
|
||||
<target-options>
|
||||
<property name="jbi.component.name" value="${symbol_dollar}{jbi.component.name}" />
|
||||
</target-options>
|
||||
</jbi:jbi-admin>
|
||||
</target>
|
||||
|
||||
<target name="stop" depends="init, -admin-setup" >
|
||||
<jbi:jbi-admin target="stop-component" failOnError="${symbol_dollar}{jbi.task.fail.on.error}" >
|
||||
<target-options>
|
||||
<property name="jbi.component.name" value="${symbol_dollar}{jbi.component.name}" />
|
||||
</target-options>
|
||||
</jbi:jbi-admin>
|
||||
</target>
|
||||
|
||||
<target name="shutdown" depends="init, -admin-setup" >
|
||||
<jbi:jbi-admin target="shut-down-component" failOnError="${symbol_dollar}{jbi.task.fail.on.error}" >
|
||||
<target-options>
|
||||
<property name="jbi.component.name" value="${symbol_dollar}{jbi.component.name}" />
|
||||
</target-options>
|
||||
</jbi:jbi-admin>
|
||||
</target>
|
||||
|
||||
<target name="forced-shutdown" depends="init, -admin-setup" >
|
||||
<jbi:jbi-admin target="shut-down-component" failOnError="${symbol_dollar}{jbi.task.fail.on.error}" >
|
||||
<target-options>
|
||||
<property name="jbi.component.name" value="${symbol_dollar}{jbi.component.name}" />
|
||||
<property name="jbi.force.task" value="true" />
|
||||
</target-options>
|
||||
</jbi:jbi-admin>
|
||||
</target>
|
||||
|
||||
<target name="-do-install-without-params" depends="init, jar, -admin-setup" unless="do.install.with.params">
|
||||
|
||||
<jbi:jbi-admin target="install-component" >
|
||||
<target-options>
|
||||
<property name="jbi.install.file" location="${symbol_dollar}{dist.jar}" />
|
||||
</target-options>
|
||||
</jbi:jbi-admin>
|
||||
|
||||
<antcall target="start" >
|
||||
<param name="jbi.task.fail.on.error" value="false" />
|
||||
</antcall>
|
||||
|
||||
</target>
|
||||
|
||||
<target name="-do-install-with-params" depends="init, jar, -admin-setup" if="do.install.with.params">
|
||||
|
||||
<jbi:jbi-admin target="install-component" >
|
||||
<target-options>
|
||||
<property name="jbi.install.file" location="${symbol_dollar}{dist.jar}" />
|
||||
<property name="jbi.install.params.file" location="${symbol_dollar}{jbi.install.params.file}" />
|
||||
</target-options>
|
||||
</jbi:jbi-admin>
|
||||
|
||||
<antcall target="start" >
|
||||
<param name="jbi.task.fail.on.error" value="false" />
|
||||
</antcall>
|
||||
|
||||
</target>
|
||||
|
||||
<target name="-init-install-component" depends="init, -admin-setup" >
|
||||
<condition property="do.install.with.params">
|
||||
<istrue value="${symbol_dollar}{jbi.install.with.params}"/>
|
||||
</condition>
|
||||
</target>
|
||||
|
||||
<target name="install" depends="init, jar, -admin-setup, -init-install-component, -do-install-without-params, -do-install-with-params" />
|
||||
|
||||
<target name="uninstall" depends="init, -admin-setup" >
|
||||
|
||||
<antcall target="stop" >
|
||||
<param name="jbi.task.fail.on.error" value="false" />
|
||||
</antcall>
|
||||
|
||||
<antcall target="shutdown" >
|
||||
<param name="jbi.task.fail.on.error" value="false" />
|
||||
</antcall>
|
||||
|
||||
<jbi:jbi-admin target="uninstall-component" failOnError="${symbol_dollar}{jbi.task.fail.on.error}" >
|
||||
<target-options>
|
||||
<property name="jbi.component.name" value="${symbol_dollar}{jbi.component.name}" />
|
||||
</target-options>
|
||||
</jbi:jbi-admin>
|
||||
|
||||
</target>
|
||||
|
||||
<target name="forced-uninstall" depends="init, -admin-setup, -do-forced-undeploy-test-sa" >
|
||||
|
||||
<antcall target="stop" >
|
||||
<param name="jbi.task.fail.on.error" value="false" />
|
||||
</antcall>
|
||||
|
||||
<antcall target="forced-shutdown" >
|
||||
<param name="jbi.task.fail.on.error" value="false" />
|
||||
</antcall>
|
||||
|
||||
<jbi:jbi-admin target="uninstall-component" failOnError="${symbol_dollar}{jbi.task.fail.on.error}" >
|
||||
<target-options>
|
||||
<property name="jbi.component.name" value="${symbol_dollar}{jbi.component.name}" />
|
||||
<property name="jbi.force.task" value="true" />
|
||||
</target-options>
|
||||
</jbi:jbi-admin>
|
||||
|
||||
</target>
|
||||
|
||||
|
||||
<target name="-reinstall-setup" depends="init" >
|
||||
<property name="jbi.task.fail.on.error" value="false" />
|
||||
</target>
|
||||
|
||||
<target name="re-install" depends="init, -reinstall-setup, -admin-setup, stop, shutdown, uninstall, install" />
|
||||
|
||||
<target name="upgrade" depends="init, -admin-setup" >
|
||||
|
||||
<antcall target="stop" >
|
||||
<param name="jbi.task.fail.on.error" value="false" />
|
||||
</antcall>
|
||||
|
||||
<antcall target="shutdown" >
|
||||
<param name="jbi.task.fail.on.error" value="false" />
|
||||
</antcall>
|
||||
|
||||
<jbi:jbi-admin target="upgrade-component" failOnError="${symbol_dollar}{jbi.task.fail.on.error}" >
|
||||
<target-options>
|
||||
<property name="jbi.component.name" value="${symbol_dollar}{jbi.component.name}" />
|
||||
<property name="jbi.install.file" location="${symbol_dollar}{dist.jar}" />
|
||||
</target-options>
|
||||
</jbi:jbi-admin>
|
||||
|
||||
</target>
|
||||
|
||||
<!--
|
||||
===============================
|
||||
TEST DEPLOYMENT ADMINISTRATION
|
||||
===============================
|
||||
-->
|
||||
|
||||
<target name="-init-test-deploy" depends="init, -admin-setup, -do-test-deploy-check" >
|
||||
<!-- test service assembly build directory -->
|
||||
<property name="project.testSA.build.dir" location="${symbol_dollar}{build.test.dir}/${symbol_dollar}{testSA.name}" />
|
||||
<!-- test SA zip file -->
|
||||
<property name="reference.testSA.zip" location="${symbol_dollar}{project.testSA.build.dir}/${symbol_dollar}{testSA.name}.zip" />
|
||||
</target>
|
||||
|
||||
<target name="-do-test-deploy-check" depends="init, -admin-setup">
|
||||
</target>
|
||||
|
||||
<target name="build-test-sa" depends="init, -init-test-deploy, -do-test-deploy-check" >
|
||||
<ant target="package" inheritall="false" antfile="${symbol_dollar}{project.testSA}/build.xml">
|
||||
<property name="service.assembly.name" value="${symbol_dollar}{testSA.name}" />
|
||||
<property name="build.dir" location="${symbol_dollar}{project.testSA.build.dir}" />
|
||||
<!-- TODO: Supporting old sa build properties. remove it for new code -->
|
||||
<property name="sa.build.dir" location="${symbol_dollar}{project.testSA.build.dir}" />
|
||||
<property name="sa.name" value="${symbol_dollar}{testSA.name}" />
|
||||
<!-- TODO: -->
|
||||
</ant>
|
||||
</target>
|
||||
|
||||
<target name="clean-test-sa" depends="init, -init-test-deploy, -do-test-deploy-check" >
|
||||
<ant target="clean" inheritall="false" antfile="${symbol_dollar}{project.testSA}/build.xml">
|
||||
<property name="service.assembly.name" value="${symbol_dollar}{testSA.name}" />
|
||||
<property name="build.dir" location="${symbol_dollar}{project.testSA.build.dir}" />
|
||||
<!-- TODO: Supporting old sa build properties. remove it for new code -->
|
||||
<property name="sa.build.dir" location="${symbol_dollar}{project.testSA.build.dir}" />
|
||||
<property name="sa.name" value="${symbol_dollar}{testSA.name}" />
|
||||
<!-- TODO: -->
|
||||
</ant>
|
||||
</target>
|
||||
|
||||
<target name="run-deploy-test-sa" if="testSA.enabled" >
|
||||
<antcall inheritall="true" target="deploy-test-sa" />
|
||||
</target>
|
||||
|
||||
<target name="run-undeploy-test-sa" if="testSA.enabled" >
|
||||
<antcall inheritall="true" target="undeploy-test-sa" />
|
||||
</target>
|
||||
|
||||
<target name="deploy-test-sa" depends="init, -init-test-deploy, build-test-sa, start-test-components, -do-deploy-test-sa">
|
||||
</target>
|
||||
|
||||
<target name="undeploy-test-sa" depends="init, -init-test-deploy, -do-undeploy-test-sa ">
|
||||
</target>
|
||||
|
||||
<target name="-do-deploy-test-sa" depends="init, -init-test-deploy, build-test-sa">
|
||||
<!-- Deploy test SA -->
|
||||
<property name="testSA.zip" location="${symbol_dollar}{reference.testSA.zip}" />
|
||||
<jbi:jbi-admin target="deploy-service-assembly">
|
||||
<target-options>
|
||||
<property name="jbi.deploy.file" value="${symbol_dollar}{testSA.zip}" />
|
||||
</target-options>
|
||||
</jbi:jbi-admin>
|
||||
<!-- Start test SA -->
|
||||
<jbi:jbi-admin target="start-service-assembly" >
|
||||
<target-options>
|
||||
<property name="jbi.service.assembly.name" value="${symbol_dollar}{testSA.name}" />
|
||||
</target-options>
|
||||
</jbi:jbi-admin>
|
||||
<!-- Show test SA -->
|
||||
<jbi:jbi-admin target="list-service-assemblies" failOnError="false" >
|
||||
<target-options>
|
||||
<property name="jbi.service.assembly.name" value="${symbol_dollar}{testSA.name}" />
|
||||
</target-options>
|
||||
</jbi:jbi-admin>
|
||||
</target>
|
||||
|
||||
<target name="-do-undeploy-test-sa" depends="init, -init-test-deploy">
|
||||
<jbi:jbi-admin target="stop-service-assembly" >
|
||||
<target-options>
|
||||
<property name="jbi.service.assembly.name" value="${symbol_dollar}{testSA.name}" />
|
||||
</target-options>
|
||||
</jbi:jbi-admin>
|
||||
<jbi:jbi-admin target="shut-down-service-assembly" >
|
||||
<target-options>
|
||||
<property name="jbi.service.assembly.name" value="${symbol_dollar}{testSA.name}" />
|
||||
</target-options>
|
||||
</jbi:jbi-admin>
|
||||
<jbi:jbi-admin target="undeploy-service-assembly">
|
||||
<target-options>
|
||||
<property name="jbi.service.assembly.name" value="${symbol_dollar}{testSA.name}" />
|
||||
</target-options>
|
||||
</jbi:jbi-admin>
|
||||
</target>
|
||||
<!-- used in forced uninstall -->
|
||||
<target name="-do-forced-undeploy-test-sa" depends="init, -init-test-deploy">
|
||||
<jbi:jbi-admin target="stop-service-assembly" failOnError="false" >
|
||||
<target-options>
|
||||
<property name="jbi.service.assembly.name" value="${symbol_dollar}{testSA.name}" />
|
||||
</target-options>
|
||||
</jbi:jbi-admin>
|
||||
<jbi:jbi-admin target="shut-down-service-assembly" failOnError="false" >
|
||||
<target-options>
|
||||
<property name="jbi.service.assembly.name" value="${symbol_dollar}{testSA.name}" />
|
||||
<property name="jbi.force.task" value="true" />
|
||||
</target-options>
|
||||
</jbi:jbi-admin>
|
||||
<jbi:jbi-admin target="undeploy-service-assembly" failOnError="false">
|
||||
<target-options>
|
||||
<property name="jbi.service.assembly.name" value="${symbol_dollar}{testSA.name}" />
|
||||
<property name="jbi.force.task" value="true" />
|
||||
</target-options>
|
||||
</jbi:jbi-admin>
|
||||
</target>
|
||||
|
||||
|
||||
<target name="start-test-components" depends="init, -init-test-deploy" >
|
||||
<jbi:jbi-admin target="start-component" failOnError="false" >
|
||||
<target-options>
|
||||
<property name="jbi.component.name" value="${symbol_dollar}{jbi.component.name}" />
|
||||
</target-options>
|
||||
</jbi:jbi-admin>
|
||||
<jbi:jbi-admin target="start-component" failOnError="false" >
|
||||
<target-options>
|
||||
<property name="jbi.component.name" value="${symbol_dollar}{jbi.soap.binding.name}" />
|
||||
</target-options>
|
||||
</jbi:jbi-admin>
|
||||
</target>
|
||||
|
||||
<target name="jbi-runtime-info" depends="init, -admin-setup" >
|
||||
<jbi:jbi-admin target="list-all" >
|
||||
</jbi:jbi-admin>
|
||||
</target>
|
||||
|
||||
</project>
|
|
@ -0,0 +1,6 @@
|
|||
#set( $symbol_pound = '#' )
|
||||
#set( $symbol_dollar = '$' )
|
||||
#set( $symbol_escape = '\' )
|
||||
javac.debug=true
|
||||
javadoc.preview=true
|
||||
user.properties.file=D:${symbol_escape}${symbol_escape}softwares${symbol_escape}${symbol_escape}openesb_logicoy_last_working57${symbol_escape}${symbol_escape}.netbeans${symbol_escape}${symbol_escape}openesb${symbol_escape}${symbol_escape}build.properties
|
|
@ -0,0 +1,3 @@
|
|||
#set( $symbol_pound = '#' )
|
||||
#set( $symbol_dollar = '$' )
|
||||
#set( $symbol_escape = '\' )
|
|
@ -0,0 +1,91 @@
|
|||
#set( $symbol_pound = '#' )
|
||||
#set( $symbol_dollar = '$' )
|
||||
#set( $symbol_escape = '\' )
|
||||
build.classes.dir=${symbol_dollar}{build.dir}/classes
|
||||
build.classes.excludes=**/*.java,**/*.form
|
||||
${symbol_pound} This directory is removed when the project is cleaned:
|
||||
build.dir=build
|
||||
build.generated.dir=${symbol_dollar}{build.dir}/generated
|
||||
build.predist.dir=${symbol_dollar}{build.dir}/predist
|
||||
build.predist.jar=${symbol_dollar}{build.predist.dir}/component.jar
|
||||
build.predist.lib.dir=${symbol_dollar}{build.predist.dir}/lib
|
||||
${symbol_pound} Only compile against the classpath explicitly listed here:
|
||||
build.sysclasspath=ignore
|
||||
build.test.classes.dir=${symbol_dollar}{build.dir}/test/classes
|
||||
build.test.dir=${symbol_dollar}{build.dir}/test
|
||||
build.test.results.dir=${symbol_dollar}{build.dir}/test/results
|
||||
conf.dir=src/conf
|
||||
debug.classpath=${symbol_escape}
|
||||
${symbol_dollar}{run.classpath}
|
||||
debug.test.classpath=${symbol_escape}
|
||||
${symbol_dollar}{run.test.classpath}
|
||||
${symbol_pound} This directory is removed when the project is cleaned:
|
||||
dist.dir=dist
|
||||
dist.jar=${symbol_dollar}{dist.dir}/${artifactId}.zip
|
||||
dist.javadoc.dir=${symbol_dollar}{dist.dir}/javadoc
|
||||
jar.compress=false
|
||||
javac.classpath=${symbol_escape}
|
||||
${symbol_dollar}{libs.jbi.classpath}:${symbol_escape}
|
||||
${symbol_dollar}{jbi.component.sharedlibs.classpath}:${symbol_escape}
|
||||
${symbol_dollar}{jbi.component.lib.classpath}
|
||||
${symbol_pound} Space-separated list of extra javac options
|
||||
javac.compilerargs=
|
||||
javac.deprecation=false
|
||||
javac.source=1.6
|
||||
javac.target=1.6
|
||||
javac.test.classpath=${symbol_escape}
|
||||
${symbol_dollar}{javac.classpath}:${symbol_escape}
|
||||
${symbol_dollar}{build.classes.dir}:${symbol_escape}
|
||||
${symbol_dollar}{libs.junit.classpath}:${symbol_escape}
|
||||
${symbol_dollar}{libs.jaxws21.classpath}
|
||||
javadoc.additionalparam=
|
||||
javadoc.author=false
|
||||
javadoc.encoding=
|
||||
javadoc.noindex=false
|
||||
javadoc.nonavbar=false
|
||||
javadoc.notree=false
|
||||
javadoc.private=false
|
||||
javadoc.splitindex=true
|
||||
javadoc.use=true
|
||||
javadoc.version=false
|
||||
javadoc.windowtitle=
|
||||
jbi.ant.tasks.classpath=${symbol_escape}
|
||||
${symbol_dollar}{jbi.as.home}/lib/sun-appserv-ant.jar:${symbol_escape}
|
||||
${symbol_dollar}{jbi.as.home}/jbi/lib/jbi-ant-tasks.jar
|
||||
jbi.as.home=D:${symbol_escape}${symbol_escape}softwares${symbol_escape}${symbol_escape}openesb_logicoy_last_working53${symbol_escape}${symbol_escape}glassfish
|
||||
jbi.as.instance.id=[D:${symbol_escape}${symbol_escape}softwares${symbol_escape}${symbol_escape}openesb_logicoy_last_working53${symbol_escape}${symbol_escape}glassfish]deployer:Sun:AppServer::localhost:4848
|
||||
jbi.component.bootstrap.class=serviceengine.ProviderSEInstaller
|
||||
jbi.component.class=serviceengine.ProviderSERuntime
|
||||
jbi.component.description=Description of service engine : ${artifactId}
|
||||
jbi.component.lib.classpath=${symbol_escape}
|
||||
${symbol_dollar}{libs.wsdl4j.162.classpath}
|
||||
jbi.component.name=${artifactId}
|
||||
jbi.component.sharedlibs.classpath=
|
||||
jbi.component.type=service-engine
|
||||
jbi.host=localhost
|
||||
jbi.install.params.file=install-params.properties
|
||||
jbi.install.with.params=false
|
||||
jbi.password=this really long string is used to identify a password that has been stored in the Keyring
|
||||
jbi.port=4848
|
||||
jbi.soap.binding.name=sun-http-binding
|
||||
jbi.username=admin
|
||||
meta.inf.dir=${symbol_dollar}{conf.dir}/META-INF
|
||||
platform.active=default_platform
|
||||
project.jbi.deploy.plugin=./deploy-plugin
|
||||
project.testSA=test/testSA
|
||||
run.classpath=${symbol_escape}
|
||||
${symbol_dollar}{javac.classpath}:${symbol_escape}
|
||||
${symbol_dollar}{build.classes.dir}
|
||||
${symbol_pound} Space-separated list of JVM arguments used when running the project
|
||||
${symbol_pound} (you may also define separate properties like run-sys-prop.name=value instead of -Dname=value
|
||||
${symbol_pound} or test-sys-prop.name=value to set system properties for unit tests):
|
||||
run.jvmargs=
|
||||
run.test.classpath=${symbol_escape}
|
||||
${symbol_dollar}{javac.test.classpath}:${symbol_escape}
|
||||
${symbol_dollar}{build.test.classes.dir}
|
||||
src.dir=src/java
|
||||
test-sys-prop.test.results.dir=${symbol_dollar}{build.test.results.dir}
|
||||
test-sys-prop.test.src.dir=test-sys-prop.test.src.dir
|
||||
test.src.dir=test/java
|
||||
testSA.enabled=true
|
||||
testSA.name=${artifactId}_TestSA
|
|
@ -0,0 +1,20 @@
|
|||
#set( $symbol_pound = '#' )
|
||||
#set( $symbol_dollar = '$' )
|
||||
#set( $symbol_escape = '\' )
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://www.netbeans.org/ns/project/1">
|
||||
<type>org.netbeans.modules.jbi.apisupport.project.jbicomponent</type>
|
||||
<configuration>
|
||||
<data xmlns="http://www.netbeans.org/ns/jbi-component-project/1">
|
||||
<name>${artifactId}</name>
|
||||
<component-type>service-engine</component-type>
|
||||
<minimum-ant-version>1.6.5</minimum-ant-version>
|
||||
<source-roots>
|
||||
<root id="src.dir"/>
|
||||
</source-roots>
|
||||
<test-roots>
|
||||
<root id="test.src.dir"/>
|
||||
</test-roots>
|
||||
</data>
|
||||
</configuration>
|
||||
</project>
|
|
@ -0,0 +1,173 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||
<!--
|
||||
This maven project is configured to invoke netbeans ant build script to build and test the netbeans jbi component
|
||||
project created using the Netbeans IDE. It configures the maven antrun plugin to invoke the netbeans project
|
||||
build scripts at various phases of the maven build lifecycle(compile, test-compile, test, package, integration-test).
|
||||
-->
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>${groupId}</groupId>
|
||||
<artifactId>${artifactId}</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
<version>${version}</version>
|
||||
<name>JBI Component[ServiceEngine]</name>
|
||||
<description>Maven project for JBI Component that contains the
|
||||
maven and netbeans build setup and component code to build and test the JBI Component.</description>
|
||||
<url>http://open-esb.org</url>
|
||||
<build>
|
||||
<directory>build</directory>
|
||||
<sourceDirectory>src/java</sourceDirectory>
|
||||
<testSourceDirectory>test/java</testSourceDirectory>
|
||||
<outputDirectory>build/classes</outputDirectory>
|
||||
<testOutputDirectory>build/test/classes</testOutputDirectory>
|
||||
<defaultGoal>package</defaultGoal>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<!-- configure antrun plugin to invoke netbeans project build scripts for
|
||||
various phases of the project -->
|
||||
<artifactId>maven-antrun-plugin</artifactId>
|
||||
<version>1.2</version>
|
||||
<executions>
|
||||
<!-- This execution cycle is added for organizing package structure as per new
|
||||
service engine user is creating from archtype -->
|
||||
<execution>
|
||||
<id>default-cli</id>
|
||||
<goals>
|
||||
<goal>run</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<tasks>
|
||||
<echo>!!!!!!!!!!!!!!!!!!!!!! Moving Files and organizing package !!!!!!!!!!!!!!!!!!!!!!!!</echo>
|
||||
<ant antfile="m2nbbuild.xml" inheritAll="false" inheritRefs="true" target="postArchTypeGen" />
|
||||
</tasks>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
<dependencies>
|
||||
<!--
|
||||
These dependencies are required in the antrun plugin classpath so that the ant script
|
||||
defining the optional or junit ant tasks will have these jars available in the ant
|
||||
main classpath.
|
||||
-->
|
||||
<dependency>
|
||||
<groupId>ant</groupId>
|
||||
<artifactId>ant-nodeps</artifactId>
|
||||
<version>1.6.5</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>ant</groupId>
|
||||
<artifactId>ant-junit</artifactId>
|
||||
<version>1.6.5</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<version>3.8.2</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
<repositories>
|
||||
<!-- these repositories are required to download the required build artifacts from
|
||||
these repositories. If user already have these repositories defined in their settings.xml
|
||||
these repositories definitions can be removed from this project -->
|
||||
<repository>
|
||||
<id>maven2-repo1</id>
|
||||
<name>Maven2 Central Repository</name>
|
||||
<url>http://repo1.maven.org/maven2</url>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>download-java-net-maven2-repository</id>
|
||||
<name>download.java.net Maven 2.x repository</name>
|
||||
<url>http://download.java.net/maven/2/</url>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>maven-repository.dev.java.net-repository</id>
|
||||
<url>https://maven-repository.dev.java.net/nonav/repository/</url>
|
||||
<layout>legacy</layout>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>ws-zones</id>
|
||||
<name>ws.zones maven repository</name>
|
||||
<url>http://ws.zones.apache.org/repository2/</url>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>apache.org</id>
|
||||
<name>Maven Snapshots</name>
|
||||
<url>http://people.apache.org/repo/m2-snapshot-repository</url>
|
||||
<releases>
|
||||
<enabled>false</enabled>
|
||||
</releases>
|
||||
<snapshots>
|
||||
</snapshots>
|
||||
</repository>
|
||||
</repositories>
|
||||
<pluginRepositories>
|
||||
<pluginRepository>
|
||||
<!-- requied to get the latest ant run plugin -->
|
||||
<id>apache.org</id>
|
||||
<name>Maven Plugin Snapshots</name>
|
||||
<url>http://people.apache.org/repo/m2-snapshot-repository</url>
|
||||
<releases>
|
||||
<enabled>false</enabled>
|
||||
</releases>
|
||||
<snapshots>
|
||||
</snapshots>
|
||||
</pluginRepository>
|
||||
</pluginRepositories>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>ant</groupId>
|
||||
<artifactId>ant-nodeps</artifactId>
|
||||
<version>1.6.5</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>ant</groupId>
|
||||
<artifactId>ant-junit</artifactId>
|
||||
<version>1.6.5</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<version>3.8.2</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven</groupId>
|
||||
<artifactId>maven-ant-tasks</artifactId>
|
||||
<version>2.0.7</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>open-esb.jbi-cdk</groupId>
|
||||
<artifactId>jbi-cdk-ant-tasks</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>open-esb</groupId>
|
||||
<artifactId>jbi</artifactId>
|
||||
<version>1.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>wsdl4j</groupId>
|
||||
<artifactId>wsdl4j</artifactId>
|
||||
<version>1.6.2</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.sun.xml.ws</groupId>
|
||||
<artifactId>jaxws-rt</artifactId>
|
||||
<version>2.1.2</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<properties>
|
||||
<!--
|
||||
! Note - the order of these declarations is unimportant.
|
||||
-->
|
||||
<localRepository>${maven.repo.local}</localRepository>
|
||||
</properties>
|
||||
|
||||
</project>
|
|
@ -0,0 +1,5 @@
|
|||
#Tue Jul 23 17:03:00 IST 2013
|
||||
package=it.pkg
|
||||
version=0.1-SNAPSHOT
|
||||
groupId=archetype.it
|
||||
artifactId=basic
|
|
@ -0,0 +1,45 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!--
|
||||
Document : pom.xml
|
||||
Created on : 23 July, 2013, 12:34 PM
|
||||
Author : Paramjeet Singh, Logicoy
|
||||
Description:
|
||||
Maven project Archtype for OpenESB Service Engine, that contains the
|
||||
maven and netbeans build setup and component code to build and test the JBI Component.
|
||||
-->
|
||||
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<groupId>open-jbi-components</groupId>
|
||||
<artifactId>ServiceEngine-archetype</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
<packaging>maven-archetype</packaging>
|
||||
|
||||
<name>ServiceEngine-archetype</name>
|
||||
|
||||
<build>
|
||||
<extensions>
|
||||
<extension>
|
||||
<groupId>org.apache.maven.archetype</groupId>
|
||||
<artifactId>archetype-packaging</artifactId>
|
||||
<version>2.2</version>
|
||||
</extension>
|
||||
</extensions>
|
||||
|
||||
<pluginManagement>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<artifactId>maven-archetype-plugin</artifactId>
|
||||
<version>2.2</version>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</pluginManagement>
|
||||
</build>
|
||||
|
||||
<description>Maven project Archtype for OpenESB Service Engine, that contains the
|
||||
maven and netbeans build setup and component code to build and test the JBI Component.</description>
|
||||
|
||||
<url>http://open-esb.org</url>
|
||||
</project>
|
|
@ -0,0 +1,82 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!--
|
||||
Document : archtype descripter
|
||||
Created on : 23 July, 2013, 12:34 PM
|
||||
Author : Paramjeet Singh, Logicoy
|
||||
Description:
|
||||
Maven project Archtype descripter for OpenESB Service Engine archtype, this contains All
|
||||
necessory logic for building the archType packages and classes.
|
||||
-->
|
||||
|
||||
|
||||
<archetype-descriptor xsi:schemaLocation="http://maven.apache.org/plugins/maven-archetype-plugin/archetype-descriptor/1.0.0 http://maven.apache.org/xsd/archetype-descriptor-1.0.0.xsd" name="ServiceEngine"
|
||||
xmlns="http://maven.apache.org/plugins/maven-archetype-plugin/archetype-descriptor/1.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<requiredProperties>
|
||||
<requiredProperty key="glassfishLocation">
|
||||
<defaultValue>C:\\GlassFishESBv22\\glassfish</defaultValue>
|
||||
</requiredProperty>
|
||||
</requiredProperties>
|
||||
<fileSets>
|
||||
<fileSet filtered="true" encoding="UTF-8">
|
||||
<directory>test/java</directory>
|
||||
<includes>
|
||||
<include>**/*.xml</include>
|
||||
<include>**/*.java</include>
|
||||
<include>**/*.properties</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
<fileSet filtered="true" encoding="UTF-8">
|
||||
<directory>src/java</directory>
|
||||
<includes>
|
||||
<include>**/*.java</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
<fileSet filtered="true" encoding="UTF-8">
|
||||
<directory>test/testSA</directory>
|
||||
<includes>
|
||||
<include>**/*.xml</include>
|
||||
<include>**/*.properties</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
<fileSet filtered="true" encoding="UTF-8">
|
||||
<directory>nbproject</directory>
|
||||
<includes>
|
||||
<include>**/*.xml</include>
|
||||
<include>**/*.properties</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
<fileSet filtered="true" encoding="UTF-8">
|
||||
<directory>src/conf</directory>
|
||||
<includes>
|
||||
<include>**/*.xml</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
<fileSet filtered="true" encoding="UTF-8">
|
||||
<directory>nbproject/private</directory>
|
||||
<includes>
|
||||
<include>**/*.xml</include>
|
||||
<include>**/*.properties</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
<fileSet encoding="UTF-8">
|
||||
<directory>test/testSA</directory>
|
||||
<includes>
|
||||
<include>**/*.xsl</include>
|
||||
<include>**/*.zip</include>
|
||||
<include>**/*.wsdl</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
<fileSet filtered="true" encoding="UTF-8">
|
||||
<directory></directory>
|
||||
<includes>
|
||||
<include>build.xml</include>
|
||||
<include>install-params.properties</include>
|
||||
<include>m2nbbuild-impl.xml</include>
|
||||
<include>m2nbbuild.properties</include>
|
||||
<include>m2nbbuild.xml</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
</fileSets>
|
||||
</archetype-descriptor>
|
|
@ -0,0 +1,72 @@
|
|||
#set( $symbol_pound = '#' )
|
||||
#set( $symbol_dollar = '$' )
|
||||
#set( $symbol_escape = '\' )
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- You may freely edit this file. See commented blocks below for -->
|
||||
<!-- some examples of how to customize the build. -->
|
||||
<!-- (If you delete it and reopen the project it will be recreated.) -->
|
||||
<project name="${artifactId}" default="default" basedir=".">
|
||||
<description>Builds, tests, and runs the project ${artifactId}.</description>
|
||||
<import file="nbproject/build-impl.xml"/>
|
||||
<!--
|
||||
|
||||
There exist several targets which are by default empty and which can be
|
||||
used for execution of your tasks. These targets are usually executed
|
||||
before and after some main targets. They are:
|
||||
|
||||
-pre-init: called before initialization of project properties
|
||||
-post-init: called after initialization of project properties
|
||||
-pre-compile: called before javac compilation
|
||||
-post-compile: called after javac compilation
|
||||
-pre-compile-single: called before javac compilation of single file
|
||||
-post-compile-single: called after javac compilation of single file
|
||||
-pre-compile-test: called before javac compilation of JUnit tests
|
||||
-post-compile-test: called after javac compilation of JUnit tests
|
||||
-pre-compile-test-single: called before javac compilation of single JUnit test
|
||||
-post-compile-test-single: called after javac compilation of single JUunit test
|
||||
-pre-jar: called before JAR building
|
||||
-post-jar: called after JAR building
|
||||
-post-clean: called after cleaning build products
|
||||
|
||||
(Targets beginning with '-' are not intended to be called on their own.)
|
||||
|
||||
Example of inserting an obfuscator after compilation could look like this:
|
||||
|
||||
<target name="-post-compile">
|
||||
<obfuscate>
|
||||
<fileset dir="${symbol_dollar}{build.classes.dir}"/>
|
||||
</obfuscate>
|
||||
</target>
|
||||
|
||||
For list of available properties check the imported
|
||||
nbproject/build-impl.xml file.
|
||||
|
||||
|
||||
Another way to customize the build is by overriding existing main targets.
|
||||
The targets of interest are:
|
||||
|
||||
-init-macrodef-javac: defines macro for javac compilation
|
||||
-init-macrodef-junit: defines macro for junit execution
|
||||
-init-macrodef-debug: defines macro for class debugging
|
||||
-init-macrodef-java: defines macro for class execution
|
||||
-do-jar-with-manifest: JAR building (if you are using a manifest)
|
||||
-do-jar-without-manifest: JAR building (if you are not using a manifest)
|
||||
run: execution of project
|
||||
-javadoc-build: Javadoc generation
|
||||
test-report: JUnit report generation
|
||||
|
||||
An example of overriding the target for project execution could look like this:
|
||||
|
||||
<target name="run" depends="${artifactId}-impl.jar">
|
||||
<exec dir="bin" executable="launcher.exe">
|
||||
<arg file="${symbol_dollar}{dist.jar}"/>
|
||||
</exec>
|
||||
</target>
|
||||
|
||||
Notice that the overridden target depends on the jar target and not only on
|
||||
the compile target as the regular run target does. Again, for a list of available
|
||||
properties which you can use, check the target you are overriding in the
|
||||
nbproject/build-impl.xml file.
|
||||
|
||||
-->
|
||||
</project>
|
|
@ -0,0 +1,38 @@
|
|||
#set( $symbol_pound = '#' )
|
||||
#set( $symbol_dollar = '$' )
|
||||
#set( $symbol_escape = '\' )
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<groupId>${package}</groupId>
|
||||
<artifactId>${artifactId}-archetype</artifactId>
|
||||
<version>${version}</version>
|
||||
<packaging>maven-archetype</packaging>
|
||||
|
||||
<name>${artifactId}-archetype</name>
|
||||
|
||||
<build>
|
||||
<extensions>
|
||||
<extension>
|
||||
<groupId>org.apache.maven.archetype</groupId>
|
||||
<artifactId>archetype-packaging</artifactId>
|
||||
<version>2.2</version>
|
||||
</extension>
|
||||
</extensions>
|
||||
|
||||
<pluginManagement>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<artifactId>maven-archetype-plugin</artifactId>
|
||||
<version>2.2</version>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</pluginManagement>
|
||||
</build>
|
||||
|
||||
<description>Maven project for JBI Component that contains the
|
||||
maven and netbeans build setup and component code to build and test the JBI Component.</description>
|
||||
|
||||
<url>http://open-esb.org</url>
|
||||
</project>
|
|
@ -0,0 +1,33 @@
|
|||
#set( $symbol_pound = '#' )
|
||||
#set( $symbol_dollar = '$' )
|
||||
#set( $symbol_escape = '\' )
|
||||
${symbol_pound}set( ${symbol_dollar}symbol_pound = '${symbol_pound}' )
|
||||
${symbol_pound}set( ${symbol_dollar}symbol_dollar = '${symbol_dollar}' )
|
||||
${symbol_pound}set( ${symbol_dollar}symbol_escape = '${symbol_escape}' )
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
*** GENERATED FROM project.xml - DO NOT EDIT ***
|
||||
*** EDIT ../build.xml INSTEAD ***
|
||||
-->
|
||||
<project name="${symbol_dollar}{artifactId}-impl" basedir="..">
|
||||
<property file="nbproject/private/platform-private.properties"/>
|
||||
<property file="nbproject/platform.properties"/>
|
||||
<macrodef name="property" uri="http://www.netbeans.org/ns/nb-module-project/2">
|
||||
<attribute name="name"/>
|
||||
<attribute name="value"/>
|
||||
<sequential>
|
||||
<property name="@{name}" value="${symbol_dollar}{symbol_dollar}{@{value}}"/>
|
||||
</sequential>
|
||||
</macrodef>
|
||||
<property file="${symbol_dollar}{symbol_dollar}{user.properties.file}"/>
|
||||
<nbmproject2:property name="harness.dir" value="nbplatform.${symbol_dollar}{symbol_dollar}{nbplatform.active}.harness.dir" xmlns:nbmproject2="http://www.netbeans.org/ns/nb-module-project/2"/>
|
||||
<nbmproject2:property name="netbeans.dest.dir" value="nbplatform.${symbol_dollar}{symbol_dollar}{nbplatform.active}.netbeans.dest.dir" xmlns:nbmproject2="http://www.netbeans.org/ns/nb-module-project/2"/>
|
||||
<fail message="You must define 'nbplatform.${symbol_dollar}{symbol_dollar}{nbplatform.active}.harness.dir'">
|
||||
<condition>
|
||||
<not>
|
||||
<available file="${symbol_dollar}{symbol_dollar}{harness.dir}" type="dir"/>
|
||||
</not>
|
||||
</condition>
|
||||
</fail>
|
||||
<import file="${symbol_dollar}{symbol_dollar}{harness.dir}/build.xml"/>
|
||||
</project>
|
|
@ -0,0 +1,146 @@
|
|||
#set( $symbol_pound = '#' )
|
||||
#set( $symbol_dollar = '$' )
|
||||
#set( $symbol_escape = '\' )
|
||||
${symbol_pound}set( ${symbol_dollar}symbol_pound = '${symbol_pound}' )
|
||||
${symbol_pound}set( ${symbol_dollar}symbol_dollar = '${symbol_dollar}' )
|
||||
${symbol_pound}set( ${symbol_dollar}symbol_escape = '${symbol_escape}' )
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://www.netbeans.org/ns/project/1">
|
||||
<type>org.netbeans.modules.apisupport.project</type>
|
||||
<configuration>
|
||||
<data xmlns="http://www.netbeans.org/ns/nb-module-project/2">
|
||||
<code-name-base>${symbol_dollar}{artifactId}</code-name-base>
|
||||
<standalone/>
|
||||
<module-dependencies>
|
||||
<dependency>
|
||||
<code-name-base>org.apache.tools.ant.module</code-name-base>
|
||||
<build-prerequisite/>
|
||||
<compile-dependency/>
|
||||
<run-dependency>
|
||||
<release-version>3</release-version>
|
||||
<specification-version>3.27.0.2</specification-version>
|
||||
</run-dependency>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<code-name-base>org.jdesktop.layout</code-name-base>
|
||||
<build-prerequisite/>
|
||||
<compile-dependency/>
|
||||
<run-dependency>
|
||||
<release-version>1</release-version>
|
||||
<specification-version>1.4</specification-version>
|
||||
</run-dependency>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<code-name-base>org.netbeans.modules.java.project</code-name-base>
|
||||
<build-prerequisite/>
|
||||
<compile-dependency/>
|
||||
<run-dependency>
|
||||
<release-version>1</release-version>
|
||||
<specification-version>1.12</specification-version>
|
||||
</run-dependency>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<code-name-base>org.netbeans.modules.project.ant</code-name-base>
|
||||
<build-prerequisite/>
|
||||
<compile-dependency/>
|
||||
<run-dependency>
|
||||
<release-version>1</release-version>
|
||||
<specification-version>1.16</specification-version>
|
||||
</run-dependency>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<code-name-base>org.netbeans.modules.projectapi</code-name-base>
|
||||
<build-prerequisite/>
|
||||
<compile-dependency/>
|
||||
<run-dependency>
|
||||
<release-version>1</release-version>
|
||||
<specification-version>1.13</specification-version>
|
||||
</run-dependency>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<code-name-base>org.netbeans.modules.projectuiapi</code-name-base>
|
||||
<build-prerequisite/>
|
||||
<compile-dependency/>
|
||||
<run-dependency>
|
||||
<release-version>1</release-version>
|
||||
<specification-version>1.24.0.6</specification-version>
|
||||
</run-dependency>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<code-name-base>org.netbeans.modules.queries</code-name-base>
|
||||
<build-prerequisite/>
|
||||
<compile-dependency/>
|
||||
<run-dependency>
|
||||
<release-version>1</release-version>
|
||||
<specification-version>1.10</specification-version>
|
||||
</run-dependency>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<code-name-base>org.openide.actions</code-name-base>
|
||||
<build-prerequisite/>
|
||||
<compile-dependency/>
|
||||
<run-dependency>
|
||||
<specification-version>6.6.0.1</specification-version>
|
||||
</run-dependency>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<code-name-base>org.openide.awt</code-name-base>
|
||||
<build-prerequisite/>
|
||||
<compile-dependency/>
|
||||
<run-dependency>
|
||||
<specification-version>6.11.0.1</specification-version>
|
||||
</run-dependency>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<code-name-base>org.openide.dialogs</code-name-base>
|
||||
<build-prerequisite/>
|
||||
<compile-dependency/>
|
||||
<run-dependency>
|
||||
<specification-version>7.5</specification-version>
|
||||
</run-dependency>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<code-name-base>org.openide.execution</code-name-base>
|
||||
<build-prerequisite/>
|
||||
<compile-dependency/>
|
||||
<run-dependency>
|
||||
<specification-version>1.10</specification-version>
|
||||
</run-dependency>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<code-name-base>org.openide.filesystems</code-name-base>
|
||||
<build-prerequisite/>
|
||||
<compile-dependency/>
|
||||
<run-dependency>
|
||||
<specification-version>7.3</specification-version>
|
||||
</run-dependency>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<code-name-base>org.openide.loaders</code-name-base>
|
||||
<build-prerequisite/>
|
||||
<compile-dependency/>
|
||||
<run-dependency>
|
||||
<specification-version>6.5</specification-version>
|
||||
</run-dependency>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<code-name-base>org.openide.nodes</code-name-base>
|
||||
<build-prerequisite/>
|
||||
<compile-dependency/>
|
||||
<run-dependency>
|
||||
<specification-version>7.2.0.1</specification-version>
|
||||
</run-dependency>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<code-name-base>org.openide.util</code-name-base>
|
||||
<build-prerequisite/>
|
||||
<compile-dependency/>
|
||||
<run-dependency>
|
||||
<specification-version>7.9.0.1</specification-version>
|
||||
</run-dependency>
|
||||
</dependency>
|
||||
</module-dependencies>
|
||||
<public-packages/>
|
||||
</data>
|
||||
</configuration>
|
||||
</project>
|
|
@ -0,0 +1,18 @@
|
|||
#set( $symbol_pound = '#' )
|
||||
#set( $symbol_dollar = '$' )
|
||||
#set( $symbol_escape = '\' )
|
||||
${symbol_pound}set( ${symbol_dollar}symbol_pound = '${symbol_pound}' )
|
||||
${symbol_pound}set( ${symbol_dollar}symbol_dollar = '${symbol_dollar}' )
|
||||
${symbol_pound}set( ${symbol_dollar}symbol_escape = '${symbol_escape}' )
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<soapenv:Envelope
|
||||
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
|
||||
xmlns:greet="http://www.sun.com/jbi/examples/sample-service/greetings/types/">
|
||||
<soapenv:Header/>
|
||||
<soapenv:Body>
|
||||
<greet:user xmlns:greet="http://www.sun.com/jbi/examples/sample-service/greetings/types/">
|
||||
<greet:first-name>Srinivasan</greet:first-name>
|
||||
<greet:last-name>Chikkala</greet:last-name>
|
||||
</greet:user>
|
||||
</soapenv:Body>
|
||||
</soapenv:Envelope>
|
|
@ -0,0 +1,18 @@
|
|||
#set( $symbol_pound = '#' )
|
||||
#set( $symbol_dollar = '$' )
|
||||
#set( $symbol_escape = '\' )
|
||||
${symbol_pound}set( ${symbol_dollar}symbol_pound = '${symbol_pound}' )
|
||||
${symbol_pound}set( ${symbol_dollar}symbol_dollar = '${symbol_dollar}' )
|
||||
${symbol_pound}set( ${symbol_dollar}symbol_escape = '${symbol_escape}' )
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<soapenv:Envelope
|
||||
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
|
||||
xmlns:part="http://www.sun.com/jbi/examples/sample-service/greetings/">
|
||||
<soapenv:Header/>
|
||||
<soapenv:Body>
|
||||
<part:userPart xmlns:greet="http://www.sun.com/jbi/examples/sample-service/greetings/types/">
|
||||
<greet:first-name>Srinivasan</greet:first-name>
|
||||
<greet:last-name>Chikkala</greet:last-name>
|
||||
</part:userPart>
|
||||
</soapenv:Body>
|
||||
</soapenv:Envelope>
|
|
@ -0,0 +1,143 @@
|
|||
#set( $symbol_pound = '#' )
|
||||
#set( $symbol_dollar = '$' )
|
||||
#set( $symbol_escape = '\' )
|
||||
${symbol_pound}set( ${symbol_dollar}symbol_pound = '${symbol_pound}' )
|
||||
${symbol_pound}set( ${symbol_dollar}symbol_dollar = '${symbol_dollar}' )
|
||||
${symbol_pound}set( ${symbol_dollar}symbol_escape = '${symbol_escape}' )
|
||||
<?xml version="1.0"?>
|
||||
<project name="testSA" default="default" basedir="." xmlns:jbi="http://www.sun.com/ns/jbi/jbi-ant/1" >
|
||||
|
||||
<target name="default" depends="package" description="compiles and packages the project."/>
|
||||
|
||||
<target name="-pre-init">
|
||||
<!-- Empty placeholder for easier customization. -->
|
||||
<!-- You can override this target in the build.xml file. -->
|
||||
</target>
|
||||
|
||||
<target name="-init-user" depends="-pre-init" >
|
||||
<echo message="loading user properties from ${symbol_dollar}{symbol_dollar}{user.properties.file}" />
|
||||
<property file="${symbol_dollar}{symbol_dollar}{user.properties.file}"/>
|
||||
</target>
|
||||
|
||||
<target name="-init-project" depends="-pre-init, -init-user" >
|
||||
<echo level="debug" message="loading build.properties" />
|
||||
<property file="build.properties"/>
|
||||
</target>
|
||||
|
||||
<target name="-do-init" depends="-pre-init, -init-user, -init-project" >
|
||||
<echo level="debug" message="-do-init called to initialize the build properties " />
|
||||
<property name="build.service.assembly.dir" location="${symbol_dollar}{symbol_dollar}{build.dir}/${symbol_dollar}{symbol_dollar}{service.assembly.name}" />
|
||||
<property name="build.service.assembly.zip" location="${symbol_dollar}{symbol_dollar}{build.dir}/${symbol_dollar}{symbol_dollar}{service.assembly.name}.zip" />
|
||||
</target>
|
||||
|
||||
<target name="-init-check" depends="-pre-init, -init-user, -init-project, -do-init">
|
||||
<fail unless="src.dir">Must set src.dir</fail>
|
||||
<fail unless="build.dir">Must set build.dir</fail>
|
||||
<fail unless="service.assembly.name">Must set service.assembly.name</fail>
|
||||
</target>
|
||||
|
||||
<target name="-init-su-macros"
|
||||
depends="-pre-init, -init-user, -init-project, -do-init" >
|
||||
|
||||
<macrodef name="jbi-su-package" uri="http://www.sun.com/ns/jbi/jbi-ant/1">
|
||||
<attribute name="suDir"/>
|
||||
<attribute name="suName"/>
|
||||
<element name="target-options" optional="true"/>
|
||||
<sequential>
|
||||
<ant inheritAll="false" antfile="@{suDir}/build.xml">
|
||||
<property name="build.dir" location="${symbol_dollar}{symbol_dollar}{build.dir}" />
|
||||
<property name="service.unit.name" value="@{suName}" />
|
||||
<target-options/>
|
||||
<target name="package"/>
|
||||
</ant>
|
||||
<echo level="debug" message ="Copying service unit @{suName} to SA build dir ${symbol_dollar}{symbol_dollar}{build.service.assembly.dir}" />
|
||||
<copy file="${symbol_dollar}{symbol_dollar}{build.dir}/@{suName}.zip" todir="${symbol_dollar}{symbol_dollar}{build.service.assembly.dir}" overwrite="true" />
|
||||
</sequential>
|
||||
</macrodef>
|
||||
|
||||
<macrodef name="jbi-su-clean" uri="http://www.sun.com/ns/jbi/jbi-ant/1">
|
||||
<attribute name="suDir"/>
|
||||
<attribute name="suName"/>
|
||||
<element name="target-options" optional="true"/>
|
||||
<sequential>
|
||||
<ant inheritAll="false" antfile="@{suDir}/build.xml">
|
||||
<property name="build.dir" location="${symbol_dollar}{symbol_dollar}{build.dir}" />
|
||||
<property name="service.unit.name" value="@{suName}" />
|
||||
<target-options/>
|
||||
<target name="clean"/>
|
||||
</ant>
|
||||
</sequential>
|
||||
</macrodef>
|
||||
|
||||
</target>
|
||||
|
||||
<!-- Init project -->
|
||||
<target name="init"
|
||||
depends="-pre-init, -init-user, -init-project, -do-init, -init-check, -init-su-macros"
|
||||
description="initilizes the build settings">
|
||||
</target>
|
||||
|
||||
<!--
|
||||
===================
|
||||
COMPILATION SECTION
|
||||
===================
|
||||
-->
|
||||
<target name="deps-package" depends="init" unless="no.deps">
|
||||
<mkdir dir="${symbol_dollar}{symbol_dollar}{build.dir}"/>
|
||||
<mkdir dir="${symbol_dollar}{symbol_dollar}{build.service.assembly.dir}"/>
|
||||
<!-- for each testSU package -->
|
||||
<!-- package testSUBC -->
|
||||
<jbi:jbi-su-package suDir="${symbol_dollar}{symbol_dollar}{project.testSUBC}" suName="${symbol_dollar}{symbol_dollar}{service.unit.name.testSUBC}" />
|
||||
<!-- package testSUSE -->
|
||||
<jbi:jbi-su-package suDir="${symbol_dollar}{symbol_dollar}{project.testSUSE}" suName="${symbol_dollar}{symbol_dollar}{service.unit.name.testSUSE}" />
|
||||
</target>
|
||||
|
||||
<!-- SA Compile target -->
|
||||
<target name="compile" depends="init, deps-package" description="Compile Service Assembly">
|
||||
<echo level="debug" message ="Compiling Service Assembly" />
|
||||
<mkdir dir="${symbol_dollar}{symbol_dollar}{build.service.assembly.dir}"/>
|
||||
<copy file="${symbol_dollar}{symbol_dollar}{src.dir}/META-INF/jbi.xml" todir="${symbol_dollar}{symbol_dollar}{build.service.assembly.dir}/META-INF" overwrite="true" />
|
||||
</target>
|
||||
|
||||
<!--
|
||||
===================
|
||||
PACKAGING SECTION
|
||||
===================
|
||||
-->
|
||||
<target name="-pre-package" depends="init, deps-package"
|
||||
description="Copy the deps su to the build dir">
|
||||
</target>
|
||||
|
||||
<!-- SA Package target -->
|
||||
<target name="package" depends="init, compile, -pre-package"
|
||||
description="Package the Service Assembly">
|
||||
<echo level="debug" message ="Packaging Service Assembly" />
|
||||
<zip destfile="${symbol_dollar}{symbol_dollar}{build.service.assembly.zip}" basedir="${symbol_dollar}{symbol_dollar}{build.service.assembly.dir}" />
|
||||
</target>
|
||||
|
||||
<!--
|
||||
===============
|
||||
CLEANUP SECTION
|
||||
===============
|
||||
-->
|
||||
<target name="deps-clean" depends="init" unless="no.deps">
|
||||
<!-- clean testSUBC -->
|
||||
<jbi:jbi-su-clean suDir="${symbol_dollar}{symbol_dollar}{project.testSUBC}" suName="${symbol_dollar}{symbol_dollar}{service.unit.name.testSUBC}" />
|
||||
<!-- clean testSUSE -->
|
||||
<jbi:jbi-su-clean suDir="${symbol_dollar}{symbol_dollar}{project.testSUSE}" suName="${symbol_dollar}{symbol_dollar}{service.unit.name.testSUSE}" />
|
||||
</target>
|
||||
|
||||
<!-- Clean target -->
|
||||
<target name="clean" depends="init, deps-clean"
|
||||
description="Clean the Service Assembly" >
|
||||
<delete dir="${symbol_dollar}{symbol_dollar}{build.dir}"/>
|
||||
<delete dir="${symbol_dollar}{symbol_dollar}{dist.dir}"/>
|
||||
<echo level="debug" message ="Cleaned Service Assembly" />
|
||||
</target>
|
||||
|
||||
<!-- Help target -->
|
||||
<target name="help" depends="init" description="Display Help on Service Assembly">
|
||||
<echo message ="Builds Service Assembly ${symbol_dollar}{symbol_dollar}{dist.zip}" />
|
||||
</target>
|
||||
|
||||
</project>
|
|
@ -0,0 +1,47 @@
|
|||
#set( $symbol_pound = '#' )
|
||||
#set( $symbol_dollar = '$' )
|
||||
#set( $symbol_escape = '\' )
|
||||
${symbol_pound}set( ${symbol_dollar}symbol_pound = '${symbol_pound}' )
|
||||
${symbol_pound}set( ${symbol_dollar}symbol_dollar = '${symbol_dollar}' )
|
||||
${symbol_pound}set( ${symbol_dollar}symbol_escape = '${symbol_escape}' )
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<jbi version="1"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns="http://java.sun.com/xml/ns/jbi"
|
||||
xmlns:greet="http://www.sun.com/jbi/examples/sample-service/greetings/"
|
||||
>
|
||||
<service-assembly>
|
||||
<identification>
|
||||
<name>${symbol_dollar}{artifactId}_TestSA</name>
|
||||
<description>This is a test Service Assembly to test Engine</description>
|
||||
</identification>
|
||||
|
||||
<service-unit>
|
||||
<identification>
|
||||
<name>${symbol_dollar}{artifactId}_TestSUBC</name>
|
||||
<description>This service unit enables soap inbound endpoint for a service in service engine</description>
|
||||
</identification>
|
||||
<target>
|
||||
<artifacts-zip>testSUBC.zip</artifacts-zip>
|
||||
<component-name>sun-http-binding</component-name>
|
||||
</target>
|
||||
</service-unit>
|
||||
<service-unit>
|
||||
<identification>
|
||||
<name>${symbol_dollar}{artifactId}_TestSUSE</name>
|
||||
<description>This service unit enables greetings service provider in service engine</description>
|
||||
</identification>
|
||||
<target>
|
||||
<artifacts-zip>testSUSE.zip</artifacts-zip>
|
||||
<component-name>${symbol_dollar}{artifactId}</component-name>
|
||||
</target>
|
||||
</service-unit>
|
||||
<connections>
|
||||
<connection>
|
||||
<consumer endpoint-name="port" service-name="greet:greetService"/>
|
||||
<provider endpoint-name="${symbol_dollar}{artifactId}_JBIPort" service-name="greet:greetService"/>
|
||||
</connection>
|
||||
</connections>
|
||||
|
||||
</service-assembly>
|
||||
</jbi>
|
|
@ -0,0 +1,77 @@
|
|||
#set( $symbol_pound = '#' )
|
||||
#set( $symbol_dollar = '$' )
|
||||
#set( $symbol_escape = '\' )
|
||||
${symbol_pound}set( ${symbol_dollar}symbol_pound = '${symbol_pound}' )
|
||||
${symbol_pound}set( ${symbol_dollar}symbol_dollar = '${symbol_dollar}' )
|
||||
${symbol_pound}set( ${symbol_dollar}symbol_escape = '${symbol_escape}' )
|
||||
<?xml version="1.0"?>
|
||||
<project name="testSUBC" default="default" basedir=".">
|
||||
|
||||
<target name="default" depends="package" description="compiles and packages the project."/>
|
||||
|
||||
<target name="-pre-init">
|
||||
<!-- Empty placeholder for easier customization. -->
|
||||
</target>
|
||||
|
||||
<target name="-init-user" depends="-pre-init" >
|
||||
<echo level="debug" message="loading user properties from ${symbol_dollar}{symbol_dollar}{user.properties.file}" />
|
||||
<property file="${symbol_dollar}{symbol_dollar}{user.properties.file}"/>
|
||||
</target>
|
||||
|
||||
<target name="-init-project" depends="-pre-init, -init-user" >
|
||||
<echo level="debug" message="loading build.properties" />
|
||||
<property file="build.properties"/>
|
||||
</target>
|
||||
|
||||
<target name="-do-init" depends="-pre-init, -init-user, -init-project" >
|
||||
<echo level="debug" message="Nothing to -do-init" />
|
||||
<property name="build.service.unit.dir" location="${symbol_dollar}{symbol_dollar}{build.dir}/${symbol_dollar}{symbol_dollar}{service.unit.name}" />
|
||||
<property name="build.service.unit.zip" location="${symbol_dollar}{symbol_dollar}{build.dir}/${symbol_dollar}{symbol_dollar}{service.unit.name}.zip" />
|
||||
</target>
|
||||
|
||||
<target name="-init-check" depends="-pre-init, -init-user, -init-project,-do-init">
|
||||
<fail unless="src.dir">Must set src.dir</fail>
|
||||
<fail unless="build.dir">Must set build.dir</fail>
|
||||
<fail unless="service.unit.name">Must set service.unit.name</fail>
|
||||
</target>
|
||||
|
||||
<!-- Init project -->
|
||||
<target name="init"
|
||||
depends="-pre-init, -init-user, -init-project,-do-init, -init-check"
|
||||
description="initilizes the build settings">
|
||||
</target>
|
||||
|
||||
<target name="-post-compile-su">
|
||||
<!-- Empty placeholder for easier customization. -->
|
||||
<!-- You can override this target in the build.xml file. -->
|
||||
</target>
|
||||
|
||||
<!-- Clean target -->
|
||||
<target name="clean" depends="init" description="Clean the Service Unit" >
|
||||
<echo level="debug" message ="Cleaning the Service Unit" />
|
||||
<delete dir="${symbol_dollar}{symbol_dollar}{build.dir}"/>
|
||||
</target>
|
||||
|
||||
<!-- Compile target -->
|
||||
<target name="compile" depends="init" description="Compile Service Unit">
|
||||
<echo level="debug" message ="Compiling Service Unit" />
|
||||
<mkdir dir="${symbol_dollar}{symbol_dollar}{build.service.unit.dir}"/>
|
||||
<copy file="${symbol_dollar}{symbol_dollar}{src.dir}/META-INF/jbi.xml" todir="${symbol_dollar}{symbol_dollar}{build.service.unit.dir}/META-INF" overwrite="true" />
|
||||
<copy todir="${symbol_dollar}{symbol_dollar}{build.service.unit.dir}" overwrite="true" >
|
||||
<fileset dir="${symbol_dollar}{symbol_dollar}{src.dir}" >
|
||||
</fileset>
|
||||
</copy>
|
||||
</target>
|
||||
|
||||
<!-- Package target -->
|
||||
<target name="package" depends="init, compile" description="Package the Service Unit" >
|
||||
<echo level="debug" message ="Packaging Service Unit" />
|
||||
<zip destfile="${symbol_dollar}{symbol_dollar}{build.service.unit.zip}" basedir="${symbol_dollar}{symbol_dollar}{build.service.unit.dir}" />
|
||||
</target>
|
||||
|
||||
<!-- Help target -->
|
||||
<target name="help" depends="init" description="Display Help on Service Unit">
|
||||
<echo message ="Builds Service Unit ${symbol_dollar}{symbol_dollar}{build.service.unit.zip}" />
|
||||
</target>
|
||||
|
||||
</project>
|
|
@ -0,0 +1,20 @@
|
|||
#set( $symbol_pound = '#' )
|
||||
#set( $symbol_dollar = '$' )
|
||||
#set( $symbol_escape = '\' )
|
||||
${symbol_pound}set( ${symbol_dollar}symbol_pound = '${symbol_pound}' )
|
||||
${symbol_pound}set( ${symbol_dollar}symbol_dollar = '${symbol_dollar}' )
|
||||
${symbol_pound}set( ${symbol_dollar}symbol_escape = '${symbol_escape}' )
|
||||
<?xml version='1.0' encoding="UTF-8" standalone="yes" ?>
|
||||
<jbi version="1.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns="http://java.sun.com/xml/ns/jbi"
|
||||
xmlns:greet="http://www.sun.com/jbi/examples/sample-service/greetings/"
|
||||
>
|
||||
<services binding-component="true">
|
||||
<consumes service-name="greet:greetService"
|
||||
interface-name="greet:greetings"
|
||||
endpoint-name="port">
|
||||
</consumes>
|
||||
</services>
|
||||
</jbi>
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
#set( $symbol_pound = '#' )
|
||||
#set( $symbol_dollar = '$' )
|
||||
#set( $symbol_escape = '\' )
|
||||
${symbol_pound}set( ${symbol_dollar}symbol_pound = '${symbol_pound}' )
|
||||
${symbol_pound}set( ${symbol_dollar}symbol_dollar = '${symbol_dollar}' )
|
||||
${symbol_pound}set( ${symbol_dollar}symbol_escape = '${symbol_escape}' )
|
||||
<?xml version='1.0' encoding="UTF-8" standalone="yes" ?>
|
||||
<jbi version="1.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns="http://java.sun.com/xml/ns/jbi"
|
||||
xmlns:greet="http://www.sun.com/jbi/examples/sample-service/greetings/"
|
||||
>
|
||||
<services binding-component="true">
|
||||
<consumes service-name="greet:greetService"
|
||||
interface-name="greet:greetings"
|
||||
endpoint-name="port">
|
||||
</consumes>
|
||||
</services>
|
||||
</jbi>
|
||||
|
|
@ -0,0 +1,77 @@
|
|||
#set( $symbol_pound = '#' )
|
||||
#set( $symbol_dollar = '$' )
|
||||
#set( $symbol_escape = '\' )
|
||||
${symbol_pound}set( ${symbol_dollar}symbol_pound = '${symbol_pound}' )
|
||||
${symbol_pound}set( ${symbol_dollar}symbol_dollar = '${symbol_dollar}' )
|
||||
${symbol_pound}set( ${symbol_dollar}symbol_escape = '${symbol_escape}' )
|
||||
<?xml version="1.0"?>
|
||||
<project name="testSUSE" default="default" basedir=".">
|
||||
|
||||
<target name="default" depends="package" description="compiles and packages the project."/>
|
||||
|
||||
<target name="-pre-init">
|
||||
<!-- Empty placeholder for easier customization. -->
|
||||
</target>
|
||||
|
||||
<target name="-init-user" depends="-pre-init" >
|
||||
<echo level="debug" message="loading user properties from ${symbol_dollar}{symbol_dollar}{user.properties.file}" />
|
||||
<property file="${symbol_dollar}{symbol_dollar}{user.properties.file}"/>
|
||||
</target>
|
||||
|
||||
<target name="-init-project" depends="-pre-init, -init-user" >
|
||||
<echo level="debug" message="loading build.properties" />
|
||||
<property file="build.properties"/>
|
||||
</target>
|
||||
|
||||
<target name="-do-init" depends="-pre-init, -init-user, -init-project" >
|
||||
<echo level="debug" message="Nothing to -do-init" />
|
||||
<property name="build.service.unit.dir" location="${symbol_dollar}{symbol_dollar}{build.dir}/${symbol_dollar}{symbol_dollar}{service.unit.name}" />
|
||||
<property name="build.service.unit.zip" location="${symbol_dollar}{symbol_dollar}{build.dir}/${symbol_dollar}{symbol_dollar}{service.unit.name}.zip" />
|
||||
</target>
|
||||
|
||||
<target name="-init-check" depends="-pre-init, -init-user, -init-project,-do-init">
|
||||
<fail unless="src.dir">Must set src.dir</fail>
|
||||
<fail unless="build.dir">Must set build.dir</fail>
|
||||
<fail unless="service.unit.name">Must set service.unit.name</fail>
|
||||
</target>
|
||||
|
||||
<!-- Init project -->
|
||||
<target name="init"
|
||||
depends="-pre-init, -init-user, -init-project,-do-init, -init-check"
|
||||
description="initilizes the build settings">
|
||||
</target>
|
||||
|
||||
<target name="-post-compile-su">
|
||||
<!-- Empty placeholder for easier customization. -->
|
||||
<!-- You can override this target in the build.xml file. -->
|
||||
</target>
|
||||
|
||||
<!-- Clean target -->
|
||||
<target name="clean" depends="init" description="Clean the Service Unit" >
|
||||
<echo level="debug" message ="Cleaning the Service Unit" />
|
||||
<delete dir="${symbol_dollar}{symbol_dollar}{build.dir}"/>
|
||||
</target>
|
||||
|
||||
<!-- Compile target -->
|
||||
<target name="compile" depends="init" description="Compile Service Unit">
|
||||
<echo level="debug" message ="Compiling Service Unit" />
|
||||
<mkdir dir="${symbol_dollar}{symbol_dollar}{build.service.unit.dir}"/>
|
||||
<copy file="${symbol_dollar}{symbol_dollar}{src.dir}/META-INF/jbi.xml" todir="${symbol_dollar}{symbol_dollar}{build.service.unit.dir}/META-INF" overwrite="true" />
|
||||
<copy todir="${symbol_dollar}{symbol_dollar}{build.service.unit.dir}" overwrite="true" >
|
||||
<fileset dir="${symbol_dollar}{symbol_dollar}{src.dir}" >
|
||||
</fileset>
|
||||
</copy>
|
||||
</target>
|
||||
|
||||
<!-- Package target -->
|
||||
<target name="package" depends="init, compile" description="Package the Service Unit" >
|
||||
<echo level="debug" message ="Packaging Service Unit" />
|
||||
<zip destfile="${symbol_dollar}{symbol_dollar}{build.service.unit.zip}" basedir="${symbol_dollar}{symbol_dollar}{build.service.unit.dir}" />
|
||||
</target>
|
||||
|
||||
<!-- Help target -->
|
||||
<target name="help" depends="init" description="Display Help on Service Unit">
|
||||
<echo message ="Builds Service Unit ${symbol_dollar}{symbol_dollar}{build.service.unit.zip}" />
|
||||
</target>
|
||||
|
||||
</project>
|
|
@ -0,0 +1,20 @@
|
|||
#set( $symbol_pound = '#' )
|
||||
#set( $symbol_dollar = '$' )
|
||||
#set( $symbol_escape = '\' )
|
||||
${symbol_pound}set( ${symbol_dollar}symbol_pound = '${symbol_pound}' )
|
||||
${symbol_pound}set( ${symbol_dollar}symbol_dollar = '${symbol_dollar}' )
|
||||
${symbol_pound}set( ${symbol_dollar}symbol_escape = '${symbol_escape}' )
|
||||
<?xml version='1.0' encoding="UTF-8" standalone="yes" ?>
|
||||
<jbi version="1.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns="http://java.sun.com/xml/ns/jbi"
|
||||
xmlns:greet="http://www.sun.com/jbi/examples/sample-service/greetings/"
|
||||
>
|
||||
<services binding-component="false">
|
||||
<provides service-name="greet:greetService"
|
||||
interface-name="greet:greetings"
|
||||
endpoint-name="${symbol_dollar}{artifactId}_JBIPort">
|
||||
</provides>
|
||||
</services>
|
||||
</jbi>
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
#set( $symbol_pound = '#' )
|
||||
#set( $symbol_dollar = '$' )
|
||||
#set( $symbol_escape = '\' )
|
||||
${symbol_pound}set( ${symbol_dollar}symbol_pound = '${symbol_pound}' )
|
||||
${symbol_pound}set( ${symbol_dollar}symbol_dollar = '${symbol_dollar}' )
|
||||
${symbol_pound}set( ${symbol_dollar}symbol_escape = '${symbol_escape}' )
|
||||
<?xml version='1.0' encoding="UTF-8" standalone="yes" ?>
|
||||
<jbi version="1.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns="http://java.sun.com/xml/ns/jbi"
|
||||
xmlns:greet="http://www.sun.com/jbi/examples/sample-service/greetings/"
|
||||
>
|
||||
<services binding-component="false">
|
||||
<provides service-name="greet:greetService"
|
||||
interface-name="greet:greetings"
|
||||
endpoint-name="${symbol_dollar}{artifactId}_JBIPort">
|
||||
</provides>
|
||||
</services>
|
||||
</jbi>
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
#set( $symbol_pound = '#' )
|
||||
#set( $symbol_dollar = '$' )
|
||||
#set( $symbol_escape = '\' )
|
|
@ -0,0 +1,133 @@
|
|||
#set( $symbol_pound = '#' )
|
||||
#set( $symbol_dollar = '$' )
|
||||
#set( $symbol_escape = '\' )
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
*** GENERATED FROM netbeans IDE project - DO NOT EDIT ***
|
||||
*** EDIT ./m2nbbuild.xml INSTEAD ***
|
||||
-->
|
||||
<!-- NOTE: this file is only used in m2nbbuild.xml to build the netbeans project
|
||||
from Maven2 build lifecycle. It will be re-generated/updated from netbeans IDE
|
||||
when the project is opened in the IDE.
|
||||
|
||||
-->
|
||||
<project name="m2nbbuild-impl" default="package" basedir="."
|
||||
xmlns:mvn2nb ="http://www.netbeans.org/ns/mvn2nb/1"
|
||||
xmlns:mvn="urn:maven-artifact-ant" >
|
||||
<description>This project compile, package and test the JBI Components when invoked from Maven2.</description>
|
||||
|
||||
<target name="default" depends="test, package" description="Build and test whole project."/>
|
||||
|
||||
<target name="-pre-init">
|
||||
<!-- Empty placeholder for easier customization. -->
|
||||
<!-- You can override this target in the ./m2nbbuild.xml file. -->
|
||||
</target>
|
||||
|
||||
<target name="-do-init" depends="-pre-init" >
|
||||
<!-- load maven-ant-tasks-2.0.7 task definitions -->
|
||||
<typedef resource="org/apache/maven/artifact/ant/antlib.xml" uri="urn:maven-artifact-ant" classpathref="maven.runtime.classpath"/>
|
||||
<!-- load this project's pom.xml -->
|
||||
<mvn:pom file="pom.xml" id="mvn.prj"/>
|
||||
<!-- load this project's netbeans project properties -->
|
||||
<property file="nbproject/project.properties" prefix="nb.prj"/>
|
||||
<!-- maven distribution jar file path -->
|
||||
<property name="mvn.prj.dist.jar.resolved" location="${symbol_dollar}{mvn.prj.build.directory}/${symbol_dollar}{mvn.prj.build.finalName}.${symbol_dollar}{mvn.prj.packaging}" />
|
||||
<!-- netbeans project distribution jar file path -->
|
||||
<property name="nb.prj.dist.jar.resolved" location="${symbol_dollar}{nb.prj.dist.jar}" />
|
||||
<!--
|
||||
this macro executes a particular target in the netbeans project build
|
||||
script as if it is invoked from the command line. It sets the user.properties.file
|
||||
to the m2nbbuild.properties which will have the required build properties set for
|
||||
building the netbeans project from command line.
|
||||
The content of the m2nbbuild.properties resolves any properties that will be passed
|
||||
through build.properties in the netbeans user.dir when the project is executed from
|
||||
inside the IDE.
|
||||
Users can set all the libraries classpaths w.r.t local maven repository in the
|
||||
m2nbbuild.properties
|
||||
-->
|
||||
<macrodef name="nbbuild" uri="http://www.netbeans.org/ns/mvn2nb/1">
|
||||
<attribute name="target" default="default"/>
|
||||
<sequential>
|
||||
<echo message="Executing netbeans build target @{target}"/>
|
||||
<ant inheritAll="false" inheritRefs="false" target="@{target}" >
|
||||
<property name="user.properties.file" location="m2nbbuild.properties" />
|
||||
<property name="m2nbbuild.setup" value="true" />
|
||||
</ant>
|
||||
</sequential>
|
||||
</macrodef>
|
||||
|
||||
</target>
|
||||
|
||||
<target name="-init-check" depends="-pre-init, -do-init">
|
||||
</target>
|
||||
|
||||
<!-- This execution cycle is added for organizing package structure as per new
|
||||
service engine user is creating from archtype -->
|
||||
<target name="postArchTypeGen" depends="init" description="Post arch type generate task">
|
||||
<mvn2nb:nbbuild target="postArchTypeGen" />
|
||||
</target>
|
||||
|
||||
|
||||
<target name="-post-init">
|
||||
<!-- Empty placeholder for easier customization. -->
|
||||
<!-- You can override this target in the ./m2nbbuild.xml file. -->
|
||||
</target>
|
||||
|
||||
<!-- initilizes the build settings -->
|
||||
<target name="init"
|
||||
depends="-pre-init, -do-init, -post-init, -init-check" >
|
||||
</target>
|
||||
|
||||
<target name="compile" depends="init"
|
||||
description="compiles jbi component source" >
|
||||
<mvn2nb:nbbuild target="compile" />
|
||||
</target>
|
||||
|
||||
<target name="package" depends="init"
|
||||
description="compile and packages jbi component sources into installer zip archive file" >
|
||||
<mvn2nb:nbbuild target="jar" />
|
||||
<copy overwrite="true"
|
||||
file="${symbol_dollar}{nb.prj.dist.jar.resolved}"
|
||||
toFile="${symbol_dollar}{mvn.prj.dist.jar.resolved}" />
|
||||
</target>
|
||||
|
||||
<target name="-do-clean" depends="init">
|
||||
<mvn2nb:nbbuild target="clean" />
|
||||
</target>
|
||||
|
||||
<target name="-post-clean">
|
||||
<!-- Empty placeholder for easier customization. -->
|
||||
<!-- You can override this target in the ../build.xml file. -->
|
||||
</target>
|
||||
|
||||
<target name="clean" depends="init, -do-clean, -post-clean" description="clean up" />
|
||||
|
||||
<!-- testing the JBI Component -->
|
||||
|
||||
<target name="test-compile" depends="init"
|
||||
description="compile the test source " >
|
||||
<mvn2nb:nbbuild target="compile-test" />
|
||||
</target>
|
||||
|
||||
<!-- run junit tests -->
|
||||
|
||||
<target name="test" depends="init"
|
||||
description="run unit tests on the jbi component" >
|
||||
<!--
|
||||
<mvn2nb:nbbuild target="test" />
|
||||
-->
|
||||
</target>
|
||||
|
||||
<!-- run integration tests -->
|
||||
|
||||
<target name="integration-test" depends="init"
|
||||
description="run integration tests on the jbi component" >
|
||||
<!--
|
||||
<mvn2nb:nbbuild target="integration-test" />
|
||||
-->
|
||||
<mvn2nb:nbbuild target="install" />
|
||||
<mvn2nb:nbbuild target="test" />
|
||||
<mvn2nb:nbbuild target="uninstall" />
|
||||
</target>
|
||||
|
||||
</project>
|
|
@ -0,0 +1,48 @@
|
|||
#set( $symbol_pound = '#' )
|
||||
#set( $symbol_dollar = '$' )
|
||||
#set( $symbol_escape = '\' )
|
||||
${symbol_pound} build properties file to set/override the properties of the netbeans project
|
||||
${symbol_pound} build properties when the netbeans build is called from the maven build lifecycle.
|
||||
${symbol_pound} Netbeans project when build from the IDE, uses a build.properties from the user.dir
|
||||
${symbol_pound} of the Netbeans IDE to resolve some of the properties used in the project such as
|
||||
${symbol_pound} the libraries classpath.
|
||||
${symbol_pound} When invoking the Netbeans project build from maven, this build.properties file
|
||||
${symbol_pound} is not available. So, you can add the properties defined in ide build properties
|
||||
${symbol_pound} that this project uses here.
|
||||
${symbol_pound}
|
||||
|
||||
${symbol_pound} default local repository settings. If the repository location is different
|
||||
${symbol_pound} -D command line option should override this (e.g. mvn -Dmaven.repo.local=/my/m2/repository
|
||||
maven.repo.local=${symbol_dollar}{user.home}/.m2/repository
|
||||
${symbol_pound} begin jbi admin settings
|
||||
${symbol_pound} set the below properties if you want to override the properties from nbproject/project.properties
|
||||
${symbol_pound} that sets the application server admin settings.
|
||||
${symbol_pound}
|
||||
${symbol_pound} jbi.as.home=C:/Sun/glassfish-v2-b58g
|
||||
${symbol_pound} jbi.host=localhost
|
||||
${symbol_pound} jbi.port=4848
|
||||
${symbol_pound} jbi.username=admin
|
||||
${symbol_pound} jbi.password=adminadmin
|
||||
${symbol_pound} end jbi admin settings
|
||||
${symbol_pound}
|
||||
|
||||
${symbol_pound} classpath settings
|
||||
junit.ant.task.classpath=${symbol_dollar}{maven.repo.local}/ant/ant-junit/1.6.5/ant-junit-1.6.5.jar
|
||||
junit.runtime.classpath=${symbol_dollar}{maven.repo.local}/junit/junit/3.8.2/junit-3.8.2.jar
|
||||
libs.junit.classpath=${symbol_dollar}{junit.runtime.classpath}:${symbol_dollar}{junit.ant.task.classpath}
|
||||
libs.jbi-cdk-ant-tasks.classpath=${symbol_dollar}{maven.repo.local}/open-esb/jbi-cdk/jbi-cdk-ant-tasks/${version}/jbi-cdk-ant-tasks-${version}.jar
|
||||
|
||||
libs.jbi.classpath=${symbol_dollar}{maven.repo.local}/open-esb/jbi/1.0/jbi-1.0.jar
|
||||
libs.wsdl4j.162.classpath=${symbol_dollar}{maven.repo.local}/wsdl4j/wsdl4j/1.6.2/wsdl4j-1.6.2.jar
|
||||
${symbol_pound} libs.jaxws21.classpath=${symbol_dollar}{jbi.as.home}/lib/javaee.jar:${symbol_dollar}{jbi.as.home}/lib/webservices-rt.jar
|
||||
libs.jaxws21.classpath=${symbol_escape}
|
||||
${symbol_dollar}{maven.repo.local}/javax/activation/activation/1.1/activation-1.1.jar:${symbol_escape}
|
||||
${symbol_dollar}{maven.repo.local}/javax/xml/soap/saaj-api/1.3/saaj-api-1.3.jar:${symbol_escape}
|
||||
${symbol_dollar}{maven.repo.local}/javax/xml/ws/jaxws-api/2.1/jaxws-api-2.1.jar:${symbol_escape}
|
||||
${symbol_dollar}{maven.repo.local}/com/sun/xml/messaging/saaj/saaj-impl/1.3/saaj-impl-1.3.jar:${symbol_escape}
|
||||
${symbol_dollar}{maven.repo.local}/com/sun/xml/ws/jaxws-rt/2.1.2/jaxws-rt-2.1.2.jar
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,37 @@
|
|||
#set( $symbol_pound = '#' )
|
||||
#set( $symbol_dollar = '$' )
|
||||
#set( $symbol_escape = '\' )
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- NOTE: this file is only used from pom.xml to build the netbeans project
|
||||
from Maven2 build lifecycle. -->
|
||||
<!-- You may freely edit this file. See commented blocks below for -->
|
||||
<!-- some examples of how to customize the build. -->
|
||||
<project name="m2nbbuild" default="default" basedir=".">
|
||||
<description>This project compile, package and test the JBI Components when invoked from Maven2.</description>
|
||||
<import file="m2nbbuild-impl.xml"/>
|
||||
<!--
|
||||
|
||||
There exist some targets which are by default empty and which can be
|
||||
used for execution of your tasks. These targets are usually executed
|
||||
before and after some main targets. They are:
|
||||
|
||||
-pre-init: called before initialization of project properties
|
||||
-post-init: called after initialization of project properties
|
||||
-post-clean: called after cleaning build products
|
||||
|
||||
(Targets beginning with '-' are not intended to be called on their own.)
|
||||
|
||||
Example of updating the n2nbbuild.properties file before lauching the
|
||||
netbeans build to set the user level properties like jbi.as.home etc from
|
||||
the environment variables could look like this:
|
||||
|
||||
<target name="-pre-init">
|
||||
<property environment="env"/>
|
||||
<propertyfile file="m2build.properties" >
|
||||
<entry key="jbi.as.home" value="${symbol_dollar}{env.AS_INSTALL}"/>
|
||||
</propertyfile>
|
||||
</target>
|
||||
|
||||
-->
|
||||
|
||||
</project>
|
|
@ -0,0 +1,554 @@
|
|||
#set( $symbol_pound = '#' )
|
||||
#set( $symbol_dollar = '$' )
|
||||
#set( $symbol_escape = '\' )
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
*** GENERATED FROM project.xml - DO NOT EDIT ***
|
||||
*** EDIT ../build.xml INSTEAD ***
|
||||
|
||||
For the purpose of easier reading the script
|
||||
is divided into following sections:
|
||||
|
||||
- initialization
|
||||
- compilation
|
||||
- jar
|
||||
- execution
|
||||
- debugging
|
||||
- javadoc
|
||||
- junit compilation
|
||||
- junit execution
|
||||
- junit debugging
|
||||
- cleanup
|
||||
|
||||
-->
|
||||
<project name="${artifactId}-impl" default="default" basedir=".." xmlns:jbiproject="http://www.netbeans.org/ns/jbi-component-project/1">
|
||||
<import file="jbiadmin-impl.xml"/>
|
||||
<target name="default" depends="test,jar,javadoc" description="Build and test whole project."/>
|
||||
<!--
|
||||
======================
|
||||
INITIALIZATION SECTION
|
||||
======================
|
||||
-->
|
||||
<target name="-pre-init">
|
||||
<!-- Empty placeholder for easier customization. -->
|
||||
<!-- You can override this target in the ../build.xml file. -->
|
||||
</target>
|
||||
<target name="-init-private" depends="-pre-init">
|
||||
<property file="nbproject/private/private.properties"/>
|
||||
</target>
|
||||
<target name="-init-user" depends="-pre-init,-init-private">
|
||||
<property file="${symbol_dollar}{user.properties.file}"/>
|
||||
<!-- 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"/>
|
||||
</target>
|
||||
<target name="-init-project" depends="-pre-init,-init-private,-init-user">
|
||||
<property file="nbproject/project.properties"/>
|
||||
</target>
|
||||
<target name="-do-init" depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property">
|
||||
<available file="${symbol_dollar}{manifest.file}" property="manifest.available"/>
|
||||
<condition property="manifest.available+main.class">
|
||||
<and>
|
||||
<isset property="manifest.available"/>
|
||||
<isset property="main.class"/>
|
||||
<not>
|
||||
<equals arg1="${symbol_dollar}{main.class}" arg2="" trim="true"/>
|
||||
</not>
|
||||
</and>
|
||||
</condition>
|
||||
<condition property="manifest.available+main.class+mkdist.available">
|
||||
<and>
|
||||
<istrue value="${symbol_dollar}{manifest.available+main.class}"/>
|
||||
<isset property="libs.CopyLibs.classpath"/>
|
||||
</and>
|
||||
</condition>
|
||||
<condition property="have.tests">
|
||||
<or>
|
||||
<available file="${symbol_dollar}{test.src.dir}"/>
|
||||
</or>
|
||||
</condition>
|
||||
<condition property="have.sources">
|
||||
<or>
|
||||
<available file="${symbol_dollar}{src.dir}"/>
|
||||
</or>
|
||||
</condition>
|
||||
<condition property="netbeans.home+have.tests">
|
||||
<and>
|
||||
<isset property="netbeans.home"/>
|
||||
<isset property="have.tests"/>
|
||||
</and>
|
||||
</condition>
|
||||
<condition property="no.javadoc.preview">
|
||||
<isfalse value="${symbol_dollar}{javadoc.preview}"/>
|
||||
</condition>
|
||||
<property name="run.jvmargs" value=""/>
|
||||
<property name="javac.compilerargs" value=""/>
|
||||
<property name="work.dir" value="${symbol_dollar}{basedir}"/>
|
||||
<condition property="no.deps">
|
||||
<and>
|
||||
<istrue value="${symbol_dollar}{no.dependencies}"/>
|
||||
</and>
|
||||
</condition>
|
||||
<property name="javac.debug" value="true"/>
|
||||
<property name="javadoc.preview" value="true"/>
|
||||
</target>
|
||||
<target name="-post-init">
|
||||
<!-- Empty placeholder for easier customization. -->
|
||||
<!-- You can override this target in the ../build.xml file. -->
|
||||
</target>
|
||||
<target name="-init-check" depends="-pre-init,-init-private,-init-user,-init-project,-do-init">
|
||||
<fail unless="src.dir">Must set src.dir</fail>
|
||||
<fail unless="test.src.dir">Must set test.src.dir</fail>
|
||||
<fail unless="build.dir">Must set build.dir</fail>
|
||||
<fail unless="dist.dir">Must set dist.dir</fail>
|
||||
<fail unless="build.classes.dir">Must set build.classes.dir</fail>
|
||||
<fail unless="dist.javadoc.dir">Must set dist.javadoc.dir</fail>
|
||||
<fail unless="build.test.classes.dir">Must set build.test.classes.dir</fail>
|
||||
<fail unless="build.test.results.dir">Must set build.test.results.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-macrodef-property">
|
||||
<macrodef name="property" uri="http://www.netbeans.org/ns/jbi-component-project/1">
|
||||
<attribute name="name"/>
|
||||
<attribute name="value"/>
|
||||
<sequential>
|
||||
<property name="@{name}" value="${symbol_dollar}{@{value}}"/>
|
||||
</sequential>
|
||||
</macrodef>
|
||||
</target>
|
||||
<target name="-init-macrodef-javac">
|
||||
<macrodef name="javac" uri="http://www.netbeans.org/ns/jbi-component-project/1">
|
||||
<attribute name="srcdir" default="${symbol_dollar}{src.dir}"/>
|
||||
<attribute name="destdir" default="${symbol_dollar}{build.classes.dir}"/>
|
||||
<attribute name="classpath" default="${symbol_dollar}{javac.classpath}"/>
|
||||
<attribute name="debug" default="${symbol_dollar}{javac.debug}"/>
|
||||
<element name="customize" optional="true"/>
|
||||
<sequential>
|
||||
<javac srcdir="@{srcdir}" destdir="@{destdir}" debug="@{debug}" deprecation="${symbol_dollar}{javac.deprecation}" source="${symbol_dollar}{javac.source}" target="${symbol_dollar}{javac.target}" fork="yes" includeantruntime="false">
|
||||
<classpath>
|
||||
<path path="@{classpath}"/>
|
||||
</classpath>
|
||||
<compilerarg line="${symbol_dollar}{javac.compilerargs}"/>
|
||||
<customize/>
|
||||
</javac>
|
||||
</sequential>
|
||||
</macrodef>
|
||||
</target>
|
||||
<target name="-init-macrodef-junit">
|
||||
<macrodef name="junit" uri="http://www.netbeans.org/ns/jbi-component-project/1">
|
||||
<attribute name="includes" default="**/*Test.java"/>
|
||||
<sequential>
|
||||
<junit showoutput="true" fork="true" dir="${symbol_dollar}{basedir}" failureproperty="tests.failed" errorproperty="tests.failed">
|
||||
<batchtest todir="${symbol_dollar}{build.test.results.dir}">
|
||||
<fileset dir="${symbol_dollar}{test.src.dir}" includes="@{includes}"/>
|
||||
</batchtest>
|
||||
<classpath>
|
||||
<path path="${symbol_dollar}{run.test.classpath}"/>
|
||||
</classpath>
|
||||
<syspropertyset>
|
||||
<propertyref prefix="test-sys-prop."/>
|
||||
<mapper type="glob" from="test-sys-prop.*" to="*"/>
|
||||
</syspropertyset>
|
||||
<formatter type="brief" usefile="false"/>
|
||||
<formatter type="xml"/>
|
||||
<jvmarg line="${symbol_dollar}{run.jvmargs}"/>
|
||||
</junit>
|
||||
</sequential>
|
||||
</macrodef>
|
||||
</target>
|
||||
<target name="-init-macrodef-nbjpda">
|
||||
<macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/jbi-component-project/1">
|
||||
<attribute name="name" default="${symbol_dollar}{main.class}"/>
|
||||
<attribute name="classpath" default="${symbol_dollar}{debug.classpath}"/>
|
||||
<attribute name="stopclassname" default=""/>
|
||||
<sequential>
|
||||
<nbjpdastart transport="dt_socket" addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}">
|
||||
<classpath>
|
||||
<path path="@{classpath}"/>
|
||||
</classpath>
|
||||
</nbjpdastart>
|
||||
</sequential>
|
||||
</macrodef>
|
||||
<macrodef name="nbjpdareload" uri="http://www.netbeans.org/ns/jbi-component-project/1">
|
||||
<attribute name="dir" default="${symbol_dollar}{build.classes.dir}"/>
|
||||
<sequential>
|
||||
<nbjpdareload>
|
||||
<fileset includes="${symbol_dollar}{fix.includes}*.class" dir="@{dir}"/>
|
||||
</nbjpdareload>
|
||||
</sequential>
|
||||
</macrodef>
|
||||
</target>
|
||||
<target name="-init-macrodef-debug">
|
||||
<macrodef name="debug" uri="http://www.netbeans.org/ns/jbi-component-project/1">
|
||||
<attribute name="classname" default="${symbol_dollar}{main.class}"/>
|
||||
<attribute name="classpath" default="${symbol_dollar}{debug.classpath}"/>
|
||||
<element name="customize" optional="true"/>
|
||||
<sequential>
|
||||
<java fork="true" classname="@{classname}" dir="${symbol_dollar}{work.dir}">
|
||||
<jvmarg value="-Xdebug"/>
|
||||
<jvmarg value="-Xnoagent"/>
|
||||
<jvmarg value="-Djava.compiler=none"/>
|
||||
<jvmarg value="-Xrunjdwp:transport=dt_socket,address=${symbol_dollar}{jpda.address}"/>
|
||||
<jvmarg line="${symbol_dollar}{run.jvmargs}"/>
|
||||
<classpath>
|
||||
<path path="@{classpath}"/>
|
||||
</classpath>
|
||||
<syspropertyset>
|
||||
<propertyref prefix="run-sys-prop."/>
|
||||
<mapper type="glob" from="run-sys-prop.*" to="*"/>
|
||||
</syspropertyset>
|
||||
<customize/>
|
||||
</java>
|
||||
</sequential>
|
||||
</macrodef>
|
||||
</target>
|
||||
<target name="-init-macrodef-java">
|
||||
<macrodef name="java" uri="http://www.netbeans.org/ns/jbi-component-project/1">
|
||||
<attribute name="classname" default="${symbol_dollar}{main.class}"/>
|
||||
<element name="customize" optional="true"/>
|
||||
<sequential>
|
||||
<java fork="true" classname="@{classname}" dir="${symbol_dollar}{work.dir}">
|
||||
<jvmarg line="${symbol_dollar}{run.jvmargs}"/>
|
||||
<classpath>
|
||||
<path path="${symbol_dollar}{run.classpath}"/>
|
||||
</classpath>
|
||||
<syspropertyset>
|
||||
<propertyref prefix="run-sys-prop."/>
|
||||
<mapper type="glob" from="run-sys-prop.*" to="*"/>
|
||||
</syspropertyset>
|
||||
<customize/>
|
||||
</java>
|
||||
</sequential>
|
||||
</macrodef>
|
||||
</target>
|
||||
<target name="-init-presetdef-jar">
|
||||
<presetdef name="jar" uri="http://www.netbeans.org/ns/jbi-component-project/1">
|
||||
<jar jarfile="${symbol_dollar}{dist.jar}" compress="${symbol_dollar}{jar.compress}">
|
||||
<jbiproject:fileset dir="${symbol_dollar}{build.classes.dir}"/>
|
||||
</jar>
|
||||
</presetdef>
|
||||
</target>
|
||||
<target name="init" 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-nbjpda,-init-macrodef-debug,-init-macrodef-java,-init-presetdef-jar"/>
|
||||
<!--
|
||||
===================
|
||||
COMPILATION SECTION
|
||||
===================
|
||||
-->
|
||||
<target name="deps-jar" depends="init" unless="no.deps"/>
|
||||
<target name="-pre-pre-compile" depends="init,deps-jar">
|
||||
<mkdir dir="${symbol_dollar}{build.classes.dir}"/>
|
||||
</target>
|
||||
<target name="-pre-compile">
|
||||
<!-- Empty placeholder for easier customization. -->
|
||||
<!-- You can override this target in the ../build.xml file. -->
|
||||
</target>
|
||||
<target name="-do-compile" depends="init,deps-jar,-pre-pre-compile,-pre-compile" if="have.sources">
|
||||
<jbiproject:javac/>
|
||||
<copy todir="${symbol_dollar}{build.classes.dir}">
|
||||
<fileset dir="${symbol_dollar}{src.dir}" excludes="${symbol_dollar}{build.classes.excludes}"/>
|
||||
</copy>
|
||||
</target>
|
||||
<target name="-post-compile">
|
||||
<!-- Empty placeholder for easier customization. -->
|
||||
<!-- You can override this target in the ../build.xml file. -->
|
||||
</target>
|
||||
<target name="compile" depends="init,deps-jar,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project."/>
|
||||
<target name="-pre-compile-single">
|
||||
<!-- Empty placeholder for easier customization. -->
|
||||
<!-- You can override this target in the ../build.xml file. -->
|
||||
</target>
|
||||
<target name="-do-compile-single" depends="init,deps-jar,-pre-pre-compile">
|
||||
<fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
|
||||
<jbiproject:javac>
|
||||
<customize>
|
||||
<patternset includes="${symbol_dollar}{javac.includes}"/>
|
||||
</customize>
|
||||
</jbiproject:javac>
|
||||
</target>
|
||||
<target name="-post-compile-single">
|
||||
<!-- Empty placeholder for easier customization. -->
|
||||
<!-- You can override this target in the ../build.xml file. -->
|
||||
</target>
|
||||
<target name="compile-single" depends="init,deps-jar,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single"/>
|
||||
<!--
|
||||
====================
|
||||
JAR BUILDING SECTION
|
||||
====================
|
||||
-->
|
||||
<target name="-pre-pre-jar" depends="init">
|
||||
<dirname property="dist.jar.dir" file="${symbol_dollar}{dist.jar}"/>
|
||||
<mkdir dir="${symbol_dollar}{dist.jar.dir}"/>
|
||||
<dirname property="build.predist.jar.dir" file="${symbol_dollar}{build.predist.jar}"/>
|
||||
<mkdir dir="${symbol_dollar}{build.predist.dir}"/>
|
||||
</target>
|
||||
<target name="-pre-jar">
|
||||
<!-- Empty placeholder for easier customization. -->
|
||||
<!-- You can override this target in the ../build.xml file. -->
|
||||
</target>
|
||||
<target name="-do-jar-with-libraries" depends="init,compile,-pre-pre-jar,-pre-jar">
|
||||
<property name="build.classes.dir.resolved" location="${symbol_dollar}{build.classes.dir}"/>
|
||||
<property name="libs.jbi.classpath.resolved" location="${symbol_dollar}{libs.jbi.classpath}"/>
|
||||
<pathconvert property="run.classpath.without.build.classes.dir">
|
||||
<path path="${symbol_dollar}{run.classpath}"/>
|
||||
<map from="${symbol_dollar}{build.classes.dir.resolved}" to=""/>
|
||||
<map from="${symbol_dollar}{libs.jbi.classpath.resolved}" to=""/>
|
||||
</pathconvert>
|
||||
<jar destfile="${symbol_dollar}{build.predist.jar}">
|
||||
<fileset dir="${symbol_dollar}{build.classes.dir}"/>
|
||||
</jar>
|
||||
<taskdef classname="com.sun.jbi.cdk.ant.CopyFiles" name="copyfiles" classpath="${symbol_dollar}{libs.jbi-cdk-ant-tasks.classpath}"/>
|
||||
<copyfiles todir="${symbol_dollar}{build.predist.dir}/lib" files="${symbol_dollar}{jbi.component.lib.classpath}"/>
|
||||
</target>
|
||||
<target name="-do-jbi-comp-zip" depends="init,compile,-pre-pre-jar,-pre-jar,-do-jar-with-libraries">
|
||||
<zip destfile="${symbol_dollar}{dist.jar}">
|
||||
<zipfileset dir="${symbol_dollar}{conf.dir}"/>
|
||||
<zipfileset file="${symbol_dollar}{build.predist.jar}"/>
|
||||
<zipfileset dir="${symbol_dollar}{build.predist.dir}/lib" prefix="lib"/>
|
||||
</zip>
|
||||
</target>
|
||||
<target name="-post-jar">
|
||||
<!-- Empty placeholder for easier customization. -->
|
||||
<!-- You can override this target in the ../build.xml file. -->
|
||||
</target>
|
||||
<target name="jar" depends="init,compile,-pre-jar,-do-jar-with-libraries,-do-jbi-comp-zip,-post-jar" description="Build JAR."/>
|
||||
<!--
|
||||
=================
|
||||
EXECUTION SECTION
|
||||
=================
|
||||
-->
|
||||
<target name="run" depends="init,compile" description="Run a main class.">
|
||||
<jbiproject:java>
|
||||
<customize>
|
||||
<arg line="${symbol_dollar}{application.args}"/>
|
||||
</customize>
|
||||
</jbiproject:java>
|
||||
</target>
|
||||
<target name="run-single" depends="init,compile-single">
|
||||
<fail unless="run.class">Must select one file in the IDE or set run.class</fail>
|
||||
<jbiproject:java classname="${symbol_dollar}{run.class}"/>
|
||||
</target>
|
||||
<!--
|
||||
=================
|
||||
DEBUGGING SECTION
|
||||
=================
|
||||
-->
|
||||
<target name="-debug-start-debugger" if="netbeans.home" depends="init">
|
||||
<jbiproject:nbjpdastart name="${symbol_dollar}{debug.class}"/>
|
||||
</target>
|
||||
<target name="-debug-start-debuggee" depends="init,compile">
|
||||
<jbiproject:debug>
|
||||
<customize>
|
||||
<arg line="${symbol_dollar}{application.args}"/>
|
||||
</customize>
|
||||
</jbiproject:debug>
|
||||
</target>
|
||||
<target name="debug" if="netbeans.home" depends="init,compile,-debug-start-debugger,-debug-start-debuggee" description="Debug project in IDE."/>
|
||||
<target name="-debug-start-debugger-stepinto" if="netbeans.home" depends="init">
|
||||
<jbiproject:nbjpdastart stopclassname="${symbol_dollar}{main.class}"/>
|
||||
</target>
|
||||
<target name="debug-stepinto" if="netbeans.home" depends="init,compile,-debug-start-debugger-stepinto,-debug-start-debuggee"/>
|
||||
<target name="-debug-start-debuggee-single" if="netbeans.home" depends="init,compile-single">
|
||||
<fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
|
||||
<jbiproject:debug classname="${symbol_dollar}{debug.class}"/>
|
||||
</target>
|
||||
<target name="debug-single" if="netbeans.home" depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-single"/>
|
||||
<target name="-pre-debug-fix" depends="init">
|
||||
<fail unless="fix.includes">Must set fix.includes</fail>
|
||||
<property name="javac.includes" value="${symbol_dollar}{fix.includes}.java"/>
|
||||
</target>
|
||||
<target name="-do-debug-fix" if="netbeans.home" depends="init,-pre-debug-fix,compile-single">
|
||||
<jbiproject:nbjpdareload/>
|
||||
</target>
|
||||
<target name="debug-fix" if="netbeans.home" depends="init,-pre-debug-fix,-do-debug-fix"/>
|
||||
<target name="connect-debugger" unless="is.debugged">
|
||||
<nbjpdaconnect address="${symbol_dollar}{jpda.address}" host="${symbol_dollar}{jpda.host}" name="${symbol_dollar}{name}" transport="${symbol_dollar}{jpda.transport}">
|
||||
<classpath>
|
||||
<path path="${symbol_dollar}{debug.classpath}"/>
|
||||
</classpath>
|
||||
<sourcepath>
|
||||
<path path="${symbol_dollar}{web.docbase.dir}"/>
|
||||
</sourcepath>
|
||||
</nbjpdaconnect>
|
||||
</target>
|
||||
<!--
|
||||
===============
|
||||
JAVADOC SECTION
|
||||
===============
|
||||
-->
|
||||
<target name="-javadoc-build" depends="init">
|
||||
<mkdir dir="${symbol_dollar}{dist.javadoc.dir}"/>
|
||||
<javadoc destdir="${symbol_dollar}{dist.javadoc.dir}" source="${symbol_dollar}{javac.source}" notree="${symbol_dollar}{javadoc.notree}" use="${symbol_dollar}{javadoc.use}" nonavbar="${symbol_dollar}{javadoc.nonavbar}" noindex="${symbol_dollar}{javadoc.noindex}" splitindex="${symbol_dollar}{javadoc.splitindex}" author="${symbol_dollar}{javadoc.author}" version="${symbol_dollar}{javadoc.version}" windowtitle="${symbol_dollar}{javadoc.windowtitle}" private="${symbol_dollar}{javadoc.private}" additionalparam="${symbol_dollar}{javadoc.additionalparam}" failonerror="true" useexternalfile="true">
|
||||
<classpath>
|
||||
<path path="${symbol_dollar}{javac.classpath}"/>
|
||||
</classpath>
|
||||
<sourcepath>
|
||||
<pathelement location="${symbol_dollar}{src.dir}"/>
|
||||
</sourcepath>
|
||||
<packageset dir="${symbol_dollar}{src.dir}" includes="*/**"/>
|
||||
<fileset dir="${symbol_dollar}{src.dir}" includes="*.java"/>
|
||||
</javadoc>
|
||||
</target>
|
||||
<target name="-javadoc-browse" if="netbeans.home" unless="no.javadoc.preview" depends="init,-javadoc-build">
|
||||
<nbbrowse file="${symbol_dollar}{dist.javadoc.dir}/index.html"/>
|
||||
</target>
|
||||
<target name="javadoc" depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc."/>
|
||||
<!--
|
||||
=========================
|
||||
JUNIT COMPILATION SECTION
|
||||
=========================
|
||||
-->
|
||||
<target name="-pre-pre-compile-test" if="have.tests" depends="init,compile">
|
||||
<mkdir dir="${symbol_dollar}{build.test.classes.dir}"/>
|
||||
</target>
|
||||
<target name="-pre-compile-test">
|
||||
<!-- Empty placeholder for easier customization. -->
|
||||
<!-- You can override this target in the ../build.xml file. -->
|
||||
</target>
|
||||
<target name="-do-compile-test" if="have.tests" depends="init,compile,-pre-pre-compile-test,-pre-compile-test">
|
||||
<jbiproject:javac srcdir="${symbol_dollar}{test.src.dir}" destdir="${symbol_dollar}{build.test.classes.dir}" debug="true" classpath="${symbol_dollar}{javac.test.classpath}"/>
|
||||
<copy todir="${symbol_dollar}{build.test.classes.dir}">
|
||||
<fileset dir="${symbol_dollar}{test.src.dir}" excludes="**/*.java"/>
|
||||
</copy>
|
||||
</target>
|
||||
<target name="-post-compile-test">
|
||||
<!-- Empty placeholder for easier customization. -->
|
||||
<!-- You can override this target in the ../build.xml file. -->
|
||||
</target>
|
||||
<target name="compile-test" depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-do-compile-test,-post-compile-test"/>
|
||||
<target name="-pre-compile-test-single">
|
||||
<!-- Empty placeholder for easier customization. -->
|
||||
<!-- You can override this target in the ../build.xml file. -->
|
||||
</target>
|
||||
<target name="-do-compile-test-single" if="have.tests" depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single">
|
||||
<fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
|
||||
<jbiproject:javac srcdir="${symbol_dollar}{test.src.dir}" destdir="${symbol_dollar}{build.test.classes.dir}" debug="true" classpath="${symbol_dollar}{javac.test.classpath}">
|
||||
<customize>
|
||||
<patternset includes="${symbol_dollar}{javac.includes}"/>
|
||||
</customize>
|
||||
</jbiproject:javac>
|
||||
<copy todir="${symbol_dollar}{build.test.classes.dir}">
|
||||
<fileset dir="${symbol_dollar}{test.src.dir}" excludes="**/*.java"/>
|
||||
</copy>
|
||||
</target>
|
||||
<target name="-post-compile-test-single">
|
||||
<!-- Empty placeholder for easier customization. -->
|
||||
<!-- You can override this target in the ../build.xml file. -->
|
||||
</target>
|
||||
<target name="compile-test-single" depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single"/>
|
||||
<!--
|
||||
=======================
|
||||
JUNIT EXECUTION SECTION
|
||||
=======================
|
||||
-->
|
||||
<target name="-pre-test-run" if="have.tests" depends="init">
|
||||
<mkdir dir="${symbol_dollar}{build.test.results.dir}"/>
|
||||
<antcall inheritall="true" target="run-deploy-test-sa"/>
|
||||
</target>
|
||||
<target name="-do-test-run" if="have.tests" depends="init,compile-test,-pre-test-run">
|
||||
<jbiproject:junit/>
|
||||
</target>
|
||||
<target name="-post-test-run" if="have.tests" depends="init,compile-test,-pre-test-run,-do-test-run">
|
||||
<antcall inheritall="true" target="run-undeploy-test-sa"/>
|
||||
<fail if="tests.failed">Some tests failed; see details above.</fail>
|
||||
</target>
|
||||
<target name="test-report" if="have.tests" depends="init"/>
|
||||
<target name="-test-browse" if="netbeans.home+have.tests" depends="init"/>
|
||||
<target name="test" depends="init,compile-test,-pre-test-run,-do-test-run,test-report,-post-test-run,-test-browse" description="Run unit tests."/>
|
||||
<target name="-pre-test-run-single" if="have.tests" depends="init">
|
||||
<mkdir dir="${symbol_dollar}{build.test.results.dir}"/>
|
||||
</target>
|
||||
<target name="-do-test-run-single" if="have.tests" depends="init,compile-test-single,-pre-test-run-single">
|
||||
<fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
|
||||
<jbiproject:junit includes="${symbol_dollar}{test.includes}"/>
|
||||
</target>
|
||||
<target name="-post-test-run-single" if="have.tests" depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single">
|
||||
<fail if="tests.failed">Some tests failed; see details above.</fail>
|
||||
</target>
|
||||
<target name="test-single" depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single,-post-test-run-single" description="Run single unit test."/>
|
||||
<!--
|
||||
=======================
|
||||
JUNIT DEBUGGING SECTION
|
||||
=======================
|
||||
-->
|
||||
<target name="-debug-start-debuggee-test" if="have.tests" depends="init,compile-test">
|
||||
<fail unless="test.class">Must select one file in the IDE or set test.class</fail>
|
||||
<jbiproject:debug classname="junit.textui.TestRunner" classpath="${symbol_dollar}{debug.test.classpath}">
|
||||
<customize>
|
||||
<arg line="${symbol_dollar}{test.class}"/>
|
||||
</customize>
|
||||
</jbiproject:debug>
|
||||
</target>
|
||||
<target name="-debug-start-debugger-test" if="netbeans.home+have.tests" depends="init,compile-test">
|
||||
<jbiproject:nbjpdastart name="${symbol_dollar}{test.class}" classpath="${symbol_dollar}{debug.test.classpath}"/>
|
||||
</target>
|
||||
<target name="debug-test" depends="init,compile-test,-debug-start-debugger-test,-debug-start-debuggee-test"/>
|
||||
<target name="-do-debug-fix-test" if="netbeans.home" depends="init,-pre-debug-fix,compile-test-single">
|
||||
<jbiproject:nbjpdareload dir="${symbol_dollar}{build.test.classes.dir}"/>
|
||||
</target>
|
||||
<target name="debug-fix-test" if="netbeans.home" depends="init,-pre-debug-fix,-do-debug-fix-test"/>
|
||||
<!--
|
||||
===============
|
||||
CLEANUP SECTION
|
||||
===============
|
||||
-->
|
||||
<target name="deps-clean" depends="init" unless="no.deps"/>
|
||||
<target name="-do-clean" depends="init">
|
||||
<delete dir="${symbol_dollar}{build.dir}"/>
|
||||
<delete dir="${symbol_dollar}{dist.dir}"/>
|
||||
</target>
|
||||
<target name="-post-clean">
|
||||
<!-- Empty placeholder for easier customization. -->
|
||||
<!-- You can override this target in the ../build.xml file. -->
|
||||
</target>
|
||||
<target name="clean" depends="init,deps-clean,-do-clean,-post-clean" description="Clean build products."/>
|
||||
|
||||
<target name="postArchTypeGen" description="Post task after archtype Gen">
|
||||
<echo>Inside: postArchTypeGen - Post task is getting executed!</echo>
|
||||
<!--<mkdir dir="src/java/${artifactId}" />-->
|
||||
<mkdir dir="src/java/net/openesb/component/${artifactId}" />
|
||||
<mkdir dir="src/java/net/openesb/component/${artifactId}/common" />
|
||||
<mkdir dir="src/java/net/openesb/component/${artifactId}/common/wsdl" />
|
||||
<mkdir dir="src/java/net/openesb/component/${artifactId}/common/deployment" />
|
||||
|
||||
<mkdir dir="test/java/net/openesb/component/${artifactId}/test" />
|
||||
|
||||
<copy todir="test/java/net/openesb/component/${artifactId}/test">
|
||||
<fileset dir="test/java/net/openesb/component/cname/test">
|
||||
<include name="*"/>
|
||||
</fileset>
|
||||
</copy>
|
||||
|
||||
<copy todir="src/java/net/openesb/component/${artifactId}">
|
||||
<fileset dir="src/java/net/openesb/component/cname">
|
||||
<include name="*"/>
|
||||
</fileset>
|
||||
</copy>
|
||||
|
||||
<copy todir="src/java/net/openesb/component/${artifactId}/common">
|
||||
<fileset dir="src/java/net/openesb/component/cname/common">
|
||||
<include name="*"/>
|
||||
</fileset>
|
||||
</copy>
|
||||
|
||||
<copy todir="src/java/net/openesb/component/${artifactId}/common/wsdl">
|
||||
<fileset dir="src/java/net/openesb/component/cname/common/wsdl">
|
||||
<include name="*"/>
|
||||
</fileset>
|
||||
</copy>
|
||||
|
||||
<copy todir="src/java/net/openesb/component/${artifactId}/common/deployment">
|
||||
<fileset dir="src/java/net/openesb/component/cname/common/deployment">
|
||||
<include name="*"/>
|
||||
</fileset>
|
||||
</copy>
|
||||
|
||||
<delete dir="src/java/cname" />
|
||||
<delete dir="src/java/net/openesb/component/cname" />
|
||||
<delete dir="test/java/net/openesb/component/cname/" />
|
||||
<echo>Inside: postArchTypeGen - Post task executed successfully!</echo>
|
||||
</target>
|
||||
|
||||
|
||||
</project>
|
|
@ -0,0 +1,11 @@
|
|||
#set( $symbol_pound = '#' )
|
||||
#set( $symbol_dollar = '$' )
|
||||
#set( $symbol_escape = '\' )
|
||||
build.xml.data.CRC32=ac78c060
|
||||
build.xml.script.CRC32=9068f2c7
|
||||
build.xml.stylesheet.CRC32=8add101f@1.0
|
||||
${symbol_pound} This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
|
||||
${symbol_pound} 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=ac78c060
|
||||
nbproject/build-impl.xml.script.CRC32=d15987fd
|
||||
nbproject/build-impl.xml.stylesheet.CRC32=4ed53ee0@1.0
|
|
@ -0,0 +1,504 @@
|
|||
#set( $symbol_pound = '#' )
|
||||
#set( $symbol_dollar = '$' )
|
||||
#set( $symbol_escape = '\' )
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
Copyright (c) 2004-2005 Sun Microsystems Inc., All Rights Reserved.
|
||||
-->
|
||||
<!--
|
||||
@author chikkala
|
||||
-->
|
||||
<project basedir="." default="help" name="jbi_admin" >
|
||||
<description>
|
||||
This ant script contains the jbi ant tasks and the targets and properties using
|
||||
which the jbi admin commands can be performed.
|
||||
</description>
|
||||
<target name="-init-jbiadmin-taskdefs" >
|
||||
<!-- jbi ant task definitions -->
|
||||
<!-- BEGIN - Jbi Ant Task definitions -->
|
||||
<!-- jbi component tasks definitions -->
|
||||
<taskdef name="jbi-install-component" classname="com.sun.jbi.ui.ant.JbiInstallComponentTask" classpath="${symbol_dollar}{jbi.ant.tasks.classpath}" />
|
||||
<taskdef name="jbi-uninstall-component" classname="com.sun.jbi.ui.ant.JbiUninstallComponentTask" classpath="${symbol_dollar}{jbi.ant.tasks.classpath}" />
|
||||
<taskdef name="jbi-start-component" classname="com.sun.jbi.ui.ant.JbiStartComponentTask" classpath="${symbol_dollar}{jbi.ant.tasks.classpath}" />
|
||||
<taskdef name="jbi-stop-component" classname="com.sun.jbi.ui.ant.JbiStopComponentTask" classpath="${symbol_dollar}{jbi.ant.tasks.classpath}" />
|
||||
<taskdef name="jbi-shut-down-component" classname="com.sun.jbi.ui.ant.JbiShutdownComponentTask" classpath="${symbol_dollar}{jbi.ant.tasks.classpath}" />
|
||||
<!-- jbi shared library task definitions -->
|
||||
<taskdef name="jbi-install-shared-library" classname="com.sun.jbi.ui.ant.JbiInstallSharedLibraryTask" classpath="${symbol_dollar}{jbi.ant.tasks.classpath}" />
|
||||
<taskdef name="jbi-uninstall-shared-library" classname="com.sun.jbi.ui.ant.JbiUninstallSharedLibraryTask" classpath="${symbol_dollar}{jbi.ant.tasks.classpath}" />
|
||||
<!-- jbi service assembly deployment tasks definitions -->
|
||||
<taskdef name="jbi-deploy-service-assembly" classname="com.sun.jbi.ui.ant.JbiDeployServiceAssemblyTask" classpath="${symbol_dollar}{jbi.ant.tasks.classpath}" />
|
||||
<taskdef name="jbi-undeploy-service-assembly" classname="com.sun.jbi.ui.ant.JbiUndeployServiceAssemblyTask" classpath="${symbol_dollar}{jbi.ant.tasks.classpath}" />
|
||||
<taskdef name="jbi-start-service-assembly" classname="com.sun.jbi.ui.ant.JbiStartServiceAssemblyTask" classpath="${symbol_dollar}{jbi.ant.tasks.classpath}" />
|
||||
<taskdef name="jbi-stop-service-assembly" classname="com.sun.jbi.ui.ant.JbiStopServiceAssemblyTask" classpath="${symbol_dollar}{jbi.ant.tasks.classpath}" />
|
||||
<taskdef name="jbi-shut-down-service-assembly" classname="com.sun.jbi.ui.ant.JbiShutdownServiceAssemblyTask" classpath="${symbol_dollar}{jbi.ant.tasks.classpath}" />
|
||||
<!-- jbi query tasks definitions -->
|
||||
<taskdef name="jbi-list-service-engines" classname="com.sun.jbi.ui.ant.JbiListServiceEnginesTask" classpath="${symbol_dollar}{jbi.ant.tasks.classpath}" />
|
||||
<taskdef name="jbi-list-binding-components" classname="com.sun.jbi.ui.ant.JbiListBindingComponentsTask" classpath="${symbol_dollar}{jbi.ant.tasks.classpath}" />
|
||||
<taskdef name="jbi-list-shared-libraries" classname="com.sun.jbi.ui.ant.JbiListSharedLibrariesTask" classpath="${symbol_dollar}{jbi.ant.tasks.classpath}" />
|
||||
<taskdef name="jbi-list-service-assemblies" classname="com.sun.jbi.ui.ant.JbiListServiceAssembliesTask" classpath="${symbol_dollar}{jbi.ant.tasks.classpath}" />
|
||||
<!-- END - Jbi Ant Task definitions -->
|
||||
|
||||
<available property="jbi.upgrade.comp.available" classname="com.sun.jbi.ui.ant.JbiUpgradeComponentTask" classpath="${symbol_dollar}{jbi.ant.tasks.classpath}" />
|
||||
|
||||
</target>
|
||||
|
||||
<target name="-init-jbiadmin-target-properties" >
|
||||
<!-- properties used as attribute values for ant tasks -->
|
||||
|
||||
<!-- default username. command line args may override this value. -->
|
||||
<property name="jbi.username" value="admin" />
|
||||
<!-- default password. command line args may override this value. -->
|
||||
<property name="jbi.password" value="adminadmin" />
|
||||
<!-- default host. command line args may override this value. -->
|
||||
<property name="jbi.host" value="localhost" />
|
||||
<!-- default port. command line args may override this value. -->
|
||||
<property name="jbi.port" value="8686" />
|
||||
|
||||
<!-- default value for throwing build exception on task failure.
|
||||
command line args may override this value-->
|
||||
<property name="jbi.task.fail.on.error" value="true" />
|
||||
|
||||
<!-- default value for forcing the task to complete the work even under error condition.
|
||||
this option is being used in the shut-down-component to change the component's state
|
||||
to shutdown even under error conditions.
|
||||
command line args may override this value-->
|
||||
<property name="jbi.force.task" value="false" />
|
||||
|
||||
<!-- default component state value. null or empty for any component state in query tasks -->
|
||||
<property name="jbi.component.state" value="" />
|
||||
|
||||
<!-- default service assembly state value. null or empty for any service assembly state in query tasks -->
|
||||
<property name="jbi.service.assembly.state" value="" />
|
||||
|
||||
<!-- default component name value. null or empty for no component dependency in query tasks where either
|
||||
service engine or binding component name can be specified -->
|
||||
<property name="jbi.component.name" value="" />
|
||||
|
||||
<!-- default service engine name value. null or empty for no service engine name in list-service-engines query task -->
|
||||
<property name="jbi.service.engine.name" value="" />
|
||||
|
||||
<!-- default binding component name value. null or empty for no binding component name in list-binding-components query task -->
|
||||
<property name="jbi.binding.component.name" value="" />
|
||||
|
||||
<!-- default shared library name value. null or empty for no shared library dependency in query tasks -->
|
||||
<property name="jbi.shared.library.name" value="" />
|
||||
|
||||
<!-- default service assembly name value. null or empty for no service assembly dependency in query tasks-->
|
||||
<property name="jbi.service.assembly.name" value="" />
|
||||
|
||||
<!--
|
||||
installer file attribute value. set using command line args.
|
||||
<property name="jbi.install.file" value="mydir/my_comp/installer.zip" />
|
||||
|
||||
for name/value installation configuration parameters in a file.
|
||||
set using command line args.
|
||||
<property name="jbi.install.params.file" value="mydir/my_comp/params.properties" />
|
||||
|
||||
deployment file attribute value. set using command line args.
|
||||
<property name="jbi.deploy.file" value="mydir/my_comp/serviec-assembly.zip" />
|
||||
|
||||
this property should exist to display the list task output in xml text.
|
||||
Note that the value of the property is not important.
|
||||
If the property exists, the list tasks displays the output in xml text.
|
||||
If not exists, the list tasks display the results in a formatted plain text.
|
||||
This property may be set using command line args.
|
||||
<property name="jbi.list.xml.output" value="xml" />
|
||||
|
||||
When user sets this ("jbi.list.xml.output" ) property, the list task output
|
||||
will be saved as xml text into the property "jbi.list.output" for display.
|
||||
Note that the "jbi.list.output" should not be set as ant user property ( with -D option )
|
||||
|
||||
-->
|
||||
</target>
|
||||
|
||||
<target name="-init-jbiadmin" depends="-init-jbiadmin-taskdefs, -init-jbiadmin-target-properties" ></target>
|
||||
|
||||
<!-- Install targets -->
|
||||
<!-- this target should not be called from out side the install target -->
|
||||
<target name="-install-component-without-params" unless="jbi.install.params.file"
|
||||
description="Installs service engine or binding component with installation parameters">
|
||||
<echo message ="Installing a component" />
|
||||
<echo message =" jmx connection info: (host=${symbol_dollar}{jbi.host}, port=${symbol_dollar}{jbi.port}, username=${symbol_dollar}{jbi.username})" />
|
||||
<echo message =" file=${symbol_dollar}{jbi.install.file}" />
|
||||
<jbi-install-component
|
||||
username="${symbol_dollar}{jbi.username}" password="${symbol_dollar}{jbi.password}"
|
||||
host="${symbol_dollar}{jbi.host}" port="${symbol_dollar}{jbi.port}"
|
||||
failOnError="${symbol_dollar}{jbi.task.fail.on.error}"
|
||||
file="${symbol_dollar}{jbi.install.file}"
|
||||
/>
|
||||
</target>
|
||||
|
||||
<!-- this target should not be called from out side the install target -->
|
||||
<target name="-install-component-with-params" if="jbi.install.params.file"
|
||||
description="Installs Service Engine or Binding Component without installtion parameters">
|
||||
<echo message ="Installing a component" />
|
||||
<echo message =" jmx connection info: (host=${symbol_dollar}{jbi.host}, port=${symbol_dollar}{jbi.port}, username=${symbol_dollar}{jbi.username})" />
|
||||
<echo message =" file=${symbol_dollar}{jbi.install.file}" />
|
||||
<jbi-install-component
|
||||
username="${symbol_dollar}{jbi.username}" password="${symbol_dollar}{jbi.password}"
|
||||
host="${symbol_dollar}{jbi.host}" port="${symbol_dollar}{jbi.port}"
|
||||
file="${symbol_dollar}{jbi.install.file}"
|
||||
failOnError="${symbol_dollar}{jbi.task.fail.on.error}"
|
||||
params="${symbol_dollar}{jbi.install.params.file}"
|
||||
/>
|
||||
</target>
|
||||
|
||||
<!-- main install target for installing a component -->
|
||||
<target name="install-component" depends="-init-jbiadmin, -install-component-without-params, -install-component-with-params"
|
||||
description="Installs service engine or binding component">
|
||||
</target>
|
||||
|
||||
<target name="-upgrade-with-upgrade-comp" depends="-init-jbiadmin" if="jbi.upgrade.comp.available"
|
||||
description="Upgrade service engine or binding component">
|
||||
<taskdef name="jbi-upgrade-component" classname="com.sun.jbi.ui.ant.JbiUpgradeComponentTask" classpath="${symbol_dollar}{jbi.ant.tasks.classpath}" />
|
||||
<echo message ="Upgrading a component" />
|
||||
<echo message =" jmx connection info: (host=${symbol_dollar}{jbi.host}, port=${symbol_dollar}{jbi.port}, username=${symbol_dollar}{jbi.username})" />
|
||||
<echo message =" name=${symbol_dollar}{jbi.component.name}" />
|
||||
<echo message =" file=${symbol_dollar}{jbi.install.file}" />
|
||||
<jbi-upgrade-component
|
||||
username="${symbol_dollar}{jbi.username}" password="${symbol_dollar}{jbi.password}"
|
||||
host="${symbol_dollar}{jbi.host}" port="${symbol_dollar}{jbi.port}"
|
||||
failOnError="${symbol_dollar}{jbi.task.fail.on.error}"
|
||||
name="${symbol_dollar}{jbi.component.name}"
|
||||
file="${symbol_dollar}{jbi.install.file}"
|
||||
/>
|
||||
</target>
|
||||
|
||||
<target name="-upgrade-with-update-comp" depends="-init-jbiadmin" unless="jbi.upgrade.comp.available"
|
||||
description="Upgrade service engine or binding component">
|
||||
<taskdef name="jbi-update-component" classname="com.sun.jbi.ui.ant.JbiUpdateComponentTask" classpath="${symbol_dollar}{jbi.ant.tasks.classpath}" />
|
||||
<echo message ="Updating a component" />
|
||||
<echo message =" jmx connection info: (host=${symbol_dollar}{jbi.host}, port=${symbol_dollar}{jbi.port}, username=${symbol_dollar}{jbi.username})" />
|
||||
<echo message =" name=${symbol_dollar}{jbi.component.name}" />
|
||||
<echo message =" file=${symbol_dollar}{jbi.install.file}" />
|
||||
<jbi-update-component
|
||||
username="${symbol_dollar}{jbi.username}" password="${symbol_dollar}{jbi.password}"
|
||||
host="${symbol_dollar}{jbi.host}" port="${symbol_dollar}{jbi.port}"
|
||||
failOnError="${symbol_dollar}{jbi.task.fail.on.error}"
|
||||
name="${symbol_dollar}{jbi.component.name}"
|
||||
file="${symbol_dollar}{jbi.install.file}"
|
||||
/>
|
||||
</target>
|
||||
|
||||
<target name="upgrade-component" depends="-init-jbiadmin, -upgrade-with-upgrade-comp, -upgrade-with-update-comp"
|
||||
description="Upgrade service engine or binding component">
|
||||
</target>
|
||||
|
||||
|
||||
<!-- install target for installing a shared library -->
|
||||
<target name="install-shared-library" depends="-init-jbiadmin"
|
||||
description="Installs shared library">
|
||||
<echo message ="Installing a shared library" />
|
||||
<echo message =" jmx connection info: (host=${symbol_dollar}{jbi.host}, port=${symbol_dollar}{jbi.port}, username=${symbol_dollar}{jbi.username})" />
|
||||
<echo message =" file=${symbol_dollar}{jbi.install.file}" />
|
||||
<jbi-install-shared-library
|
||||
username="${symbol_dollar}{jbi.username}" password="${symbol_dollar}{jbi.password}"
|
||||
host="${symbol_dollar}{jbi.host}" port="${symbol_dollar}{jbi.port}"
|
||||
failOnError="${symbol_dollar}{jbi.task.fail.on.error}"
|
||||
file="${symbol_dollar}{jbi.install.file}"
|
||||
/>
|
||||
</target>
|
||||
|
||||
<!-- uninstall target for uninstalling a component -->
|
||||
<target name="uninstall-component" depends="-init-jbiadmin"
|
||||
description="Uninstalls service engine or binding component">
|
||||
<echo message ="Uninstalling a component" />
|
||||
<echo message =" jmx connection info: (host=${symbol_dollar}{jbi.host}, port=${symbol_dollar}{jbi.port}, username=${symbol_dollar}{jbi.username})" />
|
||||
<echo message =" name=${symbol_dollar}{jbi.component.name}" />
|
||||
<jbi-uninstall-component
|
||||
username="${symbol_dollar}{jbi.username}" password="${symbol_dollar}{jbi.password}"
|
||||
host="${symbol_dollar}{jbi.host}" port="${symbol_dollar}{jbi.port}"
|
||||
failOnError="${symbol_dollar}{jbi.task.fail.on.error}"
|
||||
name="${symbol_dollar}{jbi.component.name}"
|
||||
/>
|
||||
</target>
|
||||
|
||||
<!-- uninstall target for uninstalling a shared library -->
|
||||
<target name="uninstall-shared-library" depends="-init-jbiadmin"
|
||||
description="Uninstalls shared library">
|
||||
<echo message ="Uninstalling a shared library" />
|
||||
<echo message =" jmx connection info: (host=${symbol_dollar}{jbi.host}, port=${symbol_dollar}{jbi.port}, username=${symbol_dollar}{jbi.username})" />
|
||||
<echo message =" name=${symbol_dollar}{jbi.shared.library.name}" />
|
||||
<jbi-uninstall-shared-library
|
||||
username="${symbol_dollar}{jbi.username}" password="${symbol_dollar}{jbi.password}"
|
||||
host="${symbol_dollar}{jbi.host}" port="${symbol_dollar}{jbi.port}"
|
||||
failOnError="${symbol_dollar}{jbi.task.fail.on.error}"
|
||||
name="${symbol_dollar}{jbi.shared.library.name}"
|
||||
/>
|
||||
</target>
|
||||
|
||||
<!-- start component target -->
|
||||
<target name="start-component" depends="-init-jbiadmin"
|
||||
description="Starts service engine or binding component">
|
||||
<echo message ="Starting a component" />
|
||||
<echo message =" jmx connection info: (host=${symbol_dollar}{jbi.host}, port=${symbol_dollar}{jbi.port}, username=${symbol_dollar}{jbi.username})" />
|
||||
<echo message =" name=${symbol_dollar}{jbi.component.name}" />
|
||||
<jbi-start-component
|
||||
username="${symbol_dollar}{jbi.username}" password="${symbol_dollar}{jbi.password}"
|
||||
host="${symbol_dollar}{jbi.host}" port="${symbol_dollar}{jbi.port}"
|
||||
failOnError="${symbol_dollar}{jbi.task.fail.on.error}"
|
||||
name="${symbol_dollar}{jbi.component.name}"
|
||||
/>
|
||||
</target>
|
||||
|
||||
<!-- stop component target -->
|
||||
<target name="stop-component" depends="-init-jbiadmin"
|
||||
description="Stops service engine or binding component">
|
||||
<echo message ="Stopping a component" />
|
||||
<echo message =" jmx connection info: (host=${symbol_dollar}{jbi.host}, port=${symbol_dollar}{jbi.port}, username=${symbol_dollar}{jbi.username})" />
|
||||
<echo message =" name=${symbol_dollar}{jbi.component.name}" />
|
||||
<jbi-stop-component
|
||||
username="${symbol_dollar}{jbi.username}" password="${symbol_dollar}{jbi.password}"
|
||||
host="${symbol_dollar}{jbi.host}" port="${symbol_dollar}{jbi.port}"
|
||||
failOnError="${symbol_dollar}{jbi.task.fail.on.error}"
|
||||
name="${symbol_dollar}{jbi.component.name}"
|
||||
/>
|
||||
</target>
|
||||
|
||||
<!-- shutdown component target -->
|
||||
<target name="shut-down-component" depends="-init-jbiadmin"
|
||||
description="shuts down service engine or binding component">
|
||||
<echo message ="Shutting down a component" />
|
||||
<echo message =" jmx connection info: (host=${symbol_dollar}{jbi.host}, port=${symbol_dollar}{jbi.port}, username=${symbol_dollar}{jbi.username})" />
|
||||
<echo message =" name=${symbol_dollar}{jbi.component.name}" />
|
||||
<jbi-shut-down-component
|
||||
username="${symbol_dollar}{jbi.username}" password="${symbol_dollar}{jbi.password}"
|
||||
host="${symbol_dollar}{jbi.host}" port="${symbol_dollar}{jbi.port}"
|
||||
failOnError="${symbol_dollar}{jbi.task.fail.on.error}"
|
||||
force="${symbol_dollar}{jbi.force.task}"
|
||||
name="${symbol_dollar}{jbi.component.name}"
|
||||
/>
|
||||
</target>
|
||||
|
||||
<!-- deployment targets -->
|
||||
<!-- deploy service assembly target -->
|
||||
<target name="deploy-service-assembly" depends="-init-jbiadmin"
|
||||
description="Deploys Service assembly">
|
||||
<echo message ="Deploying a service assembly" />
|
||||
<echo message =" jmx connection info: (host=${symbol_dollar}{jbi.host}, port=${symbol_dollar}{jbi.port}, username=${symbol_dollar}{jbi.username})" />
|
||||
<echo message =" file=${symbol_dollar}{jbi.deploy.file}" />
|
||||
<jbi-deploy-service-assembly
|
||||
username="${symbol_dollar}{jbi.username}" password="${symbol_dollar}{jbi.password}"
|
||||
host="${symbol_dollar}{jbi.host}" port="${symbol_dollar}{jbi.port}"
|
||||
failOnError="${symbol_dollar}{jbi.task.fail.on.error}"
|
||||
file="${symbol_dollar}{jbi.deploy.file}"
|
||||
/>
|
||||
</target>
|
||||
|
||||
<!-- undeploy service assembly target -->
|
||||
<target name="undeploy-service-assembly" depends="-init-jbiadmin"
|
||||
description="Undeploys service assembly">
|
||||
<echo message ="Undeploying a service assembly" />
|
||||
<echo message =" jmx connection info: (host=${symbol_dollar}{jbi.host}, port=${symbol_dollar}{jbi.port}, username=${symbol_dollar}{jbi.username})" />
|
||||
<echo message =" name=${symbol_dollar}{jbi.service.assembly.name}" />
|
||||
<jbi-undeploy-service-assembly
|
||||
username="${symbol_dollar}{jbi.username}" password="${symbol_dollar}{jbi.password}"
|
||||
host="${symbol_dollar}{jbi.host}" port="${symbol_dollar}{jbi.port}"
|
||||
failOnError="${symbol_dollar}{jbi.task.fail.on.error}"
|
||||
name="${symbol_dollar}{jbi.service.assembly.name}"
|
||||
/>
|
||||
</target>
|
||||
|
||||
<!-- start service assembly target -->
|
||||
<target name="start-service-assembly" depends="-init-jbiadmin"
|
||||
description="starts service assembly">
|
||||
<echo message ="Starting a service assembly" />
|
||||
<echo message =" jmx connection info: (host=${symbol_dollar}{jbi.host}, port=${symbol_dollar}{jbi.port}, username=${symbol_dollar}{jbi.username})" />
|
||||
<echo message =" name=${symbol_dollar}{jbi.service.assembly.name}" />
|
||||
<jbi-start-service-assembly
|
||||
username="${symbol_dollar}{jbi.username}" password="${symbol_dollar}{jbi.password}"
|
||||
host="${symbol_dollar}{jbi.host}" port="${symbol_dollar}{jbi.port}"
|
||||
failOnError="${symbol_dollar}{jbi.task.fail.on.error}"
|
||||
name="${symbol_dollar}{jbi.service.assembly.name}"
|
||||
/>
|
||||
</target>
|
||||
|
||||
<!-- stop service assembly target -->
|
||||
<target name="stop-service-assembly" depends="-init-jbiadmin"
|
||||
description="stops service assembly">
|
||||
<echo message ="Stopping a service assembly" />
|
||||
<echo message =" jmx connection info: (host=${symbol_dollar}{jbi.host}, port=${symbol_dollar}{jbi.port}, username=${symbol_dollar}{jbi.username})" />
|
||||
<echo message =" name=${symbol_dollar}{jbi.service.assembly.name}" />
|
||||
<jbi-stop-service-assembly
|
||||
username="${symbol_dollar}{jbi.username}" password="${symbol_dollar}{jbi.password}"
|
||||
host="${symbol_dollar}{jbi.host}" port="${symbol_dollar}{jbi.port}"
|
||||
failOnError="${symbol_dollar}{jbi.task.fail.on.error}"
|
||||
name="${symbol_dollar}{jbi.service.assembly.name}"
|
||||
/>
|
||||
</target>
|
||||
|
||||
<!-- shutdown service assembly target -->
|
||||
<target name="shut-down-service-assembly" depends="-init-jbiadmin"
|
||||
description="shuts down service assembly">
|
||||
<echo message ="Shutting down a service assembly" />
|
||||
<echo message =" jmx connection info: (host=${symbol_dollar}{jbi.host}, port=${symbol_dollar}{jbi.port}, username=${symbol_dollar}{jbi.username})" />
|
||||
<echo message =" name=${symbol_dollar}{jbi.service.assembly.name}" />
|
||||
<jbi-shut-down-service-assembly
|
||||
username="${symbol_dollar}{jbi.username}" password="${symbol_dollar}{jbi.password}"
|
||||
host="${symbol_dollar}{jbi.host}" port="${symbol_dollar}{jbi.port}"
|
||||
failOnError="${symbol_dollar}{jbi.task.fail.on.error}"
|
||||
name="${symbol_dollar}{jbi.service.assembly.name}"
|
||||
/>
|
||||
</target>
|
||||
|
||||
|
||||
<!-- Query targets -->
|
||||
<!-- lists info on the service engines -->
|
||||
<target name="-list-service-engines-in-xml-ouput" if="jbi.list.xml.output"
|
||||
description="List Service Engines in xml text output" >
|
||||
<jbi-list-service-engines
|
||||
username="${symbol_dollar}{jbi.username}" password="${symbol_dollar}{jbi.password}"
|
||||
host="${symbol_dollar}{jbi.host}" port="${symbol_dollar}{jbi.port}"
|
||||
failOnError="${symbol_dollar}{jbi.task.fail.on.error}"
|
||||
serviceEngineName="${symbol_dollar}{jbi.service.engine.name}"
|
||||
state="${symbol_dollar}{jbi.component.state}"
|
||||
sharedLibraryName="${symbol_dollar}{jbi.shared.library.name}"
|
||||
serviceAssemblyName="${symbol_dollar}{jbi.service.assembly.name}"
|
||||
xmlOutput="jbi.list.output"
|
||||
/>
|
||||
<echo message="${symbol_dollar}{jbi.list.output}" />
|
||||
</target>
|
||||
|
||||
<target name="-list-service-engines-in-text-output" unless="jbi.list.xml.output"
|
||||
description="List Service Engines in formatted plain text">
|
||||
<jbi-list-service-engines
|
||||
username="${symbol_dollar}{jbi.username}" password="${symbol_dollar}{jbi.password}"
|
||||
host="${symbol_dollar}{jbi.host}" port="${symbol_dollar}{jbi.port}"
|
||||
failOnError="${symbol_dollar}{jbi.task.fail.on.error}"
|
||||
serviceEngineName="${symbol_dollar}{jbi.service.engine.name}"
|
||||
state="${symbol_dollar}{jbi.component.state}"
|
||||
sharedLibraryName="${symbol_dollar}{jbi.shared.library.name}"
|
||||
serviceAssemblyName="${symbol_dollar}{jbi.service.assembly.name}"
|
||||
/>
|
||||
</target>
|
||||
|
||||
<target name="list-service-engines"
|
||||
description="List Service Engines"
|
||||
depends="-init-jbiadmin, -list-service-engines-in-xml-ouput,
|
||||
-list-service-engines-in-text-output"
|
||||
/>
|
||||
|
||||
<!-- lists info on the binding components -->
|
||||
<target name="-list-binding-components-in-xml-ouput" if="jbi.list.xml.output"
|
||||
description="List Binding Components ">
|
||||
<jbi-list-binding-components
|
||||
username="${symbol_dollar}{jbi.username}" password="${symbol_dollar}{jbi.password}"
|
||||
host="${symbol_dollar}{jbi.host}" port="${symbol_dollar}{jbi.port}"
|
||||
failOnError="${symbol_dollar}{jbi.task.fail.on.error}"
|
||||
bindingComponentName="${symbol_dollar}{jbi.binding.component.name}"
|
||||
state="${symbol_dollar}{jbi.component.state}"
|
||||
sharedLibraryName="${symbol_dollar}{jbi.shared.library.name}"
|
||||
serviceAssemblyName="${symbol_dollar}{jbi.service.assembly.name}"
|
||||
xmlOutput="jbi.list.output"
|
||||
/>
|
||||
<echo message="${symbol_dollar}{jbi.list.output}" />
|
||||
</target>
|
||||
|
||||
<target name="-list-binding-components-in-text-output" unless="jbi.list.xml.output"
|
||||
description="List Binding Components ">
|
||||
<jbi-list-binding-components
|
||||
username="${symbol_dollar}{jbi.username}" password="${symbol_dollar}{jbi.password}"
|
||||
host="${symbol_dollar}{jbi.host}" port="${symbol_dollar}{jbi.port}"
|
||||
failOnError="${symbol_dollar}{jbi.task.fail.on.error}"
|
||||
bindingComponentName="${symbol_dollar}{jbi.binding.component.name}"
|
||||
state="${symbol_dollar}{jbi.component.state}"
|
||||
sharedLibraryName="${symbol_dollar}{jbi.shared.library.name}"
|
||||
serviceAssemblyName="${symbol_dollar}{jbi.service.assembly.name}"
|
||||
/>
|
||||
</target>
|
||||
|
||||
<target name="list-binding-components"
|
||||
description="List Binding Components"
|
||||
depends="-init-jbiadmin, -list-binding-components-in-xml-ouput,
|
||||
-list-binding-components-in-text-output"
|
||||
/>
|
||||
|
||||
<!-- lists info on the shared libraries -->
|
||||
<target name="-list-shared-libraries-in-xml-ouput" if="jbi.list.xml.output"
|
||||
description="List Shared Libraries">
|
||||
<jbi-list-shared-libraries
|
||||
username="${symbol_dollar}{jbi.username}" password="${symbol_dollar}{jbi.password}"
|
||||
host="${symbol_dollar}{jbi.host}" port="${symbol_dollar}{jbi.port}"
|
||||
failOnError="${symbol_dollar}{jbi.task.fail.on.error}"
|
||||
sharedLibraryName="${symbol_dollar}{jbi.shared.library.name}"
|
||||
componentName="${symbol_dollar}{jbi.component.name}"
|
||||
xmlOutput="jbi.list.output"
|
||||
/>
|
||||
<echo message="${symbol_dollar}{jbi.list.output}" />
|
||||
</target>
|
||||
|
||||
<target name="-list-shared-libraries-in-text-output" unless="jbi.list.xml.output"
|
||||
description="List Shared Libraries">
|
||||
<jbi-list-shared-libraries
|
||||
username="${symbol_dollar}{jbi.username}" password="${symbol_dollar}{jbi.password}"
|
||||
host="${symbol_dollar}{jbi.host}" port="${symbol_dollar}{jbi.port}"
|
||||
failOnError="${symbol_dollar}{jbi.task.fail.on.error}"
|
||||
sharedLibraryName="${symbol_dollar}{jbi.shared.library.name}"
|
||||
componentName="${symbol_dollar}{jbi.component.name}"
|
||||
/>
|
||||
</target>
|
||||
|
||||
<target name="list-shared-libraries"
|
||||
description="List Shared Libraries"
|
||||
depends="-init-jbiadmin, -list-shared-libraries-in-xml-ouput,
|
||||
-list-shared-libraries-in-text-output"
|
||||
/>
|
||||
|
||||
|
||||
<!-- lists info on the service assemblies deployed -->
|
||||
<target name="-list-service-assemblies-in-xml-ouput" if="jbi.list.xml.output"
|
||||
description="List Service Assemblies">
|
||||
<jbi-list-service-assemblies
|
||||
username="${symbol_dollar}{jbi.username}" password="${symbol_dollar}{jbi.password}"
|
||||
host="${symbol_dollar}{jbi.host}" port="${symbol_dollar}{jbi.port}"
|
||||
failOnError="${symbol_dollar}{jbi.task.fail.on.error}"
|
||||
serviceAssemblyName="${symbol_dollar}{jbi.service.assembly.name}"
|
||||
state="${symbol_dollar}{jbi.service.assembly.state}"
|
||||
componentName="${symbol_dollar}{jbi.component.name}"
|
||||
xmlOutput="jbi.list.output"
|
||||
/>
|
||||
<echo message="${symbol_dollar}{jbi.list.output}" />
|
||||
</target>
|
||||
|
||||
<target name="-list-service-assemblies-in-text-output" unless="jbi.list.xml.output"
|
||||
description="List Service Assemblies">
|
||||
<jbi-list-service-assemblies
|
||||
username="${symbol_dollar}{jbi.username}" password="${symbol_dollar}{jbi.password}"
|
||||
host="${symbol_dollar}{jbi.host}" port="${symbol_dollar}{jbi.port}"
|
||||
failOnError="${symbol_dollar}{jbi.task.fail.on.error}"
|
||||
serviceAssemblyName="${symbol_dollar}{jbi.service.assembly.name}"
|
||||
state="${symbol_dollar}{jbi.service.assembly.state}"
|
||||
componentName="${symbol_dollar}{jbi.component.name}"
|
||||
/>
|
||||
</target>
|
||||
|
||||
<target name="list-service-assemblies"
|
||||
description="List Service Assemblies"
|
||||
depends="-init-jbiadmin, -list-service-assemblies-in-xml-ouput,
|
||||
-list-service-assemblies-in-text-output"
|
||||
/>
|
||||
|
||||
|
||||
<!-- undocumented target : calls all the query tasks -->
|
||||
<target name="list-all"
|
||||
description="List Details about All Components and Deployments "
|
||||
depends = "list-service-engines,
|
||||
list-binding-components,
|
||||
list-shared-libraries,
|
||||
list-service-assemblies " >
|
||||
</target>
|
||||
|
||||
<!-- help target -->
|
||||
<target name="usage" depends="help" />
|
||||
<target name="help" description="Help information">
|
||||
<echo>
|
||||
|
||||
Usage : ant -f <fullpath>/jbi_admin.xml [options] [target]
|
||||
options: -D<property>=<value>
|
||||
Specify a property/value pairs as options that are valid for the target.
|
||||
target : ant target name in jbi_admin.xml
|
||||
|
||||
</echo>
|
||||
</target>
|
||||
|
||||
</project>
|
|
@ -0,0 +1,339 @@
|
|||
#set( $symbol_pound = '#' )
|
||||
#set( $symbol_dollar = '$' )
|
||||
#set( $symbol_escape = '\' )
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project name="jbiadmin-impl" default="jbi_component_admin-help" basedir=".." xmlns:jbi="http://www.sun.com/ns/jbi/jbi-ant/1" >
|
||||
<description>Install, uninstall, reinstall, start, stop, shutdown jbi components.</description>
|
||||
|
||||
<!--
|
||||
======================
|
||||
INITIALIZATION SECTION
|
||||
======================
|
||||
-->
|
||||
|
||||
<target name="-init-admin-setup" depends="init" >
|
||||
<!--
|
||||
jbi properties that are set in project.properties file
|
||||
<property name="jbi.install.file" location="${symbol_dollar}{dist.jar}" />
|
||||
<property name="jbi.deploy.file" location="../testSA/${symbol_dollar}{dist.jar}" />
|
||||
<property name="jbi.component.name" value="${symbol_dollar}{jbi.component.name}" />
|
||||
<property name="jbi.host" location="localhost" />
|
||||
<property name="jbi.port" value="8686" />
|
||||
<property name="jbi.username" value="admin" />
|
||||
<property name="jbi.password" value="adminadmin" />
|
||||
-->
|
||||
<property name="jbi.task.fail.on.error" value="true" />
|
||||
<!-- jbi admin ant script settings -->
|
||||
<property name="jbi.admin.xml" location="nbproject/jbi_admin.xml" />
|
||||
|
||||
</target>
|
||||
|
||||
<target name="-init-admin-setup-check" >
|
||||
<!--
|
||||
<fail unless="jbi.as.home">Must set jbi.as.home</fail>
|
||||
-->
|
||||
<fail unless="jbi.host">Must set jbi.host</fail>
|
||||
<fail unless="jbi.port">Must set jbi.port</fail>
|
||||
<fail unless="jbi.username">Must set jbi.username</fail>
|
||||
<fail unless="jbi.password">Must set jbi.password</fail>
|
||||
</target>
|
||||
|
||||
<target name="-init-macrodef-jbi-admin">
|
||||
<macrodef name="jbi-admin" uri="http://www.sun.com/ns/jbi/jbi-ant/1">
|
||||
<attribute name="target"/>
|
||||
<attribute name="host" default="${symbol_dollar}{jbi.host}"/>
|
||||
<attribute name="port" default="${symbol_dollar}{jbi.port}"/>
|
||||
<attribute name="username" default="${symbol_dollar}{jbi.username}"/>
|
||||
<attribute name="password" default="${symbol_dollar}{jbi.password}"/>
|
||||
<attribute name="failOnError" default="true"/>
|
||||
<element name="target-options" optional="true"/>
|
||||
<sequential>
|
||||
<ant inheritAll="false" dir="${symbol_dollar}{basedir}" antfile="${symbol_dollar}{jbi.admin.xml}">
|
||||
<property name="jbi.ant.tasks.classpath" value="${symbol_dollar}{jbi.ant.tasks.classpath}"/>
|
||||
<property name="jbi.host" value="@{host}"/>
|
||||
<property name="jbi.port" value="@{port}"/>
|
||||
<property name="jbi.username" value="@{username}"/>
|
||||
<property name="jbi.password" value="@{password}"/>
|
||||
<property name="jbi.task.fail.on.error" value="@{failOnError}"/>
|
||||
<target-options/>
|
||||
<target name="@{target}"/>
|
||||
</ant>
|
||||
</sequential>
|
||||
</macrodef>
|
||||
|
||||
</target>
|
||||
|
||||
<target name="-admin-setup" depends="init, -init-admin-setup, -init-admin-setup-check, -init-macrodef-jbi-admin" />
|
||||
|
||||
|
||||
<!--
|
||||
================================
|
||||
COMPONENT ADMINISTRATION SECTION
|
||||
================================
|
||||
-->
|
||||
|
||||
<target name="start" depends="init, -admin-setup" >
|
||||
<jbi:jbi-admin target="start-component" failOnError="${symbol_dollar}{jbi.task.fail.on.error}" >
|
||||
<target-options>
|
||||
<property name="jbi.component.name" value="${symbol_dollar}{jbi.component.name}" />
|
||||
</target-options>
|
||||
</jbi:jbi-admin>
|
||||
</target>
|
||||
|
||||
<target name="stop" depends="init, -admin-setup" >
|
||||
<jbi:jbi-admin target="stop-component" failOnError="${symbol_dollar}{jbi.task.fail.on.error}" >
|
||||
<target-options>
|
||||
<property name="jbi.component.name" value="${symbol_dollar}{jbi.component.name}" />
|
||||
</target-options>
|
||||
</jbi:jbi-admin>
|
||||
</target>
|
||||
|
||||
<target name="shutdown" depends="init, -admin-setup" >
|
||||
<jbi:jbi-admin target="shut-down-component" failOnError="${symbol_dollar}{jbi.task.fail.on.error}" >
|
||||
<target-options>
|
||||
<property name="jbi.component.name" value="${symbol_dollar}{jbi.component.name}" />
|
||||
</target-options>
|
||||
</jbi:jbi-admin>
|
||||
</target>
|
||||
|
||||
<target name="forced-shutdown" depends="init, -admin-setup" >
|
||||
<jbi:jbi-admin target="shut-down-component" failOnError="${symbol_dollar}{jbi.task.fail.on.error}" >
|
||||
<target-options>
|
||||
<property name="jbi.component.name" value="${symbol_dollar}{jbi.component.name}" />
|
||||
<property name="jbi.force.task" value="true" />
|
||||
</target-options>
|
||||
</jbi:jbi-admin>
|
||||
</target>
|
||||
|
||||
<target name="-do-install-without-params" depends="init, jar, -admin-setup" unless="do.install.with.params">
|
||||
|
||||
<jbi:jbi-admin target="install-component" >
|
||||
<target-options>
|
||||
<property name="jbi.install.file" location="${symbol_dollar}{dist.jar}" />
|
||||
</target-options>
|
||||
</jbi:jbi-admin>
|
||||
|
||||
<antcall target="start" >
|
||||
<param name="jbi.task.fail.on.error" value="false" />
|
||||
</antcall>
|
||||
|
||||
</target>
|
||||
|
||||
<target name="-do-install-with-params" depends="init, jar, -admin-setup" if="do.install.with.params">
|
||||
|
||||
<jbi:jbi-admin target="install-component" >
|
||||
<target-options>
|
||||
<property name="jbi.install.file" location="${symbol_dollar}{dist.jar}" />
|
||||
<property name="jbi.install.params.file" location="${symbol_dollar}{jbi.install.params.file}" />
|
||||
</target-options>
|
||||
</jbi:jbi-admin>
|
||||
|
||||
<antcall target="start" >
|
||||
<param name="jbi.task.fail.on.error" value="false" />
|
||||
</antcall>
|
||||
|
||||
</target>
|
||||
|
||||
<target name="-init-install-component" depends="init, -admin-setup" >
|
||||
<condition property="do.install.with.params">
|
||||
<istrue value="${symbol_dollar}{jbi.install.with.params}"/>
|
||||
</condition>
|
||||
</target>
|
||||
|
||||
<target name="install" depends="init, jar, -admin-setup, -init-install-component, -do-install-without-params, -do-install-with-params" />
|
||||
|
||||
<target name="uninstall" depends="init, -admin-setup" >
|
||||
|
||||
<antcall target="stop" >
|
||||
<param name="jbi.task.fail.on.error" value="false" />
|
||||
</antcall>
|
||||
|
||||
<antcall target="shutdown" >
|
||||
<param name="jbi.task.fail.on.error" value="false" />
|
||||
</antcall>
|
||||
|
||||
<jbi:jbi-admin target="uninstall-component" failOnError="${symbol_dollar}{jbi.task.fail.on.error}" >
|
||||
<target-options>
|
||||
<property name="jbi.component.name" value="${symbol_dollar}{jbi.component.name}" />
|
||||
</target-options>
|
||||
</jbi:jbi-admin>
|
||||
|
||||
</target>
|
||||
|
||||
<target name="forced-uninstall" depends="init, -admin-setup, -do-forced-undeploy-test-sa" >
|
||||
|
||||
<antcall target="stop" >
|
||||
<param name="jbi.task.fail.on.error" value="false" />
|
||||
</antcall>
|
||||
|
||||
<antcall target="forced-shutdown" >
|
||||
<param name="jbi.task.fail.on.error" value="false" />
|
||||
</antcall>
|
||||
|
||||
<jbi:jbi-admin target="uninstall-component" failOnError="${symbol_dollar}{jbi.task.fail.on.error}" >
|
||||
<target-options>
|
||||
<property name="jbi.component.name" value="${symbol_dollar}{jbi.component.name}" />
|
||||
<property name="jbi.force.task" value="true" />
|
||||
</target-options>
|
||||
</jbi:jbi-admin>
|
||||
|
||||
</target>
|
||||
|
||||
|
||||
<target name="-reinstall-setup" depends="init" >
|
||||
<property name="jbi.task.fail.on.error" value="false" />
|
||||
</target>
|
||||
|
||||
<target name="re-install" depends="init, -reinstall-setup, -admin-setup, stop, shutdown, uninstall, install" />
|
||||
|
||||
<target name="upgrade" depends="init, -admin-setup" >
|
||||
|
||||
<antcall target="stop" >
|
||||
<param name="jbi.task.fail.on.error" value="false" />
|
||||
</antcall>
|
||||
|
||||
<antcall target="shutdown" >
|
||||
<param name="jbi.task.fail.on.error" value="false" />
|
||||
</antcall>
|
||||
|
||||
<jbi:jbi-admin target="upgrade-component" failOnError="${symbol_dollar}{jbi.task.fail.on.error}" >
|
||||
<target-options>
|
||||
<property name="jbi.component.name" value="${symbol_dollar}{jbi.component.name}" />
|
||||
<property name="jbi.install.file" location="${symbol_dollar}{dist.jar}" />
|
||||
</target-options>
|
||||
</jbi:jbi-admin>
|
||||
|
||||
</target>
|
||||
|
||||
<!--
|
||||
===============================
|
||||
TEST DEPLOYMENT ADMINISTRATION
|
||||
===============================
|
||||
-->
|
||||
|
||||
<target name="-init-test-deploy" depends="init, -admin-setup, -do-test-deploy-check" >
|
||||
<!-- test service assembly build directory -->
|
||||
<property name="project.testSA.build.dir" location="${symbol_dollar}{build.test.dir}/${symbol_dollar}{testSA.name}" />
|
||||
<!-- test SA zip file -->
|
||||
<property name="reference.testSA.zip" location="${symbol_dollar}{project.testSA.build.dir}/${symbol_dollar}{testSA.name}.zip" />
|
||||
</target>
|
||||
|
||||
<target name="-do-test-deploy-check" depends="init, -admin-setup">
|
||||
</target>
|
||||
|
||||
<target name="build-test-sa" depends="init, -init-test-deploy, -do-test-deploy-check" >
|
||||
<ant target="package" inheritall="false" antfile="${symbol_dollar}{project.testSA}/build.xml">
|
||||
<property name="service.assembly.name" value="${symbol_dollar}{testSA.name}" />
|
||||
<property name="build.dir" location="${symbol_dollar}{project.testSA.build.dir}" />
|
||||
<!-- TODO: Supporting old sa build properties. remove it for new code -->
|
||||
<property name="sa.build.dir" location="${symbol_dollar}{project.testSA.build.dir}" />
|
||||
<property name="sa.name" value="${symbol_dollar}{testSA.name}" />
|
||||
<!-- TODO: -->
|
||||
</ant>
|
||||
</target>
|
||||
|
||||
<target name="clean-test-sa" depends="init, -init-test-deploy, -do-test-deploy-check" >
|
||||
<ant target="clean" inheritall="false" antfile="${symbol_dollar}{project.testSA}/build.xml">
|
||||
<property name="service.assembly.name" value="${symbol_dollar}{testSA.name}" />
|
||||
<property name="build.dir" location="${symbol_dollar}{project.testSA.build.dir}" />
|
||||
<!-- TODO: Supporting old sa build properties. remove it for new code -->
|
||||
<property name="sa.build.dir" location="${symbol_dollar}{project.testSA.build.dir}" />
|
||||
<property name="sa.name" value="${symbol_dollar}{testSA.name}" />
|
||||
<!-- TODO: -->
|
||||
</ant>
|
||||
</target>
|
||||
|
||||
<target name="run-deploy-test-sa" if="testSA.enabled" >
|
||||
<antcall inheritall="true" target="deploy-test-sa" />
|
||||
</target>
|
||||
|
||||
<target name="run-undeploy-test-sa" if="testSA.enabled" >
|
||||
<antcall inheritall="true" target="undeploy-test-sa" />
|
||||
</target>
|
||||
|
||||
<target name="deploy-test-sa" depends="init, -init-test-deploy, build-test-sa, start-test-components, -do-deploy-test-sa">
|
||||
</target>
|
||||
|
||||
<target name="undeploy-test-sa" depends="init, -init-test-deploy, -do-undeploy-test-sa ">
|
||||
</target>
|
||||
|
||||
<target name="-do-deploy-test-sa" depends="init, -init-test-deploy, build-test-sa">
|
||||
<!-- Deploy test SA -->
|
||||
<property name="testSA.zip" location="${symbol_dollar}{reference.testSA.zip}" />
|
||||
<jbi:jbi-admin target="deploy-service-assembly">
|
||||
<target-options>
|
||||
<property name="jbi.deploy.file" value="${symbol_dollar}{testSA.zip}" />
|
||||
</target-options>
|
||||
</jbi:jbi-admin>
|
||||
<!-- Start test SA -->
|
||||
<jbi:jbi-admin target="start-service-assembly" >
|
||||
<target-options>
|
||||
<property name="jbi.service.assembly.name" value="${symbol_dollar}{testSA.name}" />
|
||||
</target-options>
|
||||
</jbi:jbi-admin>
|
||||
<!-- Show test SA -->
|
||||
<jbi:jbi-admin target="list-service-assemblies" failOnError="false" >
|
||||
<target-options>
|
||||
<property name="jbi.service.assembly.name" value="${symbol_dollar}{testSA.name}" />
|
||||
</target-options>
|
||||
</jbi:jbi-admin>
|
||||
</target>
|
||||
|
||||
<target name="-do-undeploy-test-sa" depends="init, -init-test-deploy">
|
||||
<jbi:jbi-admin target="stop-service-assembly" >
|
||||
<target-options>
|
||||
<property name="jbi.service.assembly.name" value="${symbol_dollar}{testSA.name}" />
|
||||
</target-options>
|
||||
</jbi:jbi-admin>
|
||||
<jbi:jbi-admin target="shut-down-service-assembly" >
|
||||
<target-options>
|
||||
<property name="jbi.service.assembly.name" value="${symbol_dollar}{testSA.name}" />
|
||||
</target-options>
|
||||
</jbi:jbi-admin>
|
||||
<jbi:jbi-admin target="undeploy-service-assembly">
|
||||
<target-options>
|
||||
<property name="jbi.service.assembly.name" value="${symbol_dollar}{testSA.name}" />
|
||||
</target-options>
|
||||
</jbi:jbi-admin>
|
||||
</target>
|
||||
<!-- used in forced uninstall -->
|
||||
<target name="-do-forced-undeploy-test-sa" depends="init, -init-test-deploy">
|
||||
<jbi:jbi-admin target="stop-service-assembly" failOnError="false" >
|
||||
<target-options>
|
||||
<property name="jbi.service.assembly.name" value="${symbol_dollar}{testSA.name}" />
|
||||
</target-options>
|
||||
</jbi:jbi-admin>
|
||||
<jbi:jbi-admin target="shut-down-service-assembly" failOnError="false" >
|
||||
<target-options>
|
||||
<property name="jbi.service.assembly.name" value="${symbol_dollar}{testSA.name}" />
|
||||
<property name="jbi.force.task" value="true" />
|
||||
</target-options>
|
||||
</jbi:jbi-admin>
|
||||
<jbi:jbi-admin target="undeploy-service-assembly" failOnError="false">
|
||||
<target-options>
|
||||
<property name="jbi.service.assembly.name" value="${symbol_dollar}{testSA.name}" />
|
||||
<property name="jbi.force.task" value="true" />
|
||||
</target-options>
|
||||
</jbi:jbi-admin>
|
||||
</target>
|
||||
|
||||
|
||||
<target name="start-test-components" depends="init, -init-test-deploy" >
|
||||
<jbi:jbi-admin target="start-component" failOnError="false" >
|
||||
<target-options>
|
||||
<property name="jbi.component.name" value="${symbol_dollar}{jbi.component.name}" />
|
||||
</target-options>
|
||||
</jbi:jbi-admin>
|
||||
<jbi:jbi-admin target="start-component" failOnError="false" >
|
||||
<target-options>
|
||||
<property name="jbi.component.name" value="${symbol_dollar}{jbi.soap.binding.name}" />
|
||||
</target-options>
|
||||
</jbi:jbi-admin>
|
||||
</target>
|
||||
|
||||
<target name="jbi-runtime-info" depends="init, -admin-setup" >
|
||||
<jbi:jbi-admin target="list-all" >
|
||||
</jbi:jbi-admin>
|
||||
</target>
|
||||
|
||||
</project>
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue