You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by Radim Kolarik <ra...@googlemail.com> on 2007/10/12 17:59:24 UTC

strange dependency change

Hi,

our web service build using SCA is implemented as a WAR application.
Our WAR pom.xml (Maven) file has the following dependencies:

<dependency>
  <groupId>org.apache.tuscany.sca</groupId>
  <artifactId>tuscany-host-webapp</artifactId>
  <version>1.0-incubating</version>
</dependency>
<dependency>
  <groupId>org.apache.tuscany.sca</groupId>
  <artifactId>tuscany-binding-ws-axis2</artifactId>
  <version>1.0-incubating</version>
</dependency>
<dependency>
  <groupId>org.apache.tuscany.sca</groupId>
  <artifactId>tuscany-implementation-java-runtime</artifactId>
  <version>1.0-incubating</version>
</dependency>

Some time ago (at the end of last month), this generated a WAR file
without servlet-api JAR in it's WEB-INF\lib folder. Now, for some
reason, it generates a war file with servlet-api in it, resulting in
the war file not working on Websphere or Weblogic.

Do you know what happened and is there any way of excluding the jar
from war automatically at tuscany side? We solved the problem by
adding an exclusion to the following dependency:

<dependency>
  <groupId>org.apache.tuscany.sca</groupId>
  <artifactId>tuscany-binding-ws-axis2</artifactId>
  <version>1.0-incubating</version>
  <exclusions>
    <exclusion>
      <groupId>javax.servlet</groupId>
      <artifactId>servlet-api</artifactId>
   </exclusion>
  </exclusions>
</dependency>

I feel a bit unconfortable about the fact that we supply a product
with clear dependency list and all of a sudden it stops working
because somewhere on the way, the dependencies have changed.

Do you think there would be anything you can do to prevent this
happening? Are you aware of the change that happened somewhere on the
way? I think the WS examples supplied with the product will not work
now if they are build using Maven.

Please let me know your comments.

Thanks a lot,
Radim

---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


Re: strange dependency change

Posted by Radim Kolarik <ra...@googlemail.com>.
Hi Sebastien,

thanks a lot for the detailed information.

We are happy with the workaround we have at the moment.

Thanks,
Radim

On 10/16/07, Jean-Sebastien Delfino <js...@apache.org> wrote:
> Jean-Sebastien Delfino wrote:
> > Radim Kolarik wrote:
> >> Hi Sebastien,
> >>
> >> I don't understand your question. What do you mean by "level" of
> >> Tuscany? We used the same build and same version - 1.0-incubating, if
> >> that is the question...
> >>
> >
> > Yes that was the question :) I just wanted to know which Tuscany
> > version you were using and make sure that you were using the same
> > version in both cases.
> >
> > One more question, which Maven version are you using?
> >
> >> We used exactly the same build scripts, same version, but suddenly the
> >> jar started to appear in the built WAR. I would bet that the JAR is
> >> now appearing in calculator example as well, meaning it won't run.
> >> About two weeks ago, the JAR was not there...
> >>
> >
> > I'll try the Tuscany 1.0 release later today, but can already confirm
> > that I am able to reproduce the problem with the Tuscany trunk with
> > Maven 2.0.7.
> >
> > I'll investigate the Maven dependency analysis report to see where
> > this new dependency on servlet-api is coming from...
> >
>
> Here's what I found after digging into the Maven POM files and the SVN
> change history, an unfortunate sequence of events.
>
> The dependency on servlet-api-2.3 is coming from an Apache Rampart
> module. See rampart-project-1.3.pom [1].
>
> In Tuscany revision r576569 [2] (between Tuscany 1.0 RC1 and RC2) we
> made a change to remove the dependency on rampart-project-1.3 as it was
> a snapshot at the time (and we did not want any snapshots in the release).
>
> However we left a dependency on rampart-core-1.3.jar, which was
> published on ibiblio.org but did not have a Maven POM published with it
> (from what I see in an archive of my Maven repository from that time,
> only the JAR file and an MD5 signature seemed to have been published).
>
> On Oct 4th, a Maven POM for rampart-core.1.3.jar was published on
> ibiblio.org [3]. That POM declared a dependency on the
> rampart-project-1.3, bringing back rampart-project-1.3.pom and the
> dependency on servlet-api-2.3.jar.
>
> To summarize:
> - nothing changed in the published Tuscany 1.0 artifacts
> - nothing changed in the Rampart 1.3 artifacts published on ibiblio.org
> - the publication of rampart-core-1.3.pom at [3] on Oct 4th suddenly
> caused that new dependency on servlet-2.3.api.jar.
>
> So here's the trap we fell into: A dependency on a JAR published on the
> ibiblio.org Maven repository not accompanied by a Maven POM can break us
> later if somebody publishes a POM that adds transitive some dependencies
> for example... That's tricky.
>
> I'm going to fix the Tuscany trunk to exclude servlet-api-2.3.jar. Our
> next release should include that fix (BTW we've committed a number of
> fixes on top of 1.0 recently and I'm starting to think that we should
> have another release soon). Are you OK with the exclusion workaround you
> have found for now until the next release?
>
> [1]
> http://mirrors.ibiblio.org/pub/mirrors/maven2/org/apache/rampart/rampart-project/1.3/rampart-project-1.3.pom
> [2]
> http://mail-archives.apache.org/mod_mbox/ws-tuscany-commits/200709.mbox/%3C20070917195644.972421A9832@eris.apache.org%3E
> [3]
> http://mirrors.ibiblio.org/pub/mirrors/maven2/org/apache/rampart/rampart-core/1.3/
>
> --
> Jean-Sebastien
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tuscany-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: tuscany-user-help@ws.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-user-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-user-help@ws.apache.org


Re: strange dependency change

Posted by Jean-Sebastien Delfino <js...@apache.org>.
Jean-Sebastien Delfino wrote:
> Radim Kolarik wrote:
>> Hi Sebastien,
>>
>> I don't understand your question. What do you mean by "level" of
>> Tuscany? We used the same build and same version - 1.0-incubating, if
>> that is the question...
>>   
>
> Yes that was the question :) I just wanted to know which Tuscany 
> version you were using and make sure that you were using the same 
> version in both cases.
>
> One more question, which Maven version are you using?
>
>> We used exactly the same build scripts, same version, but suddenly the
>> jar started to appear in the built WAR. I would bet that the JAR is
>> now appearing in calculator example as well, meaning it won't run.
>> About two weeks ago, the JAR was not there...
>>   
>
> I'll try the Tuscany 1.0 release later today, but can already confirm 
> that I am able to reproduce the problem with the Tuscany trunk with 
> Maven 2.0.7.
>
> I'll investigate the Maven dependency analysis report to see where 
> this new dependency on servlet-api is coming from...
>

Here's what I found after digging into the Maven POM files and the SVN 
change history, an unfortunate sequence of events.

The dependency on servlet-api-2.3 is coming from an Apache Rampart 
module. See rampart-project-1.3.pom [1].

In Tuscany revision r576569 [2] (between Tuscany 1.0 RC1 and RC2) we 
made a change to remove the dependency on rampart-project-1.3 as it was 
a snapshot at the time (and we did not want any snapshots in the release).

However we left a dependency on rampart-core-1.3.jar, which was 
published on ibiblio.org but did not have a Maven POM published with it 
(from what I see in an archive of my Maven repository from that time, 
only the JAR file and an MD5 signature seemed to have been published).

On Oct 4th, a Maven POM for rampart-core.1.3.jar was published on 
ibiblio.org [3]. That POM declared a dependency on the 
rampart-project-1.3, bringing back rampart-project-1.3.pom and the 
dependency on servlet-api-2.3.jar.

To summarize:
- nothing changed in the published Tuscany 1.0 artifacts
- nothing changed in the Rampart 1.3 artifacts published on ibiblio.org
- the publication of rampart-core-1.3.pom at [3] on Oct 4th suddenly 
caused that new dependency on servlet-2.3.api.jar.

So here's the trap we fell into: A dependency on a JAR published on the 
ibiblio.org Maven repository not accompanied by a Maven POM can break us 
later if somebody publishes a POM that adds transitive some dependencies 
for example... That's tricky.

I'm going to fix the Tuscany trunk to exclude servlet-api-2.3.jar. Our 
next release should include that fix (BTW we've committed a number of 
fixes on top of 1.0 recently and I'm starting to think that we should 
have another release soon). Are you OK with the exclusion workaround you 
have found for now until the next release?

[1] 
http://mirrors.ibiblio.org/pub/mirrors/maven2/org/apache/rampart/rampart-project/1.3/rampart-project-1.3.pom
[2] 
http://mail-archives.apache.org/mod_mbox/ws-tuscany-commits/200709.mbox/%3C20070917195644.972421A9832@eris.apache.org%3E
[3] 
http://mirrors.ibiblio.org/pub/mirrors/maven2/org/apache/rampart/rampart-core/1.3/

-- 
Jean-Sebastien


---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-user-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-user-help@ws.apache.org


Re: strange dependency change

Posted by Jean-Sebastien Delfino <js...@apache.org>.
Radim Kolarik wrote:
> Hi Sebastien,
>
> I don't understand your question. What do you mean by "level" of
> Tuscany? We used the same build and same version - 1.0-incubating, if
> that is the question...
>   

Yes that was the question :) I just wanted to know which Tuscany version 
you were using and make sure that you were using the same version in 
both cases.

One more question, which Maven version are you using?
 
> We used exactly the same build scripts, same version, but suddenly the
> jar started to appear in the built WAR. I would bet that the JAR is
> now appearing in calculator example as well, meaning it won't run.
> About two weeks ago, the JAR was not there...
>   

I'll try the Tuscany 1.0 release later today, but can already confirm 
that I am able to reproduce the problem with the Tuscany trunk with 
Maven 2.0.7.

I'll investigate the Maven dependency analysis report to see where this 
new dependency on servlet-api is coming from...

-- 
Jean-Sebastien


---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-user-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-user-help@ws.apache.org


Re: strange dependency change

Posted by Radim Kolarik <ra...@googlemail.com>.
Hi Sebastien,

I don't understand your question. What do you mean by "level" of
Tuscany? We used the same build and same version - 1.0-incubating, if
that is the question...

We used exactly the same build scripts, same version, but suddenly the
jar started to appear in the built WAR. I would bet that the JAR is
now appearing in calculator example as well, meaning it won't run.
About two weeks ago, the JAR was not there...

Best regards,
Radim

On 10/12/07, Jean-Sebastien Delfino <js...@apache.org> wrote:
> [snip]
> Radim Kolarik wrote:
> > Hi,
> >
> > our web service build using SCA is implemented as a WAR application.
> > Our WAR pom.xml (Maven) file has the following dependencies:
> >
> > <dependency>
> >   <groupId>org.apache.tuscany.sca</groupId>
> >   <artifactId>tuscany-host-webapp</artifactId>
> >   <version>1.0-incubating</version>
> > </dependency>
> > <dependency>
> >   <groupId>org.apache.tuscany.sca</groupId>
> >   <artifactId>tuscany-binding-ws-axis2</artifactId>
> >   <version>1.0-incubating</version>
> > </dependency>
> > <dependency>
> >   <groupId>org.apache.tuscany.sca</groupId>
> >   <artifactId>tuscany-implementation-java-runtime</artifactId>
> >   <version>1.0-incubating</version>
> > </dependency>
> >
> > Some time ago (at the end of last month), this generated a WAR file
> > without servlet-api JAR in it's WEB-INF\lib folder. Now, for some
> > reason, it generates a war file with servlet-api in it, resulting in
> > the war file not working on Websphere or Weblogic.
> >
>
> Which levels of Tuscany were you using before? and now?
>
> > Do you know what happened and is there any way of excluding the jar
> > from war automatically at tuscany side? We solved the problem by
> > adding an exclusion to the following dependency:
> >
>
> It'll depend on your answer to the above question :)
>
> --
> Jean-Sebastien
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tuscany-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: tuscany-user-help@ws.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-user-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-user-help@ws.apache.org


Re: strange dependency change

Posted by Jean-Sebastien Delfino <js...@apache.org>.
[snip]
Radim Kolarik wrote:
> Hi,
>
> our web service build using SCA is implemented as a WAR application.
> Our WAR pom.xml (Maven) file has the following dependencies:
>
> <dependency>
>   <groupId>org.apache.tuscany.sca</groupId>
>   <artifactId>tuscany-host-webapp</artifactId>
>   <version>1.0-incubating</version>
> </dependency>
> <dependency>
>   <groupId>org.apache.tuscany.sca</groupId>
>   <artifactId>tuscany-binding-ws-axis2</artifactId>
>   <version>1.0-incubating</version>
> </dependency>
> <dependency>
>   <groupId>org.apache.tuscany.sca</groupId>
>   <artifactId>tuscany-implementation-java-runtime</artifactId>
>   <version>1.0-incubating</version>
> </dependency>
>
> Some time ago (at the end of last month), this generated a WAR file
> without servlet-api JAR in it's WEB-INF\lib folder. Now, for some
> reason, it generates a war file with servlet-api in it, resulting in
> the war file not working on Websphere or Weblogic.
>   

Which levels of Tuscany were you using before? and now?

> Do you know what happened and is there any way of excluding the jar
> from war automatically at tuscany side? We solved the problem by
> adding an exclusion to the following dependency:
>   

It'll depend on your answer to the above question :)

-- 
Jean-Sebastien


---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-user-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-user-help@ws.apache.org


Re: strange dependency change

Posted by Jean-Sebastien Delfino <js...@apache.org>.
[snip]
Radim Kolarik wrote:
> Hi,
>
> our web service build using SCA is implemented as a WAR application.
> Our WAR pom.xml (Maven) file has the following dependencies:
>
> <dependency>
>   <groupId>org.apache.tuscany.sca</groupId>
>   <artifactId>tuscany-host-webapp</artifactId>
>   <version>1.0-incubating</version>
> </dependency>
> <dependency>
>   <groupId>org.apache.tuscany.sca</groupId>
>   <artifactId>tuscany-binding-ws-axis2</artifactId>
>   <version>1.0-incubating</version>
> </dependency>
> <dependency>
>   <groupId>org.apache.tuscany.sca</groupId>
>   <artifactId>tuscany-implementation-java-runtime</artifactId>
>   <version>1.0-incubating</version>
> </dependency>
>
> Some time ago (at the end of last month), this generated a WAR file
> without servlet-api JAR in it's WEB-INF\lib folder. Now, for some
> reason, it generates a war file with servlet-api in it, resulting in
> the war file not working on Websphere or Weblogic.
>   

Which levels of Tuscany were you using before? and now?

> Do you know what happened and is there any way of excluding the jar
> from war automatically at tuscany side? We solved the problem by
> adding an exclusion to the following dependency:
>   

It'll depend on your answer to the above question :)

-- 
Jean-Sebastien


---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org