Re: Maven's current working directory and changing resources location ...

2007-11-06 Thread Dimitris Kapanidis

Dimitris Kapanidis wrote:

KedarMhaswade wrote:

Thank you. I somehow misread "directory" as an attribute of .

Regards,
Kedar

Saritha SV wrote:
 

Hi

For changing Resources  location you can give the following :



  
src/main/java

  

  




This in my case cannot work, as the dependency is a module of the same 
project (it is an applet that needs to be put inside a war)


I tried it with maven-dependency-plugin injecting the dependency in 
the correct directory. All went well until the time of the release. 
During the release it was giving me a dependency not found error, 
since it was not installed yet (it is included in the same release). 
So I rejected that solution and went to maven-assembly-plugin. (hooked 
assembly in package and set "pom" packaging type).


Here is a more detailed description of my solution, maybe it can work in 
your case too:

...
   pom
...
   
   maven-assembly-plugin
   
   false
  
  
src/main/config/assemble/webapp.xml

  
   
   
   
   make-assembly
   package

   
   single  
   
   
   
   
...

and webapp.xml is:


   webapp
   
   war
   


 
   
   artifactName 
   
   provided
   filename
   


You have to define the dependency in the pom.xml also. Hope it helps, 
although I don't consider it a clean solution.


Somewhere I read if I remember correclty that in the release plugin 
you should put install in the preparationGoals in special cases like 
this, but never tried it. Anyone had any similar problems?




and place the properties file in  the directory src/main/java .

Then the properties file   will be  incuded in your generated jar 
file .


Thanks
Saritha SV



On 11/5/07, KedarMhaswade <[EMAIL PROTECTED]> wrote:
   

I have two questions, answers to which were not obvious.

1- What is the current working directory (i.e.
System.getProperty("user.dir"))? Can this be printed
   when one does "mvn -X ..."?
2- In our company we have resources (properties files for resource
bundles)
along side the Java sources
   because we have an ongoing strategy for Localized Strings where the
developers prefer to keep the
   strings used by com.example.Foo at the same location in a file 
named

"LocalStrings.properties".
   I added:

   
 
   


  for my resources to get copied into target folder upon "mvn 
package".

But
I get:
  Project ID: org.bykedar:learnmvn
POM Location: /Users/kedar/Personal/bnevins/projects/learnmvn/pom.xml
Validation Messages:

   [0]  'build.resources.resource.directory' is missing.


Reason: Failed to validate POM for project org.bykedar:learnmvn at
/Users/kedar/Personal/bnevins/projects/learnmvn/pom.xml

  Is there  an example somewhere of how to do this?

Thanks,

Kedar
--
View this message in context:
http://www.nabble.com/Maven%27s-current-working-directory-and-changing-resources-location-...-tf4752607s177.html#a13589892 


Sent from the Maven - Users mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


  



  



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





--
Dimitris Kapanidis
Software Q.A. Manager

Scytl Secure Electronic Voting
Tuset 20 - 08006 Barcelona
Phone: + 34 934 230 324
Fax:   + 34 933 251 028
http://www.scytl.com

NOTICE: The information in this e-mail and in any of its attachments is 
confidential and intended solely for the attention and use of the named 
addressee(s). If you are not the intended recipient, any disclosure, copying, 
distribution or retaining of this message or any part of it, without the prior 
written consent of Scytl Secure Electronic Voting, SA is prohibited and may be 
unlawful. If you have received this in error, please contact the sender and 
delete the material from any computer.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Maven's current working directory and changing resources location ...

2007-11-06 Thread Dimitris Kapanidis

KedarMhaswade wrote:

Thank you. I somehow misread "directory" as an attribute of .

Regards,
Kedar

Saritha SV wrote:
  

Hi

For changing Resources  location you can give the following :



  
src/main/java

  

  




This in my case cannot work, as the dependency is a module of the same 
project (it is an applet that needs to be put inside a war)


I tried it with maven-dependency-plugin injecting the dependency in the 
correct directory. All went well until the time of the release. During 
the release it was giving me a dependency not found error, since it was 
not installed yet (it is included in the same release). So I rejected 
that solution and went to maven-assembly-plugin. (hooked assembly in 
package and set "pom" packaging type).


Somewhere I read if I remember correclty that in the release plugin you 
should put install in the preparationGoals in special cases like this, 
but never tried it. Anyone had any similar problems?




and place the properties file in  the directory src/main/java .

Then the properties file   will be  incuded in your generated jar file .

Thanks
Saritha SV



On 11/5/07, KedarMhaswade <[EMAIL PROTECTED]> wrote:


I have two questions, answers to which were not obvious.

1- What is the current working directory (i.e.
System.getProperty("user.dir"))? Can this be printed
   when one does "mvn -X ..."?
