Skip to content
This repository has been archived by the owner on Jun 7, 2021. It is now read-only.

[TRAFODION-3081]Support debug mode whatever you were on win/linux #1574

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion core/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ foundation: sqroot dbsecurity $(MPI_TARGET) $(SEAMONSTER_TARGET)
cd sqf && $(MAKE) all

jdbc_jar: verhdr
cd conn/jdbcT4 && $(MAKE) 2>&1 && $(MAVEN) install | sed -e "s/$$/ ##(JDBCT4)/";exit $${PIPESTATUS[0]}
cd conn/jdbcT4 && $(MAKE) 2>&1 | sed -e "s/$$/ ##(JDBCT4)/";exit $${PIPESTATUS[0]}

dcs: jdbc_jar jdbc_type2_jar
cd ../dcs && $(MAKE) 2>&1 | sed -e "s/$$/ ##(DCS)/" ; exit $${PIPESTATUS[0]}
Expand Down
4 changes: 2 additions & 2 deletions core/conn/jdbcT4/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,15 @@ all: build_all

build_all: LICENSE NOTICE
echo "$(MAVEN) package -DskipTests"
set -o pipefail && $(MAVEN) package -DskipTests | tee build_jdbct4.log | grep --line-buffered -E -e '^\[[^WId]' -e '^\[INFO\] B[Uu][Ii][Ll][Dd]' -e 'to compile'
set -o pipefail && $(MAVEN) -Pproduction install -DskipTests | tee build_jdbct4.log | grep --line-buffered -E -e '^\[[^WId]' -e '^\[INFO\] B[Uu][Ii][Ll][Dd]' -e 'to compile'; exit $${PIPESTATUS[0]}
cp target/jdbcT4-${TRAFODION_VER}.jar ${TRAF_HOME}/export/lib
mkdir -p ../clients
mv target/jdbcT4-${TRAFODION_VER}.zip ../clients
#ln -sf ${TRAF_HOME}/export/lib/jdbcT4-${TRAFODION_VER}.jar ${TRAF_HOME}/export/lib/jdbcT4.jar
`cd ${TRAF_HOME}/export/lib;ln -sf jdbcT4-${TRAFODION_VER}.jar jdbcT4.jar`

clean:
-$(MAVEN) clean | grep ERROR
@$(MAVEN) -Pproduction clean; exit $$?
$(RM) build_jdbct4.log ${TRAF_HOME}/export/lib/jdbcT4*.jar

LICENSE: ../../../licenses/LICENSE-clients
Expand Down
71 changes: 42 additions & 29 deletions core/conn/jdbcT4/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,18 +27,11 @@
-->

<modelVersion>4.0.0</modelVersion>
<!--<parent>
<groupId>org.apache.trafodion</groupId>
<artifactId>trafodion</artifactId>
<version>1.3.0</version>
<relativePath>../../../</relativePath>
</parent>-->
<groupId>org.apache.trafodion.jdbc.t4</groupId>
<artifactId>jdbcT4</artifactId>
<version>${env.TRAFODION_VER}</version>
<name>Trafodion JDBC Type4 Driver</name>
<url>http://wiki.trafodion.org</url>

<version>${INTERNAL_VERSION}</version>
<distributionManagement>
<snapshotRepository>
<id>apache.snapshots.https</id>
Expand Down Expand Up @@ -115,26 +108,6 @@
</executions>
</plugin>

<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>properties-maven-plugin</artifactId>
<version>1.0.0</version>
<executions>
<execution>
<phase>initialize</phase>
<goals>
<goal>read-project-properties</goal>
</goals>
<configuration>
<files>
<file>${basedir}/../../sqf/export/include/SCMBuildMan.mf</file>
<file>${basedir}/../../sqf/export/include/buildId</file>
</files>
</configuration>
</execution>
</executions>
</plugin>

