where does maven tomcat7 plugin stores/reads dependency jars? - tomcat7

I'm trying to override a dependency version through a maven profile. I did a test installing the war and it works. The problem is when I run the war using maven tomcat plugin. I wanted to check which version of the jar is used, but I have no idea where it reads the jars from. I cannot find anything useful on available documentation..
Any help?

I believe this page will help you to understand: http://tomcat.apache.org/maven-plugin-2.2/tomcat7-maven-plugin/adjust-embedded-tomcat-version.html
Use the dependencies section in plugin section
HTH

Related

Does maven care about file names?

I am trying to install some dependencies using maven in a spring boot project.
I am looking for a jar
org.apache.maven.plugins:maven-resources-plugin:jar:3.1.0
But I wanna know if the jar file should have this name maven-resources-plugin, or if the file name is not important for maven. I mean if maven will automatically know which jar file should use.
I will appreciate any help or feedback.
That is a plugin, not a dependency as such (meaning that Maven needs it for building your project, your code doesn't need it to compile or run).
You should only have to specify the plugins groupId, artifactId and version plus any configuration in your pom.xml, and Maven knows exactly what jar to get and how to use it.
See https://maven.apache.org/plugins/maven-resources-plugin/plugin-info.html for further information.

How to include csjdbc.jar as part of maven dependency?

I have been looking for a dependency for csjdbc.jar in Maven repository so that I can build my app using maven and retrieve that jar on the fly. However, I cannot find a dependency in Maven repository related to that jar. Can anyone help, please?
Hopefully you have already resolved this issue.
csjdbc.jar is not listed in maven repositories. If you have composite software installed you can copy the jar from
~\Composite Software\CIS 6.1.0\apps\jdbc\lib
directory to your local machine's maven repository like below with proper versioning:
C:\maven\repository\composite\csjdbc\6.1\csjdbc-6.1.jar
(I have 6.1 jar)

Creating source and doc jars

I've noticed something really cool about the m2eclipse plugin. When I try to view source on one of the class files included by Maven, at first it's unable to show it to me, but then in the background, it downloads a src JAR and a docs JAR. For my own projects how do I make and deploy these JARs alongside my binary JAR in my Maven repository?
You can do this by attaching the source and javadocs as part of your project build. This cookbook has the maven configuration needed for it.
Maven Source Plugin: http://maven.apache.org/plugins/maven-source-plugin/usage.html

Getting jar not in the pom.xml

I am confused why my web application is getting a Jar in its Maven Dependencies even if I think its not on the pom.xml file.
Here's my complete pom.xml which the applications gets objectify-2.2.3.jar
However I need to put a new version of this jar and I am not sure why my application gets this jar.
Do just a
mvn dependency:tree
on the console and check the output.
I suppose this jar is referenced by one of your direct dependencies.
Some IDEs can show the full dependency tree. I know this could be done with IntelliJ IDEAs maven view. I think Eclipse has a similar view.
There is also a maven plugin for this.

RCP build with maven

How to build and package RCP (Rich client Platform) using Eclipse.
Is it possible to build as a .jar file.
I use Maven Tycho. I find it a lot easier to use than the PDE ant scripts.
The itp04 RCP example is a good project to get started.
We use Maven 3 and the sonatype-tycho plugin to build our Eclipse RCP-based application. It allows a plugin-first approach, i.e. you define the dependencies only in the plugin.xml using the editor of Eclipse. You don't have to care about dependencies in the pom.xml as these are managed by tycho.
There are detailed instructions at Apache Felix maven Bundle page on how to do this.
Alternatively, There are some quickstart maven archetypes you could download based on these instructions and experiment with.
I have wrapped PDE/Build by Maven manually. You can find an example in my answer to my own question:
How to set up Eclipse PDE/Build with Indigo?

Resources