I'm trying to learn how to use lift. I can create project skeleton by running maven commands (I had zero maven experience before) from Starting with Lift. It successfully downloads needed dependencies and everything works fine, however it does not download sources - I'd like to see how lift works from inside.
Looks like it downloads dependencies from here and there are compiled .jar files as well as sources - there are lift-mapper-1.0.jar and lift-mapper-1.0-sources.jar, but only lift-mapper-1.0.jar is downloaded to my local repository. I could download sources manually, but there are more than just few folders there. So, is there a way to tell it to Maven to download dependencies with sources?
We can use -U/--update-snapshots flag when building a maven project to force maven to download dependencies from the remote repository. Here, -U,--update-snapshots : Forces a check for missing releases and updated snapshots on remote repositories.
Where is the Maven Central repository? Maven Central can be accessed from https://repo.maven.apache.org/maven2/.
Maven's local repository is a directory on the local machine that stores all the project artifacts. When we execute a Maven build, Maven automatically downloads all the dependency jars into the local repository. Usually, this directory is named . m2.
The “maven-source” plugin is used to pack your source code and deploy along with your project. This is extremely useful, for developers who use your deployed project and also want to attach your source code for debugging.
The maven-dependency-plugin has a sources goal that will obtain the sources for all dependencies that are available. Simply run mvn dependency:sources
to obtain the sources.
If you are using Eclipse, the m2eclipse plugin handles source resolution and attachment for you. You can set it to automatically obtain sources in the Maven preferences. Window > Preferences...->Maven, then enable Download Artifact Sources.
You can also manually invoke "Download Sources" action from the Maven popup menu on any jars (including those that are not managed with Maven). Then plugin will use Maven repository indexes to lookup the corresponding Maven artifact and download its sources.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With