• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Maven Resource / WebServerResource Flattening
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Maven Resource / WebServerResource Flattening


  • Subject: Re: Maven Resource / WebServerResource Flattening
  • From: Andrew Lindesay <email@hidden>
  • Date: Fri, 24 Jul 2009 13:18:20 +1200

Hi Lachlan;

Thanks -- Henrique actually replied to me off-list and I should have copied to list (see below). Now I have a "war" issue where WO doesn't take a straight directory with "Resources/Info.plist" to be a bundle. So actual builds work, but development with Eclipse WTP fails to run as it expects to launch the servlet in Jetty from a directory of resources and classes. Note sure how you "war" build guys get around this. I registered an issue with Apple on this.

cheers.

The maven-wolifecycle-plugin (the one responsible for WO application and framework packaging) has a configuration named "flattenResources". If you change this property to true, the resources inside src/main/resources (or other defined resources folder like Resources) will be flattened respecting components, models and localizable folders. Here is an example of the configuration you have to add to your pom.xml inside the <build> section:

<plugin>
	<groupId>org.objectstyle.woproject.maven2</groupId>
	<artifactId>maven-wolifecycle-plugin</artifactId>
	<version>2.0.17</version>
	<extensions>true</extensions>
	<configuration>
		<flattenResources>true</flattenResources>
	</configuration>
</plugin>

If you are using Maven to package the application as a WAR, there is no special plug-in like the wolifecycle. So, there is no special option to flatten resources using the default maven-war-plugin. You have to create a rule for each subfolder in the resources folder to achieve the same goal in the "Maven way". Here is an example of how to "flatten" the resources inside the folder src/main/webserver- resources/images to the WebServerResources folder:

<resource>
	<targetPath>WebServerResources</targetPath>
	<directory>
		${basedir}/src/main/webserver-resources/images
	</directory>
	<includes>
		<include>*.jpg</include>
		<include>*.gif</include>
	</includes>
</resource>

You can find more information about this subject in the end of this tutorial [1] in the WOProject Wiki. BTW, we are planning to write a special plug-in to handle true WAR packaging in the future.

___ Andrew Lindesay www.lindesay.co.nz

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Maven Resource / WebServerResource Flattening
      • From: Henrique Prange <email@hidden>
References: 
 >Maven Resource / WebServerResource Flattening (From: Andrew Lindesay <email@hidden>)
 >Re: Maven Resource / WebServerResource Flattening (From: Lachlan Deck <email@hidden>)

  • Prev by Date: Re: Maven Resource / WebServerResource Flattening
  • Next by Date: Re: [SOLVED] Re: failed to provide new primary keys for entity
  • Previous by thread: Re: Maven Resource / WebServerResource Flattening
  • Next by thread: Re: Maven Resource / WebServerResource Flattening
  • Index(es):
    • Date
    • Thread