<plugin>
<artifactId>maven-clean-plugin</artifactId>
<version>2.4.1</version>
Expand All @@ -161,7 +134,7 @@
<classpathPrefix>dependency-jars/</classpathPrefix>
</manifest>
<manifestEntries>
<Implementation-Version-1>Version ${project.version}</Implementation-Version-1>
<Implementation-Version-1>Version ${project.version}</Implementation-Version-1>
<Implementation-Version-2>${TRAFODION_VER_PROD} Release ${project.version}</Implementation-Version-2>
<Implementation-Version-3>${Implementation-Version-3}</Implementation-Version-3>
<Implementation-Version-4>${Implementation-Version-4}</Implementation-Version-4>
Expand Down Expand Up @@ -213,6 +186,46 @@
</plugins>
</build>
<profiles>
<profile>
<id>dev</id>
<properties>
<INTERNAL_VERSION>0.1</INTERNAL_VERSION>
</properties>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
</profile>
<profile>
<id>production</id>
<properties>
<INTERNAL_VERSION>${env.TRAFODION_VER}</INTERNAL_VERSION>
<mfFile>${basedir}/../../sqf/export/include/SCMBuildMan.mf</mfFile>
<buildIdFile>${basedir}/../../sqf/export/include/buildId</buildIdFile>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>properties-maven-plugin</artifactId>
<version>1.0.0</version>
<executions>
<execution>
<phase>initialize</phase>
<goals>
<goal>read-project-properties</goal>
</goals>
<configuration>
<files>
<file>${mfFile}</file>
<file>${buildIdFile}</file>
</files>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>apache-release</id>
<activation>
Expand Down
5 changes: 3 additions & 2 deletions core/conn/jdbc_type2/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ all: LICENSE NOTICE $(LIBEXPDIR)/libjdbcT2.so

$(EXPROOT)/lib/jdbcT2.jar:
./getBuildInfo
$(MAVEN) install -DskipTests
$(MAVEN) -Pproduction install -DskipTests|tee build_jdbct2.log | grep --line-buffered -E -e '^\[[^WId]' -e '^\[INFO\] B[Uu][Ii][Ll][Dd]' -e 'to compile'; exit $${PIPESTATUS[0]};exit $${PIPESTATUS}
$(CP) target/trafjdbcT2-${TRAFODION_VER}.jar $(EXPROOT)/lib
`cd ${TRAF_HOME}/export/lib;$(LN) trafjdbcT2-${TRAFODION_VER}.jar jdbcT2.jar`
$(JAVAH) -cp $(EXPROOT)/lib/jdbcT2.jar -d native $(CSES)
Expand All @@ -99,11 +99,12 @@ $(OBJS): $(EXPROOT)/lib/jdbcT2.jar
$(OUTDIR)/type2version.o: $(TRAF_HOME)/export/include/SCMBuildStr.h

clean:
$(MAVEN) clean
$(MAVEN) -Pproduction clean
$(RM) $(LIBEXPDIR)/libjdbcT2.so
$(RM) -f $(EXPROOT)/lib/jdbcT2*.jar
$(RM) -rf $(OUTDIR)
$(RM) -rf $(BUILD_PLAT)
$(RM) -rf src/main/java/org/apache/trafodion/jdbc/t2/DriverInfo.java
echo '$(CSES)'|sed -e 's/\./_/g' -e 's/[[:space:]]/\n/g' |xargs -i rm -f 'native/{}.h'

