On Sat, 5 Sep 2015 02:14:03 +0100, sebb wrote:
On 5 September 2015 at 01:13, Gilles <gil...@harfang.homelinux.org> wrote:
On Sat, 5 Sep 2015 00:56:54 +0100, sebb wrote:

On 5 September 2015 at 00:55, Ole Ersoy <ole.er...@gmail.com> wrote:



On 09/04/2015 06:06 PM, Gilles wrote:


On Fri, 4 Sep 2015 11:03:08 -0500, Ole Ersoy wrote:


On 09/04/2015 10:26 AM, Gilles wrote:


On Fri, 4 Sep 2015 10:11:04 -0500, Ole Ersoy wrote:


You have left over files in `target` after switching between the branches. For example check out `math4`. Build it. Switch to the `math3` branch. Build it. Now `target` will contain both classes
from the math3 branch and the math4 branch.



No it's not the problem.
They are _source_ files.


Ahh - OK - Not sure if this will help, but you can for example
exclude the math3 package files from compilation like this:






|<plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-compiler-plugin</artifactId><version>2.0.2</version><configuration><source>1.6</source><target>1.6</target><includes><include>org/apace/commons/math4/*.java</include>
</includes> </configuration> </plugin> </plugins>|


That works fine!

Thus it's not that maven _has_ to compile everything under "src/main";
it can be told otherwise.
Perhaps there are nasty side effects to that selection (?).


If someone clones the master off of github in order to experiment and
they
are used to being able to compile everything under `src/main/java` then
they
may be in for a surprise.


Otherwise, I still don't understand why it cannot be included in the
POM file...



You could create two new branches that you have your own POM
modifications
in:

- math3-gilles
- math4-gilles


IIUC, that would exchange "stash" for "merge".
I fail to see the gain. :-{


+1 to that!

-1 to adding the changes to the main branches.


Hmm, the POM contains several CM-tailored instructions (include this,
exclude that), plus (IIRC) we don't ship source files that are not
below "o.a.c.math3".  Thus why not reflect that in the POM too?

We should ship everything in the SCM tree apart from the DOAP.

[It's the reverse of an argument given by Luc: why keep source files
under the project's "src/main/java/org/apache/commons/math3" if it's
*not* going to be part of the official project?]

Exactly; only files that are intended for release should be in the tree.

It should be possible to compare the tag with the exploded source
archive and the two should agree, apart from the DOAP (and the SCM
work files, if present)


Sorry but I think that we don't talk about the same thing.
The problem here has nothing to do with released material.

The files I'm talking about are not under source control; but they are
present in in my (local) source tree, in the right place for testing new
features.  When I'm in the right branch (say, "math3"), all is fine.
When I switch branch, the (git-managed) source tree rooted at "math3"
disappears, except, of course, those files (which are not yet tracked by
git).

Note that this is temporary: when preliminary testing is satisfactory,
I'd "git add" the files, and they will also disappear when switching
branch.
The problem is that when doing "parallel" work (like the tedious
"backporting" currently going on in CM), those files stay in the way.

And as they happen to end with ".java", maven wants to compile them
(of course), and fails when in the "wrong" branch?
My suggestion is that maven could be told to just ignore them, just
the same as it ignores any non Java files that could also happen to
be there.


Gilles


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
For additional commands, e-mail: dev-h...@commons.apache.org

Reply via email to