spat1978 / mockito

Automatically exported from code.google.com/p/mockito
0 stars 0 forks source link

Maven distribution mockito-core-1.9.5.jar contains *.java files (should only contain *.class files) #418

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Include the following standard dependency in pom.xml:

<dependency>
    <groupId>org.mockito</groupId>
    <artifactId>mockito-core</artifactId>
    <version>1.9.5</version>
    <scope>test</scope>
</dependency>

2. Run the command:

    mvn install

   to ensure the dependencies are downloaded to the local repository (in ~/.m2/repository)

3. Run the command:

    jar tvf ~/.m2/repository/org/mockito/mockito-core/1.9.5/mockito-core-1.9.5.jar

What is the expected output? What do you see instead?

Expected output is a list of *.class files.

Actual output is a list of both *.class and *.java files.

The *.java files appear correctly in the mockito-core-1.9.5-sources.jar file 
(when downloaded by Maven), but should not appear in the mockito-core-1.9.5.jar 
file.

What version of the product are you using? On what operating system?

Mockito 1.9.5, Ubuntu Linux (although this problem is not specific to any 
operating system).

Please provide any additional information below.

Original issue reported on code.google.com by gep...@gmail.com on 11 Feb 2013 at 2:18

GoogleCodeExporter commented 8 years ago
Hey, thanks for reporting, we totally missed that. We will fix that in the next 
release.

Original comment by brice.du...@gmail.com on 11 Feb 2013 at 3:15

GoogleCodeExporter commented 8 years ago
Pull request

https://github.com/mockito/mockito/pull/28

Original comment by marcin.g...@gmail.com on 21 Dec 2013 at 5:59

GoogleCodeExporter commented 8 years ago
Merged, thx Marcin

Original comment by brice.du...@gmail.com on 22 Dec 2013 at 2:44

GoogleCodeExporter commented 8 years ago
Hey,

Not sure about this change. The sources are in the jars intentionally, so that 
IDEs pick them up automatically (at least Eclipse). Why is it a problem if java 
code exists in the jar?

Original comment by szcze...@gmail.com on 19 Jan 2014 at 9:10

GoogleCodeExporter commented 8 years ago
Hi Szczepan

I just did what was required in the task so hopefully the author of the issue 
will define his intentions.

Original comment by marcin.g...@gmail.com on 19 Jan 2014 at 9:22

GoogleCodeExporter commented 8 years ago
No problem. Thank you very much for this submission (and others, too - keep 
them coming :). I'm just going through the changes so that we're release-ready.

Original comment by szcze...@gmail.com on 19 Jan 2014 at 10:03

GoogleCodeExporter commented 8 years ago
The source code is already (correctly) in the file 
~/.m2/repository/org/mockito/mockito-core/1.9.5/mockito-core-1.9.5-sources.jar

However it should *not* additionally appear in 
~/.m2/repository/org/mockito/mockito-core/1.9.5/mockito-core-1.9.5.jar

To tell Eclipse where to obtain the source, see 
http://stackoverflow.com/questions/310720/get-source-jar-files-attached-to-eclip
se-for-maven-managed-dependencies

Original comment by gep...@gmail.com on 20 Jan 2014 at 4:37

GoogleCodeExporter commented 8 years ago
Actually Ithe project should respect proper maven artifacts. Eclipse has many 
issues and I don't think this one should be considered when delivering mockito.

Original comment by brice.du...@gmail.com on 20 Jan 2014 at 5:26

GoogleCodeExporter commented 8 years ago
Nah, the project should do whatever makes developers happy.

It's not an issue with eclipse. It's about the fact that you can drop mockito 
jar into idea or eclipse and instantly view the javadocs and debug Mocktio 
internals. I consider this a feature :)

I'm not hardcoded to keeping java in the jar but I'd like to hear a better 
reasons for this. What say you? :)

Original comment by szcze...@gmail.com on 20 Jan 2014 at 6:00

GoogleCodeExporter commented 8 years ago
If it's a feature. I'm not either hardcoded to following maven standard, but it 
seems more regular or legal to me.

Original comment by brice.du...@gmail.com on 20 Jan 2014 at 6:16

GoogleCodeExporter commented 8 years ago
If someone asked me for opinion I think that it makes much more sense to keep 
sources with sources and classes with the lib as such :)

Original comment by marcin.g...@gmail.com on 20 Jan 2014 at 6:18

GoogleCodeExporter commented 8 years ago

Original comment by szcze...@gmail.com on 16 Aug 2014 at 2:43

GoogleCodeExporter commented 8 years ago

Original comment by szcze...@gmail.com on 24 Aug 2014 at 3:14

GoogleCodeExporter commented 8 years ago
Since everyone wants to remove it, lets remove them from the main jar :)

Original comment by szcze...@gmail.com on 24 Aug 2014 at 3:37

GoogleCodeExporter commented 8 years ago

Original comment by szcze...@gmail.com on 24 Aug 2014 at 3:50

GoogleCodeExporter commented 8 years ago
This doesn't seem to be fixed (although the bug is closed as fixed), the source 
files are still there in mockito-core-(version >= 10.0).jar

Original comment by jens.bor...@gmail.com on 14 Apr 2015 at 3:21

GoogleCodeExporter commented 8 years ago
Can you open a ticket at github?

Original comment by szcze...@gmail.com on 15 Apr 2015 at 12:45

GoogleCodeExporter commented 8 years ago
Reported at github: https://github.com/mockito/mockito/issues/199

Original comment by jens.bor...@gmail.com on 16 Apr 2015 at 12:06