Permalink
Browse files

[#153] Modularise jOOX and cross-release a Java 6 and Java 9 deliverable

  • Loading branch information...
lukaseder committed Nov 30, 2017
1 parent f0e87d7 commit 61d799861d2a20ee88cef2db4d720193194da7af
Showing with 12,465 additions and 56 deletions.
  1. +3 −2 README.md
  2. +31 −0 jOOX-java-6/.classpath
  3. +4 −0 jOOX-java-6/.gitignore
  4. +23 −0 jOOX-java-6/.project
  5. +5 −0 jOOX-java-6/.settings/org.eclipse.core.resources.prefs
  6. +5 −0 jOOX-java-6/.settings/org.eclipse.jdt.core.prefs
  7. +4 −0 jOOX-java-6/.settings/org.eclipse.m2e.core.prefs
  8. +293 −0 jOOX-java-6/pom.xml
  9. +33 −0 jOOX-java-6/src/main/java/org/joox/Attrs.java
  10. +33 −0 jOOX-java-6/src/main/java/org/joox/Content.java
  11. +64 −0 jOOX-java-6/src/main/java/org/joox/Context.java
  12. +83 −0 jOOX-java-6/src/main/java/org/joox/DefaultContext.java
  13. +32 −0 jOOX-java-6/src/main/java/org/joox/Each.java
  14. +83 −0 jOOX-java-6/src/main/java/org/joox/Elements.java
  15. +32 −0 jOOX-java-6/src/main/java/org/joox/FastFilter.java
  16. +35 −0 jOOX-java-6/src/main/java/org/joox/Filter.java
  17. +2,098 −0 jOOX-java-6/src/main/java/org/joox/Impl.java
  18. +1,311 −0 jOOX-java-6/src/main/java/org/joox/JOOX.java
  19. +34 −0 jOOX-java-6/src/main/java/org/joox/Mapper.java
  20. +2,286 −0 jOOX-java-6/src/main/java/org/joox/Match.java
  21. +643 −0 jOOX-java-6/src/main/java/org/joox/Util.java
  22. +42 −0 jOOX-java-6/src/main/java/org/joox/selector/Assert.java
  23. +98 −0 jOOX-java-6/src/main/java/org/joox/selector/AttributeSpecifier.java
  24. +236 −0 jOOX-java-6/src/main/java/org/joox/selector/CSS2XPath.java
  25. +44 −0 jOOX-java-6/src/main/java/org/joox/selector/NegationSpecifier.java
  26. +49 −0 jOOX-java-6/src/main/java/org/joox/selector/PseudoClassSpecifier.java
  27. +122 −0 jOOX-java-6/src/main/java/org/joox/selector/PseudoNthSpecifier.java
  28. +1,906 −0 jOOX-java-6/src/main/java/org/joox/selector/Scanner.java
  29. +23 −0 jOOX-java-6/src/main/java/org/joox/selector/ScannerException.java
  30. +132 −0 jOOX-java-6/src/main/java/org/joox/selector/Selector.java
  31. +23 −0 jOOX-java-6/src/main/java/org/joox/selector/Specifier.java
  32. +92 −0 jOOX-java-6/src/test/java/org/joox/test/Customer.java
  33. +40 −0 jOOX-java-6/src/test/java/org/joox/test/Functions.java
  34. +2,118 −0 jOOX-java-6/src/test/java/org/joox/test/JOOXTest.java
  35. +174 −0 jOOX-java-6/src/test/resources/META-INF/LICENSE.txt
  36. +2 −0 jOOX-java-6/src/test/resources/META-INF/README.txt
  37. +16 −0 jOOX-java-6/src/test/resources/book-id-decrement.xsl
  38. +16 −0 jOOX-java-6/src/test/resources/book-id-increment.xsl
  39. +9 −0 jOOX-java-6/src/test/resources/dates.xml
  40. +79 −0 jOOX-java-6/src/test/resources/example.xml
  41. +25 −0 jOOX-java-6/src/test/resources/namespaces.xml
  42. +28 −32 jOOX/.classpath
  43. +4 −3 jOOX/.settings/org.eclipse.jdt.core.prefs
  44. +41 −19 jOOX/pom.xml
  45. +11 −0 jOOX/src/main/java/module-info.java
@@ -10,8 +10,9 @@

## Dependencies

None!

- java.sql
- java.xml
- java.xml.bind

### Download

@@ -0,0 +1,31 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" output="target/classes" path="src/main/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="target/classes"/>
</classpath>
@@ -0,0 +1,4 @@
/target
/release
/.idea
/*.iml
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>jOOX-java-6</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
</natures>
</projectDescription>
@@ -0,0 +1,5 @@
eclipse.preferences.version=1
encoding//src/main/java=UTF-8
encoding//src/test/java=UTF-8
encoding//src/test/resources=UTF-8
encoding/<project>=UTF-8
@@ -0,0 +1,5 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
org.eclipse.jdt.core.compiler.compliance=1.6
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.source=1.6
@@ -0,0 +1,4 @@
activeProfiles=
eclipse.preferences.version=1
resolveWorkspaceProjects=true
version=1
@@ -0,0 +1,293 @@
<?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">

<parent>
<artifactId>oss-parent</artifactId>
<groupId>org.sonatype.oss</groupId>
<version>7</version>
</parent>
<modelVersion>4.0.0</modelVersion>

<groupId>org.jooq</groupId>
<artifactId>joox-java-6</artifactId>
<version>1.6.0</version>
<packaging>bundle</packaging>

<name>jOOX</name>
<description>jOOX is a recursive acronym that stands for jOOX Object Oriented XML. It is a simple wrapper for the org.w3c.dom package, to allow for fluent XML document creation and manipulation where DOM is required but too verbose.</description>
<url>https://github.com/jOOQ/jOOX</url>

<licenses>
<license>
<name>Apache License, Version 2.0</name>
<url>http://www.apache.org/licenses/LICENSE-2.0</url>
<distribution>repo</distribution>
</license>
</licenses>

<scm>
<developerConnection>https://github.com/jOOQ/jOOX</developerConnection>
<url>https://github.com/jOOQ/jOOX</url>
<connection>https://github.com/jOOQ/jOOX</connection>
</scm>

<build>
<defaultGoal>deploy</defaultGoal>
<finalName>${project.artifactId}-${project.version}</finalName>

<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.7.0</version>
<configuration>
<fork>true</fork>
<maxmem>512m</maxmem>
<meminitial>256m</meminitial>
<encoding>UTF-8</encoding>
<source>1.6</source>
<target>1.6</target>
<debug>true</debug>
<debuglevel>lines,vars,source</debuglevel>
</configuration>

<executions>
<execution>
<id>default-testCompile</id>
<phase>test-compile</phase>
<goals>
<goal>testCompile</goal>
</goals>
<configuration>
<fork>true</fork>

<!-- Prevent JDK cross releasing logic from replacing these versions by adding whitespace -->
<source> 1.8 </source>
<target> 1.8 </target>
<debug>true</debug>
<debuglevel>lines,vars,source</debuglevel>
</configuration>
</execution>
</executions>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>2.5</version>
<configuration>
<encoding>UTF-8</encoding>
</configuration>
</plugin>

<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>3.3.0</version>
<extensions>true</extensions>

<!-- JDK 9 Workaround for https://issues.apache.org/jira/browse/FELIX-5698 -->
<dependencies>
<dependency>
<groupId>biz.aQute.bnd</groupId>
<artifactId>biz.aQute.bndlib</artifactId>
<version>3.5.0</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>

<profiles>
<profile>
<id>release</id>
<build>
<plugins>
<plugin>
<inherited>true</inherited>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>2.1.2</version>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>

<configuration>
<excludeResources>true</excludeResources>
<useDefaultExcludes>true</useDefaultExcludes>
</configuration>
</plugin>

<plugin>
<inherited>true</inherited>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.7</version>
<executions>
<execution>
<id>bundle-sources</id>
<phase>package</phase>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
<configuration>
<maxmemory>1024</maxmemory>
<encoding>UTF-8</encoding>
<show>protected</show>
<notree>true</notree>

<!-- Avoid running into Java 8's very restrictive doclint issues -->
<additionalparam>-Xdoclint:none</additionalparam>
</configuration>
</plugin>

<!-- Copy API docs to new directory first (replacer plugin seems to be unable to create dirs) -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<executions>
<execution>
<id>copy-folder</id>
<phase>package</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/apidocs-ga</outputDirectory>
<resources>
<resource>
<filtering>false</filtering>
<directory>${project.build.directory}/apidocs</directory>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>

<!-- Then, patch Google Analytics code inside. -->
<plugin>
<groupId>com.google.code.maven-replacer-plugin</groupId>
<artifactId>replacer</artifactId>
<version>1.5.2</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>replace</goal>
</goals>
</execution>
</executions>
<configuration>

<!-- There's an error when trying to find the top module's /target/apidocs-ga directory -->
<ignoreErrors>true</ignoreErrors>
<basedir>${project.build.directory}/apidocs-ga</basedir>
<includes>
<include>**/*.html</include>
</includes>
<replacements>
<replacement>
<token><![CDATA[<body>]]></token>
<value><![CDATA[<body>
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-30716479-1']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
]]></value>
</replacement>
</replacements>
</configuration>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>1.1</version>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>

<issueManagement>
<system>GitHub</system>
<url>https://github.com/jOOQ/jOOX/issues</url>
</issueManagement>

<developers>
<developer>
<name>Lukas Eder</name>
<email>lukas.eder@gmail.com</email>
</developer>
</developers>

<dependencies>

<!-- Runtime dependencies -->
<!-- Prior to Java 9, the JAXB dependency was shipped with the JDK -->
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>2.3.0</version>
</dependency>

<!-- Users may prefer to use another JAXB implementation -->
<dependency>
<groupId>org.glassfish.jaxb</groupId>
<artifactId>jaxb-runtime</artifactId>
<version>2.3.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>javax.activation</groupId>
<artifactId>javax.activation-api</artifactId>
<version>1.2.0</version>
<scope>test</scope>
</dependency>

<!-- Test dependencies -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.4</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>xalan</groupId>
<artifactId>xalan</artifactId>
<version>2.7.1</version>
<scope>test</scope>
</dependency>
</dependencies>
</project>
Oops, something went wrong.

0 comments on commit 61d7998

Please sign in to comment.