You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by lr...@apache.org on 2008/10/28 00:03:06 UTC

svn commit: r708370 - in /tuscany/branches/sca-equinox: modules/pom.xml pom.xml

Author: lresende
Date: Mon Oct 27 16:03:06 2008
New Revision: 708370

URL: http://svn.apache.org/viewvc?rev=708370&view=rev
Log:
Moving usage of tuscany-eclipse-compiler to modules only, to allow tools to be compiled successfully.

Modified:
    tuscany/branches/sca-equinox/modules/pom.xml
    tuscany/branches/sca-equinox/pom.xml

Modified: tuscany/branches/sca-equinox/modules/pom.xml
URL: http://svn.apache.org/viewvc/tuscany/branches/sca-equinox/modules/pom.xml?rev=708370&r1=708369&r2=708370&view=diff
==============================================================================
--- tuscany/branches/sca-equinox/modules/pom.xml (original)
+++ tuscany/branches/sca-equinox/modules/pom.xml Mon Oct 27 16:03:06 2008
@@ -170,6 +170,26 @@
 
     <build>
         <plugins>
+            <!-- compiler plugin configuration -->
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-compiler-plugin</artifactId>
+                <version>2.0.2</version>
+                <configuration>
+                    <compilerId>tuscany-eclipse</compilerId>
+                    <source>1.5</source>
+                    <target>1.5</target>
+                </configuration>
+
+                <dependencies>
+                    <dependency>
+                        <groupId>org.apache.tuscany.sca</groupId>
+                        <artifactId>tuscany-maven-eclipse-compiler</artifactId>
+                        <version>1.4-SNAPSHOT</version>
+                    </dependency>
+                </dependencies>
+            </plugin>
+        
             <plugin>
                <artifactId>maven-eclipse-plugin</artifactId>
                <version>2.5.1</version>

Modified: tuscany/branches/sca-equinox/pom.xml
URL: http://svn.apache.org/viewvc/tuscany/branches/sca-equinox/pom.xml?rev=708370&r1=708369&r2=708370&view=diff
==============================================================================
--- tuscany/branches/sca-equinox/pom.xml (original)
+++ tuscany/branches/sca-equinox/pom.xml Mon Oct 27 16:03:06 2008
@@ -340,6 +340,7 @@
         </profile>
     </profiles>
  
+
     <build>
         <defaultGoal>install</defaultGoal>
 
@@ -367,18 +368,12 @@
                     <artifactId>maven-compiler-plugin</artifactId>
                     <version>2.0.2</version>
                     <configuration>
-                        <compilerId>tuscany-eclipse</compilerId>
+                    <!--
+                        <compilerId>eclipse</compilerId>
+                     -->
                         <source>1.5</source>
                         <target>1.5</target>
                     </configuration>
-
-                    <dependencies>
-                        <dependency>
-                            <groupId>org.apache.tuscany.sca</groupId>
-                            <artifactId>tuscany-maven-eclipse-compiler</artifactId>
-                            <version>1.4-SNAPSHOT</version>
-                        </dependency>
-                    </dependencies>
                 </plugin>
 
                 <!-- surefire plugin configuration -->



Considering OSGi imports/exports at build time, was: svn commit: r708370 - in /tuscany/branches/sca-equinox: modules/pom.xml pom.xml

Posted by Jean-Sebastien Delfino <js...@apache.org>.
Jean-Sebastien Delfino wrote:
> Raymond Feng wrote:
>> Hi,
>>
>> The problem is for other projects under the tools folder, for example, 
>> maven-ant-generator depends on maven-compiler-plugin which in turn 
>> depends on tuscany-eclipse-compiler. So it fails when you do a 
>> top-down build unless you have ever built the tuscany-eclipse-compiler 
>> alone.
>>
>> Thanks,
>> Raymond
> 
> It's a more general issue with Maven, which in a multi-module project 
> Maven doesn't build a plugin module before the modules that depend on 
> it, and that's why Luciano's fix attempt didn't work.
> 
> We'd see the same problem with our maven-wsdl2java plugin if it was not 
> already published in a Maven repository.
> 
> I can see two solutions to this:
> (a) publish a snapshot of the plugin
> (b) add a 'setup' profile to the top pom to build it and run that 
> profile first
> 

So, that plugin should eventually consider OSGi imports/exports at build 
time.

I see two ways to do it:
- Make JavaCompiler use an OSGi ClassLoader instead of a URLClassLoader;
- Make ClassLoaderNameEnvironment honor the OSGi imports/exports.

The solution needs to be light and fast to not burden the build.

Any thoughts about a simpler way to implement this?
-- 
Jean-Sebastien

Re: svn commit: r708370 - in /tuscany/branches/sca-equinox: modules/pom.xml pom.xml

Posted by Jean-Sebastien Delfino <js...@apache.org>.
Raymond Feng wrote:
> Hi,
> 
> The problem is for other projects under the tools folder, for example, 
> maven-ant-generator depends on maven-compiler-plugin which in turn 
> depends on tuscany-eclipse-compiler. So it fails when you do a top-down 
> build unless you have ever built the tuscany-eclipse-compiler alone.
> 
> Thanks,
> Raymond

It's a more general issue with Maven, which in a multi-module project 
Maven doesn't build a plugin module before the modules that depend on 
it, and that's why Luciano's fix attempt didn't work.

We'd see the same problem with our maven-wsdl2java plugin if it was not 
already published in a Maven repository.

I can see two solutions to this:
(a) publish a snapshot of the plugin
(b) add a 'setup' profile to the top pom to build it and run that 
profile first

-- 
Jean-Sebastien

Re: svn commit: r708370 - in /tuscany/branches/sca-equinox: modules/pom.xml pom.xml

Posted by Luciano Resende <lu...@gmail.com>.
I was able to find some issues even after applying my fix. I'll revert
my changes for now, and document the manual steps to first build
tuscany-eclipse-compiler from tools, before trying a top down build.

On Mon, Oct 27, 2008 at 8:11 PM, Raymond Feng <en...@gmail.com> wrote:
> Hi,
>
> The problem is for other projects under the tools folder, for example,
> maven-ant-generator depends on maven-compiler-plugin which in turn depends
> on tuscany-eclipse-compiler. So it fails when you do a top-down build unless
> you have ever built the tuscany-eclipse-compiler alone.
>
> Thanks,
> Raymond
> --------------------------------------------------
> From: "Jean-Sebastien Delfino" <js...@apache.org>
> Sent: Monday, October 27, 2008 7:55 PM
> To: <de...@tuscany.apache.org>
> Subject: Re: svn commit: r708370 - in /tuscany/branches/sca-equinox:
> modules/pom.xml pom.xml
>
>> Luciano Resende wrote:
>>>
>>> Let me see if I can clearly explain the issue : in the sca-pom, when
>>> you defined the maven-compiler-plugin, you had a dependency on
>>> tuscany-maven-eclipse-compiler, this kind made maven try to build the
>>> tuscany-maven-eclipse-compiler with a dependency on itself.....
>>
>> Are you sure? Here is the maven-eclipse-compiler's POM:
>>
>> http://svn.apache.org/repos/asf/tuscany/branches/sca-equinox/tools/maven/maven-eclipse-compiler/pom.xml
>>
>> I may have missed something but I had customized it to avoid that kind of
>> circular dependency (it has a different parent POM).
>>
>> This
>>>
>>> issue would only happen if you don't have the maven-eclipse-compiler
>>> in your local repo, and that was probably why you didn't see the
>>> issue.
>>>
>>> Anyway, were you thinking to use this to all modules (e.g modules,
>>> samples, itest, etc ?), or is it ok to have it in the tuscany modules
>>> (a.k.a sca/modules) only ?
>>
>> I am happily using it for all modules (as it's much faster and lighter,
>> more flexible wrt error reporting and can be made OSGi-aware).
>>
>> --
>> Jean-Sebastien
>
>



-- 
Luciano Resende
Apache Tuscany, Apache PhotArk
http://people.apache.org/~lresende
http://lresende.blogspot.com/

Re: svn commit: r708370 - in /tuscany/branches/sca-equinox: modules/pom.xml pom.xml

Posted by Raymond Feng <en...@gmail.com>.
Hi,

The problem is for other projects under the tools folder, for example, 
maven-ant-generator depends on maven-compiler-plugin which in turn depends 
on tuscany-eclipse-compiler. So it fails when you do a top-down build unless 
you have ever built the tuscany-eclipse-compiler alone.

Thanks,
Raymond
--------------------------------------------------
From: "Jean-Sebastien Delfino" <js...@apache.org>
Sent: Monday, October 27, 2008 7:55 PM
To: <de...@tuscany.apache.org>
Subject: Re: svn commit: r708370 - in /tuscany/branches/sca-equinox: 
modules/pom.xml pom.xml

> Luciano Resende wrote:
>> Let me see if I can clearly explain the issue : in the sca-pom, when
>> you defined the maven-compiler-plugin, you had a dependency on
>> tuscany-maven-eclipse-compiler, this kind made maven try to build the
>> tuscany-maven-eclipse-compiler with a dependency on itself.....
>
> Are you sure? Here is the maven-eclipse-compiler's POM:
> http://svn.apache.org/repos/asf/tuscany/branches/sca-equinox/tools/maven/maven-eclipse-compiler/pom.xml
>
> I may have missed something but I had customized it to avoid that kind of 
> circular dependency (it has a different parent POM).
>
> This
>> issue would only happen if you don't have the maven-eclipse-compiler
>> in your local repo, and that was probably why you didn't see the
>> issue.
>>
>> Anyway, were you thinking to use this to all modules (e.g modules,
>> samples, itest, etc ?), or is it ok to have it in the tuscany modules
>> (a.k.a sca/modules) only ?
>
> I am happily using it for all modules (as it's much faster and lighter, 
> more flexible wrt error reporting and can be made OSGi-aware).
>
> -- 
> Jean-Sebastien 


Re: svn commit: r708370 - in /tuscany/branches/sca-equinox: modules/pom.xml pom.xml

Posted by Luciano Resende <lu...@gmail.com>.
I'm fine to see my changes reverted if you are able get a sucessful
tools build with a clean maven repo (removing
.m2\repository\org\apache\tuscany).

On Mon, Oct 27, 2008 at 7:55 PM, Jean-Sebastien Delfino
<js...@apache.org> wrote:
> Luciano Resende wrote:
>>
>> Let me see if I can clearly explain the issue : in the sca-pom, when
>> you defined the maven-compiler-plugin, you had a dependency on
>> tuscany-maven-eclipse-compiler, this kind made maven try to build the
>> tuscany-maven-eclipse-compiler with a dependency on itself.....
>
> Are you sure? Here is the maven-eclipse-compiler's POM:
> http://svn.apache.org/repos/asf/tuscany/branches/sca-equinox/tools/maven/maven-eclipse-compiler/pom.xml
>
> I may have missed something but I had customized it to avoid that kind of
> circular dependency (it has a different parent POM).
>
> This
>>
>> issue would only happen if you don't have the maven-eclipse-compiler
>> in your local repo, and that was probably why you didn't see the
>> issue.
>>
>> Anyway, were you thinking to use this to all modules (e.g modules,
>> samples, itest, etc ?), or is it ok to have it in the tuscany modules
>> (a.k.a sca/modules) only ?
>
> I am happily using it for all modules (as it's much faster and lighter, more
> flexible wrt error reporting and can be made OSGi-aware).
>
> --
> Jean-Sebastien
>



-- 
Luciano Resende
Apache Tuscany, Apache PhotArk
http://people.apache.org/~lresende
http://lresende.blogspot.com/

Re: svn commit: r708370 - in /tuscany/branches/sca-equinox: modules/pom.xml pom.xml

Posted by Jean-Sebastien Delfino <js...@apache.org>.
Luciano Resende wrote:
> Let me see if I can clearly explain the issue : in the sca-pom, when
> you defined the maven-compiler-plugin, you had a dependency on
> tuscany-maven-eclipse-compiler, this kind made maven try to build the
> tuscany-maven-eclipse-compiler with a dependency on itself.....

Are you sure? Here is the maven-eclipse-compiler's POM:
http://svn.apache.org/repos/asf/tuscany/branches/sca-equinox/tools/maven/maven-eclipse-compiler/pom.xml

I may have missed something but I had customized it to avoid that kind 
of circular dependency (it has a different parent POM).

This
> issue would only happen if you don't have the maven-eclipse-compiler
> in your local repo, and that was probably why you didn't see the
> issue.
> 
> Anyway, were you thinking to use this to all modules (e.g modules,
> samples, itest, etc ?), or is it ok to have it in the tuscany modules
> (a.k.a sca/modules) only ?

I am happily using it for all modules (as it's much faster and lighter, 
more flexible wrt error reporting and can be made OSGi-aware).

-- 
Jean-Sebastien

Re: svn commit: r708370 - in /tuscany/branches/sca-equinox: modules/pom.xml pom.xml

Posted by Luciano Resende <lu...@gmail.com>.
Let me see if I can clearly explain the issue : in the sca-pom, when
you defined the maven-compiler-plugin, you had a dependency on
tuscany-maven-eclipse-compiler, this kind made maven try to build the
tuscany-maven-eclipse-compiler with a dependency on itself..... This
issue would only happen if you don't have the maven-eclipse-compiler
in your local repo, and that was probably why you didn't see the
issue.

Anyway, were you thinking to use this to all modules (e.g modules,
samples, itest, etc ?), or is it ok to have it in the tuscany modules
(a.k.a sca/modules) only ?

On Mon, Oct 27, 2008 at 5:23 PM, Jean-Sebastien Delfino
<js...@apache.org> wrote:
> On Mon, Oct 27, 2008 at 4:03 PM,  <lr...@apache.org> wrote:
>> Author: lresende
>> Date: Mon Oct 27 16:03:06 2008
>> New Revision: 708370
>>
>> URL: http://svn.apache.org/viewvc?rev=708370&view=rev
>> Log:
>> Moving usage of tuscany-eclipse-compiler to modules only, to allow tools to be compiled successfully.
>>
>> Modified:
>>    tuscany/branches/sca-equinox/modules/pom.xml
>>    tuscany/branches/sca-equinox/pom.xml
>>
>> Modified: tuscany/branches/sca-equinox/modules/pom.xml
>> URL: http://svn.apache.org/viewvc/tuscany/branches/sca-equinox/modules/pom.xml?rev=708370&r1=708369&r2=708370&view=diff
>> ==============================================================================
>> --- tuscany/branches/sca-equinox/modules/pom.xml (original)
>> +++ tuscany/branches/sca-equinox/modules/pom.xml Mon Oct 27 16:03:06 2008
>> @@ -170,6 +170,26 @@
>>
>>     <build>
>>         <plugins>
>> +            <!-- compiler plugin configuration -->
>> +            <plugin>
>> +                <groupId>org.apache.maven.plugins</groupId>
>> +                <artifactId>maven-compiler-plugin</artifactId>
>> +                <version>2.0.2</version>
>> +                <configuration>
>> +                    <compilerId>tuscany-eclipse</compilerId>
>> +                    <source>1.5</source>
>> +                    <target>1.5</target>
>> +                </configuration>
>> +
>> +                <dependencies>
>> +                    <dependency>
>> +                        <groupId>org.apache.tuscany.sca</groupId>
>> +                        <artifactId>tuscany-maven-eclipse-compiler</artifactId>
>> +                        <version>1.4-SNAPSHOT</version>
>> +                    </dependency>
>> +                </dependencies>
>> +            </plugin>
>> +
>>             <plugin>
>>                <artifactId>maven-eclipse-plugin</artifactId>
>>                <version>2.5.1</version>
>>
>> Modified: tuscany/branches/sca-equinox/pom.xml
>> URL: http://svn.apache.org/viewvc/tuscany/branches/sca-equinox/pom.xml?rev=708370&r1=708369&r2=708370&view=diff
>> ==============================================================================
>> --- tuscany/branches/sca-equinox/pom.xml (original)
>> +++ tuscany/branches/sca-equinox/pom.xml Mon Oct 27 16:03:06 2008
>> @@ -340,6 +340,7 @@
>>         </profile>
>>     </profiles>
>>
>> +
>>     <build>
>>         <defaultGoal>install</defaultGoal>
>>
>> @@ -367,18 +368,12 @@
>>                     <artifactId>maven-compiler-plugin</artifactId>
>>                     <version>2.0.2</version>
>>                     <configuration>
>> -                        <compilerId>tuscany-eclipse</compilerId>
>> +                    <!--
>> +                        <compilerId>eclipse</compilerId>
>> +                     -->
>>                         <source>1.5</source>
>>                         <target>1.5</target>
>>                     </configuration>
>> -
>> -                    <dependencies>
>> -                        <dependency>
>> -                            <groupId>org.apache.tuscany.sca</groupId>
>> -                            <artifactId>tuscany-maven-eclipse-compiler</artifactId>
>> -                            <version>1.4-SNAPSHOT</version>
>> -                        </dependency>
>> -                    </dependencies>
>>                 </plugin>
>>
>>                 <!-- surefire plugin configuration -->
>>
>>
>>
>
> What was the error with the compiler plugin? I had configured the
> maven-eclipse-compiler POM to use Javac, and the other tools were
> compiling OK for me.
>
> --
> Jean-Sebastien
>



