Hi Maveners,

I seem to have hit yet another Maven resource-related issue. I’ve got a project 
that doesn’t do anything non-standard with src/main/resources. (It’s the same 
project I was talking about a couple of days ago, but I haven’t, for example, 
used Hugi’s 'copy-resources’ hack yet to get logging.properties into the right 
place—I will sort that out later.) All I want to do is filter Properties on 
build so that some Maven-related properties are substituted with their 
build-time values. I’ve just added this to the POM:

    <resources>
      <resource>
        <targetPath>Resources</targetPath>
        <directory>${basedir}/src/main/resources</directory>
        <filtering>true</filtering>
      </resource>
    </resources>

At which point Eclipse loses its mind on application launch:

2017-06-25 05:00:28 Rescue[63636] DEBUG NSLog  - <WOProjectBundle>: Warning - 
Unable to find project at path 
/Users/paulh/Projects/WebObjects/GitRepos/Rescue/target/classes - Ignoring 
project.
[2017-6-25 5:0:28 UTC] <main> com.webobjects.foundation.NSForwardException 
[java.lang.StringIndexOutOfBoundsException] String index out of range: 
-1:java.lang.StringIndexOutOfBoundsException: String index out of range: -1
        at 
com.webobjects._ideservices._IDEProjectWOLips.wolipsProjectFromEclipseProject(_IDEProjectWOLips.java:78)
        at 
com.webobjects._ideservices._IDEProjectWOLips.wolipsProjectAtPath(_IDEProjectWOLips.java:87)
        at 
com.webobjects._ideservices._WOProject.ideProjectAtPath(_WOProject.java:110)
        at 
com.webobjects.appserver._private.WOProjectBundle._isProjectBundlePath(WOProjectBundle.java:226)

This happens a few times, and the application fails to launch because it can’t 
find any of the components. Indeed, the layout under target/classes does look 
very different based on whether that resource block is present in the POM, but 
I’ve done this in other projects and it works fine. To be clear, the built 
bundle looks fine if I manually run ‘mvn package’, it’s just Eclipse that can’t 
seem to launch the app.

Hugi—you seen this before? Any guesses?


-- 
Paul Hoadley
http://logicsquad.net/
https://www.linkedin.com/company/logic-squad/



 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to