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

can not build by maven #8

Closed
snageyang opened this issue Jun 20, 2012 · 36 comments

Comments

Projects
None yet
@snageyang
Copy link

commented Jun 20, 2012

@davegardnerisme

This comment has been minimized.

Copy link

commented Jul 2, 2012

Any plans on making it possible to build this project?

@ryanking

This comment has been minimized.

Copy link
Contributor

commented Jul 6, 2012

Working on it.

@snageyang

This comment has been minimized.

Copy link
Author

commented Jul 7, 2012

im try it.thks

@billmiller1001

This comment has been minimized.

Copy link

commented Jul 20, 2012

I still can't get it to build. Fails on the maven-finagle-thrift-plugin-0.0.5 from the scala-parent-292.0.0.2.pom. The latest on http://maven.twttr.com is maven-finagle-thrift-plugin-0.0.2

@ryanking

This comment has been minimized.

Copy link
Contributor

commented Jul 20, 2012

Still working on it, sorry.

@shijinkui

This comment has been minimized.

Copy link

commented Jul 31, 2012

i have this problem also. shit

@danigiri

This comment has been minimized.

Copy link

commented Aug 2, 2012

Guys, got to compile it by specifying a slightly older version of 'maven-finagle-thrift-plugin' which as @billmiller1001 commented, is on the public twitter maven repo.

  <build>
    <plugins>
      <plugin>
        <groupId>com.twitter</groupId>
        <artifactId>maven-finagle-thrift-plugin</artifactId>
        <version>0.0.2</version>
        <configuration>
          <thriftGenerators>
            <thriftGenerator>java</thriftGenerator>
            <thriftGenerator>rb</thriftGenerator>
          </thriftGenerators>
        </configuration>
      </plugin>
    </plugins>
  </build>

Builds (like, with one warning) and tests pass. Can't say if using older version has any real impact.

Hope this helps

@danigiri

This comment has been minimized.

Copy link

commented Aug 2, 2012

Mmmm.. Have been fiddling a bit. The project builds and tests using maven and the small change, but the generated jar doesn't have the Snowflake server, which does get generated with the ./sbt script.
Once sbt is run, tweaking the startup script is all is needed, then works like a charm.

@edgurgel

This comment has been minimized.

Copy link

commented Sep 13, 2012

Same problem

@ghost ghost assigned ryanking Sep 26, 2012

@ryanking

This comment has been minimized.

Copy link
Contributor

commented Sep 26, 2012

This should be working now. let me know if there are any problems.

@ryanking ryanking closed this Sep 26, 2012

@ryanking

This comment has been minimized.

Copy link
Contributor

commented Sep 26, 2012

