Discussion:
[tycho-user] Tycho-Maven multi-module build uses eclipse's compile outputdir
Ahmet Bilgin
2016-12-09 17:59:37 UTC
Permalink
Hi,

I’ve noticed that Tycho-maven is using the build-output-directory configured in the build.properties (which is used in the Eclipse-IDE) also in the classpath of an headless tycho-maven build.
This is a Problem for our headless multi-module build because we had relied on the headless-build using only the compiled classes from the target/classes directories.

To be concrete we have the following problematic situation:
The classes get compiled to the following output directories depending on whether a headless or an IDE build is performed:
• Headless: target/classes
• IDE: bin

Compiling with tycho-maven the following can be observed:

PLUGIN-A
ECLIPSE_PLUGIN_A's compile classpath contains:
• bin
• why is the Eclipse IDE's output directory listed, when compiling with Tycho maven ? But this is not the real problem.
• target/classes
• as expected

PLUGIN-B
But when compiling ECLIPSE_PLUGIN_B it's compile classpath contains:
• bin
• not expected as mentioned above. But not the real problem
• target/classes
• as expected
• ECLIPSE_PLUGIN_A/bin
• This is a really a problem
• ECLIPSE_PLUGIN_A/target/classes
• as expected

We observed during our multi-module headless build that ECLIPSE_PLUGIN_B uses the compiled classes from ECLIPSE_PLUGIN_A/bin which is not what we expected. This means our headless build depends on the compile output of the IDE.
This had already lead to headless build compile errors due to outdated .class files in the IDE's bin directory, e.g when ECLIPSE_PLUGIN_A/bin outdated => ECLIPSE_PLUGIN_B compile error. This should not be possible.


Hopefully someone can clarify why the IDE's output directory is used in a tycho-maven headless build and how to avoid this.

Thank you!
Ahmet Bilgin

MAGMA Gießereitechnologie Gesellschaft für Gießerei-, Simulations- und Regeltechnik mbH | Kackertstr. 11, 52072 Aachen, Germany | Rechtsform GmbH, Amtsgericht Aachen HRB 3912, UST-ID-Nr. DE121745780 | Geschäftsführung: Dr. Marc C. Schneider (Vorsitzender), Dr.-Ing. Jörg C. Sturm
Sievers, Jan
2016-12-12 10:25:05 UTC
Permalink
output.<jar> entries in build.properties should be ignored by Tycho, see https://eclipse.org/tycho/sitedocs/BuildProperties.html

I cannot reproduce the issue by building sample project [1] in debug mode using 'mvn clean install -X'.
The compile classpath does not contain the bin/ folder (although configured in build.properties), but it does contain

[DEBUG] Classpath:
[DEBUG] /Users/d037913/git/eclipse/org.eclipse.tycho-demo/itp01/tycho.demo.itp01.tests/target/classes


If this is not the case for you, we would need a small sample project that demonstrates the unexpected behaviour.
Open a bug and attach it so we can check what's going on.

Regards,
Jan

[1] https://github.com/eclipse/tycho-demo/tree/master/itp01



On 09/12/16 18:59, "tycho-user-***@eclipse.org on behalf of Ahmet Bilgin" <tycho-user-***@eclipse.org on behalf of ***@magmasoft.de> wrote:

Hi,

I’ve noticed that Tycho-maven is using the build-output-directory configured in the build.properties (which is used in the Eclipse-IDE) also in the classpath of an headless tycho-maven build.
This is a Problem for our headless multi-module build because we had relied on the headless-build using only the compiled classes from the target/classes directories.

To be concrete we have the following problematic situation:
The classes get compiled to the following output directories depending on whether a headless or an IDE build is performed:
• Headless: target/classes
• IDE: bin

Compiling with tycho-maven the following can be observed:

PLUGIN-A
ECLIPSE_PLUGIN_A's compile classpath contains:
• bin
• why is the Eclipse IDE's output directory listed, when compiling with Tycho maven ? But this is not the real problem.
• target/classes
• as expected

PLUGIN-B
But when compiling ECLIPSE_PLUGIN_B it's compile classpath contains:
• bin
• not expected as mentioned above. But not the real problem
• target/classes
• as expected
• ECLIPSE_PLUGIN_A/bin
• This is a really a problem
• ECLIPSE_PLUGIN_A/target/classes
• as expected