cleanall: clean
Expand Down
135 changes: 94 additions & 41 deletions core/conn/jdbc_type2/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,96 @@
<groupId>org.apache.trafodion.jdbc</groupId>
<artifactId>trafjdbcT2</artifactId>
<packaging>jar</packaging>
<version>${env.TRAFODION_VER}</version>
<version>${INTERNAL_VERSION}</version>
<name>jdbcT2</name>
<url>http://maven.apache.org</url>
<properties>
<ANTRUN_VER>1.8</ANTRUN_VER>
</properties>
<profiles>
<profile>
<id>dev</id>
<properties>
<INTERNAL_VERSION>0.1</INTERNAL_VERSION>
</properties>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<build>
<plugins>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<version>${ANTRUN_VER}</version>
<executions>
<execution>
<phase>initialize</phase>
<configuration>
<tasks>
<copy file="${basedir}/src/main/java/org/apache/trafodion/jdbc/t2/DriverInfo.java-tmpl" tofile="${basedir}/src/main/java/org/apache/trafodion/jdbc/t2/DriverInfo.java" overwrite="true"/>
<replace token= "@@@@" value="Traf_JDBC_Type2_Build_${bldId}" file="${basedir}/src/main/java/org/apache/trafodion/jdbc/t2/DriverInfo.java">
</replace>
</tasks>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>production</id>
<properties>
<INTERNAL_VERSION>${env.TRAFODION_VER}</INTERNAL_VERSION>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>properties-maven-plugin</artifactId>
<version>1.0.0</version>
<executions>
<execution>
<phase>initialize</phase>
<goals>
<goal>read-project-properties</goal>
</goals>
<configuration>
<files>
<file>${basedir}/../../sqf/export/include/SCMBuildMan.mf</file>
<file>${basedir}/buildId</file>
</files>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<version>${ANTRUN_VER}</version>
<executions>
<execution>
<phase>generate-sources</phase>
<configuration>
<tasks>
<copy file="${basedir}/LICENSE" tofile="${basedir}/src/main/resources/META-INF/LICENSE" overwrite="true"/>
<copy file="${basedir}/NOTICE" tofile="${basedir}/src/main/resources/META-INF/NOTICE" overwrite="true"/>
<copy file="${basedir}/src/main/java/org/apache/trafodion/jdbc/t2/DriverInfo.java-tmpl" tofile="${basedir}/src/main/java/org/apache/trafodion/jdbc/t2/DriverInfo.java" overwrite="true"/>
<replace token= "@@@@" value="Traf_JDBC_Type2_Build_${bldId}" file="${basedir}/src/main/java/org/apache/trafodion/jdbc/t2/DriverInfo.java">
</replace>
</tasks>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
<dependencies>
<dependency>
<groupId>junit</groupId>
Expand All @@ -39,46 +126,6 @@
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>properties-maven-plugin</artifactId>
<version>1.0.0</version>
<executions>
<execution>
<phase>initialize</phase>
<goals>
<goal>read-project-properties</goal>
</goals>
<configuration>
<files>
<file>${basedir}/../../sqf/export/include/SCMBuildMan.mf</file>
<file>${basedir}/buildId</file>
</files>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.8</version>
<executions>
<execution>
<phase>generate-sources</phase>
<configuration>
<tasks>
<copy file="${basedir}/src/main/java/org/apache/trafodion/jdbc/t2/DriverInfo.java-tmpl" tofile="${basedir}/src/main/java/org/apache/trafodion/jdbc/t2/DriverInfo.java" overwrite="true"/>
<replace token= "@@@@" value="Traf_JDBC_Type2_Build_${bldId}" file="${basedir}/src/main/java/org/apache/trafodion/jdbc/t2/DriverInfo.java">
</replace>
<copy file="${basedir}/LICENSE" todir="${basedir}/src/main/resources/META-INF" overwrite="true"/>
<copy file="${basedir}/NOTICE" todir="${basedir}/src/main/resources/META-INF" overwrite="true"/>
</tasks>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
Expand All @@ -104,4 +151,10 @@
</plugin>
</plugins>
</build>
<repositories>
<repository>
<id>mvnrepository</id>
<url>https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-resources-plugin</url>
</repository>
</repositories>
</project>
8 changes: 4 additions & 4 deletions core/conn/trafci/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,15 @@ all:Trafci_deploy
Trafci_deploy:Trafci_installer
Trafci_installer:Trafci_jar
Trafci_jar:
mvn clean install -DskipTests$
mvn -Pproduction install -DskipTests$
Trafci_installer:
./getBuildInfo
export buildId=`head -n 1 buildId`
mvn -f installer_pom.xml -DbldId=${buildId} clean package -DskipTests
mvn -Pproduction -f installer_pom.xml -DbldId=${buildId} package -DskipTests
Trafci_deploy:
zip -r ../clients/trafci.zip -j target/trafciInstaller.jar utils/README
java -jar target/trafciInstaller.jar -silent -installDir ${TRAF_HOME}

clean:
mvn -f installer_pom.xml clean
mvn -f pom.xml clean
mvn -Pproduction -f installer_pom.xml clean
mvn -Pproduction -f pom.xml clean
25 changes: 21 additions & 4 deletions core/conn/trafci/installer_pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@
<groupId>org.trafodion</groupId>
<artifactId>trafciInstaller</artifactId>
<packaging>jar</packaging>
<version>${TRAFODION_VER}</version>
<version>${INTERNAL_VERSION}</version>
<name>Trafodion Trafci</name>
<properties>
<basedir>.</basedir>
<traf-jdbc-version>${TRAFODION_VER}</traf-jdbc-version>
<trafci-version>${TRAFODION_VER}</trafci-version>
<traf-jdbc-version>${project.version}</traf-jdbc-version>
<trafci-version>${project.version}</trafci-version>
</properties>
<dependencies>
<dependency>
Expand All @@ -38,7 +38,7 @@
<dependency>
<groupId>org.apache.trafodion.jdbc.t4</groupId>
<artifactId>jdbcT4</artifactId>
<version>${TRAFODION_VER}</version>
<version>${project.version}</version>
</dependency>
</dependencies>
<build>
Expand Down Expand Up @@ -116,4 +116,21 @@
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>dev</id>
<properties>
<INTERNAL_VERSION>0.1</INTERNAL_VERSION>
</properties>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
</profile>
<profile>
<id>production</id>
<properties>
<INTERNAL_VERSION>${env.TRAFODION_VER}</INTERNAL_VERSION>
</properties>
</profile>
</profiles>
</project>
Loading