Re: how to tell if a packaging is classpath

2011-07-12 Thread Brett Porter

On 11/07/2011, at 9:04 PM, Benson Margulies wrote:

 
 Why is it doing this at all?
 
 Jörg,
 
 Honestly, I have no idea -- I just happened to spot it on the way by.
 And when I thought some more, I realized that my question is
 mis-stated. The issue here isn't classpath, it's more related to
 yours: What's the configured java src directory, and is there anything
 in it?

Right, a WAR is not on the classpath, but it still would want a JXR report.

An alternative would be 
project.getArtifact().getArtifactHandler().getLanguage() to only generate for 
Java - but I guess there's still a chance that someone packages something 
differently and still wants the sources scanned. For now they'd use skip if 
they don't.

I was pretty sure it didn't generate if there were no source directories 
already though... based on both the regular and generated ones. So I'm not sure 
what problem you're working on?

- Brett

--
Brett Porter
br...@apache.org
http://brettporter.wordpress.com/
http://au.linkedin.com/in/brettporter





-
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org



Re: how to tell if a packaging is classpath

2011-07-12 Thread Benson Margulies
Brett,

I'm not working on a problem -- well, to be exact, there was an NPE in
the code in question, but that's fixed. I happened to see this code
while working on 'aggregate' and I wondered if it was entirely
satisfactory.

--benson


On Tue, Jul 12, 2011 at 3:03 AM, Brett Porter br...@apache.org wrote:

 On 11/07/2011, at 9:04 PM, Benson Margulies wrote:


 Why is it doing this at all?

 Jörg,

 Honestly, I have no idea -- I just happened to spot it on the way by.
 And when I thought some more, I realized that my question is
 mis-stated. The issue here isn't classpath, it's more related to
 yours: What's the configured java src directory, and is there anything
 in it?

 Right, a WAR is not on the classpath, but it still would want a JXR report.

 An alternative would be 
 project.getArtifact().getArtifactHandler().getLanguage() to only generate for 
 Java - but I guess there's still a chance that someone packages something 
 differently and still wants the sources scanned. For now they'd use skip if 
 they don't.

 I was pretty sure it didn't generate if there were no source directories 
 already though... based on both the regular and generated ones. So I'm not 
 sure what problem you're working on?

 - Brett

 --
 Brett Porter
 br...@apache.org
 http://brettporter.wordpress.com/
 http://au.linkedin.com/in/brettporter





 -
 To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
 For additional commands, e-mail: dev-h...@maven.apache.org



-
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org



Re: how to tell if a packaging is classpath

2011-07-12 Thread Brett Porter

On 12/07/2011, at 8:13 PM, Benson Margulies wrote:

 Brett,
 
 I'm not working on a problem -- well, to be exact, there was an NPE in
 the code in question, but that's fixed. I happened to see this code
 while working on 'aggregate' and I wondered if it was entirely
 satisfactory.

Cool - it's the same pattern used in other plugins, so it's probably been 
replicated. The getLanguage field hasn't been widely used so I don't think it 
was put in place here (or maybe was in the past and taken out again for some 
limitation). I'd say it's fine.

- Brett

--
Brett Porter
br...@apache.org
http://brettporter.wordpress.com/
http://au.linkedin.com/in/brettporter





-
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org



Re: how to tell if a packaging is classpath

2011-07-11 Thread Jörg Schaible
Hi Benson,

Benson Margulies wrote:

 In the jxr plugin, I see:
 
 if ( !pom.equals( getProject().getPackaging().toLowerCase() ) )
 {
 l.addAll( sourceDirs );
 }
 
 This can't be good, can it? Isn't there some way to tell what are the
 classpath packagings?

Why is it doing this at all? Isn't the existing of src/main/java enough? I 
can build empty jars (resp. jars with only resources), I may use pom and 
build an attached jar with Java sources, ... 

- Jörg



-
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org



Re: how to tell if a packaging is classpath

2011-07-11 Thread Benson Margulies

 Why is it doing this at all?

 Jörg,

Honestly, I have no idea -- I just happened to spot it on the way by.
And when I thought some more, I realized that my question is
mis-stated. The issue here isn't classpath, it's more related to
yours: What's the configured java src directory, and is there anything
in it?


 Isn't the existing of src/main/java enough? I
 can build empty jars (resp. jars with only resources), I may use pom and
 build an attached jar with Java sources, ...

 - Jörg



 -
 To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
 For additional commands, e-mail: dev-h...@maven.apache.org



-
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org



Re: how to tell if a packaging is classpath

2011-07-11 Thread Stephen Connolly
http://mojo.codehaus.org/build-helper-maven-plugin/xref/org/codehaus/mojo/buildhelper/AddSourceMojo.html#67

Don't limit yourself to just one directory...

And then if this is not a Java based project, those directories might
be not holding .java files...

On 11 July 2011 12:04, Benson Margulies bimargul...@gmail.com wrote:

 Why is it doing this at all?

  Jörg,

 Honestly, I have no idea -- I just happened to spot it on the way by.
 And when I thought some more, I realized that my question is
 mis-stated. The issue here isn't classpath, it's more related to
 yours: What's the configured java src directory, and is there anything
 in it?


  Isn't the existing of src/main/java enough? I
 can build empty jars (resp. jars with only resources), I may use pom and
 build an attached jar with Java sources, ...

 - Jörg



 -
 To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
 For additional commands, e-mail: dev-h...@maven.apache.org



 -
 To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
 For additional commands, e-mail: dev-h...@maven.apache.org



-
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org



Re: how to tell if a packaging is classpath

2011-07-11 Thread Jörg Schaible
Stephen Connolly wrote:

 http://mojo.codehaus.org/build-helper-maven-
plugin/xref/org/codehaus/mojo/buildhelper/AddSourceMojo.html#67
 
 Don't limit yourself to just one directory...

Yeah, but this raises the question, if a JXR report over generated Java 
sources is actually wanted.

 And then if this is not a Java based project, those directories might
 be not holding .java files...

No Java source - no report :)

Cheers,
Jörg



-
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org



Re: how to tell if a packaging is classpath

2011-07-11 Thread Stephen Connolly
On 11 July 2011 12:37, Jörg Schaible joerg.schai...@scalaris.com wrote:
 Stephen Connolly wrote:

 http://mojo.codehaus.org/build-helper-maven-
 plugin/xref/org/codehaus/mojo/buildhelper/AddSourceMojo.html#67

 Don't limit yourself to just one directory...

 Yeah, but this raises the question, if a JXR report over generated Java
 sources is actually wanted.

Hell yes. If I want to see the source I don't want to spend hours
trying to wonder why I cannot see the XYZ file's source anywhere only
to find that its generated source...


 And then if this is not a Java based project, those directories might
 be not holding .java files...

 No Java source - no report :)

 Cheers,
 Jörg



 -
 To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
 For additional commands, e-mail: dev-h...@maven.apache.org



-
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org