We observed during our multi-module headless build that ECLIPSE_PLUGIN_B uses the compiled classes from ECLIPSE_PLUGIN_A/bin which is not what we expected. This means our headless build depends on the compile output of the IDE.
This had already lead to headless build compile errors due to outdated .class files in the IDE's bin directory, e.g when ECLIPSE_PLUGIN_A/bin outdated => ECLIPSE_PLUGIN_B compile error. This should not be possible.


Hopefully someone can clarify why the IDE's output directory is used in a tycho-maven headless build and how to avoid this.

Thank you!
Ahmet Bilgin

MAGMA Gießereitechnologie Gesellschaft für Gießerei-, Simulations- und Regeltechnik mbH | Kackertstr. 11, 52072 Aachen, Germany | Rechtsform GmbH, Amtsgericht Aachen HRB 3912, UST-ID-Nr. DE121745780 | Geschäftsführung: Dr. Marc C. Schneider (Vorsitzender), Dr.-Ing. Jörg C. Sturm
_______________________________________________
tycho-user mailing list
tycho-***@eclipse.org
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/tycho-user
Ahmet Bilgin
2016-12-12 17:08:05 UTC
Permalink
Hello Jan,

thanks to your response I could figure out what caused the Problem. At least it works for us now.

The Problem was that we used the following output directory in our build.properties for some historical reasons:
output.. = @dot/

As I learned today this seems to be the headless-build output directory by convention for the old eclipse build-system ANT.
There must be some hardcoded piece of code (in Tycho-maven?) that adds these @dot output directories to the compile classpath. Since we used these @dot directories as our Eclipse-IDE output-dir (by convention should only be used for headless-build) these lead to the problems I described in my previous post.

So we changed to "output.. = bin/" and everything seems to work now.

Except we still see the following DEBUG-message in headless build which can be ignored:
[INFO] Resolving class path of MavenProject: PLUGIN_A @ java/rcp/bundles/PLUGIN_A/pom.xml
[DEBUG] Dependency from java/rcp/bundles/PLUGIN_A to nested classpath entry java/rcp/bundles/PLUGIN_A/@dot can not be represented in Maven model and will not be visible to non-OSGi aware Maven plugins.

In my opinion adding the @dot directories statically to the compile path is a bug if this is really done.
To go one step further it must be ensured that the output path specified in build.properties is not part of the headless-build compile classpath. Otherwise the headless-build depends on the IDE-builds output.

Try it yourself with "output.. = @dot" and you should be able to reproduce if the analysis is correct.

Best regards
Ahmet Bilgin


-----Ursprüngliche Nachricht-----
Von: tycho-user-***@eclipse.org [mailto:tycho-user-***@eclipse.org] Im Auftrag von Sievers, Jan
Gesendet: Montag, 12. Dezember 2016 11:25
An: Tycho user list
Betreff: Re: [tycho-user] Tycho-Maven multi-module build uses eclipse's compile outputdir

output.<jar> entries in build.properties should be ignored by Tycho, see https://eclipse.org/tycho/sitedocs/BuildProperties.html

I cannot reproduce the issue by building sample project [1] in debug mode using 'mvn clean install -X'.
The compile classpath does not contain the bin/ folder (although configured in build.properties), but it does contain

[DEBUG] Classpath:
[DEBUG] /Users/d037913/git/eclipse/org.eclipse.tycho-demo/itp01/tycho.demo.itp01.tests/target/classes


If this is not the case for you, we would need a small sample project that demonstrates the unexpected behaviour.
Open a bug and attach it so we can check what's going on.

Regards,
Jan

[1] https://github.com/eclipse/tycho-demo/tree/master/itp01



On 09/12/16 18:59, "tycho-user-***@eclipse.org on behalf of Ahmet Bilgin" <tycho-user-***@eclipse.org on behalf of ***@magmasoft.de> wrote:

Hi,

I’ve noticed that Tycho-maven is using the build-output-directory configured in the build.properties (which is used in the Eclipse-IDE) also in the classpath of an headless tycho-maven build.
This is a Problem for our headless multi-module build because we had relied on the headless-build using only the compiled classes from the target/classes directories.

