• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

apache maven pom and jar file installation

 
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi to all, i've centos 7 netbeans 11 in VM. I downloaded maven from internet.  also i've maven-archetype-plugin-3.1.2.jar maven-archetype-plugin-3.1.2.pom files but i don't know how to install these files. when i started maven project from netbeans 11 this shows following error :


it says downloading pom file. i've already pom file  where to place this file.
 
Saloon Keeper
Posts: 27752
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Don't manually download the POM files. Let Maven do it. Delete any POM files you've already downloaded.

I ran the Maven command in line 1 and it worked perfectly, creating a project that I was then able to also build perfectly. So I think your manual download broke something.
 
rahul vishwakarma
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
respected sir, I've no internet conneciotn on linux box. i have to do in offline. I am using wifi via zebronics 802.11n adapter. it does not have linux driver for centos 7.  how to set pom file.
 
Ranch Hand
Posts: 180
2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I would suggest adding a archetype using the following information, it works for me fine, next step you would fix such issues, don't panic when you read "issues", they are easy to fix

Group id: co.netier
Artifcat : spring-mvc-archetype
version 1.0.2
 
rahul vishwakarma
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i did as you said but again it don't generates project.
 
Houssam El
Ranch Hand
Posts: 180
2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

rahul vishwakarma wrote: I did as you said but again it doesn't generate the project.



Do you have Eclipse IDE? if yes, File -> New -> other -> type  maven project -> click next (don't forget to tune your project into eclipse workspace) -> add archetype

Group id: co.netier
Artifcat : spring-mvc-archetype
version 1.0.2

 
Tim Holloway
Saloon Keeper
Posts: 27752
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You may have a bigger problem.

Maven is designed specifically as an Internet application. It want to be able to download project dependencies whenever you do a Maven build request.

You do not need to be connected all the time - Maven will cache dependencies and only download them once. You do not need a direct connection - Maven can work via a proxy server. But Maven does expect to be able to pull what it needs from the Internet.

I will not say that it's impossible to run Maven without an occasional connection to the Internet, but even having a lot more experience with the internal organization of Maven than you do, I would not feel confident that I could make thing work with full reliability if I was installing everything Maven wants manually. Maven itself is the smallest part of the Maven system.
 
Sheriff
Posts: 22781
131
Eclipse IDE Spring VI Editor Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I assume you can copy files to the Linux machine, even if it doesn't have an internet connection. You can try doing a build on another machine, then copying over the entire Maven repository. You can use option -Dmaven.repo.local=/some/path to use that path as local repository, so it's contain only what you need for the project.
 
Tim Holloway
Saloon Keeper
Posts: 27752
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Rob Spoor wrote:I assume you can copy files to the Linux machine, even if it doesn't have an internet connection. You can try doing a build on another machine, then copying over the entire Maven repository. You can use option -Dmaven.repo.local=/some/path to use that path as local repository, so it's contain only what you need for the project.


That is exactly where I would start. To the best of my knowledge everything in the ".m2" directory is portable unless you've hard-coded absolute paths in config files.

But of course you do have to have a live Internet connection to obtain that prototype repository. If the "offline" machine is a laptop or other portable device, I'd just take it to a public Internet access point and populate directly.
reply
    Bookmark Topic Watch Topic
  • New Topic