Maven and Jsig CAS 4.0RC - maven

I have downloaded the code from the repository but I have little experience to use maven (command line) to get the .war file to be included in my tomcat.
I do not have experience in this.
I have not changed the pom.xml file
I directly run the command mvn clean package but I have several errors.
Spete help me?
My goal is to generate the. War file CAS 4.0RC
I'm using the pom.xml file that I found on git (a very long file) can fit that?

If you've downloaded the source of CAS and its by itself should be a mavenized project then, pom.xml should be inside.
so you should just 'cd' to the root folder of your source and type
mvn install
or
mvn package
The first command will install your jar into local maven repository, the second one will only prepare the war in the target folder of the module with packaging war in the source.
If you encounter any errors, please post them here.
Hope this helps

It should build without any problem when executing mvn clean install in the CLI... What are your errors ?

Related

Why maven aggregator project looks for jar file to install?

I have an aggregator POM (<packaging>pom) with a few modules. The modules build fine but the aggregator itself has a strange error. When I do mvn clean install on the aggregator it normally calls default-install and installs the pom.xml in the local repository. But then right after that it calls the additional-install and looks for a JAR file in the project target directory to install to the local repository but it does not find a JAR file and fails.
Why does Maven try to install a JAR file from an aggregator project where an aggregator project never builds a JAR file so why is it trying to find one to install?
There is no error other than this and mvn clean package builds fine because it doesn’t involve installing.
The project is complex so I didn’t paste any code. If anyone could give me a clue as to why an aggregator POM with <packaging>pom would try to install a JAR I would appreciate it very much.

maven remembers deleted repos

I had some repo in my project's main module' pom.xml file which maven couldn't download any library (artifact) from. I made a decision to remove that repo from pom.xml and use another one. When I run command : mvn clean install - it print out that it is trying to download libraries from that first bloody ( already deleted from project configuration {pom.xml file} ) repository ....
How to make maven forget about deleted and even not mentioned in project repositories ?
Thanks a lot!
One of the reasons could be that this repository is also mentionned in your maven settings. This file is by default in .m2/settings.xml in your personal directory.

How to add dependency to my pom.xml?

I want to use https://code.google.com/p/droidpersistence/source/checkout but I don't know how add to my pom.xml..
The link you provided specifies a place you can download some code, using Subversion:
svn checkout http://droidpersistence.googlecode.com/svn/trunk/ droidpersistence-read-only
So run that command, and it will download the code. That particular code is designed to be built with ant, instead of maven. You need to write a little pom.xml file for it, so that when you build it on your computer with "mvn clean install", maven will generate a .jar file (the artifact), and put it in your local maven repository (.m2 directory). Then add a dependency on that jar to your pom file.
In general, to add a dependency to your pom using the latest version of IntelliJ Idea (12.1.6), click somewhere in your pom file, and press ALT-INSERT, then choose "dependency".
Hope this helps!

I want to include a jar file in my build using maven

The problem is like this
I have a maven build of my project already. But I have a requirement wherein I need to replace a .jar file located in WEB-INF/lib folder with another .jar file. This new jar file can be downloaded from a link.
What changes do I have to make in the pom.xml file to achieve this requirement. I tried to find out ways to do it but could not figure out the exact solution as I am a novice in Maven.
Assuming that the jar file is not found in any public maven repository you can install it in your local repository using the install plugin mvn install:install-file ... and refer it as any other dependency

Maven local repository

I want Maven to work offline. I downloaded all artifacts like spring and hibernate onto my computer. Then I tried to set up Maven to use local repository only. I followed instructions to point Maven to local repository. However every time I tried to load spring mvc project, I got the errors like this:
Offline / Missing artifact org.springframework:spring-context:jar:3.0.6.RELEASE:compile
Offline / Missing artifact org.springframework:spring-core:jar:3.0.6.RELEASE:compile
I checked the local repository. The jar and pom files are there. I can't figure out what is wrong with my configuration. Can someone help me out here?
Thanks.
Jerry
You probably messed up your settings.xml.
Correct way to prepare for offline is this:
mvn install dependency:go-offline
The answer bilash.saha gave will not work for multi module projects.
After first command finished, you may test that everything is ok by running
mvn -o package
To save you a from typing "-o" every time use this settings.xml:
<?xml version="1.0" encoding="UTF-8"?>
<settings>
<offline>true</offline>
</settings>
Run
mvn dependency:go-offline
then build your project offline using the '-o' flag:
mvn install -o

Resources