maven 使用
程序员文章站
2022-06-17 13:38:31
...
demo1 |____src/main/java |____src/main/config |____src/main/bin |____src/main/resources |____src/main/assemble |____src/test/java |____src/test/resources |____target |____pom.xml
<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"> <modelVersion>4.0.0</modelVersion> <artifactId>aoi-hbase</artifactId> <packaging>jar</packaging> <version>0.9-SNAPSHOT</version> <name>aoi-hbase</name> <url>http://maven.apache.org</url> <scm> <connection>scm:svn:https://127.0.0.1/aoi/src/java/util/aoi-hbase/trunk</connection> </scm> <properties> <hadoop-mapreduce-client.version>2.4.1</hadoop-mapreduce-client.version> <grizzly.version>2.3.4</grizzly.version> </properties> <dependencies> <!-- HBASE --> <dependency> <groupId>org.apache.hbase</groupId> <artifactId>hbase</artifactId> <version>0.94.6</version> </dependency> <dependency> <groupId>com.google.guava</groupId> <artifactId>guava</artifactId> <version>17.0</version> </dependency> <dependency> <groupId>org.apache.hadoop</groupId> <artifactId>hadoop-yarn-common</artifactId> <version>2.4.1</version> </dependency> <dependency> <groupId>org.apache.hadoop</groupId> <artifactId>hadoop-rumen</artifactId> <version>2.4.1</version> </dependency> <dependency> <groupId>org.apache.hadoop</groupId> <artifactId>hadoop-streaming</artifactId> <version>2.4.1</version> </dependency> <dependency> <groupId>org.apache.hadoop</groupId> <artifactId>hadoop-yarn-api</artifactId> <version>2.4.1</version> </dependency> <dependency> <groupId>org.codehaus.jackson</groupId> <artifactId>jackson-core-asl</artifactId> <version>1.9.13</version> </dependency> <dependency> <groupId>org.glassfish.grizzly</groupId> <artifactId>grizzly-framework</artifactId> <version>${grizzly.version}</version> </dependency> <dependency> <groupId>org.glassfish.grizzly</groupId> <artifactId>grizzly-http</artifactId> <version>${grizzly.version}</version> </dependency> <dependency> <groupId>org.glassfish.grizzly</groupId> <artifactId>grizzly-http-server</artifactId> <version>${grizzly.version}</version> </dependency> <dependency> <groupId>org.glassfish.grizzly</groupId> <artifactId>grizzly-http-servlet</artifactId> <version>${grizzly.version}</version> </dependency> <dependency> <groupId>org.glassfish.grizzly</groupId> <artifactId>grizzly-rcm</artifactId> <version>${grizzly.version}</version> </dependency> <dependency> <groupId>org.apache.hadoop</groupId> <artifactId>hadoop-mapreduce-client-hs</artifactId> <version>${hadoop-mapreduce-client.version}</version> </dependency> <dependency> <groupId>org.apache.hadoop</groupId> <artifactId>hadoop-mapreduce-client-hs-plugins</artifactId> <version>${hadoop-mapreduce-client.version}</version> </dependency> <dependency> <groupId>org.apache.hadoop</groupId> <artifactId>hadoop-mapreduce-client-core</artifactId> <version>${hadoop-mapreduce-client.version}</version> </dependency> <dependency> <groupId>org.apache.hadoop</groupId> <artifactId>hadoop-mapreduce-client-common</artifactId> <version>${hadoop-mapreduce-client.version}</version> </dependency> <dependency> <groupId>org.apache.hadoop</groupId> <artifactId>hadoop-mapreduce-client-app</artifactId> <version>${hadoop-mapreduce-client.version}</version> </dependency> <dependency> <groupId>org.apache.hadoop</groupId> <artifactId>hadoop-mapreduce-client-jobclient</artifactId> <version>${hadoop-mapreduce-client.version}</version> </dependency> <dependency> <groupId>org.apache.hadoop</groupId> <artifactId>hadoop-mapreduce-client-shuffle</artifactId> <version>${hadoop-mapreduce-client.version}</version> </dependency> <dependency> <groupId>com.alibaba</groupId> <artifactId>fastjson</artifactId> <version>1.1.23</version> <type>jar</type> <scope>compile</scope> </dependency> </dependencies> <distributionManagement> <repository> <id>releases</id> <name>InternalReleases</name> <url>http://192.168.80.45:8081/nexus/content/repositories/releases</url> </repository> <snapshotRepository> <id>snapshots</id> <name>InternalSnapshots</name> <url>http://192.168.80.45:8081/nexus/content/repositories/snapshots</url> </snapshotRepository> </distributionManagement> <developers> <developer> <id>baoy</id> <name>baoyou</name> <email>baoyou@163.com</email> <roles> <role>Engineer</role> </roles> <organization>R&D</organization> <timezone>+8</timezone> </developer> </developers> <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>2.3.2</version> <configuration> <source>1.6</source> <target>1.6</target> <encoding>UTF-8</encoding> </configuration> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-javadoc-plugin</artifactId> <version>2.6.1</version> <configuration> <encoding>UTF-8</encoding> </configuration> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-eclipse-plugin</artifactId> <version>2.5.1</version> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-deploy-plugin</artifactId> <version>2.8.1</version> <executions> <execution> <id>default-deploy</id> <phase>deploy</phase> <goals> <goal>deploy</goal> </goals> </execution> </executions> </plugin> <plugin> <artifactId>maven-assembly-plugin</artifactId> <version>2.2-beta-2</version> <configuration> <descriptors> <descriptorRef>assembly/package.xml</descriptorRef> </descriptors> </configuration> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-release-plugin</artifactId> <version>2.0-beta-7</version> <configuration> <tagBase> scm:svn:https://192.168.80.62/aoi/src/java/util/aoi-hbase/tag </tagBase> </configuration> </plugin> </plugins> </build> </project>
<assembly 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/xsd/assembly-1.0.0.xsd"> <formats> <format>tar.gz</format> </formats> <dependencySets> <dependencySet> <useProjectArtifact>true</useProjectArtifact> <outputDirectory>lib</outputDirectory> </dependencySet> </dependencySets> <fileSets> <fileSet> <directory>src/main/resources</directory> <outputDirectory>conf</outputDirectory> <includes> <include>hbase_sql.txt</include> <include>hbase-site-product_hz.xml</include> <include>log4j.properties</include> <include>service.properties</include> </includes> </fileSet> <fileSet> <directory>bin</directory> <outputDirectory>bin</outputDirectory> <includes> <include>search_class.bat</include> <include>search_class.sh</include> </includes> </fileSet> <fileSet> <directory>src/main/scripts</directory> <outputDirectory>bin</outputDirectory> <includes> <include>shutdown.sh</include> <include>startup.sh</include> </includes> </fileSet> </fileSets> </assembly>
#!/bin/sh ulimit -n 100000 # tries to determine arguments to launch AOI-HBASE PID=`ps aux | grep aoi-hbase | grep HbaseDevice | grep -v grep | grep -v "startup.sh" | awk '{print $2}'` #echo PID=$PID. if [ "" != "$PID" ] ; then echo " AOI-HBASE is allready running." exit 1; fi JAVA_HOME=/home/aoi/jdk1.6 CLASSPATH=.:$JAVA_HOME/lib:JAVA_HOME/jre/lib JVM_ETTINGS="-Xms512m -Xmx1024m" JVM_SETTINGS="" AOI_HOME="/home/aoi/aoi-hbase" AOI_LIB="$AOI_HOME/lib" AOI_OPTS=" -DaoiHome="/$AOI_HOME" -Daoi.lib.dir=${AOI_LIB}" #export CLASSPATH=$CLASSPATH:$CMANAGER_LIB CLASSPATH2='.' for jarfile in `ls $AOI_LIB/*.jar` do CLASSPATH2=$CLASSPATH2:$jarfile done JAVA_DEBUG="" if [ -n $1 ]; then if [ "$1" = "debug" ] ; then echo is debug mode JAVA_DEBUG="-agentlib:jdwp=transport=dt_socket,address=8686,server=y,suspend=n" fi fi #echo JAVA_HOME=$JAVA_HOME export CLASSPATH=$JAVA_HOME/lib:$JAVA_HOME/jre/lib:$CLASSPATH END=">/dev/null 2>&1 &" # END="" cmanager_exec_command="$JAVA_HOME/bin/java -server $JVM_SETTINGS $JAVA_DEBUG $AOI_OPTS -cp $CLASSPATH2 hbseDevice.HbaseDevice $END" # echo EXEC_CMD=$cmanager_exec_command eval $cmanager_exec_command echo AOI-HBASE start sucessful... exit 0
#!/bin/sh # tries to determine arguments to launch AOI-HBASE PID=`ps aux | grep HbaseDevice | grep -v grep | awk '{print $2}'` #echo PID=$PID. if [ "" = "$PID" ] ; then echo " AOI-HBASE isn't running." exit 1 else kill -9 $PID echo " AOI-HBASE (pid:$PID) be killed." exit 0 fi
捐助开发者
在兴趣的驱动下,写一个免费
的东西,有欣喜,也还有汗水,希望你喜欢我的作品,同时也能支持一下。 当然,有钱捧个钱场(右上角的爱心标志,支持支付宝和PayPal捐助),没钱捧个人场,谢谢各位。
谢谢您的赞助,我会做的更好!
上一篇: 爆冰,冷的不是一点点