To be concrete we have the following problematic situation:
The classes get compiled to the following output directories depending on whether a headless or an IDE build is performed:
• Headless: target/classes
• IDE: bin

Compiling with tycho-maven the following can be observed:

PLUGIN-A
ECLIPSE_PLUGIN_A's compile classpath contains:
• bin
• why is the Eclipse IDE's output directory listed, when compiling with Tycho maven ? But this is not the real problem.
• target/classes
• as expected

PLUGIN-B
But when compiling ECLIPSE_PLUGIN_B it's compile classpath contains:
• bin
• not expected as mentioned above. But not the real problem
• target/classes
• as expected
• ECLIPSE_PLUGIN_A/bin
• This is a really a problem
• ECLIPSE_PLUGIN_A/target/classes
• as expected

We observed during our multi-module headless build that ECLIPSE_PLUGIN_B uses the compiled classes from ECLIPSE_PLUGIN_A/bin which is not what we expected. This means our headless build depends on the compile output of the IDE.
This had already lead to headless build compile errors due to outdated .class files in the IDE's bin directory, e.g when ECLIPSE_PLUGIN_A/bin outdated => ECLIPSE_PLUGIN_B compile error. This should not be possible.


Hopefully someone can clarify why the IDE's output directory is used in a tycho-maven headless build and how to avoid this.

Thank you!
Ahmet Bilgin

MAGMA Gießereitechnologie Gesellschaft für Gießerei-, Simulations- und Regeltechnik mbH | Kackertstr. 11, 52072 Aachen, Germany | Rechtsform GmbH, Amtsgericht Aachen HRB 3912, UST-ID-Nr. DE121745780 | Geschäftsführung: Dr. Marc C. Schneider (Vorsitzender), Dr.-Ing. Jörg C. Sturm _______________________________________________
tycho-user mailing list
tycho-***@eclipse.org
To change your delivery options, retrieve your password, or unsubscribe from this list, visit https://dev.eclipse.org/mailman/listinfo/tycho-user

_______________________________________________
tycho-user mailing list
tycho-***@eclipse.org
To change your delivery options, retrieve your password, or unsubscribe from this list, visit https://dev.eclipse.org/mailman/listinfo/tycho-user
MAGMA Gießereitechnologie Gesellschaft für Gießerei-, Simulations- und Regeltechnik mbH | Kackertstr. 11, 52072 Aachen, Germany | Rechtsform GmbH, Amtsgericht Aachen HRB 3912, UST-ID-Nr. DE121745780 | Geschäftsführung: Dr. Marc C. Schneider (Vorsitzender), Dr.-Ing. Jörg C. Sturm
Ahmet Bilgin
2016-12-13 08:19:17 UTC
Permalink
In my first posting I had mistakenly written that our Eclipse IDE compiled the classes to the "bin"-directory.
Instead the "@dot"-directories were used originally when we had the problems described in the opening post.

Best regards
Ahmet Bilgin

-----Ursprüngliche Nachricht-----
Von: tycho-user-***@eclipse.org [mailto:tycho-user-***@eclipse.org] Im Auftrag von Ahmet Bilgin
Gesendet: Montag, 12. Dezember 2016 18:08
An: Tycho user list
Betreff: Re: [tycho-user] Tycho-Maven multi-module build uses eclipse's compile outputdir

Hello Jan,

thanks to your response I could figure out what caused the Problem. At least it works for us now.

The Problem was that we used the following output directory in our build.properties for some historical reasons:
output.. = @dot/

As I learned today this seems to be the headless-build output directory by convention for the old eclipse build-system ANT.
There must be some hardcoded piece of code (in Tycho-maven?) that adds these @dot output directories to the compile classpath. Since we used these @dot directories as our Eclipse-IDE output-dir (by convention should only be used for headless-build) these lead to the problems I described in my previous post.

So we changed to "output.. = bin/" and everything seems to work now.

Except we still see the following DEBUG-message in headless build which can be ignored:
[INFO] Resolving class path of MavenProject: PLUGIN_A @ java/rcp/bundles/PLUGIN_A/pom.xml
[DEBUG] Dependency from java/rcp/bundles/PLUGIN_A to nested classpath entry java/rcp/bundles/PLUGIN_A/@dot can not be represented in Maven model and will not be visible to non-OSGi aware Maven plugins.