-- 
Luciano Resende
Apache Tuscany, Apache PhotArk
http://people.apache.org/~lresende
http://lresende.blogspot.com/

Re: svn commit: r708370 - in /tuscany/branches/sca-equinox: modules/pom.xml pom.xml

Posted by Jean-Sebastien Delfino <js...@apache.org>.
On Mon, Oct 27, 2008 at 4:03 PM,  <lr...@apache.org> wrote:
> Author: lresende
> Date: Mon Oct 27 16:03:06 2008
> New Revision: 708370
>
> URL: http://svn.apache.org/viewvc?rev=708370&view=rev
> Log:
> Moving usage of tuscany-eclipse-compiler to modules only, to allow tools to be compiled successfully.
>
> Modified:
>    tuscany/branches/sca-equinox/modules/pom.xml
>    tuscany/branches/sca-equinox/pom.xml
>
> Modified: tuscany/branches/sca-equinox/modules/pom.xml
> URL: http://svn.apache.org/viewvc/tuscany/branches/sca-equinox/modules/pom.xml?rev=708370&r1=708369&r2=708370&view=diff
> ==============================================================================
> --- tuscany/branches/sca-equinox/modules/pom.xml (original)
> +++ tuscany/branches/sca-equinox/modules/pom.xml Mon Oct 27 16:03:06 2008
> @@ -170,6 +170,26 @@
>
>     <build>
>         <plugins>
> +            <!-- compiler plugin configuration -->
> +            <plugin>
> +                <groupId>org.apache.maven.plugins</groupId>
> +                <artifactId>maven-compiler-plugin</artifactId>
> +                <version>2.0.2</version>
> +                <configuration>
> +                    <compilerId>tuscany-eclipse</compilerId>
> +                    <source>1.5</source>
> +                    <target>1.5</target>
> +                </configuration>
> +
> +                <dependencies>
> +                    <dependency>
> +                        <groupId>org.apache.tuscany.sca</groupId>
> +                        <artifactId>tuscany-maven-eclipse-compiler</artifactId>
> +                        <version>1.4-SNAPSHOT</version>
> +                    </dependency>
> +                </dependencies>
> +            </plugin>
> +
>             <plugin>
>                <artifactId>maven-eclipse-plugin</artifactId>
>                <version>2.5.1</version>
>
> Modified: tuscany/branches/sca-equinox/pom.xml
> URL: http://svn.apache.org/viewvc/tuscany/branches/sca-equinox/pom.xml?rev=708370&r1=708369&r2=708370&view=diff
> ==============================================================================
> --- tuscany/branches/sca-equinox/pom.xml (original)
> +++ tuscany/branches/sca-equinox/pom.xml Mon Oct 27 16:03:06 2008
> @@ -340,6 +340,7 @@
>         </profile>
>     </profiles>
>
> +
>     <build>
>         <defaultGoal>install</defaultGoal>
>
> @@ -367,18 +368,12 @@
>                     <artifactId>maven-compiler-plugin</artifactId>
>                     <version>2.0.2</version>
>                     <configuration>
> -                        <compilerId>tuscany-eclipse</compilerId>
> +                    <!--
> +                        <compilerId>eclipse</compilerId>
> +                     -->
>                         <source>1.5</source>
>                         <target>1.5</target>
>                     </configuration>
> -
> -                    <dependencies>
> -                        <dependency>
> -                            <groupId>org.apache.tuscany.sca</groupId>
> -                            <artifactId>tuscany-maven-eclipse-compiler</artifactId>
> -                            <version>1.4-SNAPSHOT</version>
> -                        </dependency>
> -                    </dependencies>
>                 </plugin>
>
>                 <!-- surefire plugin configuration -->
>
>
>

What was the error with the compiler plugin? I had configured the
maven-eclipse-compiler POM to use Javac, and the other tools were
compiling OK for me.

-- 
Jean-Sebastien