Re: Maven build - webserver resources in frameworks
Re: Maven build - webserver resources in frameworks
- Subject: Re: Maven build - webserver resources in frameworks
- From: Dennis Scheffer via Webobjects-dev <email@hidden>
- Date: Thu, 5 Mar 2020 17:05:29 +0100
Hi,
I have to admit that I do not fully understand why you would need to do this
but you can just inject a Maven plugin into your build process.
A suitable lifecycle phase that runs before packaging would be process-classes.
Add this below your wolifecycle plugin declaration:
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.8</version>
<executions>
<execution>
<id>move-frameworks-directory</id>
<phase>process-classes</phase>
<configuration>
<target>
<move
file="target/${project.build.finalName}.woa/Contents/Frameworks"
tofile="target/${project.build.finalName}.woa/Frameworks"/>
</target>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
You can also choose to 'lift' specific frameworks by adding more 'move'
commands.
With regards
--
Dennis Scheffer
> On 5. Mar 2020, at 16:44, Steven Meyer via Webobjects-dev
> <email@hidden> wrote:
>
> Greetings,
>
> I’m in the middle of converting a group of fairly ancient applications from
> Ant builds to Maven. The process has been remarkably smooth, but I’m caught
> on the issue referenced in the subject.
>
> Our existing ant builds result in the following structure in the web server
> resources portion of the split artifiact
>
> MyApp.woa
> Contents
> WebserverResources
> <application WS resources>
> Frameworks
> MyFramework.framework
> WebserverResources
> <framework WS resources>
>
> which is expected because the “split” target in build.xml deliberately lifts
> Frameworks from under Contents and makes it a sibling. As far as I can tell,
> that’s still standard behavior.
>
> The wolifecycle-maven-plugin doesn’t seem to do that, so the web server
> resources portion of the split artifact looks like this
>
> MyApp.woa
> Contents
> WebserverResources
> <application WS resources>
> Frameworks
> MyFramework.framework
> WebserverResources
> <framework WS resources>
>
> The app is still generating resource URLs like
> "/WebObjects/MyApp.woa/Frameworks/MyFramework.framework/WebServerResources/images/myImage.png”
> which are unsurprisingly failing.
>
> I don’t see any way of configuring wolifecycle-maven-plugin, so I’m looking
> at how to change how those generated URLs look. Was hoping our old friend
> frameworksBaseURL() might help, but it doesn’t seem to.
>
> Looking for ideas,
>
> Steve
>
> _______________________________________________
> 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
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
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