Maven error while setting up i.lon 100 server in eclipse - java

I'm trying to connect i.lon100 with JAVA using Programmers Reference. pom.xml and .pdf file with Programmer reference can be downloaded from page: http://home.elka.pw.edu.pl/~mkolasin/
My eclipse version is:
Eclipse Java EE IDE for Web Developers.
Version: Juno Service Release 2
Build id: 20130225-0426
Maven version: 2.2.1 (as recomended in programmers reference)
a) First of all I have a problem with page 22-6 with installing Maven Embedder and Maven Integration for Eclipse, becouse I assume that http://m2eclipse.sonatype.org/update/ page doesn't exsist. So, my first question: is there any other site I can download those software using eclipse?
B) I installed from eclipse market: Maven integration for eclipse, but i couldn't find Maven Embedder. And now i have got right click on project: RUN AS - Maven Built instead of Run AS - maven package is it still okay?
c) When i try to make another step page 22-13 "In the Project Explorer view, right-click the ilon-ws folder, point to Run As, and then click
Maven Package. This generates the java proxy classes and builds the jar." i got an error in console and i don't know how to fix it.
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org...ticLoggerBinder for further details.
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for com.echelon.es:ilon-ws:jar:4.03-SNAPSHOT
[WARNING] 'build.plugins.plugin.version' for org.codehaus.mojo:jaxws-maven-plugin is missing. # line 71, column 21
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. # line 113, column 23
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-source-plugin is missing. # line 124, column 23
[WARNING] 'repositories.repository.layout' for java.net uses the unsupported value 'legacy', artifact resolution might fail. # line 36, column 21
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING]
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building ECHELON i.LON SmartServer 4.03-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.985s
[INFO] Finished at: Tue Jun 04 20:20:25 CEST 2013
[INFO] Final Memory: 4M/105M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project ilon-ws: Could not resolve dependencies for project com.echelon.es:ilon-ws:jar:4.03-SNAPSHOT: Failed to collect dependencies for [com.sun.xml.ws:jaxws-rt:jar:2.2 (compile)]: Failed to read artifact descriptor for woodstox:wstx-asl:jar:3.2.1: Could not transfer artifact woodstox:wstx-asl:pom:3.2.1 from/to java.net (http://download.java.net/maven/1/): No connector available to access repository java.net (http://download.java.net/maven/1/) of type legacy using the available factories AsyncRepositoryConnectorFactory, WagonRepositoryConnectorFactory -> [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....lutionException
I tried adding slf4j-nop-1.7.5.jar file to buildpath and nothing has changed.
Please give me any suggestions or help, becouse I can't handle it since last few days, and i don't know where to find answers.
Regards,
Kolata

Related

Unable to 'Maven Build' my Java Project in Eclipse IDE

I have a working Java Project (literally just 2 JAVA files) that need to be built in either Maven or Gradle. Since I wrote my Java Project in Eclipse IDE for Java Delopers (Kepler Service Release 2, 20140224-0627), I found this article to add Maven to my Java Project.
After adding Maven to my project, I had to follow this SO answer to allow myself to Right Click the Project -> Maven -> Update Project... properly. If I Right Click the Project -> Run As -> Maven Clean, I get a BUILD SUCCESS (thanks to this SO answer). But now when I Right Click the Project -> Run As -> Maven Install, I get the following:
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building AMC 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-resources-plugin:2.5:resources (default-resources) # RobTillmanProject ---
[debug] execute contextualize
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory D:\Users\names\workspace\paging-mission-control\AMC\src\main\resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) # RobTillmanProject ---
[INFO] Changes detected - recompiling the module!
[WARNING] File encoding has not been set, using platform encoding Cp1252, i.e. build is platform dependent!
[INFO] Compiling 2 source files to D:\Users\names\workspace\paging-mission-control\AMC\target\classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?
[INFO] 1 error
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.050s
[INFO] Finished at: Tue Feb 07 16:35:15 EST 2023
[INFO] Final Memory: 8M/245M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project RobTillmanProject: Compilation failure
[ERROR] No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?
[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
As per the error, it looks like I need to add a JDK to the Installed JREs list (just as this SO answer suggests).
In Eclipse IDE, Windows -> Preferences -> Java -> Installed JREs, I have jre1.8.0_333 (default) installed. On my PC, in my C:\Program Files\Java folder, I've installed jdk-17, jdk-17.0.6 and jdk-19.0.2. However, when I go to add any one of the JDKs (I've tried JRE Type Standard 1.1x VM and Standard VM), I get the error message Target is not a JDK root. System library was not found.
I'm running Eclipse IDE on Windows 10.
Any suggestions?
Make sure you are adding the correct location for the JDK home in the "Installed JREs" section.
For instance, I am using JDK 8 and selecting the JDK as the default as below:
Make sure you are also changing the compiler version to use the one matching your JDK. Other side, like your are using maven clean install to build your project, then make sure the maven distribution is using the correct JAVA_HOME.
In Eclipse, go to again Window / Preferences / Maven / Installations
Select your local maven distribution instead of using the embed version with Eclipse, for instance:
You can check if your maven distribution is using the correct JDK by typing in a cmd : mvn -version, for example in my Windows I am using JDK 11 like you can see in the below output:
Hope this can help. Please let me know.

403 Forbidden when trying to install arcgis-java dependency with maven

I have followed the guide in https://developers.arcgis.com/java/latest/guide/get-the-sdk.htm but somehow I got this 404 forbidden error when trying to run mvn install to install the dependencies of my project (there's ArcGIS, and it's the core problem).
$ mvn install
[INFO] Scanning for projects...
[INFO]
[INFO] -----------------------< redacted >-----------------------
[INFO] Building <redacted> 1.1
[INFO] --------------------------------[ jar ]---------------------------------
Downloading from arcgis: https://esri.bintray.com/arcgis/com/esri/arcgisruntime/arcgis-java/100.8.0/arcgis-java-100.8.0.pom
Downloading from arcgis: https://esri.bintray.com/arcgis/com/esri/arcgisruntime/arcgis-java-jnilibs/100.8.0/arcgis-java-jnilibs-100.8.0.pom
Downloading from arcgis: https://esri.bintray.com/arcgis/com/esri/arcgisruntime/arcgis-java-resources/100.8.0/arcgis-java-resources-100.8.0.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 7.135 s
[INFO] Finished at: 2021-01-11T14:38:29+07:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project <redacted>: Could not resolve dependencies for project <redacted>:jar:1.1: Failed to collect dependencies at com.esri.arcgisruntime:arcgis-java:jar:100.8.0: Failed to read artifact descriptor for com.esri.arcgisruntime:arcgis-java:jar:100.8.0: Could not transfer artifact com.esri.arcgisruntime:arcgis-java:pom:100.8.0 from/to arcgis (https://esri.bintray.com/arcgis): Authorization failed for https://esri.bintray.com/arcgis/com/esri/arcgisruntime/arcgis-java/100.8.0/arcgis-java-100.8.0.pom 403 Forbidden -> [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
When I tried to open the URL https://esri.bintray.com/arcgis/com/esri/arcgisruntime/arcgis-java/100.8.0/arcgis-java-100.8.0.pom in my browser, I also got that 404 forbidden error. I think the link is broken somehow?
I solved this by replacing the ArcGIS repo's URL from
https://esri.bintray.com/arcgis
to
https://esri.jfrog.io/artifactory/arcgis
in my project's pom.xml.
That repo URL (the latter) is used in ArcGIS Android installation guide, but somehow, the argis-java's documentation doesn't include this and instead include the former one which is broken (returns 404 forbidden error)
EDIT:
I just found an announcement about this issue, my bad, I didn't see this at the first time. So yes, they moved their repository from the former one to the latter. https://www.esri.com/arcgis-blog/products/developers/announcements/announcement-to-developers-using-arcgis-runtime-sdks-for-android-and-java/

missing dependencies in downloaded project

I'm trying to use project https://github.com/castor-software/decompilercmp. I downloaded from git, noticed it's a maven project, installed maven, then tried to do:
mvn install
and got:
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for se.kth:decompiler-cmp:jar:1.0-SNAPSHOT
[WARNING] 'dependencies.dependency.systemPath' for scala:jardiff:jar should not point at files within the project directory, ${basedir}/lib/jardiff.jar will be unresolvable by dependent projects # line 34, column 25
[WARNING] 'dependencies.dependency.systemPath' for jd:jd-core:jar should not point at files within the project directory, ${basedir}/lib/jd-core-1.0.0.jar will be unresolvable by dependent projects # line 42, column 25
[WARNING] 'dependencies.dependency.systemPath' for jadx:jadx-cli:jar should not point at files within the project directory, ${basedir}/lib/jadx-0.9.0/lib/jadx-cli-0.9.0.jar will be unresolvable by dependent projects # line 50, column 25
[WARNING] 'dependencies.dependency.systemPath' for cli.jd:jd-gui:jar should not point at files within the project directory, ${basedir}/lib/jd-gui-1.4.1.jar will be unresolvable by dependent projects # line 58, column 25
[WARNING] 'dependencies.dependency.systemPath' for org.jode:jode-decompiler:jar should not point at files within the project directory, ${basedir}/lib/jode-1.1.2-pre1.jar will be unresolvable by dependent projects # line 65, column 25
[WARNING] 'dependencies.dependency.(groupId:artifactId:type:classifier)' must be unique: fr.inria.gforge.spoon:spoon-core:jar -> version 7.3.0 vs 7.5.0 # line 163, column 21
[WARNING] 'dependencies.dependency.systemPath' for scala:jardiff:jar refers to a non-existing file /Users/shlomiagiv/work/decompilercmp/lib/jardiff.jar # line 34, column 25
[WARNING] 'dependencies.dependency.systemPath' for jd:jd-core:jar refers to a non-existing file /Users/shlomiagiv/work/decompilercmp/lib/jd-core-1.0.0.jar # line 42, column 25
[WARNING] 'dependencies.dependency.systemPath' for jadx:jadx-cli:jar refers to a non-existing file /Users/shlomiagiv/work/decompilercmp/lib/jadx-0.9.0/lib/jadx-cli-0.9.0.jar # line 50, column 25
[WARNING] 'dependencies.dependency.systemPath' for cli.jd:jd-gui:jar refers to a non-existing file /Users/shlomiagiv/work/decompilercmp/lib/jd-gui-1.4.1.jar # line 58, column 25
[WARNING] 'dependencies.dependency.systemPath' for org.jode:jode-decompiler:jar refers to a non-existing file /Users/shlomiagiv/work/decompilercmp/lib/jode-1.1.2-pre1.jar # line 65, column 25
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING]
[INFO]
[INFO] -----------------------< se.kth:decompiler-cmp >------------------------
[INFO] Building decompiler-cmp 1.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.483 s
[INFO] Finished at: 2020-05-03T08:13:12+03:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project decompiler-cmp: Could not resolve dependencies for project se.kth:decompiler-cmp:jar:1.0-SNAPSHOT: The following artifacts could not be resolved: scala:jardiff:jar:1.2.0, jd:jd-core:jar:1.0.0, jadx:jadx-cli:jar:0.9.0, cli.jd:jd-gui:jar:1.4.1, org.jode:jode-decompiler:jar:1.2.1-pre1: Could not find artifact scala:jardiff:jar:1.2.0 at specified path /Users/shlomiagiv/work/decompilercmp/lib/jardiff.jar -> [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
those missing dependencies are various decompilers the project is trying to reach.
How do I get/point to them? Note that I'm using MacOS
example pom.xml entry for jadx:
<dependency>
<groupId>jadx</groupId>
<artifactId>jadx-cli</artifactId>
<version>0.9.0</version>
<scope>system</scope>
<systemPath>${basedir}/lib/jadx-0.9.0/lib/jadx-cli-0.9.0.jar</systemPath>
</dependency>
In general, maven uses the concept of remote repostories (like maven central) to look up the dependencies of your project and store them in local repository cache (~/.m2 by default).
You can add your own remote repositories if you want.
If you define a dependency in the system scope however, this means that you instruct maven that the jar is not in a repository and instead its up to you to provide it in the folder that you specify (systemPath). This method effectively bypasses the maven dependency resolution mechanism and in general should not be used for real projects. Instead one should install special products like Nexus or Artifactory that serve as a remote proxy and can host your own JARs as well.
Why should system scope be used at all?
Usually it shouldn't, consider using it only if you have jars that cannot be published to remote repository (your private company's commercial artifacts) and you don't have a nexus/artifactory and don't want to install it (if you're 1 developer that runs stuff on your local machine or something)
If you decide to use the system scope anyway, you're by yourself responsible for "providing" these dependencies to maven, so you should probably find these artifacts by yourself. Once you know where the jars, you can copy them to the folder specified in the systemPath and keep bypassing maven's dependency resolution mechanism.
Another (arguably somewhat better approach) is to stop using system scope at all and once you've found the jars, use mvn install:install-file command to install the file to the local repository cache (~/.m2). You'll be able to specify group id, artifact id, version, and it will store this jar in the correct place. Then you'll be able to refer this jar as a regular maven dependency.
This Link is for tutorial that shows how to work with these "3rd party" jars.

mvn appfuse:full-source not working because of subversion

I am new for maven. I have appfuse maven project and it is embedded. I wanted to make it as full-source, but it gave me following error:
Failed to execute goal org.appfuse.plugins:appfuse-maven-plugin:3.0.0:full-source (default-cli) on project OOS: svn: PROPFIND request failed on '/svn/appfuse~svn/tags/APPFUSE_3.0.0/data/common/src'
I have searched solution for this and found this information and applied that solution given in the site: adding
<trunk>https://svn.java.net/svn/appfuse~svn/</trunk>
inside of appfuse configuration tag. After adding this line to my pom.xml file, i have tried to run mvn appfuse:full-source, but it gave me the same error.
full stack is here:
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for com.mycompany:OOS:war:1.0-SNAPSHOT
[WARNING] 'dependencies.dependency.exclusions.exclusion.artifactId' for org.springmodules:spring-modules-validation:jar with value '*' does not match a valid id pattern. # line 363, column 33
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING]
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building AppFuse Spring MVC Application 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- appfuse-maven-plugin:3.0.0:full-source (default-cli) # OOS ---
[INFO] [AppFuse] Installing source from data-common module...
[ERROR] 175002 : svn: PROPFIND request failed on '/svn/appfuse~svn/tags/APPFUSE_3.0.0/data/common/src'
[ERROR] 175002 : svn: svn.java.net: Name or service not known
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.743s
[INFO] Finished at: Fri Oct 10 15:53:55 UZT 2014
[INFO] Final Memory: 10M/144M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.appfuse.plugins:appfuse-maven-plugin:3.0.0:full-source (default-cli) on project OOS: svn: PROPFIND request failed on '/svn/appfuse~svn/tags/APPFUSE_3.0.0/data/common/src'
[ERROR] svn: svn.java.net: Name or service not known
[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/MojoExecutionException
I have deleted whole repository directory in my .m2 folder, but did not help.
I wanted to check the link https://svn.java.net/svn/appfuse~svn/ but it asked username/password for entering. I think, this also can be a cause. I am using Ubuntu and tried to install subversion form Software center, but was no use: still the same problem.
I hope someone have faced this type of issue and will share.
Finally, I have figured it out. The problem was with mysql db. I was using default configurations in my project's pom.xml and by default it uses mysql dbms. It has connected with db and created all tables in mysql, but hasn't started the project. but, when i have changed db profile to postgresql, it has worked like a charm. I haven't understand why, but the appfuse maven project has some conflicts with mysql dbms.

what's the matter about appfuse,please

when run the command:mvn jetty:run in the web directory,it's the error message:
[WARNING] The POM for com.mycompany:core:jar:1.0-SNAPSHOT is missing, no dependency information available
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.015s
[INFO] Finished at: Mon Sep 05 23:31:23 CST 2011
[INFO] Final Memory: 5M/15M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project web: Could not resolve dependencies for project com.mycompany:web:war:1.0-SNAPSHOT: Failure to find com.myco
mpany:core:jar:1.0-SNAPSHOT in http://oss.sonatype.org/content/repositories/appfuse-snapshots was cached in the local repository, resolution will not
be reattempted until the update interval of appfuse-snapshots 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
It looks like you have appfuse multi-module web project and you are building the web module without having built/installed the core module.
Quoting the instruction from appfuse quickstart, highlighting relevant portion in bold.
To view your application run mvn jetty:run from your project's
directory (for a modular project, you'll need to run mvn jetty:run
from your project's web directory (after installing the core module)).
You need to run mvn install from the project's root directory also!
In your situation, you definitely need to mvn install from your core directory. If this does not help, then run the same command from root directory. The problem is that one of Your modules needs to be installed and only after that the error you are encountering will be removed.

Categories