Re: Using the Maven Indexer
Hi, I have a new question: How can I index a remote repository? All the examples I have found and even the NexusIndexerCli seem to be focused about indexing *only* local repositories and then publishing this index for consumption. I do not want to do that. Is there any way I can pass an URL to an IndexPackingRequest instead of a (local) directory? Basically, my use case is: 1. Take a maven URL 2. If it has an index already created, use it through an IndexUpdatingRequest 3. If not, create a local index (IndexPackingRequest?) 4. In both cases, I then need to periodically update/synchronize my local index of the remote repository. Any help is deeply appreciated. Thanks, Eduard On Fri, Nov 21, 2014 at 7:07 PM, Eduard Moraru enygma2...@gmail.com wrote: Hi, I have recently started playing with the maven indexer [1], following the examples [2], and I have some questions (since AFAIS, documentation is practically unexistent on the matter): 1) From what I can understand, you need an IndexingContext for each repository you plan to index. This makes you end up with n lucene indexes, one for each repository. Is there any way that I could have just 1 lucene index, with all my repositories indexed in the same place? If the main purpose is searchig, why scatter the indexed information across n indexes and make the whole process dificult? Maybe I`m missing something. 2) On the same line as the first question, when it comes to searching, it seems that I can use a MergedIndexingContext to perform a search on multiple (all) indexed repositories (IndexingContexts). How does this merge the search results? I assume it takes each lucene index and queries it individually, but this probably means that the lucene scores of these merged results are completely messed up and ureliable, right? Any suggestions on how to properly perform search over multiple indexed repositories? 3) About the Plexus Container: Am I forced to initialize and use one, or can I/should manually instantiate the default implementations and use them instead? I`ll probably come up with more questions along the way, hope someone will find the time to guide me on the right path. Thanks, Eduard -- [1] https://github.com/apache/maven-indexer/ [2] https://github.com/apache/maven-indexer/tree/master/indexer-examples/indexer-examples-basic
assembly plugin
Hi all, I am trying to use the artifact version within the java code of my project, by reading the contents of META-INF/maven/plugin-id/artifact-id/pom.properties file that is generated by the jar plugin. I am creating a package of my project using the assembly plugin with the jar-with-dependencies prefabricated assembly descriptor. I noticed in the generated jar file that all the pom.properties files are correctly included for all my dependencies, but the one corresponding to my project. Is there any special parameter I need to provide to the assembly plugin to include this file? Thanks in advance, Carlos Alegria
Linux Command Line System Property Issue
Hi Everyone, I am having trouble passing in a value via the command line on bash in linux, but I have it working correctly on windows. On the command line, if I pass in the following: -DmavenArgLine=arg1 arg2 The error on linux is: Unknown lifecycle phase arg2 Windows is able to interpret this correctly and show arg1 arg2 in the output, verified by using the following plugin: plugin artifactIdmaven-antrun-plugin/artifactId version1.7/version executions execution phasegenerate-sources/phase configuration tasks echo${mavenArgLine}/echo /tasks /configuration goals goalrun/goal /goals /execution /executions /plugin My need is that the value of mavenArgLine has to be given from the command line as the value can differ from different environments. Is there a way to pass in the value of mavenArgLine in linux with spaces? Thanks, Phillip
Re: E-Book Beter Builds with Maven seems to be missing
I found it on Scribd - I assume this is the one you mean. http://www.scribd.com/doc/238927/Better-Builds-With-Maven On Nov 11, 2014, at 3:09 AM, Nick Stolwijk nick.stolw...@gmail.com wrote: Hi all, It seems the link from the External Resources[1] to the e-book Beter Builds with Maven'[2] is broken. Is this still being hosted elsewhere? (I couldn't find it with a quick search) Or should we remove it from our site? [1] http://maven.apache.org/articles.html [2] http://www.maestrodev.com/better-build-maven With regards, Nick Stolwijk ~~~ Try to leave this world a little better than you found it and, when your turn comes to die, you can die happy in feeling that at any rate you have not wasted your time but have done your best ~~~ Lord Baden-Powell - Author, Getting Started with Apache Maven http://www.packtpub.com/getting-started-with-apache-maven/video Author, HttpUnit http://www.httpunit.org and SimpleStub http://simplestub.meterware.com Come read my webnovel, Take a Lemon http://www.takealemon.com, and listen to the Misfile radio play http://www.fuzzyfacetheater.com/misfile/! - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: E-Book Beter Builds with Maven seems to be missing
links fixed. On 25 November 2014 at 13:14, Russell Gold r...@gold-family.us wrote: I found it on Scribd - I assume this is the one you mean. http://www.scribd.com/doc/238927/Better-Builds-With-Maven On Nov 11, 2014, at 3:09 AM, Nick Stolwijk nick.stolw...@gmail.com wrote: Hi all, It seems the link from the External Resources[1] to the e-book Beter Builds with Maven'[2] is broken. Is this still being hosted elsewhere? (I couldn't find it with a quick search) Or should we remove it from our site? [1] http://maven.apache.org/articles.html [2] http://www.maestrodev.com/better-build-maven With regards, Nick Stolwijk ~~~ Try to leave this world a little better than you found it and, when your turn comes to die, you can die happy in feeling that at any rate you have not wasted your time but have done your best ~~~ Lord Baden-Powell - Author, Getting Started with Apache Maven http://www.packtpub.com/getting-started-with-apache-maven/video Author, HttpUnit http://www.httpunit.org and SimpleStub http://simplestub.meterware.com Come read my webnovel, Take a Lemon http://www.takealemon.com, and listen to the Misfile radio play http://www.fuzzyfacetheater.com/misfile/! - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org -- Olivier Lamy http://twitter.com/olamy | http://linkedin.com/in/olamy - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Enforcing annotations
Since this was not a maven question directly, I tried posting this at stackoverflow first at https://stackoverflow.com/questions/27068654/how-to-enforce-verify-spring-scope-annotation-on-spring-beans. Did not get much traction. We do use spring and its dependency injection mechanism using annotations only. No XML files for spring. However the trouble starts when developers start mixing beans of different scopes - most of the time by accident. Many developers forget that beans are singleton in scope by default and end up creating beans (or services) that has state. They are happy because if it works on their machine but creates interesting mix/match of data when more than one user logs in to the application. Right now, I am thinking of simple solution - enforce that every spring component needs to have scope annotation also. Thought behind this is it will force developer to think about the scope by explicitly declaring the value. Are there any plugins that can do this? If not, can I extend maven enforcer plugin or findbugs in anyway to do this? Open to any other suggestions also. Regards, Niranjan - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Enforcing annotations
I think you will find it easier to add a temporary Spring bean (during development) that scans your beans/annotations to report what you want: http://stackoverflow.com/questions/259140/scanning-java-annotations-at-runtime Cheers, Paul On Mon, Nov 24, 2014 at 9:01 PM, Niranjan Rao nhr...@gmail.com wrote: Since this was not a maven question directly, I tried posting this at stackoverflow first at https://stackoverflow.com/ questions/27068654/how-to-enforce-verify-spring-scope- annotation-on-spring-beans. Did not get much traction. We do use spring and its dependency injection mechanism using annotations only. No XML files for spring. However the trouble starts when developers start mixing beans of different scopes - most of the time by accident. Many developers forget that beans are singleton in scope by default and end up creating beans (or services) that has state. They are happy because if it works on their machine but creates interesting mix/match of data when more than one user logs in to the application. Right now, I am thinking of simple solution - enforce that every spring component needs to have scope annotation also. Thought behind this is it will force developer to think about the scope by explicitly declaring the value. Are there any plugins that can do this? If not, can I extend maven enforcer plugin or findbugs in anyway to do this? Open to any other suggestions also. Regards, Niranjan - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Using the Maven Indexer
indexing is really meant to be done on local filesystem: the format is not really local repositories, but direct filesystem access to remote repository content working through network cause performance issues, and you won't get some information like last modified time, or directory listing notice the latest site is published at http://maven.apache.org/maven-indexer-archives/maven-indexer-LATEST/ this can help you, since there was a lot of work on documentation Regards, Hervé Le lundi 24 novembre 2014 13:44:18 Eduard Moraru a écrit : Hi, I have a new question: How can I index a remote repository? All the examples I have found and even the NexusIndexerCli seem to be focused about indexing *only* local repositories and then publishing this index for consumption. I do not want to do that. Is there any way I can pass an URL to an IndexPackingRequest instead of a (local) directory? Basically, my use case is: 1. Take a maven URL 2. If it has an index already created, use it through an IndexUpdatingRequest 3. If not, create a local index (IndexPackingRequest?) 4. In both cases, I then need to periodically update/synchronize my local index of the remote repository. Any help is deeply appreciated. Thanks, Eduard On Fri, Nov 21, 2014 at 7:07 PM, Eduard Moraru enygma2...@gmail.com wrote: Hi, I have recently started playing with the maven indexer [1], following the examples [2], and I have some questions (since AFAIS, documentation is practically unexistent on the matter): 1) From what I can understand, you need an IndexingContext for each repository you plan to index. This makes you end up with n lucene indexes, one for each repository. Is there any way that I could have just 1 lucene index, with all my repositories indexed in the same place? If the main purpose is searchig, why scatter the indexed information across n indexes and make the whole process dificult? Maybe I`m missing something. 2) On the same line as the first question, when it comes to searching, it seems that I can use a MergedIndexingContext to perform a search on multiple (all) indexed repositories (IndexingContexts). How does this merge the search results? I assume it takes each lucene index and queries it individually, but this probably means that the lucene scores of these merged results are completely messed up and ureliable, right? Any suggestions on how to properly perform search over multiple indexed repositories? 3) About the Plexus Container: Am I forced to initialize and use one, or can I/should manually instantiate the default implementations and use them instead? I`ll probably come up with more questions along the way, hope someone will find the time to guide me on the right path. Thanks, Eduard -- [1] https://github.com/apache/maven-indexer/ [2] https://github.com/apache/maven-indexer/tree/master/indexer-examples/index er-examples-basic - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org