In my opinion adding the @dot directories statically to the compile path is a bug if this is really done.
To go one step further it must be ensured that the output path specified in build.properties is not part of the headless-build compile classpath. Otherwise the headless-build depends on the IDE-builds output.

Try it yourself with "output.. = @dot" and you should be able to reproduce if the analysis is correct.

Best regards
Ahmet Bilgin


-----Ursprüngliche Nachricht-----
Von: tycho-user-***@eclipse.org [mailto:tycho-user-***@eclipse.org] Im Auftrag von Sievers, Jan
Gesendet: Montag, 12. Dezember 2016 11:25
An: Tycho user list
Betreff: Re: [tycho-user] Tycho-Maven multi-module build uses eclipse's compile outputdir

output.<jar> entries in build.properties should be ignored by Tycho, see https://eclipse.org/tycho/sitedocs/BuildProperties.html

I cannot reproduce the issue by building sample project [1] in debug mode using 'mvn clean install -X'.
The compile classpath does not contain the bin/ folder (although configured in build.properties), but it does contain

[DEBUG] Classpath:
[DEBUG] /Users/d037913/git/eclipse/org.eclipse.tycho-demo/itp01/tycho.demo.itp01.tests/target/classes


If this is not the case for you, we would need a small sample project that demonstrates the unexpected behaviour.
Open a bug and attach it so we can check what's going on.

Regards,
Jan

[1] https://github.com/eclipse/tycho-demo/tree/master/itp01



On 09/12/16 18:59, "tycho-user-***@eclipse.org on behalf of Ahmet Bilgin" <tycho-user-***@eclipse.org on behalf of ***@magmasoft.de> wrote:

Hi,

I’ve noticed that Tycho-maven is using the build-output-directory configured in the build.properties (which is used in the Eclipse-IDE) also in the classpath of an headless tycho-maven build.
This is a Problem for our headless multi-module build because we had relied on the headless-build using only the compiled classes from the target/classes directories.

To be concrete we have the following problematic situation:
The classes get compiled to the following output directories depending on whether a headless or an IDE build is performed:
• Headless: target/classes
• IDE: bin

Compiling with tycho-maven the following can be observed:

PLUGIN-A
ECLIPSE_PLUGIN_A's compile classpath contains:
• bin
• why is the Eclipse IDE's output directory listed, when compiling with Tycho maven ? But this is not the real problem.
• target/classes
• as expected

PLUGIN-B
But when compiling ECLIPSE_PLUGIN_B it's compile classpath contains:
• bin
• not expected as mentioned above. But not the real problem
• target/classes
• as expected
• ECLIPSE_PLUGIN_A/bin
• This is a really a problem
• ECLIPSE_PLUGIN_A/target/classes
• as expected

We observed during our multi-module headless build that ECLIPSE_PLUGIN_B uses the compiled classes from ECLIPSE_PLUGIN_A/bin which is not what we expected. This means our headless build depends on the compile output of the IDE.
This had already lead to headless build compile errors due to outdated .class files in the IDE's bin directory, e.g when ECLIPSE_PLUGIN_A/bin outdated => ECLIPSE_PLUGIN_B compile error. This should not be possible.


Hopefully someone can clarify why the IDE's output directory is used in a tycho-maven headless build and how to avoid this.

Thank you!
Ahmet Bilgin

MAGMA Gießereitechnologie Gesellschaft für Gießerei-, Simulations- und Regeltechnik mbH | Kackertstr. 11, 52072 Aachen, Germany | Rechtsform GmbH, Amtsgericht Aachen HRB 3912, UST-ID-Nr. DE121745780 | Geschäftsführung: Dr. Marc C. Schneider (Vorsitzender), Dr.-Ing. Jörg C. Sturm _______________________________________________
tycho-user mailing list
tycho-***@eclipse.org
To change your delivery options, retrieve your password, or unsubscribe from this list, visit https://dev.eclipse.org/mailman/listinfo/tycho-user

