Skip to content

Commit 225ef99

Browse files
committedAug 26, 2020
SQLDeveloper example extension ConnectionHelper
o Add info on the ConnectionHelperClient to ConnectionHelper's readme o Added ConnectionHelperClient.jar to the cfu bundle o Make sure client designates Main-Class in the jar manifest (distinction between building locally and building from ConnectionHelper which doesn't call deploy)
1 parent cce2a39 commit 225ef99

File tree

4 files changed

+24
-4
lines changed

4 files changed

+24
-4
lines changed
 

‎sqldeveloper/extension/java/ConnectionHelper/README.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# SQL Developer Examples
22
## ConnectionHelper
3-
Optionally accept connection info from the command line and/or on a [SocketServer](https://docs.oracle.com/javase/tutorial/networking/sockets/clientServer.html)
3+
Optionally accept connection info from the command line and/or on a [SocketServer](https://docs.oracle.com/javase/tutorial/networking/sockets/clientServer.html). For use with the socket server, see also the [ConnectionHelperClient](../ConnectionHelperClient/README.md) example.
4+
5+
*Note: The cfu bundle includes the client. It can be found in <sqldev_home>sqldeveloper/extension/oracle.db.example.sqldeveloper.extension.connectionHelper/ConnectionHelperClient.jar*
46

57
### Command Line
68
sqldeveloper -_conName_**=**_user_\[**/**\[_pw_]]**@**_host_**:**_port_(**:**_sid_|**/**_svc_)\[**#**_role_]

‎sqldeveloper/extension/java/ConnectionHelper/build.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
extension.id=oracle.db.example.sqldeveloper.extension.connectionHelper
22
extension.name=Connection Helper
3-
extension.descr=Example to accept connection info from the command line (or via a SocketServer?)
3+
extension.descr=Example to accept connection info from the command line or via a SocketServer
44
extension.version=20.1.0
55
extension.resources=oracle.db.example.sqldeveloper.extension.connectionHelper.ConnectionHelperResources
66

‎sqldeveloper/extension/java/ConnectionHelper/build.xml

+18-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,23 @@
11
<?xml version="1.0" encoding="windows-1252" ?>
22
<project name="ConnectionHelper" default="_deploy">
3-
<!-- imports -->
3+
<!-- This one needs direct link to the project page for doc-->
4+
<property name="extension.owner.url" value="https://github.com/oracle/oracle-db-examples/tree/master/sqldeveloper/extension/java/ConnectionHelper" />
5+
6+
<!-- override _cfu to include the client. -->
7+
<property name="ch.client.dir" value="${basedir}/../ConnectionHelperClient" />
8+
<property name="ch.client.jar" value="ConnectionHelperClient.jar" />
9+
<target name="_cfu" depends="clean,jar,manifest" description="Create CFU bundle">
10+
<echo message="Need to build ConnectionHelperClient..." />
11+
<ant dir="${ch.client.dir}" target="clean" inheritAll="false" />
12+
<ant dir="${ch.client.dir}" target="jar" inheritAll="false" />
13+
<echo message="and create a local built/lib directory..." />
14+
<mkdir dir="${built}/lib" />
15+
<echo message="to copy the client jar before building the cfu bundle." />
16+
<copy file="${ch.client.dir}/built/${ch.client.jar}" tofile="${built}/lib/${ch.client.jar}" />
17+
<antcall target="cfu-inc" inheritAll="true" inheritRefs="true" />
18+
</target>
19+
20+
<!-- imports -->
421
<import file="../../buildtools/ant/build.xml" />
522

623
<!-- bundle dependencies -->

‎sqldeveloper/extension/java/ConnectionHelperClient/build.xml

+2-1
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,11 @@
1414
-->
1515

1616
<target name="jar" depends="compile" description="Create the extension jar">
17-
<jar basedir="${built}/classes" destfile="${built}/${extension.filename}" excludes="**/.data/*" />
17+
<jar basedir="${built}/classes" destfile="${built.destination.file}" excludes="**/.data/*" />
1818
<manifest file="${jar.manifest.template}" mode="update">
1919
<attribute name="Main-Class" value="ConnectionHelperClient" />
2020
</manifest>
21+
<jar destfile="${built.destination.file}" update="true" manifest="${jar.manifest.template}" />
2122
</target>
2223
<target name="deploy" depends="jar, manifest" description="Deploy plugins directory">
2324
<copy file="${built}/${extension.filename}" tofile="${ide.home}/sqldeveloper/lib/${extension.filename}" />

0 commit comments

Comments
 (0)
Failed to load comments.