Re: the problem of maven3 in centos7
Hi Michael Such kind of question should be better handled on the Maven users list. As far as I can see you have a problem of (transitive) dependency which is using a system scope with an hardcoded path (/usr/lib/...) that you don't have on your system https://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html#System_Dependencies I won't privately reply more but if you subscribe to the Maven Users list you will be able to receive more help Cheers On Thu, Nov 14, 2019 at 1:02 AM Michael wrote: > Mr. Arnaud Héritier >I'm a maven3 user from china, you can call me Michael. Please > pardon me as my English isn't very good. >Here is the problem about meven3 when I use it in Centos7, I try to > solve the problem with google and baidu, but I failed. So I write this > letter, hope you can help me to fix it. > > > but thd jdk settings is good: > > and the mvn -v is good too: > > and rpm -qa|grep java > > > -- Arnaud
Re: Proper way to build a Maven repository without Internet access
JFrog has an air-gap how-to. Do a search for "using-artifactory-with-an-air-gap” That maybe can help you? Henrik > On 14 Nov 2019, at 00:01, Stephen Connolly > wrote: > > So I know that Sonatype have or had a feature in nexus that let you approve > what dependencies could be consumed by developers from its hosted Maven > repo. If you used that you could then replicate the nexus storage back-end > to the offline network via sneaker-net (or better a dmz that only has > access to the developer nexus) > > Unclear if jfrog have a competitive feature > > On Thu 7 Nov 2019 at 23:22, Sean Horan wrote: > >> Hi all, >> >> I am tasked with ensuring that the Maven build process of a large >> government/enterprise-class system does not reach out to the Internet. Our >> Jenkins server's local maven repository has 10,000 POMs. There are many >> individual builds that are specific to our product and what we customize >> for government clients. >> >> I have a lot of devops experience but practically no experience with Maven >> and Java beyond struggling to set this up. >> >> We are using Artifactory and I'm not sure whether a generic or >> Maven-specific repository is suitable for this project. >> >> As I'm trying to understand it, I am using curl in a find/curl loop adapted >> from >> >> https://github.com/jfrog/project-examples/blob/master/bash-example/deploy-folder-by-checksum.sh >> >> to traverse the ~/.m2/repository on our existing Jenkins server and HTTP >> PUT it over to Artifactory. This script would be hardened and sent to >> internal customers to sync as part of the development process. >> >> The problem I am seeing is that the build process is looking for >> maven-metadata.xml which does not exist on our server. We do have >> -companyname and -central XML files for eg, the maven-source-plugin that >> are slightly different. >> >> I have the sense that my approach to this is off and I'm in over my head so >> I could use some help. >> >> Any pointers in the right direction would be more than welcome. >> >> We are using Maven 3.3.9 and JDK8 on Centos 7 and cannot upgrade at this >> time. >> >> Sean Horan >> > -- > Sent from my phone - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Proper way to build a Maven repository without Internet access
I actually got it mostly working. . is the repository directory in the examples. There were only a handful of maven-metadata.xml files that were missing that it was looking for, so on a hunch I copied the maven-metadata-central.xml to maven-metadata.xml with this one liner for I in $(find . -name maven-metadata-central.xml); do cp $I $(echo $I|sed s/-central//); done and HTTP PUT'd them up with this one-liner. find . -name maven-metadata.xml | while read f; do art=$(echo $f|cut -c 3-); echo $f; curl -w "%{http_code}" -s -k -u admin: -T $f http://artifactory.mycompany.com:8081/artifactory/maven-mirror/"${art}";; done This is what ended up working in settings.xml: http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd"; xmlns="http://maven.apache.org/SETTINGS/1.0.0"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";> admin * companybuild org.sonarsource.scanner.maven artifactory snapshots libs-snapshot-local http://artifactory.mycompany.com.com:8081/artifactory/libs-snapshot-local releases libs-release-local false http://artifactory.mycompany.com:8081/artifactory/libs-release-local plugins-release plugins-release false http://artifactory.mycompany.com:8081/artifactory/plugins-release snapshots plugins-snapshot http://artifactory.mycompany.com:8081/artifactory/plugins-snapshot artifactory artifactory * Artifactory http://artifactory.mycompany.com:8081/artifactory/maven-mirror/ This settings file is cropped from what we're using and it's messy but I'm not touching it for now. What it's failing on now is a tgz we have in the repo that maven thinks is corrupt but I can perfectly untar it. Asking for help at my company but I may just have to dig into it. --sean On Wed, Nov 13, 2019 at 3:02 PM Stephen Connolly < stephen.alan.conno...@gmail.com> wrote: > So I know that Sonatype have or had a feature in nexus that let you approve > what dependencies could be consumed by developers from its hosted Maven > repo. If you used that you could then replicate the nexus storage back-end > to the offline network via sneaker-net (or better a dmz that only has > access to the developer nexus) > > Unclear if jfrog have a competitive feature > > On Thu 7 Nov 2019 at 23:22, Sean Horan wrote: > > > Hi all, > > > > I am tasked with ensuring that the Maven build process of a large > > government/enterprise-class system does not reach out to the Internet. > Our > > Jenkins server's local maven repository has 10,000 POMs. There are many > > individual builds that are specific to our product and what we customize > > for government clients. > > > > I have a lot of devops experience but practically no experience with > Maven > > and Java beyond struggling to set this up. > > > > We are using Artifactory and I'm not sure whether a generic or > > Maven-specific repository is suitable for this project. > > > > As I'm trying to understand it, I am using curl in a find/curl loop > adapted > > from > > > > > https://github.com/jfrog/project-examples/blob/master/bash-example/deploy-folder-by-checksum.sh > > > > to traverse the ~/.m2/repository on our existing Jenkins server and HTTP > > PUT it over to Artifactory. This script would be hardened and sent to > > internal customers to sync as part of the development process. > > > > The problem I am seeing is that the build process is looking for > > maven-metadata.xml which does not exist on our server. We do have > > -companyname and -central XML files for eg, the maven-source-plugin that > > are slightly different. > > > > I have the sense that my approach to this is off and I'm in over my head > so > > I could use some help. > > > > Any pointers in the right direction would be more than welcome. > > > > We are using Maven 3.3.9 and JDK8 on Centos 7 and cannot upgrade at this > > time. > > > > Sean Horan > > > -- > Sent from my phone > -- **CONFIDENTIALITY NOTICE:* * *This transmission may contain information which is Vimo, Inc. (DBA Getinsured) confidential and/or legally privileged. The information is intended only for the use of the individual or entity named on this transmi
Re: Proper way to build a Maven repository without Internet access
So I know that Sonatype have or had a feature in nexus that let you approve what dependencies could be consumed by developers from its hosted Maven repo. If you used that you could then replicate the nexus storage back-end to the offline network via sneaker-net (or better a dmz that only has access to the developer nexus) Unclear if jfrog have a competitive feature On Thu 7 Nov 2019 at 23:22, Sean Horan wrote: > Hi all, > > I am tasked with ensuring that the Maven build process of a large > government/enterprise-class system does not reach out to the Internet. Our > Jenkins server's local maven repository has 10,000 POMs. There are many > individual builds that are specific to our product and what we customize > for government clients. > > I have a lot of devops experience but practically no experience with Maven > and Java beyond struggling to set this up. > > We are using Artifactory and I'm not sure whether a generic or > Maven-specific repository is suitable for this project. > > As I'm trying to understand it, I am using curl in a find/curl loop adapted > from > > https://github.com/jfrog/project-examples/blob/master/bash-example/deploy-folder-by-checksum.sh > > to traverse the ~/.m2/repository on our existing Jenkins server and HTTP > PUT it over to Artifactory. This script would be hardened and sent to > internal customers to sync as part of the development process. > > The problem I am seeing is that the build process is looking for > maven-metadata.xml which does not exist on our server. We do have > -companyname and -central XML files for eg, the maven-source-plugin that > are slightly different. > > I have the sense that my approach to this is off and I'm in over my head so > I could use some help. > > Any pointers in the right direction would be more than welcome. > > We are using Maven 3.3.9 and JDK8 on Centos 7 and cannot upgrade at this > time. > > Sean Horan > -- Sent from my phone