[simple-jndi] Initial import (#823847)

gil gil at fedoraproject.org
Mon Jul 16 15:47:20 UTC 2012


commit 925a19931811b37468402ad09d184f16d4c997ff
Author: gil <puntogil at libero.it>
Date:   Mon Jul 16 17:47:06 2012 +0200

    Initial import (#823847)

 .gitignore                      |    1 +
 simple-jndi-0.11.4.1-jdk7.patch |   26 +++++++
 simple-jndi-0.11.4.1.pom        |  141 +++++++++++++++++++++++++++++++++++++++
 simple-jndi.spec                |   95 ++++++++++++++++++++++++++
 sources                         |    1 +
 5 files changed, 264 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..80a5052 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/simple-jndi-0.11.4.1-src.tar.gz
diff --git a/simple-jndi-0.11.4.1-jdk7.patch b/simple-jndi-0.11.4.1-jdk7.patch
new file mode 100644
index 0000000..089d19d
--- /dev/null
+++ b/simple-jndi-0.11.4.1-jdk7.patch
@@ -0,0 +1,26 @@
+--- src/java/org/osjava/sj/loader/SJDataSource.java	2008-08-05 16:41:45.000000000 +0200
++++ src/java/org/osjava/sj/loader/SJDataSource.java-gil	2012-05-22 10:04:02.104688014 +0200
+@@ -34,10 +34,13 @@
+ 
+ import java.sql.Connection;
+ import java.sql.SQLException;
++import java.sql.SQLFeatureNotSupportedException;
+ import javax.sql.DataSource;
+ import java.sql.DriverManager;
+ import java.io.PrintWriter;
++import java.lang.NullPointerException;
+ import java.util.Properties;
++import java.util.logging.Logger;
+ 
+ /**
+  * A basic implementation of a DataSource. 
+@@ -154,5 +157,9 @@
+         throw new SQLException("This object is not a wrapper");
+     }
+ 
++    public Logger getParentLogger() throws SQLFeatureNotSupportedException {
++        throw new NullPointerException();
++    }
++
+ }
+ 
diff --git a/simple-jndi-0.11.4.1.pom b/simple-jndi-0.11.4.1.pom
new file mode 100644
index 0000000..626f4b2
--- /dev/null
+++ b/simple-jndi-0.11.4.1.pom
@@ -0,0 +1,141 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xsi:noNamespaceSchemaLocation="http://maven.apache.org/xsd/maven-project-3.0.0.xsd" 
+         xmlns:xsi="http://www.w3c.org/2001/XMLSchema-instance">
+  
+  <modelVersion>4.0.0</modelVersion>
+  <artifactId>simple-jndi</artifactId>
+  <name>simple-jndi</name>
+  <version>0.11.4.1</version>
+  <organization>
+    <name>OSJava</name>
+  </organization>
+  <inceptionYear>2003</inceptionYear>
+  <groupId>simple-jndi</groupId>
+  <url>http://www.osjava.org/simple-jndi/</url>
+  
+  <description>
+    A simple implementation of JNDI. It is entirely library based, so no server instances are started, and it sits upon Java .properties files or XML files, so it is easy to use and simple to understand. The .properties/.xml files may be either on the file system or in the classpath. 
+  </description>
+
+  <scm>
+    <developerConnection>scm:svn:https://osjava.googlecode.com/svn/trunk/simple-jndi</developerConnection>
+    <connection>scm:svn:http://osjava.googlecode.com/svn/trunk/simple-jndi</connection>
+  </scm>
+  <issueManagement>
+    <url>http://code.google.com/p/osjava/issues/list</url>
+  </issueManagement>
+  
+  <mailingLists>
+    <mailingList>
+      <name>osjava google group</name>
+      <subscribe>http://groups.google.com/group/osjava</subscribe>
+      <unsubscribe>http://groups.google.com/group/osjava</unsubscribe>
+      <archive>http://groups.google.com/group/osjava</archive>
+    </mailingList>
+  </mailingLists>
+
+  <developers>
+
+    <developer>
+      <name>Henri Yandell</name>
+      <id>hen</id>
+      <email>bayard at generationjava.com</email>
+      <organization>GenerationJava</organization>
+      <roles>
+        <role>Java Developer</role>
+      </roles>
+    </developer>
+
+    <developer>
+      <name>Robert M. Zigweid</name>
+      <id>rzigweid</id>
+      <email>rzigweid at osjava.org</email>
+      <organization>OSJava</organization>
+      <roles>
+        <role>Developer</role>
+      </roles>
+      <timezone>-5</timezone>
+    </developer>
+  </developers>
+  
+  <dependencies>
+    <!-- used if you turn on dbcp usage -->
+    <dependency>
+      <artifactId>commons-dbcp</artifactId>
+      <groupId>commons-dbcp</groupId>
+      <version>1.2.2</version>
+      <optional>true</optional>
+    </dependency>
+    <!-- used if you turn on dbcp usage -->
+    <dependency>
+      <artifactId>commons-pool</artifactId>
+      <groupId>commons-pool</groupId>
+      <version>1.3</version>
+      <optional>true</optional>
+    </dependency>
+
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <version>3.8.1</version>
+      <scope>test</scope>
+    </dependency>
+
+    <!--
+    <dependency>
+      <groupId>directory-naming</groupId>
+      <artifactId>directory-naming-core</artifactId>
+      <version>SNAPSHOT</version>
+    </dependency>
+    -->
+  </dependencies>
+
+  <build>
+
+    <sourceDirectory>src/java</sourceDirectory>
+    <testSourceDirectory>src/test</testSourceDirectory>
+
+      <testResources>
+        <testResource>
+          <directory>${basedir}/src/test/config</directory>
+          <targetPath>config</targetPath>
+        </testResource>
+        <testResource>
+          <directory>${basedir}/src/test</directory>
+          <includes>
+            <include>jndi.properties</include>
+          </includes>
+        </testResource>
+      </testResources>
+
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-surefire-plugin</artifactId>
+        <configuration>
+          <forkMode>always</forkMode>
+        </configuration>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-compiler-plugin</artifactId>
+        <configuration>
+          <source>1.5</source>
+          <target>1.5</target>
+        </configuration>
+      </plugin>
+    </plugins>
+
+  </build>
+
+    <!-- NOT USED FOR SITE YET; USE MAVEN 1 -->
+    <reports>
+        <report>maven-jxr-plugin</report>
+        <report>maven-javadoc-plugin</report>
+        <report>maven-license-plugin</report>
+        <report>maven-changes-plugin</report>           
+    </reports>
+
+
+</project>
+
diff --git a/simple-jndi.spec b/simple-jndi.spec
new file mode 100644
index 0000000..0e599c3
--- /dev/null
+++ b/simple-jndi.spec
@@ -0,0 +1,95 @@
+
+Name:          simple-jndi
+Version:       0.11.4.1
+Release:       1%{?dist}
+Summary:       A JNDI implementation
+Group:         Development/Libraries
+License:       BSD
+Url:           http://code.google.com/p/osjava/
+Source0:       http://osjava.googlecode.com/svn/dist/releases/official/simple-jndi/simple-jndi-0.11.4.1-src.tar.gz
+# wget -O simple-jndi-0.11.4.1.pom http://osjava.googlecode.com/svn/releases/simple-jndi-0.11.4.1/pom.xml
+Source1:       simple-jndi-%{version}.pom
+Patch0:        simple-jndi-0.11.4.1-jdk7.patch
+
+BuildRequires: java-devel
+BuildRequires: jpackage-utils
+
+BuildRequires: ant
+BuildRequires: apache-commons-dbcp
+BuildRequires: apache-commons-pool
+BuildRequires: junit
+
+Requires:      apache-commons-dbcp
+Requires:      apache-commons-pool
+
+Requires:      java
+Requires:      jpackage-utils
+BuildArch:     noarch
+
+%description
+Simple-JNDI is intended to solve two problems. The first is
+that of finding a container independent way of opening a
+database connection, the second is to find a good way of
+specifying application configurations.
+1. Unit tests or prototype code often need to emulate the
+  environment within which the code is expected to run.
+  A very common one is to get an object of type
+  javax.sql.DataSource from JNDI so a java.sql.Connection
+  to your database of choice may be opened.
+2. Applications need configuration; a JNDI implementation
+  makes a handy location for configuration values. Either
+  as a globally available system, or via IoC through the
+  use of some kind of JNDI configuration facade (see gj-config).
+A solution: simple implementation of JNDI. It is entirely
+library based, so no server instances are started, and it
+sits upon Java .properties files, XML files or Windows-style
+.ini files, so it is easy to use and simple to understand.
+The files may be either on the file system or in the classpath.
+
+%package javadoc
+Group:         Documentation
+Summary:       Javadoc for %{name}
+Requires:      jpackage-utils
+
+%description javadoc
+This package contains javadoc for %{name}.
+
+%prep
+%setup -q -n simple-jndi-%{version}
+find . -name "*.class" -delete
+find . -name "*.jar" -delete
+%patch0 -p0
+
+%build
+
+%ant \
+  -Dlibdir=lib \
+  -Dcommons-pool.jar=file://$(build-classpath commons-pool) \
+  -Dcommons-dbcp.jar=file://$(build-classpath commons-dbcp) \
+  jar javadoc
+
+%install
+
+mkdir -p %{buildroot}%{_javadir}
+install -pm 644 target/%{name}-%{version}.jar %{buildroot}%{_javadir}/%{name}.jar
+
+mkdir -p %{buildroot}%{_mavenpomdir}
+install -pm 644 %{SOURCE1} %{buildroot}%{_mavenpomdir}/JPP-%{name}.pom
+%add_maven_depmap JPP-%{name}.pom %{name}.jar
+
+mkdir -p %{buildroot}%{_javadocdir}/%{name}
+cp -pr dist/docs/api/* %{buildroot}%{_javadocdir}/%{name}/
+
+%files
+%{_javadir}/%{name}.jar
+%{_mavenpomdir}/JPP-%{name}.pom
+%{_mavendepmapfragdir}/%{name}
+%doc LICENSE.txt
+
+%files javadoc
+%{_javadocdir}/%{name}
+%doc LICENSE.txt
+
+%changelog
+* Fri Apr 06 2012 gil cattaneo <puntogil at libero.it> 0.11.4.1-1
+- initial rpm
\ No newline at end of file
diff --git a/sources b/sources
index e69de29..fbd35dc 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+0bd5bca9e06bb966a39b9857c2fd81c5  simple-jndi-0.11.4.1-src.tar.gz


More information about the scm-commits mailing list