You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by CodingPlayer <ro...@researchstudio.at> on 2006/08/01 15:47:31 UTC

Maven2 - Where to put script files?

Hi,

i just browsed through the standard directory layout for Maven2. 
http://maven.apache.org/guides/introduction/introduction-to-the-standard-directory-layout.html
here 

I still could not find out where to put my shell-scripts (batch-files), that
for example start my application from the CLI.


If anyone knows what is the "best practice" where to put these additional
.bat and .sh files, pls let me know.
(Since they are not needed in the classpath, i guess it is wrong to put them
into the resources directory.)

i would just need them for some assemblies, e.g. an assembly for a LINUX OS
would include some shell scripts (.sh), while an assembly for a WINDOWS OS
would include some batch files (.bat). Both of them would start up my
application/singular services.

regards
R.C.


-- 
View this message in context: http://www.nabble.com/Maven2---Where-to-put-script-files--tf2033674.html#a5594755
Sent from the Maven - Users forum at Nabble.com.


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


Re: Maven2 - Where to put script files?

Posted by veronymkroun <ve...@volny.cz>.
The book 'Maven - The Definitive Guide'
(www.sonatype.com/download.php?file=books/maven-definitive-guide.pdf) says: 

"When you are using the assembly plugin to produce a distribution for an
application as a ZIP or TAR, you might place all of you scripts in a
directory like src/main/command." (p. 235).


CodingPlayer wrote:
> 
> I still could not find out where to put my shell-scripts (batch-files),
> that for example start my application from the CLI.
> 
> If anyone knows what is the "best practice" where to put these additional
> .bat and .sh files, pls let me know.
> (Since they are not needed in the classpath, i guess it is wrong to put
> them into the resources directory.)
> 
> i would just need them for some assemblies, e.g. an assembly for a LINUX
> OS would include some shell scripts (.sh), while an assembly for a WINDOWS
> OS would include some batch files (.bat). Both of them would start up my
> application/singular services.
> 

-- 
View this message in context: http://www.nabble.com/Maven2---Where-to-put-script-files--tp5594755p25114844.html
Sent from the Maven - Users mailing list archive at Nabble.com.


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


Re: Maven2 - Where to put script files?

Posted by Nick Stolwijk <ni...@gmail.com>.
Created issue MNGSITE-75 and busy on a patch.

With regards,

Nick Stolwijk
~Java Developer~

Iprofs BV.
Claus Sluterweg 125
2012 WS Haarlem
www.iprofs.nl



On Wed, Dec 24, 2008 at 6:16 PM, Wendy Smoak <ws...@gmail.com> wrote:
> On Wed, Dec 24, 2008 at 10:13 AM, Nick Stolwijk <ni...@gmail.com> wrote:
>> If you take a look at the superpom [1] you'll see there is a default
>> script directory:
>>
>> <scriptSourceDirectory>src/main/scripts</scriptSourceDirectory>
>
> ... that needs to be added to
> http://maven.apache.org/guides/introduction/introduction-to-the-standard-directory-layout.html
>
> --
> Wendy
>
> ---------------------------------------------------------------------
> 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: Maven2 - Where to put script files?

Posted by Wendy Smoak <ws...@gmail.com>.
On Wed, Dec 24, 2008 at 10:13 AM, Nick Stolwijk <ni...@gmail.com> wrote:
> If you take a look at the superpom [1] you'll see there is a default
> script directory:
>
> <scriptSourceDirectory>src/main/scripts</scriptSourceDirectory>

... that needs to be added to
http://maven.apache.org/guides/introduction/introduction-to-the-standard-directory-layout.html

-- 
Wendy

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


Re: Maven2 - Where to put script files?

Posted by Nick Stolwijk <ni...@gmail.com>.
It all depends what you want to do with them.

Deliver them with your application? Use the assembly plugin to create a bundle.
Add them to the jar file? Configure the resource plugin to include the
src/main/scripts directory.

If it is any specific functionality, then you could write your own plugin.

Nick Stolwijk
~Java Developer~

Iprofs BV.
Claus Sluterweg 125
2012 WS Haarlem
www.iprofs.nl



