You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by Vincent Massol <vm...@pivolis.com> on 2003/06/19 12:32:32 UTC

Why is the java source directory named "main" for plugins?

Hi,

Why is the java source directory named "main" for plugins (instead of
"java")?

Thanks
-Vincent


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


RE: Why is the java source directory named "main" for plugins?

Posted by Jason van Zyl <ja...@zenplex.com>.
On Thu, 2003-06-19 at 09:23, Vincent Massol wrote:
> > -----Original Message-----
> > From: Jason van Zyl [mailto:jason@zenplex.com]
> > Sent: 19 June 2003 15:02
> > To: Maven Developers List
> > Subject: Re: Why is the java source directory named "main" for
> plugins?
> > 
> > On Thu, 2003-06-19 at 06:32, Vincent Massol wrote:
> > > Hi,
> > >
> > > Why is the java source directory named "main" for plugins (instead
> of
> > > "java")?
> > 
> > /src/test
> > /src/main
> > 
> > Seem to make more sense as a pattern as the testing code is also
> 'java'
> > code.
> 
> Ok, my comment wasn't about whether the name made more sense or not
> about consistency. At present we use src/java everywhere else and
> everyone I know who uses maven also uses this convention. 
> 
> In cvs we also src/java for Maven...

Then for consistency and a sensible layout I would like to advocate
src/main before the 1.0 release.


> -Vincent
> 
> > 
> > > Thanks
> > > -Vincent
> > >
> > >
> > >
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> > > For additional commands, e-mail: dev-help@maven.apache.org
> > --
> > jvz.
> > 
> > Jason van Zyl
> > jason@zenplex.com
> > http://tambora.zenplex.org
> > 
> > In short, man creates for himself a new religion of a rational
> > and technical order to justify his work and to be justified in it.
> > 
> >   -- Jacques Ellul, The Technological Society
> > 
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> > For additional commands, e-mail: dev-help@maven.apache.org
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
-- 
jvz.

Jason van Zyl
jason@zenplex.com
http://tambora.zenplex.org

In short, man creates for himself a new religion of a rational
and technical order to justify his work and to be justified in it.
  
  -- Jacques Ellul, The Technological Society


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


Re: Why is the java source directory named "main" for plugins?

Posted by Juergen Heidak <Ju...@Heidak.de>.
Wow you're very fast I just sent the mail an already got an answer :-))

I know that  the source directories are configurable at the moment I 
just wanted to make sure that this will also be the case in the future 
(after eventually changes to the directory layout) because changing the 
layout of a project is impossible if the project has reached a critical 
size.

Juergen

bob mcwhirter wrote:

>On Thu, 19 Jun 2003, Juergen Heidak wrote:
>
>  
>
>>I like the idea of adding more structural information to the directory 
>>layout but all changes should be backward compatible because many 
>>projects already use maven and can not adapt a possible new structure 
>>without great  effort.
>>
>>In other words: The path to the different source directories (java, 
>>test, ...) should be configurable by properties :-)
>>    
>>
>
>I't's already configurable in project.xml.  I've personally been
>using src/java/main/ and src/java/test/ since the beginning.
>
>	-bob
>  
>



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


Re: Why is the java source directory named "main" for plugins?

Posted by bob mcwhirter <bo...@werken.com>.
On Thu, 19 Jun 2003, Juergen Heidak wrote:

> 
> I like the idea of adding more structural information to the directory 
> layout but all changes should be backward compatible because many 
> projects already use maven and can not adapt a possible new structure 
> without great  effort.
> 
> In other words: The path to the different source directories (java, 
> test, ...) should be configurable by properties :-)

I't's already configurable in project.xml.  I've personally been
using src/java/main/ and src/java/test/ since the beginning.

	-bob


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


Re: Why is the java source directory named "main" for plugins?

Posted by Juergen Heidak <Ju...@Heidak.de>.
I like the idea of adding more structural information to the directory 
layout but all changes should be backward compatible because many 
projects already use maven and can not adapt a possible new structure 
without great  effort.

In other words: The path to the different source directories (java, 
test, ...) should be configurable by properties :-)

Regards Juergen


Ben Walding wrote:

> That's my preference also.   And it also makes it look like you can 
> have multiple build trees, yet not! Muahahaha... I demand more emails 
> on the user list dammit!
>
> Michal Maczka wrote:
>
>> I also think it is bit inconsistent.
>>
>> But think that the most consistent approach is
>>
>> / basedir
>>     main
>>         java
>>         resources
>>         aspects
>>         conf
>>     test
>>        java
>>        test-resources
>>        ...
>>
>>
>> Michal
>>
>> P.S.
>>
>> I am not saying we should change anything ...
>>  
>>
>>  
>>
>>> -----Original Message-----
>>> From: Vincent Massol [mailto:vmassol@pivolis.com]
>>> Sent: Thursday, June 19, 2003 3:23 PM
>>> To: 'Maven Developers List'
>>> Subject: RE: Why is the java source directory named "main" for plugins?
>>>
>>>
>>>
>>>
>>>   
>>>
>>>> -----Original Message-----
>>>> From: Jason van Zyl [mailto:jason@zenplex.com]
>>>> Sent: 19 June 2003 15:02
>>>> To: Maven Developers List
>>>> Subject: Re: Why is the java source directory named "main" for
>>>>     
>>>
>>> plugins?
>>>   
>>>
>>>> On Thu, 2003-06-19 at 06:32, Vincent Massol wrote:
>>>>     
>>>>
>>>>> Hi,
>>>>>
>>>>> Why is the java source directory named "main" for plugins (instead
>>>>>       
>>>>
>>> of
>>>   
>>>
>>>>> "java")?
>>>>>       
>>>>
>>>> /src/test
>>>> /src/main
>>>>
>>>> Seem to make more sense as a pattern as the testing code is also
>>>>     
>>>
>>> 'java'
>>>   
>>>
>>>> code.
>>>>     
>>>
>>> Ok, my comment wasn't about whether the name made more sense or not
>>> about consistency. At present we use src/java everywhere else and
>>> everyone I know who uses maven also uses this convention.
>>> In cvs we also src/java for Maven...
>>>
>>> -Vincent
>>>
>>>   
>>



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


Re: Why is the java source directory named "main" for plugins?

Posted by Ben Walding <de...@walding.com>.
That's my preference also.   And it also makes it look like you can have 
multiple build trees, yet not! Muahahaha... I demand more emails on the 
user list dammit!

Michal Maczka wrote:

>I also think it is bit inconsistent.
>
>But think that the most consistent approach is
>
>/ basedir
>     main
>         java
>         resources
>         aspects
>         conf
>     test
>        java
>        test-resources
>        ...
>
>
>Michal
>
>P.S.
>
>I am not saying we should change anything ...
>  
>
>  
>
>>-----Original Message-----
>>From: Vincent Massol [mailto:vmassol@pivolis.com]
>>Sent: Thursday, June 19, 2003 3:23 PM
>>To: 'Maven Developers List'
>>Subject: RE: Why is the java source directory named "main" for plugins?
>>
>>
>>
>>
>>    
>>
>>>-----Original Message-----
>>>From: Jason van Zyl [mailto:jason@zenplex.com]
>>>Sent: 19 June 2003 15:02
>>>To: Maven Developers List
>>>Subject: Re: Why is the java source directory named "main" for
>>>      
>>>
>>plugins?
>>    
>>
>>>On Thu, 2003-06-19 at 06:32, Vincent Massol wrote:
>>>      
>>>
>>>>Hi,
>>>>
>>>>Why is the java source directory named "main" for plugins (instead
>>>>        
>>>>
>>of
>>    
>>
>>>>"java")?
>>>>        
>>>>
>>>/src/test
>>>/src/main
>>>
>>>Seem to make more sense as a pattern as the testing code is also
>>>      
>>>
>>'java'
>>    
>>
>>>code.
>>>      
>>>
>>Ok, my comment wasn't about whether the name made more sense or not
>>about consistency. At present we use src/java everywhere else and
>>everyone I know who uses maven also uses this convention. 
>>
>>In cvs we also src/java for Maven...
>>
>>-Vincent
>>
>>    
>>
>>>>Thanks
>>>>-Vincent
>>>>
>>>>
>>>>
>>>>        
>>>>
>>---------------------------------------------------------------------
>>    
>>
>>>>To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
>>>>For additional commands, e-mail: dev-help@maven.apache.org
>>>>        
>>>>
>>>--
>>>jvz.
>>>
>>>Jason van Zyl
>>>jason@zenplex.com
>>>http://tambora.zenplex.org
>>>
>>>In short, man creates for himself a new religion of a rational
>>>and technical order to justify his work and to be justified in it.
>>>
>>>  -- Jacques Ellul, The Technological Society
>>>
>>>
>>>---------------------------------------------------------------------
>>>To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
>>>For additional commands, e-mail: dev-help@maven.apache.org
>>>      
>>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
>>For additional commands, e-mail: dev-help@maven.apache.org
>>
>>
>>-------------------------------------------------------------------------
>>Limit kredytowy nawet o 20% wyzszy, niz masz teraz.
>>Sprawdz TSL+: http://link.interia.pl/f173e
>>
>>
>>
>>    
>>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
>For additional commands, e-mail: dev-help@maven.apache.org
>
>
>  
>



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


RE: Classloader problems when writing plugin

Posted by Alexei Barantsev <ba...@ispras.ru>.
It seems that jCoverage uses log4j and that causes the collision.

Try launching jCoverage in separate JVM (fork="true")

-- 
Alexei Barantsev, ISP RAS
E-mail: barancev@ispras.ru
ICQ   : 3959207


  > -----Original Message-----
  > From: Mark Langley [mailto:mlangley@casebank.com] 
  > Sent: Tuesday, June 24, 2003 10:55 PM
  > To: Maven Developers List
  > Subject: Classloader problems when writing plugin
  > 
  > 
  > Two questions:
  > 
  > #1: I've written a plugin to integrate jCoverage 
  > (http://www.jcoverage.com) with Maven. The plugin itself 
  > works fine, but I get a class loader conflict later on in the run:
  > 
  > xdoc:generate-from-pom:
  >     [echo] Generating xdocs from POM ...
  > 
  > BUILD FAILED
  > null:58:30: <attainGoal> null:25:30: <attainGoal> 
  > null:363:9: <velocity:merge> Class org/apache/log4j/Layout 
  > violates loader constraints Total time: 1 minutes 48 seconds
  > 
  > If I disable jCoverage the build executes flawlessly.
  > 
  > I've confirmed that I'm using the correct (root) 
  > classloader in the plugin's project.xml (see below). Is 
  > there anything else I should consider in troubleshooting this?
  > 
  > #2: Once this is working, is it best donated back to 
  > maven.apache.org or to the maven-plugins.sourceforge.net 
  > group? I vaguely remember some discussion on the list about 
  > keeping GPL dependencies out of the Jakarta codebase...?
  > 
  > Thanks for any assistance.
  > 
  > Mark Langley
  > 
  > 
  > 
  > (Plugin's project.xml dependencies follow...)
  > 
  >   <dependencies>
  >     <dependency>
  >       <id>jcoverage</id>
  >       <version>1.0.4</version>
  >       <properties>
  >         <classloader>root</classloader>
  >       </properties>
  >     </dependency>
  >     <dependency>
  >       <id>log4j</id>
  >       <version>1.2.7</version>
  >       <properties>
  >         <classloader>root</classloader>
  >       </properties>
  >     </dependency>
  >     <dependency>
  >       <id>bcel</id>
  >       <version>5.0</version>
  >       <properties>
  >         <classloader>root</classloader>
  >       </properties>
  >     </dependency>
  >     <dependency>
  >       <id>oro</id>
  >       <version>2.0.7</version>
  >       <properties>
  >         <classloader>root</classloader>
  >       </properties>
  >     </dependency>
  >     <dependency>
  >       <id>java-getopt</id>
  >       <version>1.0.9</version>
  >       <properties>
  >         <classloader>root</classloader>
  >       </properties>
  >     </dependency>
  >   </dependencies>
  > 
  > 
  > ------------------------------------------------------------
  > ---------
  > To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
  > For additional commands, e-mail: dev-help@maven.apache.org
  > 



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


Classloader problems when writing plugin

Posted by Mark Langley <ml...@casebank.com>.
Two questions:

#1: I've written a plugin to integrate jCoverage (http://www.jcoverage.com)
with Maven. The plugin itself works fine, but I get a class loader conflict
later on in the run:

xdoc:generate-from-pom:
    [echo] Generating xdocs from POM ...

BUILD FAILED
null:58:30: <attainGoal> null:25:30: <attainGoal> null:363:9:
<velocity:merge> Class org/apache/log4j/Layout violates loader constraints
Total time: 1 minutes 48 seconds

If I disable jCoverage the build executes flawlessly.

I've confirmed that I'm using the correct (root) classloader in the plugin's
project.xml (see below). Is there anything else I should consider in
troubleshooting this?

#2: Once this is working, is it best donated back to maven.apache.org or to
the maven-plugins.sourceforge.net group? I vaguely remember some discussion
on the list about keeping GPL dependencies out of the Jakarta codebase...?

Thanks for any assistance.

Mark Langley



(Plugin's project.xml dependencies follow...)

  <dependencies>
    <dependency>
      <id>jcoverage</id>
      <version>1.0.4</version>
      <properties>
        <classloader>root</classloader>
      </properties>
    </dependency>
    <dependency>
      <id>log4j</id>
      <version>1.2.7</version>
      <properties>
        <classloader>root</classloader>
      </properties>
    </dependency>
    <dependency>
      <id>bcel</id>
      <version>5.0</version>
      <properties>
        <classloader>root</classloader>
      </properties>
    </dependency>
    <dependency>
      <id>oro</id>
      <version>2.0.7</version>
      <properties>
        <classloader>root</classloader>
      </properties>
    </dependency>
    <dependency>
      <id>java-getopt</id>
      <version>1.0.9</version>
      <properties>
        <classloader>root</classloader>
      </properties>
    </dependency>
  </dependencies>


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


RE: Why is the java source directory named "main" for plugins?

Posted by Michal Maczka <mm...@interia.pl>.
I also think it is bit inconsistent.

But think that the most consistent approach is

/ basedir
     main
         java
         resources
         aspects
         conf
     test
        java
        test-resources
        ...


Michal

P.S.

I am not saying we should change anything ...
  

> -----Original Message-----
> From: Vincent Massol [mailto:vmassol@pivolis.com]
> Sent: Thursday, June 19, 2003 3:23 PM
> To: 'Maven Developers List'
> Subject: RE: Why is the java source directory named "main" for plugins?
> 
> 
> 
> 
> > -----Original Message-----
> > From: Jason van Zyl [mailto:jason@zenplex.com]
> > Sent: 19 June 2003 15:02
> > To: Maven Developers List
> > Subject: Re: Why is the java source directory named "main" for
> plugins?
> > 
> > On Thu, 2003-06-19 at 06:32, Vincent Massol wrote:
> > > Hi,
> > >
> > > Why is the java source directory named "main" for plugins (instead
> of
> > > "java")?
> > 
> > /src/test
> > /src/main
> > 
> > Seem to make more sense as a pattern as the testing code is also
> 'java'
> > code.
> 
> Ok, my comment wasn't about whether the name made more sense or not
> about consistency. At present we use src/java everywhere else and
> everyone I know who uses maven also uses this convention. 
> 
> In cvs we also src/java for Maven...
> 
> -Vincent
> 
> > 
> > > Thanks
> > > -Vincent
> > >
> > >
> > >
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> > > For additional commands, e-mail: dev-help@maven.apache.org
> > --
> > jvz.
> > 
> > Jason van Zyl
> > jason@zenplex.com
> > http://tambora.zenplex.org
> > 
> > In short, man creates for himself a new religion of a rational
> > and technical order to justify his work and to be justified in it.
> > 
> >   -- Jacques Ellul, The Technological Society
> > 
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> > For additional commands, e-mail: dev-help@maven.apache.org
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
> 
> 
> -------------------------------------------------------------------------
> Limit kredytowy nawet o 20% wyzszy, niz masz teraz.
> Sprawdz TSL+: http://link.interia.pl/f173e
> 
> 
> 


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


RE: Why is the java source directory named "main" for plugins?

Posted by Vincent Massol <vm...@pivolis.com>.

> -----Original Message-----
> From: Jason van Zyl [mailto:jason@zenplex.com]
> Sent: 19 June 2003 15:02
> To: Maven Developers List
> Subject: Re: Why is the java source directory named "main" for
plugins?
> 
> On Thu, 2003-06-19 at 06:32, Vincent Massol wrote:
> > Hi,
> >
> > Why is the java source directory named "main" for plugins (instead
of
> > "java")?
> 
> /src/test
> /src/main
> 
> Seem to make more sense as a pattern as the testing code is also
'java'
> code.

Ok, my comment wasn't about whether the name made more sense or not
about consistency. At present we use src/java everywhere else and
everyone I know who uses maven also uses this convention. 

In cvs we also src/java for Maven...

-Vincent

> 
> > Thanks
> > -Vincent
> >
> >
> >
---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> > For additional commands, e-mail: dev-help@maven.apache.org
> --
> jvz.
> 
> Jason van Zyl
> jason@zenplex.com
> http://tambora.zenplex.org
> 
> In short, man creates for himself a new religion of a rational
> and technical order to justify his work and to be justified in it.
> 
>   -- Jacques Ellul, The Technological Society
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org



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


Re: Why is the java source directory named "main" for plugins?

Posted by Jason van Zyl <ja...@zenplex.com>.
On Thu, 2003-06-19 at 06:32, Vincent Massol wrote:
> Hi,
> 
> Why is the java source directory named "main" for plugins (instead of
> "java")?

/src/test
/src/main

Seem to make more sense as a pattern as the testing code is also 'java'
code.

> Thanks
> -Vincent
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
-- 
jvz.

Jason van Zyl
jason@zenplex.com
http://tambora.zenplex.org

In short, man creates for himself a new religion of a rational
and technical order to justify his work and to be justified in it.
  
  -- Jacques Ellul, The Technological Society


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