moafmoar / weibo4j

Automatically exported from code.google.com/p/weibo4j
Other
0 stars 0 forks source link

贡献一个maven的pom.xml #22

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
现在的代码没有"Makefile"这样的东西,所以不能自动编译。

mvn的下载网址:http://maven.apache.org/
解压缩后把bin目录加入到PATH中即可

我刚写了一个pom.xml,请见附件。

把pom.xml放在源代码的顶层目录下,然后

创建两个目录
src\main\java
src\main\resources

把现在的src\weibo4j 放到 src\main\java目录下
把现在的配置文件config.properties、log4j.properties 放到 
src\main\resources 目录下

然后用
mvn clean package就可以编译了。
lib目录可以从svn中删除。

Original issue reported on code.google.com by me@cpp.io on 25 Oct 2012 at 9:45

GoogleCodeExporter commented 8 years ago
<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/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>weibo4j</groupId>
    <artifactId>weibo4j</artifactId>
    <version>2.1-beta</version>
    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>2.4</version>
                <configuration>
                    <source>1.7</source>
                    <target>1.7</target>
                </configuration>
            </plugin>
            <plugin>
                <artifactId>maven-assembly-plugin</artifactId>
                <version>2.3</version>
                <configuration>
                    <descriptorRefs>
                        <descriptorRef>jar-with-dependencies</descriptorRef>
                    </descriptorRefs>
                </configuration>
                <executions>
                    <execution>
                        <id>make-assembly</id>
                        <phase>package</phase>
                        <goals>
                            <goal>single</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>
    <dependencies>
        <dependency>
            <groupId>commons-httpclient</groupId>
            <artifactId>commons-httpclient</artifactId>
            <version>3.1</version>
        </dependency>
        <dependency>
            <groupId>commons-logging</groupId>
            <artifactId>commons-logging</artifactId>
            <version>1.1</version>
        </dependency>
        <dependency>
            <groupId>log4j</groupId>
            <artifactId>log4j</artifactId>
            <version>1.2.17</version>
        </dependency>

        <dependency>
            <groupId>org.codehaus.jackson</groupId>
            <artifactId>jackson-core-asl</artifactId>
            <version>1.9.10</version>
        </dependency>
    </dependencies>
</project>

Original comment by me@cpp.io on 25 Oct 2012 at 9:46