_______________________________________________
tycho-user mailing list
tycho-***@eclipse.org
To change your delivery options, retrieve your password, or unsubscribe from this list, visit https://dev.eclipse.org/mailman/listinfo/tycho-user
MAGMA Gießereitechnologie Gesellschaft für Gießerei-, Simulations- und Regeltechnik mbH | Kackertstr. 11, 52072 Aachen, Germany | Rechtsform GmbH, Amtsgericht Aachen HRB 3912, UST-ID-Nr. DE121745780 | Geschäftsführung: Dr. Marc C. Schneider (Vorsitzender), Dr.-Ing. Jörg C. Sturm _______________________________________________
tycho-user mailing list
tycho-***@eclipse.org
To change your delivery options, retrieve your password, or unsubscribe from this list, visit https://dev.eclipse.org/mailman/listinfo/tycho-user
MAGMA Gießereitechnologie Gesellschaft für Gießerei-, Simulations- und Regeltechnik mbH | Kackertstr. 11, 52072 Aachen, Germany | Rechtsform GmbH, Amtsgericht Aachen HRB 3912, UST-ID-Nr. DE121745780 | Geschäftsführung: Dr. Marc C. Schneider (Vorsitzender), Dr.-Ing. Jörg C. Sturm
Sievers, Jan
2016-12-13 08:57:50 UTC
Permalink
Post by Ahmet Bilgin
and will not be visible to non-OSGi aware Maven plugins.
check your MANIFEST.MF
I suspect there is some Bundle-ClassPath entry referencing @dot

Regards
Jan



On 13/12/16 09:19, "tycho-user-***@eclipse.org on behalf of Ahmet Bilgin" <tycho-user-***@eclipse.org on behalf of ***@magmasoft.de> wrote:

In my first posting I had mistakenly written that our Eclipse IDE compiled the classes to the "bin"-directory.
Instead the "@dot"-directories were used originally when we had the problems described in the opening post.

Best regards
Ahmet Bilgin

-----Ursprüngliche Nachricht-----
Von: tycho-user-***@eclipse.org [mailto:tycho-user-***@eclipse.org] Im Auftrag von Ahmet Bilgin
Gesendet: Montag, 12. Dezember 2016 18:08
An: Tycho user list
Betreff: Re: [tycho-user] Tycho-Maven multi-module build uses eclipse's compile outputdir

Hello Jan,

thanks to your response I could figure out what caused the Problem. At least it works for us now.

The Problem was that we used the following output directory in our build.properties for some historical reasons:
output.. = @dot/

As I learned today this seems to be the headless-build output directory by convention for the old eclipse build-system ANT.
There must be some hardcoded piece of code (in Tycho-maven?) that adds these @dot output directories to the compile classpath. Since we used these @dot directories as our Eclipse-IDE output-dir (by convention should only be used for headless-build) these lead to the problems I described in my previous post.

So we changed to "output.. = bin/" and everything seems to work now.

Except we still see the following DEBUG-message in headless build which can be ignored:
[INFO] Resolving class path of MavenProject: PLUGIN_A @ java/rcp/bundles/PLUGIN_A/pom.xml
[DEBUG] Dependency from java/rcp/bundles/PLUGIN_A to nested classpath entry java/rcp/bundles/PLUGIN_A/@dot can not be represented in Maven model and will not be visible to non-OSGi aware Maven plugins.

In my opinion adding the @dot directories statically to the compile path is a bug if this is really done.
To go one step further it must be ensured that the output path specified in build.properties is not part of the headless-build compile classpath. Otherwise the headless-build depends on the IDE-builds output.

Try it yourself with "output.. = @dot" and you should be able to reproduce if the analysis is correct.

Best regards
Ahmet Bilgin


-----Ursprüngliche Nachricht-----
Von: tycho-user-***@eclipse.org [mailto:tycho-user-***@eclipse.org] Im Auftrag von Sievers, Jan
Gesendet: Montag, 12. Dezember 2016 11:25
An: Tycho user list
Betreff: Re: [tycho-user] Tycho-Maven multi-module build uses eclipse's compile outputdir

output.<jar> entries in build.properties should be ignored by Tycho, see https://eclipse.org/tycho/sitedocs/BuildProperties.html

I cannot reproduce the issue by building sample project [1] in debug mode using 'mvn clean install -X'.
The compile classpath does not contain the bin/ folder (although configured in build.properties), but it does contain

