mirror of
https://github.com/apache/sqoop.git
synced 2025-05-02 19:50:39 +08:00
SQOOP-392. Build using maven is broken due to missing class generated by script write-version-info.sh
(Arvind Prabhakar via Jarek Jarcec Cecho) git-svn-id: https://svn.apache.org/repos/asf/incubator/sqoop/trunk@1206698 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
1bf7cbf81a
commit
9bde3ec5df
52
pom.xml
52
pom.xml
@ -261,10 +261,21 @@ limitations under the License.
|
|||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
|
<scriptSourceDirectory>src/scripts</scriptSourceDirectory>
|
||||||
<sourceDirectory>src/java</sourceDirectory>
|
<sourceDirectory>src/java</sourceDirectory>
|
||||||
<testSourceDirectory>src/test</testSourceDirectory>
|
<testSourceDirectory>src/test</testSourceDirectory>
|
||||||
<pluginManagement>
|
<pluginManagement>
|
||||||
<plugins>
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-antrun-plugin</artifactId>
|
||||||
|
<version>1.7</version>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.codehaus.mojo</groupId>
|
||||||
|
<artifactId>build-helper-maven-plugin</artifactId>
|
||||||
|
<version>1.7</version>
|
||||||
|
</plugin>
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-clean-plugin</artifactId>
|
<artifactId>maven-clean-plugin</artifactId>
|
||||||
@ -298,6 +309,47 @@ limitations under the License.
|
|||||||
</plugins>
|
</plugins>
|
||||||
</pluginManagement>
|
</pluginManagement>
|
||||||
<plugins>
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-antrun-plugin</artifactId>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>generate-version-tool</id>
|
||||||
|
<phase>generate-sources</phase>
|
||||||
|
<goals><goal>run</goal></goals>
|
||||||
|
<configuration>
|
||||||
|
<target>
|
||||||
|
<echo>Generating version tool</echo>
|
||||||
|
<mkdir dir="${basedir}/target/generated-sources"/>
|
||||||
|
<exec executable="${basedir}/src/scripts/write-version-info.sh"
|
||||||
|
dir="${basedir}" failonerror="true">
|
||||||
|
<arg value="${basedir}/target/generated-sources"/>
|
||||||
|
<arg value="${version}" />
|
||||||
|
<arg value="${gitHash}" />
|
||||||
|
</exec>
|
||||||
|
</target>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.codehaus.mojo</groupId>
|
||||||
|
<artifactId>build-helper-maven-plugin</artifactId>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>add-generated-sources</id>
|
||||||
|
<phase>generate-sources</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>add-source</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<sources>
|
||||||
|
<source>${basedir}/target/generated-sources/src</source>
|
||||||
|
</sources>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-surefire-plugin</artifactId>
|
<artifactId>maven-surefire-plugin</artifactId>
|
||||||
|
@ -37,7 +37,6 @@
|
|||||||
|
|
||||||
import com.cloudera.sqoop.config.ConfigurationHelper;
|
import com.cloudera.sqoop.config.ConfigurationHelper;
|
||||||
import com.cloudera.sqoop.mapreduce.db.DBConfiguration;
|
import com.cloudera.sqoop.mapreduce.db.DBConfiguration;
|
||||||
import com.cloudera.sqoop.mapreduce.db.DBOutputFormat.DBRecordWriter;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A OutputFormat that sends the reduce output to a SQL table.
|
* A OutputFormat that sends the reduce output to a SQL table.
|
||||||
@ -119,7 +118,8 @@ public RecordWriter<K, V> getRecordWriter(TaskAttemptContext context)
|
|||||||
|
|
||||||
statement = connection.prepareStatement(
|
statement = connection.prepareStatement(
|
||||||
constructQuery(tableName, fieldNames));
|
constructQuery(tableName, fieldNames));
|
||||||
return new DBRecordWriter(connection, statement);
|
return new com.cloudera.sqoop.mapreduce.db.DBOutputFormat.DBRecordWriter(
|
||||||
|
connection, statement);
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
throw new IOException(ex);
|
throw new IOException(ex);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user