You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Paul Ackersviller <pd...@freeshell.org> on 2013/02/18 17:21:00 UTC

Effect of skipSource?

I'm a complete newbie with maven, so could be completely off base,
but my problem is the following.  We have a .war file that people have
been building with eclipse, and I'm trying to pacakge the same thing
using just maven.  The .war created this way doesn't work however,
and the only difference I see in comparing the contents of the two
archives is that the maven one is missing all the .java files.

In looking at docs, I get the feeling that the skipSource flag might
somehow be related, but should default to on anyway.  Can someone
point me in the right direction?

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


Are there other options like skipSource?

Posted by Paul Ackersviller <pd...@freeshell.org>.
Thanks, while that answers the question in my original, poorly-worded,
subject, it doesn't address the problem I'm really having.

Trying again, is there something similar to skipSource by a different
name that controls .java files in wars?


On Tue, Feb 19, 2013 at 12:04:30AM +0100, Olivier Lamy wrote:
> http://maven.apache.org/plugins/maven-source-plugin/jar-mojo.html#skipSource
> 
> So if your build attach a jar containing sources this will be skipped.
> (no sources jar will be produce)
> 
> 
> 2013/2/18 Paul Ackersviller <pd...@freeshell.org>:
> > I'm a complete newbie with maven, so could be completely off base,
> > but my problem is the following.  We have a .war file that people have
> > been building with eclipse, and I'm trying to pacakge the same thing
> > using just maven.  The .war created this way doesn't work however,
> > and the only difference I see in comparing the contents of the two
> > archives is that the maven one is missing all the .java files.
> >
> > In looking at docs, I get the feeling that the skipSource flag might
> > somehow be related, but should default to on anyway.  Can someone
> > point me in the right direction?

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


Re: Effect of skipSource?

Posted by Wayne Fay <wa...@gmail.com>.
>> Not including .java files in wars is the default for Maven.
...
> Yes, that appears to be what happens here... but -DskipSource=false
> doesn't make any difference.  Is there some other option to control this?

Maven is not just a build tool, it is also a collection of best
practices. One of those best practices is that Java code should be in
Jar projects, and then War projects should depend on one or more Jar
projects to pull in (compiled) Java code to use in your Webapp. You
can see this for yourself if you build a new project using the j2ee
archetype.

So the "right" approach would be to move your Java code to a Jar
project and then maybe try building again, and specifying the
-DskipSource=false at that point.

Alternatively, you should be able to configure a <resource> in the War
project that includes src/main/java, and the java files should land in
your War file. Not sure why you'd want this unless you're working on a
GWT project, though. And in that case, you might want to have a look
at the gwt-maven-plugin.

Wayne

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


Re: Effect of skipSource?

Posted by Paul Ackersviller <pd...@freeshell.org>.
Yes, that appears to be what happens here... but -DskipSource=false
doesn't make any difference.  Is there some other option to control this?

On Tue, Feb 19, 2013 at 09:44:52AM +0100, Adrien Rivard wrote:
> Not including .java files in wars is the default for Maven.
> 
> On Tue, Feb 19, 2013 at 12:04 AM, Olivier Lamy <ol...@apache.org> wrote:
> 
> >
> > http://maven.apache.org/plugins/maven-source-plugin/jar-mojo.html#skipSource
> >
> > So if your build attach a jar containing sources this will be skipped.
> > (no sources jar will be produce)
> >
> >
> > 2013/2/18 Paul Ackersviller <pd...@freeshell.org>:
> > > I'm a complete newbie with maven, so could be completely off base,
> > > but my problem is the following.  We have a .war file that people have
> > > been building with eclipse, and I'm trying to pacakge the same thing
> > > using just maven.  The .war created this way doesn't work however,
> > > and the only difference I see in comparing the contents of the two
> > > archives is that the maven one is missing all the .java files.
> > >
> > > In looking at docs, I get the feeling that the skipSource flag might
> > > somehow be related, but should default to on anyway.  Can someone
> > > point me in the right direction?

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


Re: Effect of skipSource?

Posted by Adrien Rivard <ad...@gmail.com>.
Not including .java files in wars is the default for Maven.



On Tue, Feb 19, 2013 at 12:04 AM, Olivier Lamy <ol...@apache.org> wrote:

>
> http://maven.apache.org/plugins/maven-source-plugin/jar-mojo.html#skipSource
>
> So if your build attach a jar containing sources this will be skipped.
> (no sources jar will be produce)
>
>
> 2013/2/18 Paul Ackersviller <pd...@freeshell.org>:
> > I'm a complete newbie with maven, so could be completely off base,
> > but my problem is the following.  We have a .war file that people have
> > been building with eclipse, and I'm trying to pacakge the same thing
> > using just maven.  The .war created this way doesn't work however,
> > and the only difference I see in comparing the contents of the two
> > archives is that the maven one is missing all the .java files.
> >
> > In looking at docs, I get the feeling that the skipSource flag might
> > somehow be related, but should default to on anyway.  Can someone
> > point me in the right direction?
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
>
>
>
> --
> Olivier Lamy
> Talend: http://coders.talend.com
> http://twitter.com/olamy | http://linkedin.com/in/olamy
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>


-- 
Adrien Rivard
06 63 08 79 74

Re: Effect of skipSource?

Posted by Olivier Lamy <ol...@apache.org>.
http://maven.apache.org/plugins/maven-source-plugin/jar-mojo.html#skipSource

So if your build attach a jar containing sources this will be skipped.
(no sources jar will be produce)


2013/2/18 Paul Ackersviller <pd...@freeshell.org>:
> I'm a complete newbie with maven, so could be completely off base,
> but my problem is the following.  We have a .war file that people have
> been building with eclipse, and I'm trying to pacakge the same thing
> using just maven.  The .war created this way doesn't work however,
> and the only difference I see in comparing the contents of the two
> archives is that the maven one is missing all the .java files.
>
> In looking at docs, I get the feeling that the skipSource flag might
> somehow be related, but should default to on anyway.  Can someone
> point me in the right direction?
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>



--
Olivier Lamy
Talend: http://coders.talend.com
http://twitter.com/olamy | http://linkedin.com/in/olamy

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