On Wed, May 6, 2009 at 12:09 PM, Blackbird <pa...@yahoo.fr> wrote:
>
> I guess I'll have to write my own plugin..
>
>
> Nick Stolwijk-4 wrote:
>>
>> To put the files in src/main/scripts is the convention. It is then up
>> to the plugins to do something with them. Which plugin did you expect
>> to take your files?
>>
>> Hth,
>>
>> Nick Stolwijk
>> ~Java Developer~
>>
>> Iprofs BV.
>> Claus Sluterweg 125
>> 2012 WS Haarlem
>> www.iprofs.nl
>>
>
> --
> View this message in context: http://www.nabble.com/Maven2---Where-to-put-script-files--tp5594755p23403655.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> 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: Maven2 - Where to put script files?

Posted by Blackbird <pa...@yahoo.fr>.
I guess I'll have to write my own plugin..


Nick Stolwijk-4 wrote:
> 
> To put the files in src/main/scripts is the convention. It is then up
> to the plugins to do something with them. Which plugin did you expect
> to take your files?
> 
> Hth,
> 
> Nick Stolwijk
> ~Java Developer~
> 
> Iprofs BV.
> Claus Sluterweg 125
> 2012 WS Haarlem
> www.iprofs.nl
> 

-- 
View this message in context: http://www.nabble.com/Maven2---Where-to-put-script-files--tp5594755p23403655.html
Sent from the Maven - Users mailing list archive at Nabble.com.


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


Re: Maven2 - Where to put script files?

Posted by Nick Stolwijk <ni...@gmail.com>.
To put the files in src/main/scripts is the convention. It is then up
to the plugins to do something with them. Which plugin did you expect
to take your files?

Hth,

Nick Stolwijk
~Java Developer~

Iprofs BV.
Claus Sluterweg 125
2012 WS Haarlem
www.iprofs.nl



