Putting the sources in a executable jar just makes it bigger and slower to load at run--time with absolutely no benefit to the execution.

Wayne is right that it will not break anything but why do it.

People who run programs are not generally the people who read or use source code. People who want the source code are probably going to alter it to make a new executable jar with their version of your code. They don't need your compiled classes in the source artifact that you give them.

Make it a separate artifact if you want to share the source code.

Ron


On 12/04/2012 10:39 AM, Wayne Fay wrote:
That is the reason for my two jars, one is source and the other binary.
However, this statement does not make sense in all cases, since one can
create self-running JAR files with mainclass.mf manifest file to run the
program with "java -jar myProgram.jar". This may include both binary and
source.
In and of itself, this is a true statement. It does not mean that it
is a best practice. I'm sure that we could come up with all kinds of
things that "work" but are probably a bad idea for one reason or
another.

Read this thread (4 messages from late 2010) for more info:
http://mail-archives.apache.org/mod_mbox/maven-users/201001.mbox/%[email protected]%3E

Wayne

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]




--
Ron Wheeler
President
Artifact Software Inc
email: [email protected]
skype: ronaldmwheeler
phone: 866-970-2435, ext 102


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to