Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install failed #15

Closed
mengzhuo opened this issue Apr 2, 2016 · 1 comment
Closed

Install failed #15

mengzhuo opened this issue Apr 2, 2016 · 1 comment

Comments

@mengzhuo
Copy link

mengzhuo commented Apr 2, 2016

Linux 3.13.0-77-generic #121-Ubuntu SMP Wed Jan 20 10:50:42 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

java -version
java version "1.7.0_95"
OpenJDK Runtime Environment (IcedTea 2.6.4) (7u95-2.6.4-0ubuntu0.14.04.1)
OpenJDK 64-Bit Server VM (build 24.95-b01, mixed mode)

compile:
    [mkdir] Created dir: /home/meng/amazon-kinesis-agent/ant_build/private
    [javac] Compiling 85 source files to /home/meng/amazon-kinesis-agent/ant_build/private
    [javac] /home/meng/amazon-kinesis-agent/src/com/amazon/kinesis/streaming/agent/Agent.java:400: 错误: 找不到符号
    [javac]         return MoreExecutors.directExecutor();
    [javac]                             ^
    [javac]   符号:   方法 directExecutor()
    [javac]   位置: 类 MoreExecutors
    [javac] /home/meng/amazon-kinesis-agent/src/com/amazon/kinesis/streaming/agent/config/Configuration.java:125: 错误: 找不到符号
    [javac]                 Doubles.stringConverter());
    [javac]                        ^
    [javac]   符号:   方法 stringConverter()
    [javac]   位置: 类 Doubles
    [javac] /home/meng/amazon-kinesis-agent/src/com/amazon/kinesis/streaming/agent/config/Configuration.java:128: 错误: 找不到符号
    [javac]                 Ints.stringConverter());
    [javac]                     ^
    [javac]   符号:   方法 stringConverter()
    [javac]   位置: 类 Ints
    [javac] /home/meng/amazon-kinesis-agent/src/com/amazon/kinesis/streaming/agent/config/Configuration.java:131: 错误: 找不到符号
    [javac]                 Longs.stringConverter());
    [javac]                      ^
    [javac]   符号:   方法 stringConverter()
    [javac]   位置: 类 Longs
    [javac] 4 个错误

BUILD FAILED
/home/meng/amazon-kinesis-agent/build.xml:38: Compile failed; see the compiler error output for details.

@mengzhuo
Copy link
Author

mengzhuo commented Apr 2, 2016

build.xml

<?xml version="1.0"?>
<project basedir="." default="release" xmlns:unless="ant:unless">
    <property name="agent.name" value="aws-kinesis-agent" />
    <property name="agent.package.name" value="AWSKinesisStreamingDataAgent" />
    <property name="agent.version" value="1.0" />
    <property name="agent.vendor" value="Amazon.com, Inc." />

    <property name="src.root" location="." />
    <property name="src.dir" location="src" />
    <property name="build.root" location="ant_build" />
    <property name="build.private" location="${build.root}/private" />
    <property name="build.lib" location="${build.root}/lib" />
    <property name="build.dependencies" location="dependencies" />

    <path id="classpath">
        <fileset dir="/usr/share/java" includes="**/*.jar" />
        <fileset dir="${build.dependencies}" includes="**/*.jar" />
    </path>

    <target name="get-java-version">
      <condition property="current.java.version">
        <or>
          <equals arg1="${ant.java.version}" arg2="1.7"/>
          <equals arg1="${ant.java.version}" arg2="1.8"/>
        </or>
      </condition>
    </target>
    <target name="check-java-version" depends="get-java-version" unless="current.java.version">
        <fail message="Unsupported Java version: ${ant.java.version}. Make sure that the Java version is 1.7 or greater."/>                                                                                                        [13/49]
    </target>

    <target name="init">
        <mkdir dir="${build.root}" />
    </target>

    <target name="compile" depends="check-java-version, init">
        <mkdir dir="${build.private}" />
        <javac source="1.7" target="1.7" includeantruntime="false" classpathref="classpath" srcdir="${src.dir}" destdir="${build.private}" />
        <property name="src.agent.path" value="com/amazon/kinesis/streaming/agent" />
        <copy todir="${build.private}/${src.agent.path}" failonerror="true">
            <fileset dir="${src.dir}/${src.agent.path}" excludes="**/*.java" />
        </copy>
    </target>

    <target name="build" depends="compile">
        <mkdir dir="${build.lib}" />
        <jar jarfile="${build.lib}/${agent.package.name}-${agent.version}.jar" basedir="${build.private}">
          <manifest>
                <attribute name="Main-Class" value="com.amazon.kinesis.streaming.agent.Agent" />
            </manifest>
        </jar>
    </target>

    <target name="clean">
        <delete dir="${build.root}" />
    </target>

    <target name="release" depends="clean, compile, build" />

I think you guys might want to update your document about minimal Java version requirement.

@mengzhuo mengzhuo closed this as completed Apr 2, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant