Issues when compiling basic Java SE using Maven

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Issues when compiling basic Java SE using Maven

rafa

Hi everyone, 

I am new on Maven and I am trying to create project and compile project using Netbeans IDE.

I have successfully installed Maven 

Then I have created a Java SE application using Maven in Netbeans. Find attached the pom.xml
 
When trying to compile it through netbeans, I get next:
 
cd C:\Datos\Java\MavenTest; "JAVA_HOME=C:\\Program Files\\Java\\jdk1.8.0_151" cmd /c "\"\"C:\\Program Files\\NetBeans 8.2\\java\\maven\\bin\\mvn.bat\" -Dmaven.ext.class.path=\"C:\\Program Files\\NetBeans 8.2\\java\\maven-nblib\\netbeans-eventspy.jar\" -Dfile.encoding=UTF-8 install\""
Scanning for projects...

------------------------------------------------------------------------
Building MavenTest 1.0-SNAPSHOT
------------------------------------------------------------------------
The POM for org.apache.maven.plugins:maven-resources-plugin:jar:2.5 is missing, no dependency information available
------------------------------------------------------------------------
BUILD FAILURE
------------------------------------------------------------------------
Total time: 0.095s
Finished at: Wed Oct 07 08:12:03 CEST 2020
Final Memory: 7M/155M
------------------------------------------------------------------------
Plugin org.apache.maven.plugins:maven-resources-plugin:2.5 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:2.5: Failure to find org.apache.maven.plugins:maven-resources-plugin:pom:2.5 in http://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]

To see the full stack trace of the errors, re-run Maven with the -e switch.
Re-run Maven using the -X switch to enable full debug logging.

For more information about the errors and possible solutions, please read the following articles:
[Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException
 
After googling a lot, I found some suggestions about the proxy settings. However, when using netsh winhttp show proxy in cmd, I get
that no proxy is used.
 
Please find attached my settings.xml config. This is used on:
 
my\path\to\maven\apache-maven-3.6.3\conf
C:\Program Files\NetBeans 8.2\java\maven\conf
C:\Users\Gladys Pluas\.m2
 
If I try to compile the project using mvn compile from command line, I get:
 
 
Any idea of what I am missing?
 
Kind Regards,
 



---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

pom.xml (910 bytes) Download Attachment
settings.xml (13K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Issues when compiling basic Java SE using Maven

Karl Heinz Marbaise-3
Hi,

the problem is simply you are trying to access central repository via
http instead of https ....


So you have to change the configuration in Maven as well as in Netbeans
to use the https://repo.maven.apache.org/maven2

Since 15. January 2020 access to central only via https:


https://support.sonatype.com/hc/en-us/articles/360041287334-Central-501-HTTPS-Required


Kind regards
Karl Heinz Marbaise

On 07.10.20 08:34, rafa wrote:

> Hi everyone,
>
> I am new on Maven and I am trying to create project and compile project
> using Netbeans IDE.
>
> I have successfully installed Maven
>
> Then I have created a Java SE application using Maven in Netbeans. Find
> attached the pom.xml
> When trying to compile it through netbeans, I get next:
> /cd C:\Datos\Java\MavenTest; "JAVA_HOME=C:\\Program
> Files\\Java\\jdk1.8.0_151" cmd /c "\"\"C:\\Program Files\\NetBeans
> 8.2\\java\\maven\\bin\\mvn.bat\" -Dmaven.ext.class.path=\"C:\\Program
> Files\\NetBeans 8.2\\java\\maven-nblib\\netbeans-eventspy.jar\"
> -Dfile.encoding=UTF-8 install\""/
> /Scanning for projects.../
>
> /------------------------------------------------------------------------/
> /Building MavenTest 1.0-SNAPSHOT/
> /------------------------------------------------------------------------/
> /The POM for org.apache.maven.plugins:maven-resources-plugin:jar:2.5 is
> missing, no dependency information available/
> /------------------------------------------------------------------------/
> /BUILD FAILURE/
> /------------------------------------------------------------------------/
> /Total time: 0.095s/
> /Finished at: Wed Oct 07 08:12:03 CEST 2020/
> /Final Memory: 7M/155M/
> /------------------------------------------------------------------------/
> /Plugin org.apache.maven.plugins:maven-resources-plugin:2.5 or one of
> its dependencies could not be resolved: Failed to read artifact
> descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:2.5:
> Failure to find org.apache.maven.plugins:maven-resources-plugin:pom:2.5
> in http://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]/
>
> /To see the full stack trace of the errors, re-run Maven with the -e
> switch./
> /Re-run Maven using the -X switch to enable full debug logging./
>
> /For more information about the errors and possible solutions, please
> read the following articles:/
> /[Help 1]
> http://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException/
> After googling a lot, I found some suggestions about the proxy
> settings. However, when using /netsh winhttp show proxy /in cmd, I get
> that no proxy is used.
> Please find attached my settings.xml config. This is used on:
> my\path\to\maven\apache-maven-3.6.3\conf
> C:\Program Files\NetBeans 8.2\java\maven\conf
> C:\Users\Gladys Pluas\.m2
> If I try to compile the project using mvn compile from command line, I get:
> Any idea of what I am missing?
> Kind Regards,
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]