Skip to content

Commit

Permalink
Merge pull request #8 from chiroito/1.3
Browse files Browse the repository at this point in the history
Change the build method
  • Loading branch information
chiroito authored Apr 7, 2022
2 parents de907fb + 1dedecb commit 927d672
Show file tree
Hide file tree
Showing 25 changed files with 202 additions and 196 deletions.
65 changes: 0 additions & 65 deletions jdbc42-test/pom.xml

This file was deleted.

48 changes: 46 additions & 2 deletions jdbc42/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,59 @@
<parent>
<artifactId>project</artifactId>
<groupId>dev.jfr4jdbc</groupId>
<version>1.1.0</version>
<version>1.3.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>

<artifactId>jfr4jdbc42-driver</artifactId>
<artifactId>jdbc42</artifactId>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>8</maven.compiler.source>
<maven.compiler.target>8</maven.compiler.target>
<maven.install.skip>true</maven.install.skip>
</properties>

<build>
<pluginManagement>
<plugins>
<plugin>
<artifactId>maven-deploy-plugin</artifactId>
<version>3.0.0-M2</version>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.6.8</version>
<extensions>false</extensions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>1.6</version>
</plugin>
</plugins>
</pluginManagement>
</build>

<dependencies>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-junit-jupiter</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,7 @@ void eachDatasourceWaitCount() throws Exception {
fr.stop();

List<RecordedEvent> events = fr.getEvents("ConnectionResource", e -> e.getString("label").equals("ds" + labelId));
events.sort((o1, o2) -> o1.getStartTime().compareTo(o2.getStartTime()));
assertEquals(6, events.size());
RecordedEvent e1 = events.get(0);
assertEquals(0, e1.getInt("wait"));
Expand Down
46 changes: 0 additions & 46 deletions jdbc43-test/pom.xml

This file was deleted.

52 changes: 46 additions & 6 deletions jdbc43/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,63 @@
<parent>
<artifactId>project</artifactId>
<groupId>dev.jfr4jdbc</groupId>
<version>1.1.0</version>
<version>1.3.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>

<artifactId>jfr4jdbc43-driver</artifactId>
<artifactId>jdbc43</artifactId>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<maven.compiler.release>11</maven.compiler.release>
<maven.install.skip>true</maven.install.skip>
</properties>

<build>
<pluginManagement>
<plugins>
<plugin>
<artifactId>maven-deploy-plugin</artifactId>
<version>3.0.0-M2</version>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.6.8</version>
<extensions>false</extensions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>1.6</version>
</plugin>
</plugins>
</pluginManagement>
</build>

<dependencies>
<dependency>
<groupId>dev.jfr4jdbc</groupId>
<artifactId>jfr4jdbc42-driver</artifactId>
<scope>compile</scope>
<artifactId>jdbc42</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-junit-jupiter</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
</project>
70 changes: 55 additions & 15 deletions jfr4jdbc-driver/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,46 @@
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>project</artifactId>
<groupId>dev.jfr4jdbc</groupId>
<version>1.1.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>

<groupId>dev.jfr4jdbc</groupId>
<artifactId>jfr4jdbc-driver</artifactId>
<version>1.3.0</version>
<name>jfr4jdbc</name>
<description>A JDBC wrapper driver recording JDK Flight Recorder events</description>
<url>https://github.com/chiroito/Jfr4Jdbc</url>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
</properties>

<licenses>
<license>
<name>Apache License 2.0</name>
<url>http://www.apache.org/licenses/LICENSE-2.0</url>
<distribution>repo</distribution>
</license>
</licenses>
<scm>
<connection>scm:git:https://github.com/chiroito/Jfr4Jdbc.git</connection>
<developerConnection>scm:git:https://github.com/chiroito/Jfr4Jdbc.git</developerConnection>
<url>https://github.com/chiroito/Jfr4Jdbc</url>
</scm>
<developers>
<developer>
<id>chiroito</id>
<name>Chihiro Ito</name>
<url>https://github.com/chiroito</url>
<roles>
<role>lead</role>
<role>architect</role>
<role>developer</role>
</roles>
<timezone>9</timezone>
</developer>
</developers>
<distributionManagement>
<snapshotRepository>
<id>ossrh</id>
Expand All @@ -27,13 +52,30 @@
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
</repository>
</distributionManagement>

<build>
<sourceDirectory>${project.basedir}/target/generated-sources/copied-java</sourceDirectory>
<resources>
<resource>
<directory>target/generated-sources/gen-resources</directory>
<filtering>true</filtering>
</resource>
</resources>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.22.2</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.10.1</version>
</plugin>
</plugins>
</pluginManagement>

<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand All @@ -47,17 +89,17 @@
<target>
<echo message="copy template files from ja directory"/>
<property name="jdbc42_src" value="../jdbc42/src"/>
<mkdir dir="target/generated-sources/gen-java"/>
<copy todir="./target/generated-sources/gen-java">
<mkdir dir="target/generated-sources/copied-java"/>
<copy todir="./target/generated-sources/copied-java">
<fileset dir="${jdbc42_src}/main/java"/>
</copy>
<mkdir dir="target/generated-sources/gen-resources"/>
<copy todir="./target/generated-sources/gen-resources">
<fileset dir="${jdbc42_src}/main/resources"/>
</copy>
<property name="jdbc43_src" value="../jdbc43/src"/>
<mkdir dir="target/generated-sources/gen-java11"/>
<copy todir="./target/generated-sources/gen-java11">
<mkdir dir="target/generated-sources/copied-java11"/>
<copy todir="./target/generated-sources/copied-java11">
<fileset dir="${jdbc43_src}/main/java"/>
</copy>
</target>
Expand All @@ -81,8 +123,7 @@
<source>1.8</source>
<target>1.8</target>
<compileSourceRoots>
<compileSourceRoot>${project.basedir}/target/generated-sources/gen-java
</compileSourceRoot>
<compileSourceRoot>${project.basedir}/target/generated-sources/copied-java</compileSourceRoot>
</compileSourceRoots>
<outputDirectory>${project.build.outputDirectory}</outputDirectory>
</configuration>
Expand All @@ -97,8 +138,7 @@
<source>11</source>
<target>11</target>
<compileSourceRoots>
<compileSourceRoot>${project.basedir}/target/generated-sources/gen-java11
</compileSourceRoot>
<compileSourceRoot>${project.basedir}/target/generated-sources/copied-java11</compileSourceRoot>
</compileSourceRoots>
<outputDirectory>${project.build.outputDirectory}/META-INF/versions/11</outputDirectory>
</configuration>
Expand Down Expand Up @@ -140,7 +180,7 @@
<goal>jar</goal>
</goals>
<configuration>
<sourcepath>${project.basedir}/target/generated-sources/gen-java</sourcepath>
<sourcepath>${project.basedir}/target/generated-sources/copied-java</sourcepath>
</configuration>
</execution>
</executions>
Expand All @@ -153,7 +193,7 @@
<configuration>
<serverId>ossrh</serverId>
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
<autoReleaseAfterClose>true</autoReleaseAfterClose>
<autoReleaseAfterClose>false</autoReleaseAfterClose>
</configuration>
</plugin>
<plugin>
Expand Down
Loading

0 comments on commit 927d672

Please sign in to comment.