Re: How to debug/download dependency source code using mvn ...

2008-11-22 Thread KedarMhaswade

Thank you for your response!


dchicks wrote:
 
 If the sources got downloaded, they would be in your repository - 
 usually alongside the binary jar file with a source label in the 
 name.  You do still have to put that jar on your classpath in order to 
 debug into it - or somehow tell NetBeans where the source is located.  
 (I'm an Eclipse user, so I don't know that part.)
 
Hmmm. Sadly, when I do mvn -DdownloadSources=true install, no source
jars get downloaded to the maven local repo. For commons-io and
commons-fileupload,
the sources are present at
http://repo2.maven.org/maven2/commons-io/commons-io/1.4/
(and correspondingly for commons-fileupload), but it does not find its way
to local repo. Only class-jars get downloaded.

Surprisingly, if I did idea:idea -DdownloadSources=true, in addition to
generating the IDEA project, it downloads those -sources.jar files! So, it
seems that maven-idea-plugin takes this -DdownloadSources=true into
account correctly, whereas standard install plugin ignores it.


dchicks wrote:
 
 Sometimes, there is no source jar available for a given dependency.  In 
 that case, not sure what to tell you.  I suppose you can pull down the 
 source from the commons project and get it into your classpath through 
 some other mechanism.
 

Yeah, that's the tough part. How do you achieve this with Eclipse? In
NetBeans 6.5,
it was not evident.

-Kedar

-- 
View this message in context: 
http://www.nabble.com/How-to-debug-download-dependency-source-code-using-mvn-...-tp20641814p20642626.html
Sent from the Maven - Users mailing list archive at Nabble.com.


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



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

2007-11-05 Thread KedarMhaswade

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:
  build
resources
  resource directory=src/main/java/
/resources
  /build

   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]



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 resource.

Regards,
Kedar

Saritha SV wrote:
 
 Hi
 
 For changing Resources  location you can give the following :
 
 build
 resources
   resource
 directorysrc/main/java/directory
 
   /resource
 /resources
   /build
 
 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:
 build
resources
  resource directory=src/main/java/
/resources
 /build

   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]