Hi All,
Happy new year to everyone. I've got some newbie questions about WO & Maven. I
have what appears to be a working installation currently with the following
components:
Mac OS X 10.6 + Java 1.6 + WebObjects 5.4.3 + Maven 2.2.1
Eclipse 3.6.1 + WOLips 3.6.6215 + m2Eclipse 0.12.0.20101115-1102
Wonder (rev. 11847)
The installation went smoothly as far as I can tell. I was able to get Maven
installed, added the settings.xml [1] and archetype-catalog.xml [2] as outlined
in the wiki and installed the WO libraries using mvn wobootstrap:install. I
then checked out Wonder and installed it to my local repository using mvn clean
install -P wo54. Everything looks okay at this point.
But I'm having some issues for which I think I just need some reassurance that
this is how things are supposed to work, or that these are indeed valid
concerns that I need to fix (a nudge in the right direction would also be
appreciated).
#1: When I launch Eclipse, the console always shows errors when trying to
update the index for the wocommunity repositories:
Unable to update index for
wocommunity.snapshots|http://maven.wocommunity.org/content/groups/public-snapshots
Unable to update index for
wocommunity.releases|http://maven.wocommunity.org/content/groups/public
Do these messages indicate something amiss in my environment, or are they safe
to ignore? By the way, the central repository index at
http://repo1.maven.org/maven2 is updated without error.
#2: Whenever I create a new Maven project using m2eclipse, Eclipse throws up an
error panel telling me the project failed to create, although a project is
created (but it seems to be missing some info). Here are the steps I follow:
1. select File > New > Maven Project, which brings up the New Maven
Project wizard.
2. fill in the project's location and working set and click 'Next'
3. pick the erxapplication-archetype (2.1-SNAPSHOT version) and advance
to next step
4. fill in the required info (WebObjectsVersion and WonderVersion are
already filled in.
5. click on 'Finish
And then I get the aforementioned error panel. Looking in Eclipse's error log,
I see the following:
eclipse.buildId=M20100909-0800
java.version=1.6.0_22
java.vendor=Apple Inc.
BootLoader constants: OS=macosx, ARCH=x86_64, WS=cocoa, NL=en_US
Framework arguments: -keyring /Users/fez/.eclipse_keyring -showlocation
Command-line arguments: -os macosx -ws cocoa -arch x86_64 -keyring
/Users/fez/.eclipse_keyring -showlocation
Error
Sun Jan 02 17:35:03 CST 2011
The specified class for ResourceManager
(org.apache.velocity.runtime.resource.ResourceManagerImpl) does not implement
org.apache.velocity.runtime.resource.ResourceManager; Velocity is not
initialized correctly.
java.lang.Exception: The specified class for ResourceManager
(org.apache.velocity.runtime.resource.ResourceManagerImpl) does not implement
org.apache.velocity.runtime.resource.ResourceManager; Velocity is not
initialized correctly.
at
org.apache.velocity.runtime.RuntimeInstance.initializeResourceManager(RuntimeInstance.java:589)
at org.apache.velocity.runtime.RuntimeInstance.init(RuntimeInstance.java:241)
at org.apache.velocity.app.VelocityEngine.init(VelocityEngine.java:116)
at
org.objectstyle.wolips.templateengine.TemplateEngine.init(TemplateEngine.java:126)
at
org.objectstyle.wolips.templateengine.ProjectTemplate.createProjectContents(ProjectTemplate.java:236)
at
org.objectstyle.wolips.builder.internal.WOIncrementalBuilder.createInfoPlist(WOIncrementalBuilder.java:242)
at
org.objectstyle.wolips.builder.internal.WOIncrementalBuilder.invokeOldBuilder(WOIncrementalBuilder.java:191)
at
org.objectstyle.wolips.core.resources.internal.build.Builder.invokeOldBuilder(Builder.java:214)
at
org.objectstyle.wolips.core.resources.internal.build.Builder.build(Builder.java:131)
at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:629)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at
org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:172)
at
org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:203)
at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:255)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at
org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:258)
at
org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:311)
at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:343)
at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:144)
at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:242)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Despite the error message, a project is created, but it looks suspect (e.g.
there are no source folders in the project, so the project tree looks like a
hierarchy of folders and files). BUT, if I right-click on the project and
select Maven > Update Project Configuration, it looks like it gets fixed (I see
source folders in the project and I'm able to build and run the app).
Is this indicative of a problem in my current installation about which I
should be worried?
#3: After choosing Update Project Configuration, I have what appears to be a
valid project. I can add dependencies [3] and build and run a WO app
successfully. But, there are some log messages in the console that I'm not sure
about. I get the following messages (which I'm guessing are the result of using
jar bundles instead of framework bundles):
- Can't get path when run as jar: ERJavaMail - Properties
- Can't get path when run as jar: ERJavaMail - Properties.dev
- Can't get path when run as jar: ERJavaMail - Properties.fez
The messages appear for all of the frameworks that are calculated as
dependencies for the project. On top of that, the entire set of messages
repeats a few more times in the console.
Are these messages the norm when using jar frameworks with maven, or should I
be worried about this too?
Other than the above three issues, my test app seems to build and run.
Admittedly I haven't tried anything terribly complex yet.
Thanks for any answers, insights or pointers.
Fez
-----
[1]
http://wiki.objectstyle.org/confluence/download/attachments/3048235/settings.xml?version=2&modificationDate=1239222185000
[2]
http://wiki.objectstyle.org/confluence/download/attachments/3048169/archetype-catalog.xml?version=4&modificationDate=1248703924000
[3] initially my local maven folder ($HOME/.m2) was symlinked to another
location and none of the artifacts in my local repository were showing up when
I was adding dependencies. After rebuilding the index on my local repo from the
Maven Repositories view in Eclipse, things started working better. I don't
know if this was related to my particular setup or not, but I've since moved
away from symlinking my maven folder.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com
This email sent to [email protected]