Review Board 1.7.22


SQOOP-722 Improve Sqoop 2 packaging

Review Request #8189 - Created Nov. 22, 2012 and submitted

Jarek Cecho
SQOOP-722
Reviewers
Sqoop
sqoop-sqoop2
I've incorporated both suggested changes. Created binary artifacts are appending -hadoop{200,100} suffix.
I've generated artifacts and tested them on real clusters.

Diff revision 2 (Latest)

1 2
1 2

  1. dist/pom.xml: Loading...
dist/pom.xml
Revision 8182347 New Change
[20] 124 lines
[+20]
125
                  <goal>run</goal>
125
                  <goal>run</goal>
126
                </goals>
126
                </goals>
127
                <configuration>
127
                <configuration>
128
                  <target>
128
                  <target>
129
                    <!-- Clean up -->
129
                    <!-- Clean up -->
130
                    <delete dir="target/sqoop-${project.version}-bin"/>
130
                    <delete dir="target/sqoop-${project.version}-bin-hadoop${hadoop.profile}"/>
131
                    <delete file="target/sqoop-${project.version}-bin.tar.gz"/>
131
                    <delete file="target/sqoop-${project.version}-bin-hadoop${hadoop.profile}.tar.gz"/>
132

    
   
132

   
133
                    <!-- Create dist dir -->
133
                    <!-- Create dist dir -->
134
                    <mkdir dir="target/sqoop-${project.version}-bin"/>
134
                    <mkdir dir="target/sqoop-${project.version}-bin-hadoop${hadoop.profile}"/>
135

    
   
135

   
136

    
   
136

   
137
                    <!-- Copy sources over -->
137
                    <!-- Copy sources over -->
138
                    <copy todir="target/sqoop-${project.version}-bin" includeEmptyDirs="false" flatten="false">
138
                    <copy todir="target/sqoop-${project.version}-bin-hadoop${hadoop.profile}" includeEmptyDirs="false" flatten="false">
139
                      <fileset dir="../">
139
                      <fileset dir="../">
140
                        <include name="**/*" />
140
                        <include name="**/*" />
141
                        <exclude name="build/**" />
141
                        <exclude name="build/**" />
142
                        <exclude name="**/target/**" />
142
                        <exclude name="**/target/**" />
143
                        <exclude name=".git/**" />
143
                        <exclude name=".git/**" />
[+20] [20] 5 lines
[+20]
149

    
   
149

   
150
                    <!-- Build server directory -->
150
                    <!-- Build server directory -->
151
                    <get src="http://archive.apache.org/dist/tomcat/tomcat-${tomcat.majorVersion}/v${tomcat.version}/bin/apache-tomcat-${tomcat.version}.tar.gz"
151
                    <get src="http://archive.apache.org/dist/tomcat/tomcat-${tomcat.majorVersion}/v${tomcat.version}/bin/apache-tomcat-${tomcat.version}.tar.gz"
152
                         dest="target/apache-tomcat.tar.gz" verbose="true" skipexisting="true"/>
152
                         dest="target/apache-tomcat.tar.gz" verbose="true" skipexisting="true"/>
153
                    <untar src="target/apache-tomcat.tar.gz" dest="target" compression="gzip"/>
153
                    <untar src="target/apache-tomcat.tar.gz" dest="target" compression="gzip"/>
154
                    <move file="target/apache-tomcat-${tomcat.version}" tofile="target/sqoop-${project.version}-bin/server"/>
154
                    <move file="target/apache-tomcat-${tomcat.version}" tofile="target/sqoop-${project.version}-bin-hadoop${hadoop.profile}/server"/>
155
                    <copy todir="target/sqoop-${project.version}-bin/server/bin">
155
                    <copy todir="target/sqoop-${project.version}-bin-hadoop${hadoop.profile}/server/bin">
156
                      <fileset dir="src/main/server/bin"/>
156
                      <fileset dir="src/main/server/bin"/>
157
                    </copy>
157
                    </copy>
158
                    <chmod dir="target/sqoop-${project.version}-bin/server/bin" perm="u+x" includes="**/*.sh"/>
158
                    <chmod dir="target/sqoop-${project.version}-bin-hadoop${hadoop.profile}/server/bin" perm="u+x" includes="**/*.sh"/>
159
                    <copy todir="target/sqoop-${project.version}-bin/server/conf">
159
                    <copy todir="target/sqoop-${project.version}-bin-hadoop${hadoop.profile}/server/conf">
160
                      <fileset dir="src/main/server/conf"/>
160
                      <fileset dir="src/main/server/conf"/>
161
                    </copy>
161
                    </copy>
162
                    <delete dir="target/sqoop-${project.version}-bin/server/webapps"/>
162
                    <delete dir="target/sqoop-${project.version}-bin-hadoop${hadoop.profile}/server/webapps"/>