2- In our company we have resources (properties files for resource
bundles)
along side the Java sources
   because we have an ongoing strategy for Localized Strings where the
developers prefer to keep the
   strings used by com.example.Foo at the same location in a file named
"LocalStrings.properties".
   I added:

   
 
   


  for my resources to get copied into target folder upon "mvn package".
But
I get:
  Project ID: org.bykedar:learnmvn
POM Location: /Users/kedar/Personal/bnevins/projects/learnmvn/pom.xml
Validation Messages:

   [0]  'build.resources.resource.directory' is missing.


Reason: Failed to validate POM for project org.bykedar:learnmvn at
/Users/kedar/Personal/bnevins/projects/learnmvn/pom.xml

  Is there  an example somewhere of how to do this?

Thanks,

Kedar
--
View this message in context:
http://www.nabble.com/Maven%27s-current-working-directory-and-changing-resources-location-...-tf4752607s177.html#a13589892
Sent from the Maven - Users mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


  



  



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Maven's current working directory and changing resources location ...

2007-11-05 Thread KedarMhaswade


Thank you. I somehow misread "directory" as an attribute of .

Regards,
Kedar

Saritha SV wrote:
> 
> Hi
> 
> For changing Resources  location you can give the following :
> 
> 
> 
>   
> src/main/java
> 
>   
> 
>   
> 
> and place the properties file in  the directory src/main/java .
> 
> Then the properties file   will be  incuded in your generated jar file .
> 
> Thanks
> Saritha SV
> 
> 
> 
> On 11/5/07, KedarMhaswade <[EMAIL PROTECTED]> wrote:
>>
>>
>> I have two questions, answers to which were not obvious.
>>
>> 1- What is the current working directory (i.e.
>> System.getProperty("user.dir"))? Can this be printed
>>when one does "mvn -X ..."?
>> 2- In our company we have resources (properties files for resource
>> bundles)
>> along side the Java sources
>>because we have an ongoing strategy for Localized Strings where the
>> developers prefer to keep the
>>strings used by com.example.Foo at the same location in a file named
>> "LocalStrings.properties".
>>I added:
>> 
>>
>>  
>>
>> 
>>
>>   for my resources to get copied into target folder upon "mvn package".
>> But
>> I get:
>>   Project ID: org.bykedar:learnmvn
>> POM Location: /Users/kedar/Personal/bnevins/projects/learnmvn/pom.xml
>> Validation Messages:
>>
>>[0]  'build.resources.resource.directory' is missing.
>>
>>
>> Reason: Failed to validate POM for project org.bykedar:learnmvn at
>> /Users/kedar/Personal/bnevins/projects/learnmvn/pom.xml
>>
>>   Is there  an example somewhere of how to do this?
>>
>> Thanks,
>>
>> Kedar
>> --
>> View this message in context:
>> http://www.nabble.com/Maven%27s-current-working-directory-and-changing-resources-location-...-tf4752607s177.html#a13589892
>> Sent from the Maven - Users mailing list archive at Nabble.com.
>>
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Maven%27s-current-working-directory-and-changing-resources-location-...-tf4752607s177.html#a13592426
Sent from the Maven - Users mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Maven's current working directory and changing resources location ...

2007-11-05 Thread Saritha SV
Hi

For changing Resources  location you can give the following :



  
src/main/java

  

  

and place the properties file in  the directory src/main/java .

Then the properties file   will be  incuded in your generated jar file .

Thanks
Saritha SV



On 11/5/07, KedarMhaswade <[EMAIL PROTECTED]> wrote:
>
>
> I have two questions, answers to which were not obvious.
>
> 1- What is the current working directory (i.e.
> System.getProperty("user.dir"))? Can this be printed
>when one does "mvn -X ..."?
> 2- In our company we have resources (properties files for resource
> bundles)
> along side the Java sources
>because we have an ongoing strategy for Localized Strings where the
> developers prefer to keep the
>strings used by com.example.Foo at the same location in a file named
> "LocalStrings.properties".
>I added:
> 
>
>  
>
> 
>
>   for my resources to get copied into target folder upon "mvn package".
> But
> I get:
>   Project ID: org.bykedar:learnmvn
> POM Location: /Users/kedar/Personal/bnevins/projects/learnmvn/pom.xml
> Validation Messages:
>
>[0]  'build.resources.resource.directory' is missing.
>
>
> Reason: Failed to validate POM for project org.bykedar:learnmvn at
> /Users/kedar/Personal/bnevins/projects/learnmvn/pom.xml
>
>   Is there  an example somewhere of how to do this?
>
> Thanks,
>
> Kedar
> --
> View this message in context:
> http://www.nabble.com/Maven%27s-current-working-directory-and-changing-resources-location-...-tf4752607s177.html#a13589892
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>