ContinuumIO / nutchpy

For interacting with nutch via Python
Apache License 2.0
23 stars 16 forks source link

Bad error without pom.xml #8

Closed aterrel closed 9 years ago

aterrel commented 9 years ago

Bug report from Shadi Saleh propatrio@gmail.com

When installing, the following errors occur

[INFO] Scanning for projects...

[INFO]

[INFO]
------------------------------------------------------------------------

[INFO] Building seqreader-app 1.0-SNAPSHOT

[INFO]
------------------------------------------------------------------------

[INFO]

[INFO] --- maven-resources-plugin:2.3:resources (default-resources) @
seqreader-app ---

[WARNING] Using platform encoding (ANSI_X3.4-1968 actually) to copy
filtered resources, i.e. build is platform dependent!

[INFO] skip non existing resourceDirectory
/root/py_nutch/nutchpy/seqreader-app/src/main/resources

[INFO]

[INFO] --- maven-compiler-plugin:2.0.2:compile (default-compile) @
seqreader-app ---

[INFO] Compiling 5 source files to
/root/py_nutch/nutchpy/seqreader-app/target/classes

[INFO]
------------------------------------------------------------------------

[INFO] BUILD FAILURE

[INFO]
------------------------------------------------------------------------

[INFO] Total time: 1.213s

[INFO] Finished at: Sat Jan 10 03:23:39 EST 2015

[INFO] Final Memory: 9M/153M

[INFO]
------------------------------------------------------------------------

[ERROR] Failed to execute goal
org.apache.maven.plugins:maven-compiler-plugin:2.0.2:compile
(default-compile) on project seqreader-app: Compilation failure:
Compilation failure:

[ERROR]
/root/py_nutch/nutchpy/seqreader-app/src/main/java/com/continuumio/seqreaderapp/LinkReader.java:[21,25]
error: generics are not supported in -source 1.3

[ERROR]

[ERROR] (use -source 5 or higher to enable generics)

[ERROR]
/root/py_nutch/nutchpy/seqreader-app/src/main/java/com/continuumio/seqreaderapp/SequenceReader.java:[47,12]
error: generics are not supported in -source 1.3

[ERROR]

[ERROR] (use -source 5 or higher to enable generics)

[ERROR]
/root/py_nutch/nutchpy/seqreader-app/src/main/java/com/continuumio/seqreaderapp/NodeReader.java:[21,25]
error: generics are not supported in -source 1.3

[ERROR] -> [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/MojoFailureException

Traceback (most recent call last):

  File "setup.py", line 132, in <module>

    shutil.copy(jar_file,java_lib_dir)

  File "/usr/lib/python2.7/shutil.py", line 119, in copy

    copyfile(src, dst)

  File "/usr/lib/python2.7/shutil.py", line 82, in copyfile

    with open(src, 'rb') as fsrc:

IOError: [Errno 2] No such file or directory:
'seqreader-app/target/seqreader-app-1.0-SNAPSHOT-jar-with-dependencies.jar'

But things worked when adding nutchpy/seqreader-app/pom.xml

   <plugin>

      <groupId>org.apache.maven.plugins</groupId>

      <artifactId>maven-compiler-plugin</artifactId>

      <configuration>

        <compilerVersion>1.5</compilerVersion>

        <source>1.5</source>

        <target>1.5</target>

      </configuration>

    </plugin>
lewismc commented 9 years ago

Hi @aterrel I saw this last night as well, however I cannot reproduce with master branch. After checking out a fresh copy of the codebase and following the instructions in the README, I get a clean, successful build

...
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 9.123 s
[INFO] Finished at: 2015-01-10T08:58:41-08:00
[INFO] Final Memory: 10M/265M
[INFO] ------------------------------------------------------------------------
/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'install_requires'
  warnings.warn(msg)
running install
running build
running build_py
copying nutchpy/java_libs/seqreader-app-1.0-SNAPSHOT-jar-with-dependencies.jar -> build/lib/nutchpy/java_libs
running install_lib
creating /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/nutchpy
copying build/lib/nutchpy/__init__.py -> /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/nutchpy
creating /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/nutchpy/ex_data
copying build/lib/nutchpy/ex_data/crawl_fetch_data -> /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/nutchpy/ex_data
copying build/lib/nutchpy/ex_data/crawldb_data -> /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/nutchpy/ex_data
copying build/lib/nutchpy/ex_data/linkdb_data -> /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/nutchpy/ex_data
creating /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/nutchpy/java_libs
copying build/lib/nutchpy/java_libs/seqreader-app-1.0-SNAPSHOT-jar-with-dependencies.jar -> /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/nutchpy/java_libs
copying build/lib/nutchpy/JVM.py -> /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/nutchpy
copying build/lib/nutchpy/readers.py -> /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/nutchpy
byte-compiling /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/nutchpy/__init__.py to __init__.pyc
byte-compiling /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/nutchpy/JVM.py to JVM.pyc
byte-compiling /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/nutchpy/readers.py to readers.pyc
running install_egg_info
Writing /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/nutchpy-0.1-py2.7.egg-info

Additionally, I would comment that the proposed fix posted by Shadi Saleh suggests that the source and target Javac should be pinned to 1.5, this is not correct. The README for Nutchpy explicitly states JDK1.6+, meaning that at a minimum the maven-compiler-plugin config, if included, should be pinned to 1.6.

I don't see anything wrong with Nutchpy as it stands. It would be very useful to see someone else make an attempt to install from scratch. Thanks

chrismattmann commented 9 years ago

I think this isn't an error anymore.