163
                    <mkdir dir="target/sqoop-${project.version}-bin/server/webapps"/>
163
                    <mkdir dir="target/sqoop-${project.version}-bin-hadoop${hadoop.profile}/server/webapps"/>
164
                    <copy todir="target/sqoop-${project.version}-bin/server/webapps">
164
                    <copy todir="target/sqoop-${project.version}-bin-hadoop${hadoop.profile}/server/webapps">
165
                      <fileset dir="src/main/server/webapps"/>
165
                      <fileset dir="src/main/server/webapps"/>
166
                    </copy>
166
                    </copy>
167
                    <copy file="../server/target/sqoop.war"
167
                    <copy file="../server/target/sqoop.war"
168
                          toDir="target/sqoop-${project.version}-bin/server/webapps"/>
168
                      toDir="target/sqoop-${project.version}-bin-hadoop${hadoop.profile}/server/webapps"/>
169

    
   
169

   
170
                    <!-- Build client directory -->
170
                    <!-- Build client directory -->
171
                    <copy todir="target/sqoop-${project.version}-bin/client/lib">
171
                    <copy todir="target/sqoop-${project.version}-bin-hadoop${hadoop.profile}/client/lib">
172
                      <fileset dir="../client/target/lib"/>
172
                      <fileset dir="../client/target/lib"/>
173
                    </copy>
173
                    </copy>
174
                    <copy file="../client/target/sqoop-client-${project.version}.jar"
174
                    <copy file="../client/target/sqoop-client-${project.version}.jar"
175
                          toDir="target/sqoop-${project.version}-bin/client/lib"/>
175
                      toDir="target/sqoop-${project.version}-bin-hadoop${hadoop.profile}/client/lib"/>
176

    
   
176

   
177
                    <!-- Build "bin" directory -->
177
                    <!-- Build "bin" directory -->
178
                    <copy todir="target/sqoop-${project.version}-bin/bin">
178
                    <copy todir="target/sqoop-${project.version}-bin-hadoop${hadoop.profile}/bin">
179
                      <fileset dir="src/main/bin"/>
179
                      <fileset dir="src/main/bin"/>
180
                    </copy>
180
                    </copy>
181
                    <chmod dir="target/sqoop-${project.version}-bin/bin" perm="u+x" includes="**/*.sh"/>
181
                    <chmod dir="target/sqoop-${project.version}-bin-hadoop${hadoop.profile}/bin" perm="u+x" includes="**/*.sh"/>
182

    
   
182

   
183
                    <!-- Finally create distribution tar -->
183
                    <!-- Finally create distribution tar -->
184
                    <tar destfile="target/sqoop-${project.version}-bin.tar.gz" compression="gzip">
184
                    <tar destfile="target/sqoop-${project.version}-bin-hadoop${hadoop.profile}.tar.gz" compression="gzip">
185
                      <tarfileset dir="target/sqoop-${project.version}-bin" prefix="sqoop-${project.version}"/>
185
                      <tarfileset dir="target/sqoop-${project.version}-bin-hadoop${hadoop.profile}" prefix="sqoop-${project.version}-bin-hadoop${hadoop.profile}"/>
186
                    </tar>
186
                    </tar>
187
                  </target>
187
                  </target>
188
                </configuration>
188
                </configuration>
189
              </execution>
189
              </execution>
190
            </executions>
190
            </executions>
191
          </plugin>
191
          </plugin>
192
        </plugins>
192
        </plugins>
193
      </build>
193
      </build>
194
    </profile>
194
    </profile>

    
   
195

   

    
   
196
    <!-- Hadoop 1.x -->

    
   
197
    <profile>

    
   
198
      <id>hadoop100</id>

    
   
199

   

    
   
200
     <activation>

    
   
201
        <property>

    
   
202
          <name>hadoop.profile</name>

    
   
203
          <value>100</value>

    
   
204
        </property>

    
   
205
      </activation>

    
   
206
    </profile>

    
   
207

   

    
   
208
    <!-- Hadoop 2.x (active by default) -->

    
   
209
    <profile>

    
   
210
      <id>hadoop200</id>

    
   
211

   

    
   
212
      <activation>

    
   
213
        <activeByDefault>true</activeByDefault>

    
   
214
        <property>

    
   
215
          <name>hadoop.profile</name>

    
   
216
          <value>200</value>

    
   
217
        </property>

    
   
218
      </activation>

    
   
219

   

    
   
220
      <properties>

    
   
221
        <hadoop.profile>200</hadoop.profile>

    
   
222
      </properties>

    
   
223
    </profile>

    
   
224

   
195
  </profiles>
225
  </profiles>

    
   
226

   
196
</project>
227
</project>
  1. dist/pom.xml: Loading...