multilang-depends / depends

Depends is a fast, comprehensive code dependency analysis tool
MIT License
195 stars 54 forks source link

Build issue/invalid pom #16

Closed juli1 closed 5 years ago

juli1 commented 5 years ago

When trying to build depends from scratch, some dependencies cannot be found.

Configuration: Ubuntu amd64

Trace

mvn clean package                                                                                                                                                                                                                        11:28:42
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.google.inject.internal.cglib.core.$ReflectUtils$1 (file:/usr/share/maven/lib/guice.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain)
WARNING: Please consider reporting this to the maintainers of com.google.inject.internal.cglib.core.$ReflectUtils$1
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
[INFO] Scanning for projects...
[INFO] 
[INFO] --------------------< cn.emergentdesign.se:depends >--------------------
[INFO] Building depends 0.9.3
[INFO] --------------------------------[ jar ]---------------------------------
[WARNING] The POM for org.eclipse.cdt:org.eclipse.cdt.core:jar:6.5.0.201806170908 is missing, no dependency information available
[WARNING] The POM for eclipse-photon:org.eclipse.equinox.registry:jar:3.8.0.v20180426-1327 is missing, no dependency information available
[WARNING] The POM for eclipse-photon:org.eclipse.core.runtime:jar:3.14.0.v20180417-0825 is missing, no dependency information available
[WARNING] The POM for eclipse-photon:org.eclipse.equinox.common:jar:3.10.0.v20180412-1130 is missing, no dependency information available
[WARNING] The POM for eclipse-photon:org.eclipse.osgi:jar:3.13.0.v20180409-1500 is missing, no dependency information available
[WARNING] The POM for eclipse-photon:org.eclipse.equinox.preferences:jar:3.7.100.v20180510-1129 is missing, no dependency information available
[WARNING] The POM for eclipse-photon:org.eclipse.core.jobs:jar:3.10.0.v20180427-1454 is missing, no dependency information available
[WARNING] The POM for org.jruby:jrubyparser:jar:0.5.5-SNAPSHOT is missing, no dependency information available
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  0.560 s
[INFO] Finished at: 2019-10-12T11:29:23-07:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project depends: Could not resolve dependencies for project cn.emergentdesign.se:depends:jar:0.9.3: The following artifacts could not be resolved: org.eclipse.cdt:org.eclipse.cdt.core:jar:6.5.0.201806170908, eclipse-photon:org.eclipse.equinox.registry:jar:3.8.0.v20180426-1327, eclipse-photon:org.eclipse.core.runtime:jar:3.14.0.v20180417-0825, eclipse-photon:org.eclipse.equinox.common:jar:3.10.0.v20180412-1130, eclipse-photon:org.eclipse.osgi:jar:3.13.0.v20180409-1500, eclipse-photon:org.eclipse.equinox.preferences:jar:3.7.100.v20180510-1129, eclipse-photon:org.eclipse.core.jobs:jar:3.10.0.v20180427-1454, org.jruby:jrubyparser:jar:0.5.5-SNAPSHOT: Failure to find org.eclipse.cdt:org.eclipse.cdt.core:jar:6.5.0.201806170908 in https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced -> [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
gangz commented 5 years ago

Please firstly run the ./lib_install.sh or ./lib_install.bat before build. Thanks.

juli1 commented 5 years ago

Thanks for the information. I followed the information from build.txt and that probably needs to be added.

Also, after installing dependencies, the build still fail.

Would it be possible to share the build environment to reproduce build and be able to make it run?

I use the open-jdk11 on ubuntu.

[INFO] ANTLR 4: Processing source directory /home/julien/git/depends/src/main/antlr4
[INFO] Processing grammar: depends/extractor/java/JavaLexer.g4
[INFO] Processing grammar: depends/extractor/java/JavaParser.g4
[INFO] Processing grammar: depends/extractor/python/Python2.g4
[INFO] Processing grammar: depends/extractor/python/Python3.g4
[INFO] Processing grammar: depends/extractor/cpp/CElsa.g4
[INFO] Processing grammar: depends/extractor/cpp/CPP14.g4
[INFO] Processing grammar: depends/extractor/cpp/CPreprocessor.g4
[INFO] Processing grammar: depends/extractor/kotlin/KotlinLexer.g4
[INFO] Processing grammar: depends/extractor/kotlin/KotlinParser.g4
[INFO] Processing grammar: depends/extractor/xml/XMLLexer.g4
[INFO] Processing grammar: depends/extractor/xml/XMLParser.g4
[INFO] 
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ depends ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO] 
[INFO] --- maven-compiler-plugin:2.5:compile (default-compile) @ depends ---
[INFO] Compiling 203 source files to /home/julien/git/depends/target/classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR : 
[INFO] -------------------------------------------------------------
[ERROR] /home/julien/git/depends/src/main/java/depends/format/json/JDepObject.java:[27,32] error: package javax.xml.bind.annotation does not exist
[ERROR] /home/julien/git/depends/src/main/java/depends/format/json/JDepObject.java:[28,32] error: package javax.xml.bind.annotation does not exist
[ERROR] /home/julien/git/depends/src/main/java/depends/format/json/JDepObject.java:[29,32] error: package javax.xml.bind.annotation does not exist
[ERROR] /home/julien/git/depends/src/main/java/depends/format/json/JDepObject.java:[32,1] error: cannot find symbol
[ERROR]   symbol: class XmlRootElement
/home/julien/git/depends/src/main/java/depends/format/xml/XCells.java:[27,32] error: package javax.xml.bind.annotation does not exist
[ERROR] /home/julien/git/depends/src/main/java/depends/format/xml/XCell.java:[27,32] error: package javax.xml.bind.annotation does not exist
[ERROR] /home/julien/git/depends/src/main/java/depends/format/xml/XCell.java:[28,32] error: package javax.xml.bind.annotation does not exist
[ERROR] /home/julien/git/depends/src/main/java/depends/format/xml/XDepend.java:[27,32] error: package javax.xml.bind.annotation does not exist
[ERROR] /home/julien/git/depends/src/main/java/depends/format/xml/XDepend.java:[28,32] error: package javax.xml.bind.annotation does not exist
[ERROR] /home/julien/git/depends/src/main/java/depends/format/xml/XDepend.java:[30,1] error: cannot find symbol
[ERROR]   symbol: class XmlRootElement
/home/julien/git/depends/src/main/java/depends/format/xml/XDepObject.java:[27,32] error: package javax.xml.bind.annotation does not exist
[ERROR] /home/julien/git/depends/src/main/java/depends/format/xml/XDepObject.java:[28,32] error: package javax.xml.bind.annotation does not exist
[ERROR] /home/julien/git/depends/src/main/java/depends/format/xml/XDepObject.java:[29,32] error: package javax.xml.bind.annotation does not exist
[ERROR] /home/julien/git/depends/src/main/java/depends/format/xml/XDepObject.java:[30,32] error: package javax.xml.bind.annotation does not exist
[ERROR] /home/julien/git/depends/src/main/java/depends/format/xml/XDepObject.java:[33,1] error: cannot find symbol
[ERROR]   symbol: class XmlRootElement
/home/julien/git/depends/src/main/java/depends/format/xml/XDepObject.java:[34,1] error: cannot find symbol
[ERROR]   symbol: class XmlType
/home/julien/git/depends/src/main/java/depends/format/xml/XFiles.java:[27,32] error: package javax.xml.bind.annotation does not exist
[ERROR] /home/julien/git/depends/src/main/java/depends/format/xml/XmlFormatDependencyDumper.java:[29,21] error: package javax.xml.bind does not exist
[ERROR] /home/julien/git/depends/src/main/java/depends/format/xml/XmlFormatDependencyDumper.java:[30,21] error: package javax.xml.bind does not exist
[ERROR] /home/julien/git/depends/src/main/java/depends/format/json/JDepObject.java:[43,5] error: cannot find symbol
[ERROR]   symbol:   class XmlAttribute
  location: class JDepObject
