Re: Properties in settings.xml does not work for system scoped dependencies
the correct scope for those deps should be provided imho. the problem you have is getting the deps you need, system scope is just a workaround. ideally you would create an uberjar from the geologic jar and just install that into your repo manager. the focus should be on taking a jar and making an uberjar from its manifest classpath... should be easy, then install that uberjar in your repo. forget about identifying which of the 480 odd jars has your dep, when you depend on geologic specific classes, that's what you need. - Stephen --- Sent from my Android phone, so random spelling mistakes, random nonsense words and other nonsense are a direct result of using swype to type on the screen On 15 Nov 2011 03:19, Stephen Coy st...@resolvesw.com wrote: Hi there, I've been a maven user since the early 1.0 days and have contributed patches at various times for the ejb-plugin, ear-plugin and others. I've also had the unfortunate experience of having to use WebLogic 10+ to create useable maven poms for our projects. In fact, when I read the OP I knew he was talking about Weblogic even though he did not mention it. The *only* way I've been able to do this successfully was with a system scoped dependency on the weblogic.jar. This is because weblogic contains a maze of relative manifest class paths that are truly mind boggling. The very first class path entry in weblogic.jar looks like: ../../../modules/features/weblogic.server.modules_10.3.5.0.jar (plus a dozen or more others) That modules directory contains 465 (very OSGI looking) jars and sub directories. Do you really think it's practical to install all of these into a repository manager? How would you generate the dependencies for each pom? This would not be an issue for any plain old JEE application. However, if you have any need at all for weblogic specific APIs then a system scoped dependency is the only practical way. Even when you do figure out which one of those ~500 jars contains your API, you then need to read it's manifest and pick out its dependencies, and then the dependencies' dependencies, etc. If someone has a simple solution to this then I'd like to hear it too. Otherwise, *please* restore the system scope functionality. Cheers, Steve C On 14/11/2011, at 2:55 AM, Benson Margulies wrote: No possible licensing restriction can prevent you from having your own shared repository with nexus or archiva or artifactory and pushing whatever you want to it. For that matter, it's not too hard to write a script that calls install:install-file on each of a pile of jar files. You can't do this in the reactor and then use the results (AFAIK), but you can run this and then run the build. In other words, anything you can do with system scope you can do with less headaches with a repo manager or instal:install-file. On Sat, Nov 12, 2011 at 8:20 AM, Bengt Rodehav be...@rodehav.com wrote: Last time I went through this I never came all the way to a complete list but I do remember there were lots of jars missing. I guess I'll have to reiterate this again since system scope doesn't seem to be supported anymore. /Bengt 2011/11/12 Wayne Fay wayne...@gmail.com What else do you need? Why not full client + some reasonable (small) handful of other dependencies? Wayne On Fri, Nov 11, 2011 at 5:00 PM, Bengt Rodehav be...@rodehav.com wrote: It works but the full client is not enough for us to be able to build our application. Den 11 nov 2011 23:11 skrev Ryan Connolly ryn...@gmail.com: Does this no longer work? http://docs.oracle.com/cd/E12840_01/wls/docs103/client/t3.html On Nov 11, 2011 3:38 PM, Bengt Rodehav be...@rodehav.com wrote: Stephen and Wayne, I agree that using system scope is undesirable. However, there is a reason why maven has had this support - it is needed in real life. In my case, I use Weblogic. When first trying to migrate our old ant based build system to maven, I started out by trying to put the Weblogic jar:s in the maven repo. It just wasn't doable. They have split the big, all encompassing, jar file from previous versions into hundreds of individual jar files. I gave up after a while. I guess if I could find a tool that could convert all these jars into one super jar then I could put that jar in the maven repo. I'm not sure that Oracle's licensing rules would allow it though. Dropping support like this because you don't think it's the best way to handle things will not give you a loyal user base. We need to solve these kind of issues somehow. Before you remove support you must provide an alternate solution. Requiring that hundreds of proprietary jars have to be put in the maven repo (and updated each time we upgrade Weblogic) is just not realistic. I've been searching for a good tool that can traverse the manifest classpath's and create a single jar from all
Re: browsing maven repo
Ogi, this is a bit incomplete :) I understand you want the triplets (triplets? What about classifiers?), but Indexer does not have any information about dependencies (edges in your case). Also, what for is the tree-like big graph needed? Are you sure you need the graph of one whole repository? I still don't get your ultimate problem you try to solve, nor see the value of having this tree-like graph of whole repository, since on repository level, there is no constraint of whatsoever... repositories _tend_ to contain interdependent artifacts, but it's not a requirement at all. Or you are targeting Central Repository specifically (that one has a weak requirement to not contain artifacts pointing outside of it)? Or... Thanks, ~t~ On Mon, Nov 14, 2011 at 6:58 PM, Ognjen Bubalo ogi.wer...@gmail.com wrote: Hi! Yes I understand. So, I would like to get from a repository all the groupId, artifactId, version 3s and put it into an SQL DB. Then I want to draw a graph using my DB (POM = node, dependency = edge), and finally I want to put in my local POM and see how the dependency tree looklike in the big graph. I need this for my thesis. So I need the information somehow what 3s are on a repository. Thank you! Ogi Ps: Puno ti hvala :). Harom nyelven is mehet a beszelgetes :) 2011/11/14 Tamás Cservenák ta...@cservenak.net Hi, well, as I said, on remote reposes Indexer can't do much IF index is not published. And crawling a repo is considered a bad behavior, so be polite! :) Could you describe a bit more about your use case? Thanks, ~t~ PS: Ma nema problema Ogi, i drugi put! Moze i direktno :D On Mon, Nov 14, 2011 at 6:39 PM, Ognjen Bubalo ogi.wer...@gmail.com wrote: Thank you (Koszonom) for your response! By given repository I mean a remote repository address (http,https..). I thought that Nexus Indexer can only manage local repo. Anyway, if I understand, indexing a repo is done on the repo side, and I cannot use it for sure. I need something like: http://search.maven.org/#api, but I have 2 problem with this API: 1. I cannot get in an xml or json the whole artifacts information set (select *), only if I search for a specific artifact or group. 2. This works maybe only on this repo, I need something for my application (an API or another application), to explore any remote repository programmatically (using java code). One repository is good for a start also if there is a solution. I am new in this world, please excuse me. Thank you very much! Br, Ogi 2011/11/14 Tamás Cservenák ta...@cservenak.net Hm, a typo: Maven3 (nor Maven2) does not... Thanks, ~t~ 2011/11/14 Tamás Cservenák ta...@cservenak.net: Hi Ogi, Maven3 (not was Maven2) does not use or consume or need index at all... For indexer API uses you can see some examples here: https://github.com/cstamas/maven-indexer-examples For CLI uses (to create indexes for repositories), unsure is there any up to date doco, but just gleaning over the CLI source should work: https://github.com/apache/maven-indexer/blob/trunk/indexer-core/src/main/java/org/apache/maven/index/cli/NexusIndexerCli.java Now the question is: is given repository you mention under your governance or not... since if it's NOT and it does NOT publish indexes either, Maven Indexer will not help you. Thanks, ~t~ On Mon, Nov 14, 2011 at 5:57 PM, Ognjen Bubalo ogi.wer...@gmail.com wrote: Hi! I would like to get a list of all artifacts placed in a given repository. I think I could use Maven Indexer but I am not sure it works with Maven 3. Also I couldn't find any example using Maven Indexer, to know where to start. I would appreciate if somebody put me on right direction, recommend something. Thank you! Br, Ogi - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: How setup java-first webservice client-jar in Maven?
Thanks Anders, Just to clarify... So the serverside webservice-project puts the wsdl in a jar-file, which is deployed to Nexus? And the client-project can then read that wsdl from the classpath and generate the client-jar? Is that what you have in mind? -- View this message in context: http://maven.40175.n5.nabble.com/How-setup-java-first-webservice-client-jar-in-Maven-tp4990484p4993782.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: How setup java-first webservice client-jar in Maven?
You could either deploy the wsdl in a jar file (or zip or whatever) or deploy it as is. Personally I've gone the path of having the wsdl deployed as is to the repo. Ultimately (IMHO), the wsdl should be in a separate project so that is the primary artifact. A client using your ws doesn't care about anything but the wsdl. /Anders On Tue, Nov 15, 2011 at 09:55, rop rop...@gmail.com wrote: Thanks Anders, Just to clarify... So the serverside webservice-project puts the wsdl in a jar-file, which is deployed to Nexus? And the client-project can then read that wsdl from the classpath and generate the client-jar? Is that what you have in mind? -- View this message in context: http://maven.40175.n5.nabble.com/How-setup-java-first-webservice-client-jar-in-Maven-tp4990484p4993782.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
RE: Properties in settings.xml does not work for system scoped dependencies
Not that I am needing to do this but in order to further my understanding... If you create an Uber JAR - then you can end up in classpath hell - as the dependencies aren't correct (it could include common-io 1.2 and you need commons-io 1.3 which is declared transitively) This then means that even though you don't depend on commons-io you need to start adding all transitive dependencies to your pom just incase the app server ships with a different one and the uber jar takes precedence over the transitive dependency. The J2EE container should allow you to override some bits of the provide jars should they not? /James -Original Message- From: Stephen Connolly [mailto:stephen.alan.conno...@gmail.com] Sent: 15 November 2011 08:26 To: Maven Users List Subject: Re: Properties in settings.xml does not work for system scoped dependencies the correct scope for those deps should be provided imho. the problem you have is getting the deps you need, system scope is just a workaround. ideally you would create an uberjar from the geologic jar and just install that into your repo manager. the focus should be on taking a jar and making an uberjar from its manifest classpath... should be easy, then install that uberjar in your repo. forget about identifying which of the 480 odd jars has your dep, when you depend on geologic specific classes, that's what you need. - Stephen --- Sent from my Android phone, so random spelling mistakes, random nonsense words and other nonsense are a direct result of using swype to type on the screen On 15 Nov 2011 03:19, Stephen Coy st...@resolvesw.com wrote: Hi there, I've been a maven user since the early 1.0 days and have contributed patches at various times for the ejb-plugin, ear-plugin and others. I've also had the unfortunate experience of having to use WebLogic 10+ to create useable maven poms for our projects. In fact, when I read the OP I knew he was talking about Weblogic even though he did not mention it. The *only* way I've been able to do this successfully was with a system scoped dependency on the weblogic.jar. This is because weblogic contains a maze of relative manifest class paths that are truly mind boggling. The very first class path entry in weblogic.jar looks like: ../../../modules/features/weblogic.server.modules_10.3.5.0.jar (plus a dozen or more others) That modules directory contains 465 (very OSGI looking) jars and sub directories. Do you really think it's practical to install all of these into a repository manager? How would you generate the dependencies for each pom? This would not be an issue for any plain old JEE application. However, if you have any need at all for weblogic specific APIs then a system scoped dependency is the only practical way. Even when you do figure out which one of those ~500 jars contains your API, you then need to read it's manifest and pick out its dependencies, and then the dependencies' dependencies, etc. If someone has a simple solution to this then I'd like to hear it too. Otherwise, *please* restore the system scope functionality. Cheers, Steve C On 14/11/2011, at 2:55 AM, Benson Margulies wrote: No possible licensing restriction can prevent you from having your own shared repository with nexus or archiva or artifactory and pushing whatever you want to it. For that matter, it's not too hard to write a script that calls install:install-file on each of a pile of jar files. You can't do this in the reactor and then use the results (AFAIK), but you can run this and then run the build. In other words, anything you can do with system scope you can do with less headaches with a repo manager or instal:install-file. On Sat, Nov 12, 2011 at 8:20 AM, Bengt Rodehav be...@rodehav.com wrote: Last time I went through this I never came all the way to a complete list but I do remember there were lots of jars missing. I guess I'll have to reiterate this again since system scope doesn't seem to be supported anymore. /Bengt 2011/11/12 Wayne Fay wayne...@gmail.com What else do you need? Why not full client + some reasonable (small) handful of other dependencies? Wayne On Fri, Nov 11, 2011 at 5:00 PM, Bengt Rodehav be...@rodehav.com wrote: It works but the full client is not enough for us to be able to build our application. Den 11 nov 2011 23:11 skrev Ryan Connolly ryn...@gmail.com: Does this no longer work? http://docs.oracle.com/cd/E12840_01/wls/docs103/client/t3.html On Nov 11, 2011 3:38 PM, Bengt Rodehav be...@rodehav.com wrote: Stephen and Wayne, I agree that using system scope is undesirable. However, there is a reason why maven has had this support - it is needed in real life. In my case, I use Weblogic. When first trying to migrate our old ant based build system to maven, I started out by trying to put the Weblogic jar:s in the maven repo. It just wasn't
Re: browsing maven repo
Hi! Hmm, the only way to get the dependencies is to look into the POM files I think. I know this is too much maybe. Yes I would like to have all the triplets in my DB and it would be really good if I could show the whole graph. If I add my local POM which depends on some other projects in this specific repository then I have to see for example in a different color the dependency tree inside the big graph. So if we give some other local POMs we can see the differences in the dependency trees. For example if we give 2 POMs which diffs only in versions or only in used dependencies (or their versions) we can see visually that there can be an affect on our project a difference between 2 versions of a third party library. You mean that dependency trees do not always stay in one repository? Yes then there would be a cut in the tree. I think the Central repo would be enough :) first. Thank you very much! Ogi 2011/11/15 Tamás Cservenák ta...@cservenak.net Ogi, this is a bit incomplete :) I understand you want the triplets (triplets? What about classifiers?), but Indexer does not have any information about dependencies (edges in your case). Also, what for is the tree-like big graph needed? Are you sure you need the graph of one whole repository? I still don't get your ultimate problem you try to solve, nor see the value of having this tree-like graph of whole repository, since on repository level, there is no constraint of whatsoever... repositories _tend_ to contain interdependent artifacts, but it's not a requirement at all. Or you are targeting Central Repository specifically (that one has a weak requirement to not contain artifacts pointing outside of it)? Or... Thanks, ~t~ On Mon, Nov 14, 2011 at 6:58 PM, Ognjen Bubalo ogi.wer...@gmail.com wrote: Hi! Yes I understand. So, I would like to get from a repository all the groupId, artifactId, version 3s and put it into an SQL DB. Then I want to draw a graph using my DB (POM = node, dependency = edge), and finally I want to put in my local POM and see how the dependency tree looklike in the big graph. I need this for my thesis. So I need the information somehow what 3s are on a repository. Thank you! Ogi Ps: Puno ti hvala :). Harom nyelven is mehet a beszelgetes :) 2011/11/14 Tamás Cservenák ta...@cservenak.net Hi, well, as I said, on remote reposes Indexer can't do much IF index is not published. And crawling a repo is considered a bad behavior, so be polite! :) Could you describe a bit more about your use case? Thanks, ~t~ PS: Ma nema problema Ogi, i drugi put! Moze i direktno :D On Mon, Nov 14, 2011 at 6:39 PM, Ognjen Bubalo ogi.wer...@gmail.com wrote: Thank you (Koszonom) for your response! By given repository I mean a remote repository address (http,https..). I thought that Nexus Indexer can only manage local repo. Anyway, if I understand, indexing a repo is done on the repo side, and I cannot use it for sure. I need something like: http://search.maven.org/#api, but I have 2 problem with this API: 1. I cannot get in an xml or json the whole artifacts information set (select *), only if I search for a specific artifact or group. 2. This works maybe only on this repo, I need something for my application (an API or another application), to explore any remote repository programmatically (using java code). One repository is good for a start also if there is a solution. I am new in this world, please excuse me. Thank you very much! Br, Ogi 2011/11/14 Tamás Cservenák ta...@cservenak.net Hm, a typo: Maven3 (nor Maven2) does not... Thanks, ~t~ 2011/11/14 Tamás Cservenák ta...@cservenak.net: Hi Ogi, Maven3 (not was Maven2) does not use or consume or need index at all... For indexer API uses you can see some examples here: https://github.com/cstamas/maven-indexer-examples For CLI uses (to create indexes for repositories), unsure is there any up to date doco, but just gleaning over the CLI source should work: https://github.com/apache/maven-indexer/blob/trunk/indexer-core/src/main/java/org/apache/maven/index/cli/NexusIndexerCli.java Now the question is: is given repository you mention under your governance or not... since if it's NOT and it does NOT publish indexes either, Maven Indexer will not help you. Thanks, ~t~ On Mon, Nov 14, 2011 at 5:57 PM, Ognjen Bubalo ogi.wer...@gmail.com wrote: Hi! I would like to get a list of all artifacts placed in a given repository. I think I could use Maven Indexer but I am not sure it works with Maven 3. Also I couldn't find any example using Maven Indexer, to know where to start. I would appreciate if somebody put me on right direction, recommend something. Thank you! Br, Ogi
Re: browsing maven repo
Hm, well then, your need seems bloated. You don't need _whole_ Central Repository GAVs at all (what for? to use 1%, 5% or 10% of it in best case?)... Let's reverse your problem: Just create those local POMs first, and use Aether [1] to resolve it's dependencies and persist somehow the resulting tree. The tweak your local POM (apply changes you mention, bump some versions or add some) and persist that tree too. And then compare the two tree, visualize or whatever. So, you could figure out how to persist the dependency trees got from Aether (it calculates for you all), how to compare the trees and finally how to visualize those diffs. That would be a nice thesis :D Ultimately, the tool resulting from your thesis could be applied to _any_ project, just pass in the POM of it in multiple iterations (ie. V1, V2, ...), build the graphs, and resulting output would be nice visualization of changes happened in dependencies. Note: getting dependencies from POM is not trivial. It's not just parsing the POM XML etc... you need to interpolate values, apply parents, etc... All that is done by Aether for you. [1] https://github.com/sonatype/sonatype-aether Thanks, ~t~ On Tue, Nov 15, 2011 at 10:34 AM, Ognjen Bubalo ogi.wer...@gmail.com wrote: Hi! Hmm, the only way to get the dependencies is to look into the POM files I think. I know this is too much maybe. Yes I would like to have all the triplets in my DB and it would be really good if I could show the whole graph. If I add my local POM which depends on some other projects in this specific repository then I have to see for example in a different color the dependency tree inside the big graph. So if we give some other local POMs we can see the differences in the dependency trees. For example if we give 2 POMs which diffs only in versions or only in used dependencies (or their versions) we can see visually that there can be an affect on our project a difference between 2 versions of a third party library. You mean that dependency trees do not always stay in one repository? Yes then there would be a cut in the tree. I think the Central repo would be enough :) first. Thank you very much! Ogi 2011/11/15 Tamás Cservenák ta...@cservenak.net Ogi, this is a bit incomplete :) I understand you want the triplets (triplets? What about classifiers?), but Indexer does not have any information about dependencies (edges in your case). Also, what for is the tree-like big graph needed? Are you sure you need the graph of one whole repository? I still don't get your ultimate problem you try to solve, nor see the value of having this tree-like graph of whole repository, since on repository level, there is no constraint of whatsoever... repositories _tend_ to contain interdependent artifacts, but it's not a requirement at all. Or you are targeting Central Repository specifically (that one has a weak requirement to not contain artifacts pointing outside of it)? Or... Thanks, ~t~ On Mon, Nov 14, 2011 at 6:58 PM, Ognjen Bubalo ogi.wer...@gmail.com wrote: Hi! Yes I understand. So, I would like to get from a repository all the groupId, artifactId, version 3s and put it into an SQL DB. Then I want to draw a graph using my DB (POM = node, dependency = edge), and finally I want to put in my local POM and see how the dependency tree looklike in the big graph. I need this for my thesis. So I need the information somehow what 3s are on a repository. Thank you! Ogi Ps: Puno ti hvala :). Harom nyelven is mehet a beszelgetes :) 2011/11/14 Tamás Cservenák ta...@cservenak.net Hi, well, as I said, on remote reposes Indexer can't do much IF index is not published. And crawling a repo is considered a bad behavior, so be polite! :) Could you describe a bit more about your use case? Thanks, ~t~ PS: Ma nema problema Ogi, i drugi put! Moze i direktno :D On Mon, Nov 14, 2011 at 6:39 PM, Ognjen Bubalo ogi.wer...@gmail.com wrote: Thank you (Koszonom) for your response! By given repository I mean a remote repository address (http,https..). I thought that Nexus Indexer can only manage local repo. Anyway, if I understand, indexing a repo is done on the repo side, and I cannot use it for sure. I need something like: http://search.maven.org/#api, but I have 2 problem with this API: 1. I cannot get in an xml or json the whole artifacts information set (select *), only if I search for a specific artifact or group. 2. This works maybe only on this repo, I need something for my application (an API or another application), to explore any remote repository programmatically (using java code). One repository is good for a start also if there is a solution. I am new in this world, please excuse me. Thank you very much! Br, Ogi 2011/11/14 Tamás Cservenák ta...@cservenak.net Hm, a typo: Maven3 (nor Maven2) does
Re: Properties in settings.xml does not work for system scoped dependencies
Actually this is not going to be as big an issue as you think. Keep in mind you are not sucking in _all_ the container's jars into your uber jar, only the public ones (unless you are very lazy... in which case you're going to have problems anyway) The container's classloaders should look something a bit like System - Common - Server \- Your App Now the above is very simplified, but most JEE containers boil down to something like the above if your app is an EAR you will have a similar fork with the EAR common dependencies in a shared classloader and then the EJBs being in one class loader descended from your app's common and the WARs being in another classloader(s) descended from common. So your app should only be depending on things that are in the App Server's Common classloader, i.e. all the javax.* packages for the JEE spec the container implements plus the public APIs of the App Server's additional extensions. Typically the app server's are reasonably helpful and put their public jars in one lib folder separate from the server's internal lib folder... but then again there is no need for them to do that at all... they should at least call out which jars are safe to depend on (i.e. public) somewhere in their docs. My understanding is that it is just the weblogic.jar that you'd want to uber-ize as that is the public facing API. You then depend on that uberjar _with_scope_provided_ this is because the jar is being provided for you. In weblogic, if you want to use a version of xerces that is not the one sucked in by weblogic.jar, then you need to configure your app with a filtering classloader in any case, so the classpath hell will either be there anyway, or you will have to man up and write the filtering classloader descriptor anyway. The provided weblogic.jar dependency will not have any transitive deps in any case (unless you add them yourself) and being scope=provided, it will not be transitive itself -Stephen On 15 November 2011 09:27, Nord, James jn...@nds.com wrote: Not that I am needing to do this but in order to further my understanding... If you create an Uber JAR - then you can end up in classpath hell - as the dependencies aren't correct (it could include common-io 1.2 and you need commons-io 1.3 which is declared transitively) This then means that even though you don't depend on commons-io you need to start adding all transitive dependencies to your pom just incase the app server ships with a different one and the uber jar takes precedence over the transitive dependency. The J2EE container should allow you to override some bits of the provide jars should they not? /James -Original Message- From: Stephen Connolly [mailto:stephen.alan.conno...@gmail.com] Sent: 15 November 2011 08:26 To: Maven Users List Subject: Re: Properties in settings.xml does not work for system scoped dependencies the correct scope for those deps should be provided imho. the problem you have is getting the deps you need, system scope is just a workaround. ideally you would create an uberjar from the geologic jar and just install that into your repo manager. the focus should be on taking a jar and making an uberjar from its manifest classpath... should be easy, then install that uberjar in your repo. forget about identifying which of the 480 odd jars has your dep, when you depend on geologic specific classes, that's what you need. - Stephen --- Sent from my Android phone, so random spelling mistakes, random nonsense words and other nonsense are a direct result of using swype to type on the screen On 15 Nov 2011 03:19, Stephen Coy st...@resolvesw.com wrote: Hi there, I've been a maven user since the early 1.0 days and have contributed patches at various times for the ejb-plugin, ear-plugin and others. I've also had the unfortunate experience of having to use WebLogic 10+ to create useable maven poms for our projects. In fact, when I read the OP I knew he was talking about Weblogic even though he did not mention it. The *only* way I've been able to do this successfully was with a system scoped dependency on the weblogic.jar. This is because weblogic contains a maze of relative manifest class paths that are truly mind boggling. The very first class path entry in weblogic.jar looks like: ../../../modules/features/weblogic.server.modules_10.3.5.0.jar (plus a dozen or more others) That modules directory contains 465 (very OSGI looking) jars and sub directories. Do you really think it's practical to install all of these into a repository manager? How would you generate the dependencies for each pom? This would not be an issue for any plain old JEE application. However, if you have any need at all for weblogic specific APIs then a system scoped dependency is the only practical way. Even when you do figure out which one of those ~500 jars contains your API, you then need to read it's manifest and pick
Re: browsing maven repo
Yes I already read about Aether. I know that if I use this I can get the tree, and that should be enough to visualize, but the part of the thesis is to get artifacts information (triples) into a DB from a repo for further analysis. Is this possible somehow? Thank you! Br, Ogi 2011/11/15 Tamás Cservenák ta...@cservenak.net Hm, well then, your need seems bloated. You don't need _whole_ Central Repository GAVs at all (what for? to use 1%, 5% or 10% of it in best case?)... Let's reverse your problem: Just create those local POMs first, and use Aether [1] to resolve it's dependencies and persist somehow the resulting tree. The tweak your local POM (apply changes you mention, bump some versions or add some) and persist that tree too. And then compare the two tree, visualize or whatever. So, you could figure out how to persist the dependency trees got from Aether (it calculates for you all), how to compare the trees and finally how to visualize those diffs. That would be a nice thesis :D Ultimately, the tool resulting from your thesis could be applied to _any_ project, just pass in the POM of it in multiple iterations (ie. V1, V2, ...), build the graphs, and resulting output would be nice visualization of changes happened in dependencies. Note: getting dependencies from POM is not trivial. It's not just parsing the POM XML etc... you need to interpolate values, apply parents, etc... All that is done by Aether for you. [1] https://github.com/sonatype/sonatype-aether Thanks, ~t~ On Tue, Nov 15, 2011 at 10:34 AM, Ognjen Bubalo ogi.wer...@gmail.com wrote: Hi! Hmm, the only way to get the dependencies is to look into the POM files I think. I know this is too much maybe. Yes I would like to have all the triplets in my DB and it would be really good if I could show the whole graph. If I add my local POM which depends on some other projects in this specific repository then I have to see for example in a different color the dependency tree inside the big graph. So if we give some other local POMs we can see the differences in the dependency trees. For example if we give 2 POMs which diffs only in versions or only in used dependencies (or their versions) we can see visually that there can be an affect on our project a difference between 2 versions of a third party library. You mean that dependency trees do not always stay in one repository? Yes then there would be a cut in the tree. I think the Central repo would be enough :) first. Thank you very much! Ogi 2011/11/15 Tamás Cservenák ta...@cservenak.net Ogi, this is a bit incomplete :) I understand you want the triplets (triplets? What about classifiers?), but Indexer does not have any information about dependencies (edges in your case). Also, what for is the tree-like big graph needed? Are you sure you need the graph of one whole repository? I still don't get your ultimate problem you try to solve, nor see the value of having this tree-like graph of whole repository, since on repository level, there is no constraint of whatsoever... repositories _tend_ to contain interdependent artifacts, but it's not a requirement at all. Or you are targeting Central Repository specifically (that one has a weak requirement to not contain artifacts pointing outside of it)? Or... Thanks, ~t~ On Mon, Nov 14, 2011 at 6:58 PM, Ognjen Bubalo ogi.wer...@gmail.com wrote: Hi! Yes I understand. So, I would like to get from a repository all the groupId, artifactId, version 3s and put it into an SQL DB. Then I want to draw a graph using my DB (POM = node, dependency = edge), and finally I want to put in my local POM and see how the dependency tree looklike in the big graph. I need this for my thesis. So I need the information somehow what 3s are on a repository. Thank you! Ogi Ps: Puno ti hvala :). Harom nyelven is mehet a beszelgetes :) 2011/11/14 Tamás Cservenák ta...@cservenak.net Hi, well, as I said, on remote reposes Indexer can't do much IF index is not published. And crawling a repo is considered a bad behavior, so be polite! :) Could you describe a bit more about your use case? Thanks, ~t~ PS: Ma nema problema Ogi, i drugi put! Moze i direktno :D On Mon, Nov 14, 2011 at 6:39 PM, Ognjen Bubalo ogi.wer...@gmail.com wrote: Thank you (Koszonom) for your response! By given repository I mean a remote repository address (http,https..). I thought that Nexus Indexer can only manage local repo. Anyway, if I understand, indexing a repo is done on the repo side, and I cannot use it for sure. I need something like: http://search.maven.org/#api, but I have 2 problem with this API: 1. I cannot get in an xml or json the whole artifacts information set (select *), only if I search for a specific artifact or group.
Re: browsing maven repo
Hi, it's not feasible at all. You'd need to _resolve_ all the existing POMs into effective POMs, to be able to build the edges you mention in way you want. Moreover, it's not that simple, think platform specific profiles (hence, edges changes as you change the platform you evaluate aganst), etc. I don't believe you want to do that. What further analysis you expect to have against _triplets_ and _edges_? Thanks, ~t~ On Tue, Nov 15, 2011 at 11:32 AM, Ognjen Bubalo ogi.wer...@gmail.com wrote: Yes I already read about Aether. I know that if I use this I can get the tree, and that should be enough to visualize, but the part of the thesis is to get artifacts information (triples) into a DB from a repo for further analysis. Is this possible somehow? Thank you! Br, Ogi - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: browsing maven repo
Oh yes I understand. I didn't think deep enough. My tutor needs this set of triplets. If I do not need the dependency information of the whole repo, just the triplets with timestamp, is there a way to get this? If not can I do this someway with the central repo only? Or maybe create a local repo and mirror? I tried the central repo's api but I cannot search for example a com.* groupid. The only idea I had is to search using http://search.maven.org/solrsearch/select?q=comrows=20wt=json then parse it get the numFound, and then next is: http://search.maven.org/solrsearch/select?q=comrows=numFoundwt=json. Thank you very much! Br, Ogi 2011/11/15 Tamás Cservenák ta...@cservenak.net Hi, it's not feasible at all. You'd need to _resolve_ all the existing POMs into effective POMs, to be able to build the edges you mention in way you want. Moreover, it's not that simple, think platform specific profiles (hence, edges changes as you change the platform you evaluate aganst), etc. I don't believe you want to do that. What further analysis you expect to have against _triplets_ and _edges_? Thanks, ~t~ On Tue, Nov 15, 2011 at 11:32 AM, Ognjen Bubalo ogi.wer...@gmail.com wrote: Yes I already read about Aether. I know that if I use this I can get the tree, and that should be enough to visualize, but the part of the thesis is to get artifacts information (triples) into a DB from a repo for further analysis. Is this possible somehow? Thank you! Br, Ogi - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Properties in settings.xml does not work for system scoped dependencies
On 15/11/2011, at 9:24 PM, Stephen Connolly wrote: Actually this is not going to be as big an issue as you think. hmm Keep in mind you are not sucking in _all_ the container's jars into your uber jar, only the public ones (unless you are very lazy... in which case you're going to have problems anyway) The container's classloaders should look something a bit like System - Common - Server \- Your App Now the above is very simplified, but most JEE containers boil down to something like the above if your app is an EAR you will have a similar fork with the EAR common dependencies in a shared classloader and then the EJBs being in one class loader descended from your app's common and the WARs being in another classloader(s) descended from common. I know this. I have ten years on JBoss and over 7 years on WebLogic and WebSphere. So your app should only be depending on things that are in the App Server's Common classloader, i.e. all the javax.* packages for the JEE spec the container implements plus the public APIs of the App Server's additional extensions. Yep Typically the app server's are reasonably helpful and put their public jars in one lib folder separate from the server's internal lib folder... but then again there is no need for them to do that at all... they should at least call out which jars are safe to depend on (i.e. public) somewhere in their docs. In fact, WebSphere does this very nicely. Unfortunately WebLogic does not. I spent many days on this a couple of years ago. My understanding is that it is just the weblogic.jar that you'd want to uber-ize as that is the public facing API. The API that we needed (a Tuxedo client) is buried in one of the modules jars, together with it's implementation. And it had OSGI style package dependencies that just exploded as I tried to work my way back out of it. We get it for free indirectly when including weblogic.jar as a system scope dependency through it's manifest classpath. You then depend on that uberjar _with_scope_provided_ this is because the jar is being provided for you. In weblogic, if you want to use a version of xerces that is not the one sucked in by weblogic.jar, then you need to configure your app with a filtering classloader in any case, so the classpath hell will either be there anyway, or you will have to man up and write the filtering classloader descriptor anyway. The provided weblogic.jar dependency will not have any transitive deps in any case (unless you add them yourself) and being scope=provided, it will not be transitive itself We're talking build time dependencies here. WebLogic appears to be using some form of OSGI container that at runtime gives the kind of class visibility behaviour that you would expect. I agree that the system scope is an ugly ugly solution, but in the end one has to be pragmatic. This is the only real use case I've *ever* had for system scope. Removing that Maven capability makes working with some WebLogic APIs a trial for the developers that need them. You're right that we could each write a program to analyse the OSGI Import-Package entries (there are no Class-Path entries in the modules) of the manifest.mf and try and build some kind of uberjar. But really? All this talk of OSGI makes me wonder if tycho could help somehow. What do you think? Steve C * Incidentally, we never package xerces and friends in our EAR or WAR files. We stick to the standard javax.xml apis and use whatever implementation is provided by the container. That has always been a recipe for trouble. If you're building WAR files and deploying only to a servlet container then YMMV. -Stephen On 15 November 2011 09:27, Nord, James jn...@nds.com wrote: Not that I am needing to do this but in order to further my understanding... If you create an Uber JAR - then you can end up in classpath hell - as the dependencies aren't correct (it could include common-io 1.2 and you need commons-io 1.3 which is declared transitively) This then means that even though you don't depend on commons-io you need to start adding all transitive dependencies to your pom just incase the app server ships with a different one and the uber jar takes precedence over the transitive dependency. The J2EE container should allow you to override some bits of the provide jars should they not? /James -Original Message- From: Stephen Connolly [mailto:stephen.alan.conno...@gmail.com] Sent: 15 November 2011 08:26 To: Maven Users List Subject: Re: Properties in settings.xml does not work for system scoped dependencies the correct scope for those deps should be provided imho. the problem you have is getting the deps you need, system scope is just a workaround. ideally you would create an uberjar from the geologic jar and just install that into your repo manager. the focus should be on taking a jar and making an
Execution control for self developed maven plugins
Hi, how can I ensure that resource filtering took place before my maven plugin is executed? Background: I wrote my own maven plugin. I used spring to wire my components together and set specific configuration parameters. Now I would like to use maven properties in my spring-config.xml. I put my spring-config.xml into src/main/resources/ and used ${maven.property} placeholders. In my plugin I now want to read the spring-config.xml which contains the values from my pom.xml file instead of my placeholders. I used the following code to access this config file in my plugin: /** * @parameter expression=${spring.config} default-value=${project.build.outputDirectory}${file.separator}spring-config.xml * @required */ private String config; But because the target sources have not been generated yet, I get a FileNotFoundException when I try to read this config file. I read something about an @execute Annotation which executes another plugin first, before executing the current plugin. But I don't know how to set it right, that filtering takes place before my plugin is executed. I tried, but it didn't work: @execute goal=resources:resources Kind regards Jan Jan Bernhardt, M.Sc., +49 (228) 76 37 76 - 15, Talend, global leader in Open Source Integration [Description: sig_businesscard]http://www.talend.com/JANBER.vcf[Description: sig_direction]http://www.talend.com/open-source-provider/contacts.php[Description: sig_download]http://www.talend.com/download.php?src=EmailSignature [Description: sig_talend]http://www.talend.com/
Re: Execution control for self developed maven plugins
execute the process-resources phase... but beware if you are binding your plugin to the lifecycle you would be better giving the default phase as process-resources rather than forking a lifecycle with @execute On 15 November 2011 10:28, Jan Bernhardt jbernha...@talend.com wrote: ** ** Hi, ** ** how can I ensure that resource filtering took place before my maven plugin is executed? ** ** Background: I wrote my own maven plugin. I used spring to wire my components together and set specific configuration parameters. Now I would like to use maven properties in my spring-config.xml. I put my spring-config.xml into src/main/resources/ and used ${maven.property} placeholders. In my plugin I now want to read the spring-config.xml which contains the values from my pom.xml file instead of my placeholders. I used the following code to access this config file in my plugin: ** ** /** * @parameter expression=${spring.config} default-value=${project.build.outputDirectory}${file.separator}spring-config.xml * @required */ private String config; ** ** ** ** But because the target sources have not been generated yet, I get a FileNotFoundException when I try to read this config file. I read something about an “@execute” Annotation which executes another plugin first, before executing the current plugin. But I don’t know how to set it right, that filtering takes place before my plugin is executed. I tried, but it didn’t work: ** ** @execute goal=”resources:resources” ** ** Kind regards Jan ** ** ** ** Jan Bernhardt, M.Sc., +49 (228) 76 37 76 - 15, Talend, global leader in Open Source Integration [image: Description: sig_businesscard] http://www.talend.com/JANBER.vcf[image: Description: sig_direction]http://www.talend.com/open-source-provider/contacts.php[image: Description: sig_download]http://www.talend.com/download.php?src=EmailSignature [image: Description: sig_talend] http://www.talend.com/ ** **
Building production web archive
Hello, What is the best way to build production web archive in maven project ? Should I use a profile in pom.xml or externalize the process with ant's build.xml file to manage multiple production (hostname, config) version, with the results of maven build/package ? Best regards Edo - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Report Plugin Dependencies (Maven 3 style) for Site
I'm trying to use the new Maven 3 style of generating reports, but I'm having problems with one in particular. I have some custom Checkstyle checks, but I'm not able to add the dependency in the right spot to make everything work. Here's part of my POM: org.apache.maven.plugins maven-site-plugin 3.0-beta-3 [deleted] checkstyle ${project.version} org.apache.maven.plugins maven-checkstyle-plugin 2.8 [deleted]/checkstyle.xml In previous versions of Maven, I could add dependencies to the actual report plugin, but not anymore. Adding the dependency to the maven-site-plugin doesn't work since it's added to the wrong level of the classloader. In this case two classloaders are created: 1) maven-site-plugin, which is the parent classloader of 2) maven-checkstyle-plugin. The Checkstyle JAR is added to (2), so by adding my dependency to the the maven-site-plugin (1) things won't work because it can't reference the Checkstyle types in (2). Adding the Checkstyle JAR as an additional dependency doesn't work either since the types from different classloaders are incompatible. There's no way of adding the dependency such that it ends up in (2). I've tried configuring the plugin under the pluginManagement section also, but that seems to be ignored for the newest style. I'm just wondering if this is even possible, or if I need to roll back my reporting configurations to the older style until the newer one is fixed up and functioning better. Nate Stoddard
Report Plugin Dependencies (Maven 3 style) for Site
I'm resending this because the formatting got butchered the first type. Sorry for the duplicate. Nate Stoddard = I'm trying to use the new Maven 3 style of generating reports, but I'm having problems with one in particular. I have some custom Checkstyle checks, but I'm not able to add the dependency in the right spot to make everything work. Here's part of my POM: build plugins plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-site-plugin/artifactId version3.0-beta-3/version dependencies dependency groupId[deleted]/groupId artifactIdcheckstyle/artifactId version${project.version}/version /dependency /dependencies configuration reportPlugins plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-checkstyle-plugin/artifactId version2.8/version configuration configLocation[deleted]/checkstyle.xml/configLocation /configuration /plugin /reportPlugins /configuration /plugin /plugins /build In previous versions of Maven, I could add dependencies to the actual report plugin, but not anymore. Adding the dependency to the maven-site-plugin doesn't work since it's added to the wrong level of the classloader. In this case two classloaders are created: 1) maven-site-plugin, which is the parent classloader of 2) maven-checkstyle-plugin. The Checkstyle JAR is added to (2), so by adding my dependency to the the maven-site-plugin (1) things won't work because it can't reference the Checkstyle types in (2). Adding the Checkstyle JAR as an additional dependency doesn't work either since the types from different classloaders are incompatible. There's no way of adding the dependency such that it ends up in (2). I've tried configuring the plugin under the pluginManagement section also, but that seems to be ignored for the newest style. I'm just wondering if this is even possible, or if I need to roll back my reporting configurations to the older style until the newer one is fixed up and functioning better. Nate Stoddard - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Building production web archive
What is the best way to build production web archive in maven project ? Should I use a profile in pom.xml or externalize the process with ant's build.xml file to manage multiple production (hostname, config) version, with the results of maven build/package ? Externalize your configuration and build one single master WAR that is deployed to all environments without changes. Wayne - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Building production web archive
Hello Wayne, Thanks for the reply. Le 15 nov. 2011 à 20:36, Wayne Fay wayne...@gmail.com a écrit : What is the best way to build production web archive in maven project ? Should I use a profile in pom.xml or externalize the process with ant's build.xml file to manage multiple production (hostname, config) version, with the results of maven build/package ? Externalize your configuration and build one single master WAR that is deployed to all environments without changes. Is there a recommanded way to manage the lifecycle of this external config process Associated To Maven project version (create a parent/module project)? Edo Wayne - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Building production web archive
Is there a recommanded way to manage the lifecycle of this external config process Associated To Maven project version (create a parent/module project)? I have no specific recommendations to make here other than to say that it should be versioned and released just like any other artifact. Parent/module is fine and probably typical. Wayne