Maven Overlay Docs

26 views
Skip to first unread message

Will Warren

unread,
Feb 28, 2012, 10:53:51 AM2/28/12
to kc.techni...@kuali.org

Hi There

 

Does anyone have any detailed instructions on how to setup a custom overlay project using maven for KC 3.1.1?

We’ve tried getting it set up, but have run into issues where the base project (kc_project) isn’t building a war and jar and/or putting them into the local maven repo.

 

We’re not experts with maven so any help/pom files/documentation would be greatly appreciated.

 

TIA


Will Warren
Sr. Application Developer
Brock University | Information Technology Services
500 Glenridge Ave. | St. Catharines, ON L2S 3A1
brocku.ca | 905 688 5550 x5105

Confidentiality Notice: This e-mail, including any attachments, may contain confidential or privileged information. If you are not the intended recipient, please notify the sender by e-mail and immediately delete this message and its contents. Thank you.

 

Damien Eversmann

unread,
Feb 28, 2012, 11:47:03 AM2/28/12
to Will Warren, kc.techni...@kuali.org
Hi Will,

I've been working on implementing KC as a Maven overlay.  I'll give a writeup a shot today and get something back here soon.


Thanks,

Damien

We not only build Solutions,

              We build Relationships.

Damien Eversmann

Senior Software Architect

dever...@vivantech.com 

 

2275 Rio Bonito Way

Suite 210

San Diego, CA 92108 

 

t.  916.469-5282

f.  619.298.4842

www.vivantech.com



Ken Geis

unread,
Feb 28, 2012, 12:52:26 PM2/28/12
to Will Warren, kc.techni...@kuali.org
I just manually install the KC war into our Nexus repository.

KC dev team: A lot of people are using the wars this way. Please start
publishing release wars to the Kuali Maven repository. I just dug up an
email that I sent in November 2008 asking for this, and I was told you
would look into it.


Ken

On 02/28/2012 07:53 AM, Will Warren wrote:
> Hi There
>
> Does anyone have any detailed instructions on how to setup a custom
> overlay project using maven for KC 3.1.1?
>

> We�ve tried getting it set up, but have run into issues where the base
> project (kc_project) isn�t building a war and jar and/or putting them


> into the local maven repo.
>

> We�re not experts with maven so any help/pom files/documentation would
> be greatly appreciated.
>
> TIA
>
> ------------------------------------------------------------------------
>
> *Will Warren*

Bryan Hutchinson

unread,
Feb 28, 2012, 12:56:57 PM2/28/12
to Will Warren, kc.techni...@kuali.org

Will,

 

We’ve done that here at Cornell. I don’t necessarily have detailed instructions on how we did it, but I’ll try to provide some details that may be helpful. I’ve attached our pom file for reference. We’ve installed the kc-ptd.war into our local maven repository, thus this dependency:

 

    <dependency>

      <groupId>org.kuali.kra</groupId>

      <artifactId>kc_project</artifactId>

      <version>3.1.1</version>

      <type>war</type>

    </dependency>

 

You can ignore the cynergy dependency (artifactId: cynergy-customizations) in the pom, this is for our own local Rice customizations.

 

We haven’t done any local customizations in our project yet, but I did include the kc-config-build.xml in our local overlay project (in \src\main\resources\META-INF), so we can pass our own build.environment (as opposed to ptd in the kc-ptd.war) and build.version parameters when starting the app.

 

While they are not specific to setting up the war overlay per se, I have written up instructions on setting up a local Cornell development environment, which have some related information that might also be useful:

https://cornell.jira.com/wiki/x/UABS

 

Hope this helps,

Bryan

 

--
Bryan G. Hutchinson
CIT Community Applications
Cornell University
395 Pine Tree Road, Suite #102
Ithaca, NY 14850

Work: 607-254-8959
Cell: 607-227-7271
bryan.hu...@cornell.edu

 

From: Will Warren [mailto:wwa...@brocku.ca]
Sent: Tuesday, February 28, 2012 10:54 AM
To: kc.techni...@kuali.org
Subject: [kuali] Maven Overlay Docs

 

Hi There

pom.xml

Kousheh, Mohammed A

unread,
Feb 28, 2012, 1:19:18 PM2/28/12
to Bryan Hutchinson, Will Warren, kc.techni...@kuali.org

Hi Will,

 

Here at BU, we have completed ‘almost’. I have promised to put the instructions but was really busy with the upgrade. I will do that soon.

 

What errors are you getting?

 

Here is the basics:

                              

1-                   Download kc_project-3.1.1 from the foundation’s SVN and build the war and jar

> mvn -Dmaven.test.skip=true install

> mvn jar:jar

> mvn install:install-file -Dpackaging=jar -DgroupId=org.kuali.kra -DartifactId=kc_project -Dversion=3.1.1 -DgeneratePom=true -Dfile=target/kc_project-3.1.1.jar

2-                   Create new maven project and add the following in the pom

                                <dependency>

                  <groupId>org.kuali.kra</groupId>

                  <artifactId>kc_project</artifactId>

                  <version>3.1.1</version>

                  <type>war</type>

              <scope>runtime</scope>

            </dependency>

            <dependency>

                  <groupId>org.kuali.kra</groupId>

                  <artifactId>kc_project</artifactId>

                  <version>3.1.1</version>

                 <scope>provided</scope>

                  <type>jar</type>

            </dependency>

 

Thanks,

Mohammed

Damien Eversmann

unread,
Feb 28, 2012, 1:26:53 PM2/28/12
to kc.techni...@kuali.org, Will Warren
Will,

It's going to take me a while to get something documented in a pretty manner, so I'll just outline the steps briefly here:

  1. Publish the Foundation's release of KC to a maven repo you have access to.  Initially this can be your local repository.  You need to publish in both jar and war formats for development purposes. From within the kc_project directory:
    1. mvn install
    1. mvn jar:jar
    2. mvn install:install-file -Dpackaging=jar -DgroupId=org.kuali.kra -DartifactId=kc_project -Dversion=3.1.1 -DgeneratePom=true -Dfile=target/kc_project-3.1.1.jar
    1. Create a new maven project for your overlay.  In its pom include the following:

    1. <dependency>
      <groupId>org.kuali.kra</groupId>
      <artifactId>kc_project</artifactId>
      <version>3.1.1</version>
      <type>war</type>
      </dependency>
      <dependency>
      <groupId>org.kuali.kra</groupId>
      <artifactId>kc_project</artifactId>
      <version>3.1.1</version>
    1. <type>jar</type>
      <scope>provided</scope>
      </dependency>
    2. When you build this project it will first unpack the foundation's war and then overlay all the files in your project on top.  
    Unfortunately, I have not yet been able to get "mvn jetty:run" to work with the overlay.  "mvn jetty:run-war" and "mvn jetty:run-exploded" work, but neither of those will pick up changes as you save them in your project and hot deploy, so you need to restart jetty each time you want you changes to take effect.  I'm still working on that so if you've got any insight, I'd love to hear it.

    Let me know if you have any questions.
    Reply all
    Reply to author
    Forward
    0 new messages