/home/julien/git/depends/src/main/java/depends/format/json/JDepObject.java:[52,5] error: cannot find symbol
[ERROR]   symbol:   class XmlAttribute
  location: class JDepObject
/home/julien/git/depends/src/main/java/depends/format/json/JDepObject.java:[61,5] error: cannot find symbol
[ERROR]   symbol:   class XmlElement
  location: class JDepObject
/home/julien/git/depends/src/main/java/depends/format/json/JDepObject.java:[70,5] error: cannot find symbol
[ERROR]   symbol:   class XmlElement
  location: class JDepObject
/home/julien/git/depends/src/main/java/depends/format/xml/XCells.java:[33,5] error: cannot find symbol
[ERROR]   symbol:   class XmlElement
  location: class XCells
/home/julien/git/depends/src/main/java/depends/format/xml/XCell.java:[36,5] error: cannot find symbol
[ERROR]   symbol:   class XmlAttribute
  location: class XCell
/home/julien/git/depends/src/main/java/depends/format/xml/XCell.java:[45,5] error: cannot find symbol
[ERROR]   symbol:   class XmlAttribute
  location: class XCell
/home/julien/git/depends/src/main/java/depends/format/xml/XCell.java:[54,5] error: cannot find symbol
[ERROR]   symbol:   class XmlElement
  location: class XCell
