CernunnosPortlet

1 view
Skip to first unread message

logic...@gmail.com

unread,
Apr 1, 2009, 12:28:32 PM4/1/09
to Cernunnos Discussion
Hey Drew.

Gotta a problem I'm trying to solve quickly. Sound familiar?

I'm thinking of toying with the CernunnosPortlet. I have not done
anything with it yet, but I glanced at the ImportExportPortlet and the
source for the CernunnosPortlet. I noticed that there are some
configuration standards that I should probably get some background on
before I jump in. Can you point me to any getting started info on
that?

Thanks, Tim

Andrew Wills

unread,
Apr 1, 2009, 1:36:12 PM4/1/09
to cernunnos-...@googlegroups.com
Tim,

Thanks for asking.  ;-)

Take a look at these resources first:
  - Unicon.net article:  http://www.unicon.net/node/822
  - Slides from "Servlets & Portlets" presentation in Dallas:  http://www.ja-sig.org/wiki/download/attachments/22940141/cernunnos-servlets-portlets.pdf?version=1

Ultimately, I need to get this info into the manual and perhaps also the project wiki.

drew wills

logic...@gmail.com

unread,
Apr 1, 2009, 5:44:04 PM4/1/09
to Cernunnos Discussion
Thanks Drew. Good article.

I have moved on to the instructions at - http://cernunnos.googlecode.com/svn/manual/index.html
(Cernunnos & Maven)

Since I'm not adding to an existing project, I skipped straight to the
"Creating a New Project from Scratch" section. It appears that you
have to have the archetype already installed in your local repository
for these instructions to work. I am getting more familiar with Maven
by the minute, but I am a bit stuck on how to reference the jasig
repository without having an existing project pom to update. I
believe the .m2/settings.xml needs to be updated, but I have not had
much luck with that.

Right now, running the command:

mvn archetype:create -DarchetypeGroupId=com.googlecode.cernunnos -
DarchetypeArtifactId=cernunnos-webapp -DarchetypeVersion=1.0.0 -
DgroupId=blah -DartifactId=blah

Results in:
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'archetype'.
[INFO]
------------------------------------------------------------------------
[INFO] Building Maven Default Project
[INFO] task-segment: [archetype:create] (aggregator-style)
[INFO]
------------------------------------------------------------------------
[INFO] Setting property: classpath.resource.loader.class =>
'org.codehaus.plexus.velocity.ContextClassLoaderResourceLoader'.
[INFO] Setting property: velocimacro.messages.on => 'false'.
[INFO] Setting property: resource.loader => 'classpath'.
[INFO] Setting property: resource.manager.logwhenfound => 'false'.
[INFO] [archetype:create]
[WARNING] This goal is deprecated. Please use mvn archetype:generate
instead
[INFO] Defaulting package to group ID: blah
Downloading: http://repo1.maven.org/maven2/com/googlecode/cernunnos/cernunnos-webapp/1.0.0/cernunnos-webapp-1.0.0.jar
[INFO]
------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO]
------------------------------------------------------------------------
[INFO] Failed to resolve artifact.

GroupId: com.googlecode.cernunnos
ArtifactId: cernunnos-webapp
Version: 1.0.0

Reason: Unable to download the artifact from any repository


So, it does not appear to be searching the jasig repository. Any
advice would be appreciated.
Thanks, Tim




On Apr 1, 12:36 pm, Andrew Wills <wills.d...@gmail.com> wrote:
> Tim,
>
> Thanks for asking.  ;-)
>
> Take a look at these resources first:
>   - Unicon.net article:  http://www.unicon.net/node/822
>   - Slides from "Servlets & Portlets" presentation in Dallas:http://www.ja-sig.org/wiki/download/attachments/22940141/cernunnos-se...
>
> Ultimately, I need to get this info into the manual and perhaps also the
> project wiki.
>
> drew wills
>
> On Wed, Apr 1, 2009 at 9:28 AM, logiclan...@gmail.com <logiclan...@gmail.com

Andrew Wills

unread,
Apr 1, 2009, 5:55:17 PM4/1/09
to cernunnos-...@googlegroups.com
The cernunnos-webapp archetype was just added for the 1.1.0 release, so the command would have to be more like:

  > mvn archetype:create -DarchetypeGroupId=com.googlecode.cernunnos -DarchetypeArtifactId=cernunnos-webapp -DarchetypeVersion=1.1.0 -DgroupId=blah -DartifactId=blah

Or you could use "-DarchetypeVersion=1.1.0-SNAPSHOT" with a local checkout of the Cernunnos trunk/ (after running >mvn install).

In either case, you're right:  Maven on your machine must be able to resolve the com.googlecode.cernunnos:cernunnos-webapp artifact.  I think you're correct that you can configure the Jasig repo in your settings.xml file.

Alternately, you can obtain 1.1.0 from source and install it in your local repo as follows:

  > svn co http://cernunnos.googlecode.com/svn/tags/cernunnos-parent-1.1.0/
  > cd cernunnos-parent-1.1.0
  > mvn install

After that, the "-DarchetypeVersion=1.1.0" version of the command should work swimmingly.  :)

drew wills

logic...@gmail.com

unread,
Apr 1, 2009, 11:00:11 PM4/1/09
to Cernunnos Discussion
okay. i finally got this to work. i decided not to take the easy way
out... andy can vouch for the fact -- that is not my style.

anyway. i added the following to my .m2/settings.xml file. the
kicker that took me a while to realize is the activation section that
apparently enables the profile, but it is mystically not included in
any settings.xml samples that i could find. this might be a good
snippet to include in the crn manual... (by the way, looks like the
jasig repository has moved since the manual section on maven2 was
added.)

<profiles>
<profile>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<repositories>
<repository>
<id>jasig-m2</id>
<name>JASIG Maven2 Repository</name>
<url>http://developer.jasig.org/repo/content/
repositories/m2</url>
</repository>
</repositories>
</profile>
</profiles>


On Apr 1, 4:55 pm, Andrew Wills <wills.d...@gmail.com> wrote:
> The cernunnos-webapp archetype was just added for the 1.1.0 release, so the
> command would have to be more like:
>
>   > mvn archetype:create -DarchetypeGroupId=com.googlecode.cernunnos
> -DarchetypeArtifactId=cernunnos-webapp -DarchetypeVersion=1.1.0
> -DgroupId=blah -DartifactId=blah
>
> Or you could use "-DarchetypeVersion=1.1.0-SNAPSHOT" with a local checkout
> of the Cernunnos trunk/ (after running >mvn install).
>
> In either case, you're right:  Maven on your machine must be able to resolve
> the com.googlecode.cernunnos:cernunnos-webapp artifact.  I think you're
> correct that you can configure the Jasig repo in your settings.xml file.
>
> Alternately, you can obtain 1.1.0 from source and install it in your local
> repo as follows:
>
>   > svn cohttp://cernunnos.googlecode.com/svn/tags/cernunnos-parent-1.1.0/
>   > cd cernunnos-parent-1.1.0
>   > mvn install
>
> After that, the "-DarchetypeVersion=1.1.0" version of the command should
> work swimmingly.  :)
>
> drew wills
>
> On Wed, Apr 1, 2009 at 2:44 PM, logiclan...@gmail.com <logiclan...@gmail.com
> >http://repo1.maven.org/maven2/com/googlecode/cernunnos/cernunnos-weba...

logic...@gmail.com

unread,
Apr 3, 2009, 11:00:25 AM4/3/09
to Cernunnos Discussion
For the next step. I worked with Andy to get this operational on the
Mac. We had to change define-portlet.crn to resolve the path
correctly. This technique should work in both Windows and Mac:

change all references to - "${Attributes.ORIGIN}/.."

to this "${groovy(new File('${Attributes.ORIGIN}').getParentFile())}"

Drew, could you test if this works in Windows? If so, we could commit
the change.

On Apr 1, 10:00 pm, "logiclan...@gmail.com" <logiclan...@gmail.com>
wrote:

Andrew Wills

unread,
Apr 3, 2009, 11:23:05 AM4/3/09
to cernunnos-...@googlegroups.com
Tim,

Works perfectly.  Please go ahead and commit.

drew

Timothy Carroll

unread,
Apr 9, 2009, 8:56:24 PM4/9/09
to cernunnos-...@googlegroups.com
not sure i responded to this, but this was committed to the trunk a few plus days ago.
Reply all
Reply to author
Forward
0 new messages