On Tue, May 5, 2009 at 5:34 PM, Blackbird <pa...@yahoo.fr> wrote:
>
> I've put a file in this directory, ran "mvn clean install", but the script
> file isn't copied anywhere in "target". What am I supposed to do after
> adding a file to "src/main/scripts"?
>
>
> Nick Stolwijk-4 wrote:
>>
>> If you take a look at the superpom [1] you'll see there is a default
>> script directory:
>>
>> <scriptSourceDirectory>src/main/scripts</scriptSourceDirectory>
>>
>> So I would say "convention over configuration" and use that one. (If
>> you'll write a maven plugin to handle the scripts, use the
>> scriptSourceDirectory instead of making your own variable setting.
>>
>> Hth,
>>
>> [1]
>> http://maven.apache.org/guides/introduction/introduction-to-the-pom.html
>>
>> Nick Stolwijk
>> ~Java Developer~
>>
>> Iprofs BV.
>> Claus Sluterweg 125
>> 2012 WS Haarlem
>> www.iprofs.nl
>>
>
> --
> View this message in context: http://www.nabble.com/Maven2---Where-to-put-script-files--tp5594755p23389966.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> 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: Maven2 - Where to put script files?

Posted by Blackbird <pa...@yahoo.fr>.
I've put a file in this directory, ran "mvn clean install", but the script
file isn't copied anywhere in "target". What am I supposed to do after
adding a file to "src/main/scripts"?


Nick Stolwijk-4 wrote:
> 
> If you take a look at the superpom [1] you'll see there is a default
> script directory:
> 
> <scriptSourceDirectory>src/main/scripts</scriptSourceDirectory>
> 
> So I would say "convention over configuration" and use that one. (If
> you'll write a maven plugin to handle the scripts, use the
> scriptSourceDirectory instead of making your own variable setting.
> 
> Hth,
> 
> [1]
> http://maven.apache.org/guides/introduction/introduction-to-the-pom.html
> 
> Nick Stolwijk
> ~Java Developer~
> 
> Iprofs BV.
> Claus Sluterweg 125
> 2012 WS Haarlem
> www.iprofs.nl
> 

-- 
View this message in context: http://www.nabble.com/Maven2---Where-to-put-script-files--tp5594755p23389966.html
Sent from the Maven - Users mailing list archive at Nabble.com.


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


Re: Maven2 - Where to put script files?

Posted by Nick Stolwijk <ni...@gmail.com>.
If you take a look at the superpom [1] you'll see there is a default
script directory:

<scriptSourceDirectory>src/main/scripts</scriptSourceDirectory>

So I would say "convention over configuration" and use that one. (If
you'll write a maven plugin to handle the scripts, use the
scriptSourceDirectory instead of making your own variable setting.

Hth,

[1] http://maven.apache.org/guides/introduction/introduction-to-the-pom.html

Nick Stolwijk
~Java Developer~

Iprofs BV.
Claus Sluterweg 125
2012 WS Haarlem
www.iprofs.nl



On Wed, Dec 24, 2008 at 5:09 PM, AsafM <as...@gmail.com> wrote:
>
> I'm contemplating this my self.
> Anyone has a solution?
>
>
> CodingPlayer wrote:
>>
>> thx for your reply, but i'm not sure what exactly you mean:
>>
>> <project_name>/scripts          or (since the scripts belong to the whole
>> project)
>>
>> <project_name>/src/scripts     or (since scripts are part of the source)
>>
>> <project_name>/src/main/scripts and
>> <project_name>/src/test/scripts (since scripts for runtime and tests
>> should be divided apart)
>>
>>
>
> --
> View this message in context: http://www.nabble.com/Maven2---Where-to-put-script-files--tp5594755p21156894.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> 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: Maven2 - Where to put script files?

Posted by AsafM <as...@gmail.com>.
I'm contemplating this my self.
Anyone has a solution?


CodingPlayer wrote:
> 
> thx for your reply, but i'm not sure what exactly you mean:
> 
> <project_name>/scripts          or (since the scripts belong to the whole
> project)
> 
> <project_name>/src/scripts     or (since scripts are part of the source)
> 
> <project_name>/src/main/scripts and
> <project_name>/src/test/scripts (since scripts for runtime and tests
> should be divided apart)
> 
> 

-- 
View this message in context: http://www.nabble.com/Maven2---Where-to-put-script-files--tp5594755p21156894.html
Sent from the Maven - Users mailing list archive at Nabble.com.


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


Re: Maven2 - Where to put script files?

Posted by CodingPlayer <ro...@researchstudio.at>.
thx for your reply, but i'm not sure what exactly you mean:

<project_name>/scripts          or (since the scripts belong to the whole
project)

<project_name>/src/scripts     or (since scripts are part of the source)

<project_name>/src/main/scripts and
<project_name>/src/test/scripts (since scripts for runtime and tests should
be divided apart)

-- 
View this message in context: http://www.nabble.com/Maven2---Where-to-put-script-files--tf2033674.html#a5596294
Sent from the Maven - Users forum at Nabble.com.


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


Re: Maven2 - Where to put script files?

Posted by Stefan Magnus Landrø <st...@gjensidige.no>.
I believe the scripts folder is the best place for this kind of stuff


CodingPlayer <ro...@researchstudio.at> skrev 01.08.2006 15:47:31:

> 
> Hi,
> 
> i just browsed through the standard directory layout for Maven2. 
> http://maven.apache.org/guides/introduction/introduction-to-the-
> standard-directory-layout.html
> here 
> 
> I still could not find out where to put my shell-scripts (batch-files), 
that
> for example start my application from the CLI.
> 
> 
> If anyone knows what is the "best practice" where to put these 
additional
> .bat and .sh files, pls let me know.
> (Since they are not needed in the classpath, i guess it is wrong to put 
them
> into the resources directory.)
> 
> i would just need them for some assemblies, e.g. an assembly for a LINUX 
OS
> would include some shell scripts (.sh), while an assembly for a WINDOWS 
OS
> would include some batch files (.bat). Both of them would start up my
> application/singular services.
> 
> regards
> R.C.
> 
> 
> -- 
> View this message in context: http://www.nabble.com/Maven2---Where-
> to-put-script-files--tf2033674.html#a5594755
> Sent from the Maven - Users forum at Nabble.com.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>