Finding where the jar came from...
Can anyone tell me the quick-n-dirty way to figure out which dependency is responsible for a jar that is being transitively downloaded/included in the project? For instance, I see the servlet-api jar showing up in my assembly, but don't need it. I've already excluded it once from the spring dependency like so: org.springframework spring 2.0.2 javax.servlet servlet-api I just need to find out if another one of my dependencies depends on the servlet-api. Could it be the case that the assembly plugin doesn't grock that I said to exclude when I specified the spring dependency? TIA... Bryan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Finding where the jar came from...
Thanks for the feedback. I'm trying to use the project-info-reports plugin, and am getting the following: org.apache.maven.lifecycle.LifecycleExecutionException: The plugin 'org.apache.maven.plugins:maven-project-info-reports-plugin' does not exist or no valid version could be found ...which seems odd to me, because I can see it right here: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-project-info-reports-plugin/ Any ideas? Alan D. Salewski wrote: On Thu, Feb 22, 2007 at 11:00:42AM -0700, Bryan Noll spake thus: Can anyone tell me the quick-n-dirty way to figure out which dependency is responsible for a jar that is being transitively downloaded/included in the project? For instance, I see the servlet-api jar showing up in my assembly, but don't need it. I've already excluded it once from the spring dependency like so: org.springframework spring 2.0.2 javax.servlet servlet-api I just need to find out if another one of my dependencies depends on the servlet-api. Could it be the case that the assembly plugin doesn't grock that I said to exclude when I specified the spring dependency? You can run $ mvn -o project-info-reports:dependencies to generate the dependency report in target/site/dependencies.html HTH, -Al
Re: Finding where the jar came from...
Nevermind... I did it with a '-U' arg tacked on, and it worked... Thanks again for the help. Bryan Noll wrote: Thanks for the feedback. I'm trying to use the project-info-reports plugin, and am getting the following: org.apache.maven.lifecycle.LifecycleExecutionException: The plugin 'org.apache.maven.plugins:maven-project-info-reports-plugin' does not exist or no valid version could be found ...which seems odd to me, because I can see it right here: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-project-info-reports-plugin/ Any ideas? Alan D. Salewski wrote: On Thu, Feb 22, 2007 at 11:00:42AM -0700, Bryan Noll spake thus: Can anyone tell me the quick-n-dirty way to figure out which dependency is responsible for a jar that is being transitively downloaded/included in the project? For instance, I see the servlet-api jar showing up in my assembly, but don't need it. I've already excluded it once from the spring dependency like so: org.springframework spring 2.0.2 javax.servlet servlet-api I just need to find out if another one of my dependencies depends on the servlet-api. Could it be the case that the assembly plugin doesn't grock that I said to exclude when I specified the spring dependency? You can run $ mvn -o project-info-reports:dependencies to generate the dependency report in target/site/dependencies.html HTH, -Al
Re: How to include the artfact/extraFiles/dependency in assembly (single module)
Zarick... Just wanted to let you know that your solution just helped me out. I would second it that it seems odd to me that extra configuration is required in order to get the jar your project is building into the assembly. Seems to me this should be the default behavior, and then the user could exclude if they wanted to. At any rate, thanks for posting your solution back to the board. --Bryan Zarick Lau wrote: Alright, I got an answer myself. The solution is the add one more 'fileSet' to include the artifact produced the jar plugin. ${artifactId}-*.jar ${basedir}/target lib keep 0664 Btw, I think that, assembly plugin should include this setup as one of the default assembly descriptor (as I think it is common enough, isn't it?) On 8/9/07, Zarick Lau <[EMAIL PROTECTED]> wrote: Dear users and developers, I have a single module project, is it possible to create an assembly such that, it include the normal project artifact, extra files (scripts/sql) and dependency in the assembly output? I can use an descriptor to include the scripts and dependencies included in the output, but the module itself is not included. For example: After mvn package (I use assembly:inline), I found the followings files in target/sample-1.0-SNAPSHOT-binary.dir: bin/start.sh lib/commons-logging-1.1.jar lib/commons-lang-2.1.jar [... some more other commonly used jar ...] However, the sample-1.0-SNAPSHOT.jar is not appear in the directory. How can I managed the sample-1.0-SNAPSHOT.jar appear in the directory? == the following is my descriptor == binary zip ${artifactId}-${version} true src/main/script false keep scripts false true 0555 0755 lib Thanks!! Zarick Lau - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to include the artfact/extraFiles/dependency in assembly (single module)
Thanks for following up and letting us know John. Good info. John Casey wrote: BTW, this problem is fixed in the latest snapshots of the assembly plugin, where there is a new flag in the assembly descriptor's dependencySet: true|false. For compatibility with the 2.1 release of maven-assembly-plugin, this flag is set to true by default. I know it's just trivia right now, but someday we'll get this next release out, and it'll be useful to know. :-) -john On Aug 12, 2007, at 7:21 AM, Zarick Lau wrote: Alright, I got an answer myself. The solution is the add one more 'fileSet' to include the artifact produced the jar plugin. ${artifactId}-*.jar ${basedir}/target lib keep 0664 Btw, I think that, assembly plugin should include this setup as one of the default assembly descriptor (as I think it is common enough, isn't it?) On 8/9/07, Zarick Lau <[EMAIL PROTECTED]> wrote: Dear users and developers, I have a single module project, is it possible to create an assembly such that, it include the normal project artifact, extra files (scripts/sql) and dependency in the assembly output? I can use an descriptor to include the scripts and dependencies included in the output, but the module itself is not included. For example: After mvn package (I use assembly:inline), I found the followings files in target/sample-1.0-SNAPSHOT-binary.dir: bin/start.sh lib/commons-logging-1.1.jar lib/commons-lang-2.1.jar [... some more other commonly used jar ...] However, the sample-1.0-SNAPSHOT.jar is not appear in the directory. How can I managed the sample-1.0-SNAPSHOT.jar appear in the directory? == the following is my descriptor == binary zip ${artifactId}-${version} true src/main/script false keep scripts false true 0555 0755 lib Thanks!! Zarick Lau - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --- John Casey Committer and PMC Member, Apache Maven mail: jdcasey at commonjava dot org blog: http://www.ejlife.net/blogs/john - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]