Re: Breadcrumb inheritance in site.xml
Hi, that wasn't possible during my time of activity, not sure if anything changed since: http://mail-archives.apache.org/mod_mbox/maven-users/201104.mbox/%3c4da464c8.2060...@apache.org%3E yes, https://jira.codehaus.org/browse/MSITE-582 got fixed and I have used the fix successfully in one of my projects. Best wishes, Andreas - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
site-deploy using wagon-ssh: User input needed
Hello everyone, :) this is my first post in this mailing list, so I hope I doing everything right. I'm using Maven 3.0.4, having a Jenkins build server running on Windows and a Web Server running on Ubuntu 14.04 LTS. I decided to use SSH for deploying the site to the server. My local settings.xml looks like this: settings servers server idmarketplace/id username!-- The username --/username password!-- The plain-text password --/password /server /servers /settings My pom.xml looks like this: build pluginManagement plugins plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-site-plugin/artifactId version3.3/version configuration localesen/locales /configuration dependencies dependency groupIdorg.apache.maven.wagon/groupId artifactIdwagon-ssh/artifactId version2.6/version /dependency /dependencies /plugin /plugins /pluginManagement plugins plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-site-plugin/artifactId /plugin /plugins /build distributionManagement site idmarketplace/id urlscp://[Address of the web server]/var/www/html/test-project//url /site /distributionManagement If I start Maven locally using the site-deploy goal, Maven will show the following in my Eclipse: [INFO] --- maven-site-plugin:3.3:deploy (default-deploy) @ test-project --- The authenticity of host '[Adresse des Web Servers]' can't be established. RSA key fingerprint is [RSA Fingerprint]. Are you sure you want to continue connecting? (yes/no): But if I run this on Jenkins I don't have the possibility to enter something. So I need a solution where I don't need an user input. I came across the solution in the Internet: settings servers server idmarketplace/id username!-- The username --/username password!-- The plain-text password --/password configuration knownHostsProvider implementation=org.apache.maven.wagon.providers.ssh.knownhost.NullKnown HostProvider hostKeyCheckingno/hostKeyChecking /knownHostsProvider /configuration /server /servers /settings But now I get the following error: [INFO] --- maven-site-plugin:3.3:deploy (default-deploy) @ test-project --- [INFO] [INFO] BUILD FAILURE [INFO] [INFO] Total time: 9.105s [INFO] Finished at: Thu Jun 12 09:48:18 CEST 2014 [INFO] Final Memory: 30M/505M [INFO] [ERROR] Failed to execute goal org.apache.maven.plugins:maven-site-plugin:3.3:deploy (default-deploy) on project test-project: Unable to configure Wagon: 'scp': While configuring wagon for 'marketplace': Unable to apply wagon configuration. ClassNotFoundException: Class name which was explicitly given in configuration using 'implementation' attribute: 'org.apache.maven.wagon.providers.ssh.knownhost.NullKnownHostProvider' cannot be loaded - [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 That is odd. The class NullKnownHostProvider is part of the wagon-ssh-common, the class name as well as the package name are okay. wagon-ssh depends on wagon-ssh-common, so it should be available. I even added wagon-ssh-common to the dependencies element of the maven-site-plugin. But the result was still the same. Can anyone give me a hint what I did wrong? Regards, Gerrit
Complex Maven projects - Tutorials? Books?
Hello everyone, :) I have a question which is not about a specific problem with Maven, but more a general question. I hope it is okay to ask this question here. We use Maven and Jenkins for about 1.5 years now, I guess. Until now the Maven projects have been very simple and - let's say - very monolithic. But recently we identify more and more internal libraries in our products. Of course we don't want to share this libraries by copy-n-paste between the products - especially as we have Maven. So we started to read books, tutorials on the Internet and so on. But most of them only deal with simple projects. They don't cover e.g. versioning the build process (especially if your build process consists of more than just one step). They also don't cover the problems of developing the libraries while your developing the products which depend on them. Especially at the beginning your libraries will go through a lot of changes. A few name snapshots as a solution, but don't explain how you can work using them, how you can use them in your pom.xml and how you deal with them if you finally switch your product and/or your library from the snapshot state to the release state. A few also say that you shouldn't use snapshots at all because it will result in many problems (e.g. having -SNAPSHOT entries in your pom.xml). Nightly builds or build triggered by the SCM are also an issue here. Does someone know a good book or tutorial which handles all of these issues around Maven and CI/CD in more depth? Regards, Gerrit
AW: site-deploy using wagon-ssh: User input needed
Hello everyone, :) okay, I tried a different approach: Instead of that configuration section in the settings.xml I copied my local know_hosts file from C:\Users\[MY_USER]\.ssh\known_hosts to the server: C:\Windows\system32\config\.ssh\known_hosts I read in the Internet that this folder is the folder of the system account which is used e.g. by Tomcat. And as Jenkins and Maven are executed by Tomcat, they should work on the same folder. Unfortunately I didn't work: I see in the Jenkins Build log that wagon-ssh keeps asking if it should trust the connection by showing the SSH RSA fingerprint. Unfortunately wagon-ssh also doesn't show at which location it tries to open the known_hosts file. The easiest way would be if I would be able to specify the path of the known_hosts file in the settings.xml. But I haven't found anything about a configuration parameter like that. Regards, Gerrit - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Complex Maven projects - Tutorials? Books?
Am 2014-06-12 16:46, schrieb Hohl, Gerrit: Hello everyone, :) [..] Does someone know a good book or tutorial which handles all of these issues around Maven and CI/CD in more depth? Hi Gerrit, here is the approach I have been using all the years, I think this is quite common in companies: 1. Set up a Nexus instance in your company, mirroring Central and with release/snapshot repos for your company. 1.1 Make sure that Nexus works correctly. 2. Let the CI server deploy SNAPSHOTs of you libraries deploy to your Nexus instance frequently. 3. Refer to those SNAPSHOTs in your project POMs if you need bleeding edge. This makes it easier to soak in fixed bugs in deps. If you think that your lib is stable enough, release to SCM and Nexus. 4. Use the maven-versions-plugin to update your project dependencies and or fix to a release version. It is perfectly fine to rely on SNAPSHOTs during development but not when you perform mvn release:prepare release:perform. Gruß, Michael PS: Upgrade your Maven version to a new one if you are able to. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Complex Maven projects - Tutorials? Books?
Good questions. I have never heard anything negative about SNAPSHOTs from those who use them. Notice - Free advice: - Separate your utilities from your applications. If they have a life of their own, you can manage the dependencies more easily. - Test your utilities and libraries separately. Use SNAPSHOTs and a release process that is separate from your application. - Have your applications treat your utilities and libraries as if they were written by some other organization. - Use dependency management in the parent POM to control versions of utilities. This gives you one place to maintain the versions. End of free advice. Free commentary. At the beginning, you are correct, it will be harder to provide a stable environment but that is where SNAPSHOTs are a big help. Version 2.1.0-SHAPSHOT of the application depends on version 1.0-SNAPSHOT of file-manager-core until file-manager-core stabilizes and becomes version 1.0. Generally speaking, the application should still be a SNAPSHOT after your utilities become releases since you should be able to stabilize the functionality and finish the testing of the utilities before the same can happen to the application modules. End of fee commentary I think that you will find this advice at least worth the cost and you may get some comments from the smarter and more knowledgeable people here that refines or contradicts my advice. There is lots of good Maven information freely available and lots of projects that are very complex being developed with Maven. Our biggest project had over 70 Maven modules of which 10 where supporting libraries either written by us or aggregated from existing open source projects. We have some articles describing how we use Maven in our technical blog at http://blog.artifact-software.com/tech. Jokes are found at http://blog.artifact-software.com/fun if you need a smile to face the world of Maven. Ron On 12/06/2014 10:46 AM, Hohl, Gerrit wrote: Hello everyone, :) I have a question which is not about a specific problem with Maven, but more a general question. I hope it is okay to ask this question here. We use Maven and Jenkins for about 1.5 years now, I guess. Until now the Maven projects have been very simple and - let's say - very monolithic. But recently we identify more and more internal libraries in our products. Of course we don't want to share this libraries by copy-n-paste between the products - especially as we have Maven. So we started to read books, tutorials on the Internet and so on. But most of them only deal with simple projects. They don't cover e.g. versioning the build process (especially if your build process consists of more than just one step). They also don't cover the problems of developing the libraries while your developing the products which depend on them. Especially at the beginning your libraries will go through a lot of changes. A few name snapshots as a solution, but don't explain how you can work using them, how you can use them in your pom.xml and how you deal with them if you finally switch your product and/or your library from the snapshot state to the release state. A few also say that you shouldn't use snapshots at all because it will result in many problems (e.g. having -SNAPSHOT entries in your pom.xml). Nightly builds or build triggered by the SCM are also an issue here. Does someone know a good book or tutorial which handles all of these issues around Maven and CI/CD in more depth? Regards, Gerrit -- Ron Wheeler President Artifact Software Inc email: rwhee...@artifact-software.com skype: ronaldmwheeler phone: 866-970-2435, ext 102 - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Complex Maven projects - Tutorials? Books?
Great advice. We depend on Nexus. If you are serious about Maven, you need a repo. The community version of Nexus is a great benefit to the Maven community. Ron On 12/06/2014 2:39 PM, Michael Osipov wrote: Am 2014-06-12 16:46, schrieb Hohl, Gerrit: Hello everyone, :) [..] Does someone know a good book or tutorial which handles all of these issues around Maven and CI/CD in more depth? Hi Gerrit, here is the approach I have been using all the years, I think this is quite common in companies: 1. Set up a Nexus instance in your company, mirroring Central and with release/snapshot repos for your company. 1.1 Make sure that Nexus works correctly. 2. Let the CI server deploy SNAPSHOTs of you libraries deploy to your Nexus instance frequently. 3. Refer to those SNAPSHOTs in your project POMs if you need bleeding edge. This makes it easier to soak in fixed bugs in deps. If you think that your lib is stable enough, release to SCM and Nexus. 4. Use the maven-versions-plugin to update your project dependencies and or fix to a release version. It is perfectly fine to rely on SNAPSHOTs during development but not when you perform mvn release:prepare release:perform. Gruß, Michael PS: Upgrade your Maven version to a new one if you are able to. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org -- Ron Wheeler President Artifact Software Inc email: rwhee...@artifact-software.com skype: ronaldmwheeler phone: 866-970-2435, ext 102 - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Complex Maven projects - Tutorials? Books?
On 13 June 2014 00:16, Hohl, Gerrit g.h...@aurenz.de wrote: We use Maven and Jenkins for about 1.5 years now, I guess. Until now the Maven projects have been very simple and - let's say - very monolithic. But recently we identify more and more internal libraries in our products. Of course we don't want to share this libraries by copy-n-paste between the products - especially as we have Maven. So we started to read books, tutorials on the Internet and so on. But Can you list what you've read so far? I assume you've gone through the ones we link at the Maven site? http://maven.apache.org/articles.html most of them only deal with simple projects. They don't cover e.g. versioning the build process (especially if your build process consists of more than just one step). They also don't cover the problems of developing the libraries while your developing the products which depend on them. Especially at the beginning your libraries will go through a lot of changes. A few name snapshots as a solution, but don't explain how you can work using them, how you can use them in your pom.xml and how you deal with them if you finally switch your product and/or your library from the snapshot state to the release state. A few also say that you shouldn't use snapshots at all because it will result in many problems (e.g. having -SNAPSHOT entries in your pom.xml). Nightly builds or build triggered by the SCM are also an issue here. I highly recommend that you sit down locally with your group and write up a list of questions, and then document them on your internal wiki. Work through which ones are causing you the most pain (whatever that may be; confusion, build stability, slow build times, etc) And after you've done some googling, searched the archives, etc, then come back and ask the questions individually here. A lot of the problem you will find when you get to this level is that it's hard to express the concepts if you haven't already been exposed to them before. And we can't give the advice you want because we have to both upskill and explain options and their alternatives. Look for blogs by active members of the community, some that come to mind are (in no particular order): * Brian Fox - http://blog.sonatype.com/author/brian/ * Stephen Connolly - http://javaadventure.blogspot.com.au/ * Ron Wheeler - http://blog.artifact-software.com/tech/?author=2 And when you think you've found the answers - contribute them back to the community.
Re: Complex Maven projects - Tutorials? Books?
So how does this book help you any more than all the detailed online Maven docs that exists and are updated? On Thu, Jun 12, 2014 at 4:10 PM, Barrie Treloar baerr...@gmail.com wrote: On 13 June 2014 00:16, Hohl, Gerrit g.h...@aurenz.de wrote: We use Maven and Jenkins for about 1.5 years now, I guess. Until now the Maven projects have been very simple and - let's say - very monolithic. But recently we identify more and more internal libraries in our products. Of course we don't want to share this libraries by copy-n-paste between the products - especially as we have Maven. So we started to read books, tutorials on the Internet and so on. But Can you list what you've read so far? I assume you've gone through the ones we link at the Maven site? http://maven.apache.org/articles.html most of them only deal with simple projects. They don't cover e.g. versioning the build process (especially if your build process consists of more than just one step). They also don't cover the problems of developing the libraries while your developing the products which depend on them. Especially at the beginning your libraries will go through a lot of changes. A few name snapshots as a solution, but don't explain how you can work using them, how you can use them in your pom.xml and how you deal with them if you finally switch your product and/or your library from the snapshot state to the release state. A few also say that you shouldn't use snapshots at all because it will result in many problems (e.g. having -SNAPSHOT entries in your pom.xml). Nightly builds or build triggered by the SCM are also an issue here. I highly recommend that you sit down locally with your group and write up a list of questions, and then document them on your internal wiki. Work through which ones are causing you the most pain (whatever that may be; confusion, build stability, slow build times, etc) And after you've done some googling, searched the archives, etc, then come back and ask the questions individually here. A lot of the problem you will find when you get to this level is that it's hard to express the concepts if you haven't already been exposed to them before. And we can't give the advice you want because we have to both upskill and explain options and their alternatives. Look for blogs by active members of the community, some that come to mind are (in no particular order): * Brian Fox - http://blog.sonatype.com/author/brian/ * Stephen Connolly - http://javaadventure.blogspot.com.au/ * Ron Wheeler - http://blog.artifact-software.com/tech/?author=2 And when you think you've found the answers - contribute them back to the community.
Re: Complex Maven projects - Tutorials? Books?
On 13 June 2014 09:07, mike digioia mpd...@gmail.com wrote: So how does this book help you any more than all the detailed online Maven docs that exists and are updated? It's just another source of information. The docs don't really walk you through everything, they are mostly focused on a particular plugin and not on how to pull all this together.
site-deploy using wagon-ssh: User input needed
Hello everyone, :) this is my first post in this mailing list, so I hope I doing everything right. I'm using Maven 3.0.4, having a Jenkins build server running on Windows and a Web Server running on Ubuntu 14.04 LTS. I decided to use SSH for deploying the site to the server. My local settings.xml looks like this: settings servers server idmarketplace/id username!-- The username --/username password!-- The plain-text password --/password /server /servers /settings My pom.xml looks like this: build pluginManagement plugins plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-site-plugin/artifactId version3.3/version configuration localesen/locales /configuration dependencies dependency groupIdorg.apache.maven.wagon/groupId artifactIdwagon-ssh/artifactId version2.6/version /dependency /dependencies /plugin /plugins /pluginManagement plugins plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-site-plugin/artifactId /plugin /plugins /build distributionManagement site idmarketplace/id urlscp://[Address of the web server]/var/www/html/test-project//url /site /distributionManagement If I start Maven locally using the site-deploy goal, Maven will show the following in my Eclipse: [INFO] --- maven-site-plugin:3.3:deploy (default-deploy) @ test-project --- The authenticity of host '[Adresse des Web Servers]' can't be established. RSA key fingerprint is [RSA Fingerprint]. Are you sure you want to continue connecting? (yes/no): But if I run this on Jenkins I don't have the possibility to enter something. So I need a solution where I don't need an user input. I came across the solution in the Internet: settings servers server idmarketplace/id username!-- The username --/username password!-- The plain-text password --/password configuration knownHostsProvider implementation=org.apache.maven.wagon.providers.ssh.knownhost.NullKnown HostProvider hostKeyCheckingno/hostKeyChecking /knownHostsProvider /configuration /server /servers /settings But now I get the following error: [INFO] --- maven-site-plugin:3.3:deploy (default-deploy) @ test-project --- [INFO] [INFO] BUILD FAILURE [INFO] [INFO] Total time: 9.105s [INFO] Finished at: Thu Jun 12 09:48:18 CEST 2014 [INFO] Final Memory: 30M/505M [INFO] [ERROR] Failed to execute goal org.apache.maven.plugins:maven-site-plugin:3.3:deploy (default-deploy) on project test-project: Unable to configure Wagon: 'scp': While configuring wagon for 'marketplace': Unable to apply wagon configuration. ClassNotFoundException: Class name which was explicitly given in configuration using 'implementation' attribute: 'org.apache.maven.wagon.providers.ssh.knownhost.NullKnownHostProvider' cannot be loaded - [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 That is odd. The class NullKnownHostProvider is part of the wagon-ssh-common, the class name as well as the package name are okay. wagon-ssh depends on wagon-ssh-common, so it should be available. I even added wagon-ssh-common to the dependencies element of the maven-site-plugin. But the result was still the same. Can anyone give me a hint what I did wrong? Regards, Gerrit
Complex Maven projects - Tutorials? Books?
Hello everyone, :) I have a question which is not about a specific problem with Maven, but more a general question. I hope it is okay to ask this question here. We use Maven and Jenkins for about 1.5 years now, I guess. Until now the Maven projects have been very simple and - let's say - very monolithic. But recently we identify more and more internal libraries in our products. Of course we don't want to share this libraries by copy-n-paste between the products - especially as we have Maven. So we started to read books, tutorials on the Internet and so on. But most of them only deal with simple projects. They don't cover e.g. versioning the build process (especially if your build process consists of more than just one step). They also don't cover the problems of developing the libraries while your developing the products which depend on them. Especially at the beginning your libraries will go through a lot of changes. A few name snapshots as a solution, but don't explain how you can work using them, how you can use them in your pom.xml and how you deal with them if you finally switch your product and/or your library from the snapshot state to the release state. A few also say that you shouldn't use snapshots at all because it will result in many problems (e.g. having -SNAPSHOT entries in your pom.xml). Nightly builds or build triggered by the SCM are also an issue here. Does someone know a good book or tutorial which handles all of these issues around Maven and CI/CD in more depth? Regards, Gerrit
Re: Complex Maven projects - Tutorials? Books?
If you are really aiming at doing continuous delivery (any potential build can be pushed to prod), then SNAPSHOT is not a great way to deal with dependencies since you will not be able to exactly know what you ship. To avoid this, one practice is to use the build number in the artifact version (1.0.0-b1 or 1.0.1). This has of course had the drawback that now you have to update the pom.xml of components using a specific artifact (move from build 1 to 2) but this also gives you greater control on the rate at which you consume libraries. You may be interested in these articles: - http://maven.40175.n5.nabble.com/Continuous-Delivery-and-Maven-td3245370.html - http://stackoverflow.com/questions/18456111/what-is-the-maven-way-for-project-versions-when-doing-continuous-delivery That said, if you add Artifactory to the mix, you can leverage its capabilities of obtaining specific versions of a SNAPSHOT through matrix parameters (https://www.jfrog.com/confluence/display/RTF/Using+Properties+in+Deployment+and+Resolution) quite handy. One example where this comes handy is when you split your build process over multiple jenkins jobs and you want to make sure that you use the same artifact throughout the process and this w/o blocking the whole pipeline for the whole duration of the process. HTH Pascal On 12/06/2014 10:46 AM, Hohl, Gerrit wrote: Hello everyone, :) I have a question which is not about a specific problem with Maven, but more a general question. I hope it is okay to ask this question here. We use Maven and Jenkins for about 1.5 years now, I guess. Until now the Maven projects have been very simple and - let's say - very monolithic. But recently we identify more and more internal libraries in our products. Of course we don't want to share this libraries by copy-n-paste between the products - especially as we have Maven. So we started to read books, tutorials on the Internet and so on. But most of them only deal with simple projects. They don't cover e.g. versioning the build process (especially if your build process consists of more than just one step). They also don't cover the problems of developing the libraries while your developing the products which depend on them. Especially at the beginning your libraries will go through a lot of changes. A few name snapshots as a solution, but don't explain how you can work using them, how you can use them in your pom.xml and how you deal with them if you finally switch your product and/or your library from the snapshot state to the release state. A few also say that you shouldn't use snapshots at all because it will result in many problems (e.g. having -SNAPSHOT entries in your pom.xml). Nightly builds or build triggered by the SCM are also an issue here. Does someone know a good book or tutorial which handles all of these issues around Maven and CI/CD in more depth? Regards, Gerrit - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org