[DEBUG] Classpath:
[DEBUG] /Users/d037913/git/eclipse/org.eclipse.tycho-demo/itp01/tycho.demo.itp01.tests/target/classes


If this is not the case for you, we would need a small sample project that demonstrates the unexpected behaviour.
Open a bug and attach it so we can check what's going on.

Regards,
Jan

[1] https://github.com/eclipse/tycho-demo/tree/master/itp01



On 09/12/16 18:59, "tycho-user-***@eclipse.org on behalf of Ahmet Bilgin" <tycho-user-***@eclipse.org on behalf of ***@magmasoft.de> wrote:

Hi,

I’ve noticed that Tycho-maven is using the build-output-directory configured in the build.properties (which is used in the Eclipse-IDE) also in the classpath of an headless tycho-maven build.
This is a Problem for our headless multi-module build because we had relied on the headless-build using only the compiled classes from the target/classes directories.

To be concrete we have the following problematic situation:
The classes get compiled to the following output directories depending on whether a headless or an IDE build is performed:
• Headless: target/classes
• IDE: bin

Compiling with tycho-maven the following can be observed:

PLUGIN-A
ECLIPSE_PLUGIN_A's compile classpath contains:
• bin
• why is the Eclipse IDE's output directory listed, when compiling with Tycho maven ? But this is not the real problem.
• target/classes
• as expected

PLUGIN-B
But when compiling ECLIPSE_PLUGIN_B it's compile classpath contains:
• bin
• not expected as mentioned above. But not the real problem
• target/classes
• as expected
• ECLIPSE_PLUGIN_A/bin
• This is a really a problem
• ECLIPSE_PLUGIN_A/target/classes
• as expected

We observed during our multi-module headless build that ECLIPSE_PLUGIN_B uses the compiled classes from ECLIPSE_PLUGIN_A/bin which is not what we expected. This means our headless build depends on the compile output of the IDE.
This had already lead to headless build compile errors due to outdated .class files in the IDE's bin directory, e.g when ECLIPSE_PLUGIN_A/bin outdated => ECLIPSE_PLUGIN_B compile error. This should not be possible.


Hopefully someone can clarify why the IDE's output directory is used in a tycho-maven headless build and how to avoid this.

Thank you!
Ahmet Bilgin

MAGMA Gießereitechnologie Gesellschaft für Gießerei-, Simulations- und Regeltechnik mbH | Kackertstr. 11, 52072 Aachen, Germany | Rechtsform GmbH, Amtsgericht Aachen HRB 3912, UST-ID-Nr. DE121745780 | Geschäftsführung: Dr. Marc C. Schneider (Vorsitzender), Dr.-Ing. Jörg C. Sturm _______________________________________________
tycho-user mailing list
tycho-***@eclipse.org
To change your delivery options, retrieve your password, or unsubscribe from this list, visit https://dev.eclipse.org/mailman/listinfo/tycho-user

_______________________________________________
tycho-user mailing list
tycho-***@eclipse.org
To change your delivery options, retrieve your password, or unsubscribe from this list, visit https://dev.eclipse.org/mailman/listinfo/tycho-user
MAGMA Gießereitechnologie Gesellschaft für Gießerei-, Simulations- und Regeltechnik mbH | Kackertstr. 11, 52072 Aachen, Germany | Rechtsform GmbH, Amtsgericht Aachen HRB 3912, UST-ID-Nr. DE121745780 | Geschäftsführung: Dr. Marc C. Schneider (Vorsitzender), Dr.-Ing. Jörg C. Sturm _______________________________________________
tycho-user mailing list
tycho-***@eclipse.org
To change your delivery options, retrieve your password, or unsubscribe from this list, visit https://dev.eclipse.org/mailman/listinfo/tycho-user
MAGMA Gießereitechnologie Gesellschaft für Gießerei-, Simulations- und Regeltechnik mbH | Kackertstr. 11, 52072 Aachen, Germany | Rechtsform GmbH, Amtsgericht Aachen HRB 3912, UST-ID-Nr. DE121745780 | Geschäftsführung: Dr. Marc C. Schneider (Vorsitzender), Dr.-Ing. Jörg C. Sturm
_______________________________________________
tycho-user mailing list
tycho-***@eclipse.org
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/tycho-user

Loading...