/home/julien/git/depends/src/main/java/depends/format/xml/XDepend.java:[41,5] error: cannot find symbol
[ERROR]   symbol:   class XmlAttribute
  location: class XDepend
/home/julien/git/depends/src/main/java/depends/format/xml/XDepend.java:[50,5] error: cannot find symbol
[ERROR]   symbol:   class XmlAttribute
  location: class XDepend
/home/julien/git/depends/src/main/java/depends/format/xml/XDepObject.java:[46,5] error: cannot find symbol
[ERROR]   symbol:   class XmlAttribute
  location: class XDepObject
/home/julien/git/depends/src/main/java/depends/format/xml/XDepObject.java:[55,5] error: cannot find symbol
[ERROR]   symbol:   class XmlAttribute
  location: class XDepObject
/home/julien/git/depends/src/main/java/depends/format/xml/XDepObject.java:[60,5] error: cannot find symbol
[ERROR]   symbol:   class XmlElement
  location: class XDepObject
/home/julien/git/depends/src/main/java/depends/format/xml/XDepObject.java:[69,5] error: cannot find symbol
[ERROR]   symbol:   class XmlElement
  location: class XDepObject
/home/julien/git/depends/src/main/java/depends/format/xml/XDepObject.java:[85,5] error: cannot find symbol
[ERROR]   symbol:   class XmlAttribute
  location: class XDepObject