sorry, I was wrong :(

@ryanking ryanking reopened this Sep 26, 2012

@dokipen

This comment has been minimized.

Copy link

commented Sep 27, 2012

[ERROR] Failed to execute goal on project snowflake: Could not resolve dependencies for project com.twitter.service❄️jar:1.0.1-SNAPSHOT: Could not find artifact org.scala-tools.testing:specs_2.9.2:jar:1.6.9 in Twitter public Maven repo (http://maven.twttr.com) -> [Help 1]

@timperrett

This comment has been minimized.

Copy link

commented Oct 11, 2012

@ryanking Nope, it still doesn't build, and the SBT build configuration is also missing from the source tree.

@benlime

This comment has been minimized.

Copy link

commented Oct 15, 2012

Youre still on it? Getting the same error like dokipen.

@paulwilton

This comment has been minimized.

Copy link

commented Oct 25, 2012

also there is a dependency on com.twitter:util-core:jar:4.0.1 which doesn't exist in the twitter public maven repo

@robertdolca

This comment has been minimized.

Copy link

commented Nov 17, 2012

com.twitter maven-finagle-thrift-plugin
version 0.0.8

I downloaded org.scala-tools.testing:specs_2.9.2:jar:1.6.9 manually.

@chka

This comment has been minimized.

Copy link

commented Dec 7, 2012

Solved:

cd ~/.m2/repository
vi com/twitter/util-logging/5.3.0/util-logging-5.3.0.pom
==> find specs_2.9.2 and change it to specs_2.9.1

vi com/twitter/scala-parent-292/0.0.4/scala-parent-292-0.0.4.pom
==> same here: find specs_2.9.2 and change it to specs_2.9.1

mvn test

@caniszczyk

This comment has been minimized.

Copy link

commented Dec 18, 2012

bump @ryanking, looks like the build is failing still...

https://travis-ci.org/twitter/snowflake

Looks like the solution is to bump maven-finagle-thrift-plugin but not sure.

yourabi added a commit to yourabi/snowflake that referenced this issue Feb 27, 2013

@yourabi

This comment has been minimized.

Copy link

commented Feb 27, 2013

I got the build to succeed. This is a short term work around, the real fix needs to happen in "scala-parent"

  1. checkout snowflake
  2. edit pom.xml to bump maven-finagle-thrift-plugin to 0.0.9 from 0.0.7 (see pull request #13)
  3. mvn test (will fail) but create needed directory structure in $HOME/.m2
  4. cd $HOME/.m2/repository/org/scala-tools/testing/specs_2.9.2/1.6.9 and download missing specs_2.9.2-1.6.9.jar from typesafe cache: wget http://repo.typesafe.com/typesafe/scala-tools-releases-cache/org/scala-tools/testing/specs_2.9.2/1.6.9/specs_2.9.2-1.6.9.jar
  5. mvn -U test

At this point build should succeed. It it worth pointing out that I haven't had a chance to test this out live yet since I've had to jump through these hoops just to get the build to pass.

@yllierop

This comment has been minimized.

Copy link

commented Jun 26, 2013

bump @ryanking, looks like the build is failing still... ;-)

@bixu

This comment has been minimized.

Copy link

commented Jun 28, 2013

Also seeing this.

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 12.177s
[INFO] Finished at: Fri Jun 28 00:35:20 UTC 2013
[INFO] Final Memory: 5M/147M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project snowflake: Could not resolve dependencies for project com.twitter.service:snowflake:jar:1.0.2-SNAPSHOT: Could not find artifact org.scala-tools.testing:specs_2.9.2:jar:1.6.9 in Twitter public Maven repo (http://maven.twttr.com) -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException
@yllierop

This comment has been minimized.

Copy link

commented Jun 28, 2013

@bixu — I got it to work with @yourabi's work-around:

I got the build to succeed. This is a short term work around, the real fix needs to happen in "scala-parent"

  1. checkout snowflake
  2. edit pom.xml to bump maven-finagle-thrift-plugin to 0.0.9 from 0.0.7 (see pull request #13)
  3. mvn test (will fail) but create needed directory structure in $HOME/.m2
  4. cd $HOME/.m2/repository/org/scala-tools/testing/specs_2.9.2/1.6.9 and download missing specs_2.9.2-1.6.9.jar from typesafe cache: wget http://repo.typesafe.com/typesafe/scala-tools-releases-cache/org/scala-tools/testing/specs_2.9.2/1.6.9/specs_2.9.2-1.6.9.jar
  5. mvn -U test

At this point build should succeed.

Have you tried this?

@bixu

This comment has been minimized.

Copy link

commented Jun 28, 2013

@preillyme, that does indeed work, but I then fail here:

[INFO] compiling thrift files [/root/snowflake/src/main/thrift/Snowflake.thrift, /root/snowflake/src/main/thrift/fb303.thrift, /root/snowflake/src/main/thrift/scribe.thrift] with generators [java, rb]
[INFO] copying /thrift/thrift.null to /var/tmp/thrift8180113951168204754
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 8.931s
[INFO] Finished at: Fri Jun 28 01:28:12 UTC 2013
[INFO] Final Memory: 5M/85M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.twitter:maven-finagle-thrift-plugin:0.0.9:compile (thrift-sources) on project snowflake: Execution thrift-sources of goal com.twitter:maven-finagle-thrift-plugin:0.0.9:compile failed. NullPointerException -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.twitter:maven-finagle-thrift-plugin:0.0.9:compile (thrift-sources) on project snowflake: Execution thrift-sources of goal com.twitter:maven-finagle-thrift-plugin:0.0.9:compile failed.
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:225)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
        at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
        at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
        at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
        at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
        at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
        at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: org.apache.maven.plugin.PluginExecutionException: Execution thrift-sources of goal com.twitter:maven-finagle-thrift-plugin:0.0.9:compile failed.
        at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:110)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
        ... 19 more
Caused by: java.lang.NullPointerException
        at org.codehaus.plexus.util.IOUtil.copy(IOUtil.java:188)
        at org.codehaus.plexus.util.IOUtil.copy(IOUtil.java:174)
        at org.codehaus.plexus.util.FileUtils.copyStreamToFile(FileUtils.java:1059)
        at com.twitter.FinagleThriftRunner.getBinary(FinagleThriftRunner.java:53)
        at com.twitter.FinagleThriftRunner.compile(FinagleThriftRunner.java:64)
        at com.twitter.AbstractFinagleThriftMojo.execute(AbstractFinagleThriftMojo.java:186)
        at com.twitter.FinagleThriftCompileMojo.execute(FinagleThriftCompileMojo.java:22)
        at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
        ... 20 more
[ERROR]
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException

Is this because I'm on the Illumos (once Solaris) kernel? Or for some other reason? Maven is new to me...

@ramayer

This comment has been minimized.

Copy link

commented Jul 24, 2013

Not building for me too. Curious if this project's still alive?

@hridayeshgupta

This comment has been minimized.

Copy link

commented Aug 19, 2013

I am able to build it successfully but I can't get it running. What are the steps to get it running? I could not find anywhere.
Tried to run generated jar at target/ but it did not work

@yllierop

This comment has been minimized.

Copy link

commented Aug 19, 2013

I've asked @jreichhold to take a look at this thread: https://twitter.com/preillyme/status/369502554033356801

@hridayeshgupta

This comment has been minimized.

Copy link

commented Aug 19, 2013

I have changed version of maven-finagle-thrift-plugin to 0.0.8 in pom.xml then tried to build with mvn test.
It failed but some repositories was downloaded at ~/.m2/ then i followed this comment #8 (comment)
After that i was able to build successfully using mvn test. Also tried mvn install and mvn deploy which was successful. but have no clue on how to run it

@jreichhold

This comment has been minimized.

Copy link

commented Aug 19, 2013

Can I get someone external to test the branch updated_deps? Looks to fix for me, would love to get external verification

@yllierop

This comment has been minimized.

Copy link

commented Aug 19, 2013

I'm checking it right now.

@yllierop

This comment has been minimized.

Copy link

commented Aug 19, 2013

@jreichhold — See below.

$git branch
  master
* updated_deps

$mvn -U test

-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Running com.twitter.service.snowflake.SnowflakeConfigSpec
validating development238462076416955672scala
validating development21739671345518817259scala
validating test8779000135063884026scala
Tests run: 2, Failures: 0, Errors: 0, Skipped: 1, Time elapsed: 11.106 sec
Running com.twitter.service.snowflake.SnowflakeServerSpec
Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.001 sec
Running com.twitter.service.snowflake.ReporterSpec
Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.001 sec
Running com.twitter.service.snowflake.IdWorkerSpec
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/home/preilly/.m2/repository/org/slf4j/slf4j-nop/1.5.8/slf4j-nop-1.5.8.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/home/preilly/.m2/repository/org/slf4j/slf4j-log4j12/1.6.1/slf4j-log4j12-1.6.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
generated 1000000 ids in 315 ms, or 3,174,603 ids/second
Tests run: 17, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.23 sec

Results :

Tests run: 19, Failures: 0, Errors: 0, Skipped: 1

[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 20.177s
[INFO] Finished at: Mon Aug 19 15:33:08 PDT 2013
[INFO] Final Memory: 13M/137M
[INFO] ------------------------------------------------------------------------


@hridayeshgupta

This comment has been minimized.

Copy link

commented Aug 20, 2013

Build is success now. Can anyone point me to steps on how to run this server?
mvn test just runs the test.

@yllierop

This comment has been minimized.

Copy link

commented Sep 9, 2013

@hridayeshgupta — I run it like this for testing:

$ echo ${JAVA_HOME}
/usr/jdk/jdk1.6.0_31/

$ echo ${JAVA_OPTS}
-Xmx700m -Xms700m -Xmn500m -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=9999 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -XX:+UseConcMarkSweepGC -verbosegc -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintGCDateStamps -XX:+UseParNewGC -Xloggc:/var/log/snowflake/gc.log -XX:ErrorFile=/var/log//java_error%p.log -server

$ echo ${CLASSPATH}
/home/preilly/.m2/repository/commons-codec/commons-codec/1.4/commons-codec-1.4.jar:/home/preilly/.m2/repository/org/slf4j/slf4j-api/1.5.8/slf4j-api-1.5.8.jar:/home/preilly/.m2/repository/org/slf4j/slf4j-nop/1.5.8/slf4j-nop-1.5.8.jar:/home/preilly/.m2/repository/thrift/libthrift/0.5.0/libthrift-0.5.0.jar:/home/preilly/.m2/repository/com/twitter/ostrich/8.2.0/ostrich-8.2.0.jar:/home/preilly/.m2/repository/com/twitter/scala-json/3.0.0/scala-json-3.0.0.jar:/home/preilly/.m2/repository/com/twitter/util-core/5.3.0/util-core-5.3.0.jar:/home/preilly/.m2/repository/com/twitter/util-eval/5.3.0/util-eval-5.3.0.jar:/home/preilly/.m2/repository/org/scala-lang/scala-compiler/2.9.2/scala-compiler-2.9.2.jar:/home/preilly/.m2/repository/com/twitter/util-jvm/5.3.0/util-jvm-5.3.0.jar:/home/preilly/.m2/repository/com/twitter/scala-zookeeper-client/3.0.6/scala-zookeeper-client-3.0.6.jar:/home/preilly/.m2/repository/org/apache/zookeeper/zookeeper/3.4.3/zookeeper-3.4.3.jar:/home/preilly/.m2/repository/org/slf4j/slf4j-log4j12/1.6.1/slf4j-log4j12-1.6.1.jar:/home/preilly/.m2/repository/log4j/log4j/1.2.15/log4j-1.2.15.jar:/home/preilly/.m2/repository/javax/mail/mail/1.4/mail-1.4.jar:/home/preilly/.m2/repository/javax/activation/activation/1.1/activation-1.1.jar:/home/preilly/.m2/repository/jline/jline/0.9.94/jline-0.9.94.jar:/home/preilly/.m2/repository/org/jboss/netty/netty/3.2.2.Final/netty-3.2.2.Final.jar:/home/preilly/.m2/repository/com/twitter/util-logging/5.3.0/util-logging-5.3.0.jar:/home/preilly/.m2/repository/com/twitter/util-thrift/5.3.0/util-thrift-5.3.0.jar:/home/preilly/.m2/repository/org/codehaus/jackson/jackson-core-asl/1.8.1/jackson-core-asl-1.8.1.jar:/home/preilly/.m2/repository/org/codehaus/jackson/jackson-mapper-asl/1.8.1/jackson-mapper-asl-1.8.1.jar:/home/preilly/.m2/repository/com/twitter/util-codec/5.3.0/util-codec-5.3.0.jar:/home/preilly/.m2/repository/org/scala-tools/testing/specs_2.9.3/1.6.9/specs_2.9.3-1.6.9.jar:/home/preilly/.m2/repository/junit/junit/4.5/junit-4.5.jar:/home/preilly/.m2/repository/org/scala-lang/scala-library/2.9.2/scala-library-2.9.2.jar

$ echo ${MAIN_CLASS}
com.twitter.service.snowflake.SnowflakeServer

$ ${JAVA_HOME}/bin/java ${JAVA_OPTS} -cp "/tmp/snowflake/target/*:${CLASSPATH}" ${MAIN_CLASS} -f /tmp/snowflake/config/development2.scala

For a more complete example take a look at: https://github.com/twitter/snowflake/blob/master/src/scripts/snowflake.sh

@hridayeshgupta

This comment has been minimized.

Copy link

commented Sep 9, 2013

Thanks preillyme I did find out that file and I was able to run the java program, But I could not find how to access it via REST api or some other api whichever is supported. Could not find any doc regarding that Tried opening in browser but there was something else

@yllierop

This comment has been minimized.

Copy link

commented Sep 9, 2013

@ hridayeshgupta — Take a look at: https://github.com/preillyme/SnowflakeClient it's an example Java client for Snowflake.

@AlexCzar

This comment has been minimized.

Copy link

commented Oct 3, 2013

So, is Twitter working on the public source of this project? Or the current and future developments are (will be) done "behind the curtain" and interested users should fork snowflake and continue working on it by themselves (with maybe a rebranding—I'm not good at understanding licenses)? I see quite a number of forks and some of them are several commits ahead, yet no pull requests were issued and the one that was is neither accepted nor rejected for 7 months already.

@bdd

This comment has been minimized.

Copy link
Contributor

commented Oct 3, 2013

A rewrite a Snowflake with http://github.com/twitter/twitter-server is internally complete but it will take time to release the open source version (it's not just a push-to-github operation). Feel free to fork, rewrite and rename Snowflake as the license permits.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.