You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by john redden <jr...@matrix-consultants.com> on 2010/08/25 20:04:56 UTC

packaging php files in jar

Peer Maven users,

I have a new project where the top scheduling half is a Java app that
executes php scripts on various criteria.  I want to package the php
files in the jar along with all the usual suspects.

I can get my php files into the target directory, but can't seem to get
them automatically included in a jar file. The Java structure is as it
should be.

The pom.xml is attached

Any suggestions?   Many thanks in advance.

-John R.



Re: packaging php files in jar

Posted by Wayne Fay <wa...@gmail.com>.
> The pom.xml is attached
>
> Any suggestions?   Many thanks in advance.

Perhaps try using the build-helper-m-p specifically add-source or
add-resource mojo instead of current configuration you're doing with
m-resources-p and m-jar-p.
http://mojo.codehaus.org/build-helper-maven-plugin/add-source-mojo.html

Wayne

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: packaging php files in jar

Posted by john redden <jr...@matrix-consultants.com>.
Bingo!

Thanks,  I haven't had enough coffee ...

-John R.


On Wed, 2010-08-25 at 21:47 +0300, Manos Batsis wrote:
> On 08/25/2010 09:04 PM, john redden wrote:
> > Peer Maven users,
> >
> > I have a new project where the top scheduling half is a Java app that
> > executes php scripts on various criteria.  I want to package the php
> > files in the jar along with all the usual suspects.
> >
> > I can get my php files into the target directory, but can't seem to get
> > them automatically included in a jar file. The Java structure is as it
> > should be.
> >
> > The pom.xml is attached
> >
> 
> Where are your PHP files stored? I think they will automatically be 
> included in the jar if stored in src/main/resources, although I'd 
> probably put them in src/main/php and then
> 
>    <build>
>      ...
>      <resources>
>        <resource>
>          <directory> src/main/php</directory>
>          <includes>
>            <include>**/*.php</include>
>          </includes>
>        </resource>
>        ...
>      </resources>
>      ...
>    </build>
> 
> For the record, I've had too much coffee.
> 
> Manos
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: packaging php files in jar

Posted by Manos Batsis <ma...@geekologue.com>.
On 08/25/2010 09:04 PM, john redden wrote:
> Peer Maven users,
>
> I have a new project where the top scheduling half is a Java app that
> executes php scripts on various criteria.  I want to package the php
> files in the jar along with all the usual suspects.
>
> I can get my php files into the target directory, but can't seem to get
> them automatically included in a jar file. The Java structure is as it
> should be.
>
> The pom.xml is attached
>

Where are your PHP files stored? I think they will automatically be 
included in the jar if stored in src/main/resources, although I'd 
probably put them in src/main/php and then

   <build>
     ...
     <resources>
       <resource>
         <directory> src/main/php</directory>
         <includes>
           <include>**/*.php</include>
         </includes>
       </resource>
       ...
     </resources>
     ...
   </build>

For the record, I've had too much coffee.

Manos

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org