/home/julien/git/depends/src/main/java/depends/format/xml/XFiles.java:[38,5] error: cannot find symbol
[INFO] 35 errors 
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  6.221 s
[INFO] Finished at: 2019-10-14T21:52:59-07:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.5:compile (default-compile) on project depends: Compilation failure: Compilation failure: 
[ERROR] /home/julien/git/depends/src/main/java/depends/format/json/JDepObject.java:[27,32] error: package javax.xml.bind.annotation does not exist
[ERROR] /home/julien/git/depends/src/main/java/depends/format/json/JDepObject.java:[28,32] error: package javax.xml.bind.annotation does not exist
[ERROR] /home/julien/git/depends/src/main/java/depends/format/json/JDepObject.java:[29,32] error: package javax.xml.bind.annotation does not exist
[ERROR] /home/julien/git/depends/src/main/java/depends/format/json/JDepObject.java:[32,1] error: cannot find symbol
[ERROR]   symbol: class XmlRootElement
[ERROR] /home/julien/git/depends/src/main/java/depends/format/xml/XCells.java:[27,32] error: package javax.xml.bind.annotation does not exist
[ERROR] /home/julien/git/depends/src/main/java/depends/format/xml/XCell.java:[27,32] error: package javax.xml.bind.annotation does not exist
[ERROR] /home/julien/git/depends/src/main/java/depends/format/xml/XCell.java:[28,32] error: package javax.xml.bind.annotation does not exist
[ERROR] /home/julien/git/depends/src/main/java/depends/format/xml/XDepend.java:[27,32] error: package javax.xml.bind.annotation does not exist
[ERROR] /home/julien/git/depends/src/main/java/depends/format/xml/XDepend.java:[28,32] error: package javax.xml.bind.annotation does not exist
[ERROR] /home/julien/git/depends/src/main/java/depends/format/xml/XDepend.java:[30,1] error: cannot find symbol
[ERROR]   symbol: class XmlRootElement
[ERROR] /home/julien/git/depends/src/main/java/depends/format/xml/XDepObject.java:[27,32] error: package javax.xml.bind.annotation does not exist
[ERROR] /home/julien/git/depends/src/main/java/depends/format/xml/XDepObject.java:[28,32] error: package javax.xml.bind.annotation does not exist
[ERROR] /home/julien/git/depends/src/main/java/depends/format/xml/XDepObject.java:[29,32] error: package javax.xml.bind.annotation does not exist
[ERROR] /home/julien/git/depends/src/main/java/depends/format/xml/XDepObject.java:[30,32] error: package javax.xml.bind.annotation does not exist
[ERROR] /home/julien/git/depends/src/main/java/depends/format/xml/XDepObject.java:[33,1] error: cannot find symbol
[ERROR]   symbol: class XmlRootElement
[ERROR] /home/julien/git/depends/src/main/java/depends/format/xml/XDepObject.java:[34,1] error: cannot find symbol
[ERROR]   symbol: class XmlType
[ERROR] /home/julien/git/depends/src/main/java/depends/format/xml/XFiles.java:[27,32] error: package javax.xml.bind.annotation does not exist
[ERROR] /home/julien/git/depends/src/main/java/depends/format/xml/XmlFormatDependencyDumper.java:[29,21] error: package javax.xml.bind does not exist
[ERROR] /home/julien/git/depends/src/main/java/depends/format/xml/XmlFormatDependencyDumper.java:[30,21] error: package javax.xml.bind does not exist
[ERROR] /home/julien/git/depends/src/main/java/depends/format/json/JDepObject.java:[43,5] error: cannot find symbol
[ERROR]   symbol:   class XmlAttribute
[ERROR]   location: class JDepObject
[ERROR] /home/julien/git/depends/src/main/java/depends/format/json/JDepObject.java:[52,5] error: cannot find symbol
[ERROR]   symbol:   class XmlAttribute
[ERROR]   location: class JDepObject
[ERROR] /home/julien/git/depends/src/main/java/depends/format/json/JDepObject.java:[61,5] error: cannot find symbol
[ERROR]   symbol:   class XmlElement
[ERROR]   location: class JDepObject
[ERROR] /home/julien/git/depends/src/main/java/depends/format/json/JDepObject.java:[70,5] error: cannot find symbol
[ERROR]   symbol:   class XmlElement
[ERROR]   location: class JDepObject
[ERROR] /home/julien/git/depends/src/main/java/depends/format/xml/XCells.java:[33,5] error: cannot find symbol
[ERROR]   symbol:   class XmlElement
[ERROR]   location: class XCells
[ERROR] /home/julien/git/depends/src/main/java/depends/format/xml/XCell.java:[36,5] error: cannot find symbol
[ERROR]   symbol:   class XmlAttribute
[ERROR]   location: class XCell
[ERROR] /home/julien/git/depends/src/main/java/depends/format/xml/XCell.java:[45,5] error: cannot find symbol
[ERROR]   symbol:   class XmlAttribute
[ERROR]   location: class XCell
[ERROR] /home/julien/git/depends/src/main/java/depends/format/xml/XCell.java:[54,5] error: cannot find symbol
[ERROR]   symbol:   class XmlElement
[ERROR]   location: class XCell
[ERROR] /home/julien/git/depends/src/main/java/depends/format/xml/XDepend.java:[41,5] error: cannot find symbol
[ERROR]   symbol:   class XmlAttribute
[ERROR]   location: class XDepend
[ERROR] /home/julien/git/depends/src/main/java/depends/format/xml/XDepend.java:[50,5] error: cannot find symbol
[ERROR]   symbol:   class XmlAttribute
[ERROR]   location: class XDepend
[ERROR] /home/julien/git/depends/src/main/java/depends/format/xml/XDepObject.java:[46,5] error: cannot find symbol
[ERROR]   symbol:   class XmlAttribute
[ERROR]   location: class XDepObject
[ERROR] /home/julien/git/depends/src/main/java/depends/format/xml/XDepObject.java:[55,5] error: cannot find symbol
[ERROR]   symbol:   class XmlAttribute
[ERROR]   location: class XDepObject
[ERROR] /home/julien/git/depends/src/main/java/depends/format/xml/XDepObject.java:[60,5] error: cannot find symbol
[ERROR]   symbol:   class XmlElement
[ERROR]   location: class XDepObject
[ERROR] /home/julien/git/depends/src/main/java/depends/format/xml/XDepObject.java:[69,5] error: cannot find symbol
[ERROR]   symbol:   class XmlElement
[ERROR]   location: class XDepObject
[ERROR] /home/julien/git/depends/src/main/java/depends/format/xml/XDepObject.java:[85,5] error: cannot find symbol
[ERROR]   symbol:   class XmlAttribute
[ERROR]   location: class XDepObject
[ERROR] /home/julien/git/depends/src/main/java/depends/format/xml/XFiles.java:[38,5] error: cannot find symbol
[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
hongxuchen commented 3 years ago

@gangz I met a similar issue when running

./lib_install.sh
mvn clean package

The error messages are:

WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.google.inject.internal.cglib.core.$ReflectUtils$1 (file:/usr/share/maven/lib/guice.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain)
WARNING: Please consider reporting this to the maintainers of com.google.inject.internal.cglib.core.$ReflectUtils$1
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
[INFO] Scanning for projects...
[INFO] 
[INFO] --------------------< cn.emergentdesign.se:depends >--------------------
[INFO] Building depends 0.9.6
[INFO] --------------------------------[ jar ]---------------------------------
[WARNING] The POM for cn.emergentdesign.se:utils:jar:0.0.1 is missing, no dependency information available
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  0.410 s
[INFO] Finished at: 2020-10-31T18:17:45+08:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project depends: Could not resolve dependencies for project cn.emergentdesign.se:depends:jar:0.9.6: Failure to find cn.emergentdesign.se:utils:jar:0.0.1 in https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced -> [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

The libraries should have been installed correctly, and the output of jars are like:

$ find -type f -name "*.jar"
./jars/org.eclipse.equinox.registry_3.8.500.v20190714-1850.jar
./jars/org.eclipse.cdt.core_6.9.0.201909091953.jar
./jars/org.eclipse.equinox.preferences_3.7.500.v20190815-1535.jar
./jars/org.eclipse.equinox.common_3.10.500.v20190815-1535.jar
./jars/org.eclipse.core.resources_3.13.500.v20190819-0800.jar
./jars/org.eclipse.core.runtime-3.14.0.v20180417-0825.jar
./jars/org.eclipse.core.jobs_3.10.500.v20190620-1426.jar
./jars/org.eclipse.osgi_3.15.0.v20190830-1434.jar
./jars/jrubyparser-0.5.5-SNAPSHOT.jar

There seems no cn.emergentdesign.se in mvnrepository.

hongxuchen commented 3 years ago

I finally solved the issues. For the record, here are my steps: