You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Vikas Phonsa <VP...@suz.com> on 2003/11/07 22:18:32 UTC

including source in jar

Hi,
Can I have the jar goal generate a jar that includes the source code file
also beside the .class files.

Thanks

Vikas



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


Re: including source in jar

Posted by da...@etudier-online.com.
Quoting Alwyn Schoeman <al...@smart.com.ph>:

> 
> On Wed, 2003-11-12 at 09:47, Alain Javier Guarnieri del Gesu wrote:
> 
> > Every user maintaining their own source is what I am trying to
> > elminiate with this.
> 
> Wouldn't using something like CVS be a better solution for this?

Sure, but:
1. Checking out the source code of every library is cumbersome, to say the least.
2. Usually, the user only want to read the code or step trough it with the
debugger, so there is no need to keep the revision information.

Best Regards,
David Garnier


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


Re: including source in jar

Posted by Alwyn Schoeman <al...@smart.com.ph>.
On Wed, 2003-11-12 at 09:47, Alain Javier Guarnieri del Gesu wrote:

> Every user maintaining their own source is what I am trying to
> elminiate with this.

Wouldn't using something like CVS be a better solution for this?

-- 
Alwyn Schoeman <al...@smart.com.ph>
SMART Communications.


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


Deploying plugin with Project?

Posted by Eric Pugh <ep...@upstate.com>.
Hi all,

I have a project that requires the jetspeed plugin (uses Jakarta Jetspeed
portal).  However, most machines won't have this plugin installed.  Is there
any easy way to have the plugin be downloaded and installed?  If I put it in
a repo, will it get installed by referencing it in the project.xml?

Eric


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


Re: including source in jar

Posted by Alain Javier Guarnieri del Gesu <ja...@ajgdg.com>.
* Eric Pugh <ep...@upstate.com> [2003-11-11 11:49]:
> > --
> > dIon Gillard, Multitask Consulting
> > Blog:      http://blogs.codehaus.org/people/dion/
> > Pub Key:http://blogs.codehaus.org/people/dion/public-key.asc
> >
> >
> > Alain Javier Guarnieri del Gesu <ja...@ajgdg.com> wrote
> > on 10/11/2003
> > 03:38:49 AM:
> >
> > > * dion@multitask.com.au <di...@multitask.com.au> [2003-11-09 06:50]:
> > > > Alain Javier Guarnieri del Gesu <ja...@ajgdg.com> wrote on
> > 09/11/2003
> > > > 12:45:46 PM:
> > > >
> > > > > * Vikas Phonsa <VP...@suz.com> [2003-11-07 21:19]:
> > > > > > Can I have the jar goal generate a jar that includes
> > the source
> > code
> > > > file
> > > > > > also beside the .class files.
> > > > >
> > > > > I've been asking about creating separate debug and release build
> > > > > targets for some time now. A debug target would have a
> > source jar.
> > > > > This would make is easy to deploy the artifacts for use with
> > > > > Eclipse.
> > >
> > > > where did we get with this?
> > > >
> > > > Last I remember, my suggest was to use the dist plugin,
> > not the jar
> > > > plugin.
> > >
> > > I will start working on it this week. It just seems to me that Maven
> > > ought to support the two inevitable output paths, debug and release,
> > > but after reading through java, jar, and dist, I'll be able to
> > > better comment.
> > -----Original Message-----
> > From: dion@multitask.com.au [mailto:dion@multitask.com.au]
> > Sent: Monday, November 10, 2003 12:43 AM
> > To: Maven Users List
> > Subject: Re: including source in jar
> >
> >
> > Building a debug vs non-debug jar does sound like a good idea.

> I like the idea of including src etc in the jar..  However, we
> should also think about how to work with non Maven jars..  Is
> there any sense to to adding something to the Eclipse plugin that
> allows you to define where to get src from?
> 
> For instance, I keep the source for OSWorkflow, and Ant built
> project, on c:\java\oswf\src\java..  So, would it make sense to
> have an .xml file that maps  the groupId/artifactID to a location?
> 
> <srcArtifact>
> <groupId>opensymphony</groupId>
> <artifactId>osworkflow-2.6-dev</artifactId>
> <location>c:\java\oswf\src\java</location>
> <srcArtifact>
> 
> This would at least obviate the need to change a whole bunch of
> things...  Of course, every user is maintaining their own
> source...

Every user maintaining their own source is what I am trying to
elminiate with this.

It should be possible to pull down a jar of debug classes and a jar
of source files so that someone is able to trace into their project
dependencies. If this is standardized, these debug and source jars
can be kept on ibiblio.

Creating a source jar is not difficult. Users can just create a jar
using their favorite zip utility and put it in their local
repository. Or else, they can do as I have, and create ant scripts
to pull source from project repositories and build the debug and
source jars.

But keep taking about this, I'd love to get a dialog going.

-- 
Alain Javier Guarnieri del Gesu - javi@ajgdg.com

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


RE: including source in jar

Posted by Eric Pugh <ep...@upstate.com>.
I like the idea of including src etc in the jar..  However, we should also
think about how to work with non Maven jars..  Is there any sense to to
adding something to the Eclipse plugin that allows you to define where to
get src from?

For instance, I keep the source for OSWorkflow, and Ant built project, on
c:\java\oswf\src\java..  So, would it make sense to have an .xml file that
maps  the groupId/artifactID to a location?

<srcArtifact>
<groupId>opensymphony</groupId>
<artifactId>osworkflow-2.6-dev</artifactId>
<location>c:\java\oswf\src\java</location>
<srcArtifact>

This would at least obviate the need to change a whole bunch of things...
Of course, every user is maintaining their own source...

Eric

> -----Original Message-----
> From: dion@multitask.com.au [mailto:dion@multitask.com.au]
> Sent: Monday, November 10, 2003 12:43 AM
> To: Maven Users List
> Subject: Re: including source in jar
>
>
> Building a debug vs non-debug jar does sound like a good idea.
> --
> dIon Gillard, Multitask Consulting
> Blog:      http://blogs.codehaus.org/people/dion/
> Pub Key:http://blogs.codehaus.org/people/dion/public-key.asc
>
>
> Alain Javier Guarnieri del Gesu <ja...@ajgdg.com> wrote
> on 10/11/2003
> 03:38:49 AM:
>
> > * dion@multitask.com.au <di...@multitask.com.au> [2003-11-09 06:50]:
> > > Alain Javier Guarnieri del Gesu <ja...@ajgdg.com> wrote on
> 09/11/2003
> > > 12:45:46 PM:
> > >
> > > > * Vikas Phonsa <VP...@suz.com> [2003-11-07 21:19]:
> > > > > Can I have the jar goal generate a jar that includes
> the source
> code
> > > file
> > > > > also beside the .class files.
> > > >
> > > > I've been asking about creating separate debug and release build
> > > > targets for some time now. A debug target would have a
> source jar.
> > > > This would make is easy to deploy the artifacts for use with
> > > > Eclipse.
> >
> > > where did we get with this?
> > >
> > > Last I remember, my suggest was to use the dist plugin,
> not the jar
> > > plugin.
> >
> > I will start working on it this week. It just seems to me that Maven
> > ought to support the two inevitable output paths, debug and release,
> > but after reading through java, jar, and dist, I'll be able to
> > better comment.
> >
> > --
> > Alain Javier Guarnieri del Gesu - javi@ajgdg.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


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


Re: including source in jar

Posted by di...@multitask.com.au.
Building a debug vs non-debug jar does sound like a good idea.
--
dIon Gillard, Multitask Consulting
Blog:      http://blogs.codehaus.org/people/dion/
Pub Key:http://blogs.codehaus.org/people/dion/public-key.asc


Alain Javier Guarnieri del Gesu <ja...@ajgdg.com> wrote on 10/11/2003 
03:38:49 AM:

> * dion@multitask.com.au <di...@multitask.com.au> [2003-11-09 06:50]:
> > Alain Javier Guarnieri del Gesu <ja...@ajgdg.com> wrote on 
09/11/2003 
> > 12:45:46 PM:
> > 
> > > * Vikas Phonsa <VP...@suz.com> [2003-11-07 21:19]:
> > > > Can I have the jar goal generate a jar that includes the source 
code 
> > file
> > > > also beside the .class files.
> > > 
> > > I've been asking about creating separate debug and release build
> > > targets for some time now. A debug target would have a source jar.
> > > This would make is easy to deploy the artifacts for use with
> > > Eclipse.
> 
> > where did we get with this?
> > 
> > Last I remember, my suggest was to use the dist plugin, not the jar 
> > plugin.
> 
> I will start working on it this week. It just seems to me that Maven
> ought to support the two inevitable output paths, debug and release,
> but after reading through java, jar, and dist, I'll be able to
> better comment.
> 
> -- 
> Alain Javier Guarnieri del Gesu - javi@ajgdg.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: including source in jar

Posted by Alain Javier Guarnieri del Gesu <ja...@ajgdg.com>.
* dion@multitask.com.au <di...@multitask.com.au> [2003-11-09 06:50]:
> Alain Javier Guarnieri del Gesu <ja...@ajgdg.com> wrote on 09/11/2003 
> 12:45:46 PM:
> 
> > * Vikas Phonsa <VP...@suz.com> [2003-11-07 21:19]:
> > > Can I have the jar goal generate a jar that includes the source code 
> file
> > > also beside the .class files.
> > 
> > I've been asking about creating separate debug and release build
> > targets for some time now. A debug target would have a source jar.
> > This would make is easy to deploy the artifacts for use with
> > Eclipse.

> where did we get with this?
> 
> Last I remember, my suggest was to use the dist plugin, not the jar 
> plugin.

I will start working on it this week. It just seems to me that Maven
ought to support the two inevitable output paths, debug and release,
but after reading through java, jar, and dist, I'll be able to
better comment.

-- 
Alain Javier Guarnieri del Gesu - javi@ajgdg.com

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


Re: including source in jar

Posted by di...@multitask.com.au.
Alain,

where did we get with this?

Last I remember, my suggest was to use the dist plugin, not the jar 
plugin.
--
dIon Gillard, Multitask Consulting
Blog:      http://blogs.codehaus.org/people/dion/
Pub Key:http://blogs.codehaus.org/people/dion/public-key.asc


Alain Javier Guarnieri del Gesu <ja...@ajgdg.com> wrote on 09/11/2003 
12:45:46 PM:

> * Vikas Phonsa <VP...@suz.com> [2003-11-07 21:19]:
> > Can I have the jar goal generate a jar that includes the source code 
file
> > also beside the .class files.
> 
> I've been asking about creating separate debug and release build
> targets for some time now. A debug target would have a source jar.
> This would make is easy to deploy the artifacts for use with
> Eclipse.
> 
> -- 
> Alain Javier Guarnieri del Gesu - javi@ajgdg.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: including source in jar

Posted by Alain Javier Guarnieri del Gesu <ja...@ajgdg.com>.
* Vikas Phonsa <VP...@suz.com> [2003-11-07 21:19]:
> Can I have the jar goal generate a jar that includes the source code file
> also beside the .class files.

I've been asking about creating separate debug and release build
targets for some time now. A debug target would have a source jar.
This would make is easy to deploy the artifacts for use with
Eclipse.

-- 
Alain Javier Guarnieri del Gesu - javi@ajgdg.com

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


Re: including source in jar

Posted by Leif Nelson <ln...@llnl.gov>.
I have this in my maven.xml to generate a separate sources zip, when 
building a jar.

   <postGoal name="jar:jar" >
     <echo>creating sources zip from ${maven.src.dir}</echo>
     <zip
      zipfile="${maven.build.dir}/${maven.final.name}-src.zip"
      basedir="${maven.src.dir}" >
      excludes="**/**.class" >
    </zip>
   </postGoal>

Enjoy,

--Leif

At 01:18 PM 11/7/2003 -0800, you wrote:
>Hi,
>Can I have the jar goal generate a jar that includes the source code file
>also beside the .class files.
>
>Thanks
>
>Vikas
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>For additional commands, e-mail: users-help@maven.apache.org