You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by Manfred Geiler <ma...@gmail.com> on 2006/04/24 16:53:43 UTC

[Important] Ugly bug in core pom.xml for 1.1.2 and 1.1.3

The pom.xml of the myfaces-core-project artifact contains the following
errornous lines:
  <repositories>
    <repository>
      <snapshots />
      <id>apache-maven-snapshots</id>
      <url>http://cvs.apache.org/maven-snapshot-repository</url>
    </repository>
  </repositories>

At least for the newest Maven 2.0.4 these lines make builds fail because
Maven tries to download the released(!) myfaces-master from the apache
snapshot(!) repo.

Correct syntax would be:
  <repositories>
    <repository>
        <releases>
          <enabled>false</enabled>
        </releases>
        <snapshots>
          <enabled>true</enabled>
        </snapshots>
        <id>apache-maven-snapshots</id>
        <url>http://cvs.apache.org/maven-snapshot-repository</url>
    </repository>
  </repositories>

Just corrected this on the 1.1.3 branch.
Sean, could you please build a new RC?

What about 1.1.2?
Is it possible to replace the already released
myfaces-core-project-1.1.2.pom? Shall I correct the 1.1.2 core branch?

Note: Without that correction nobody is able to build Maven projects that
depend on myfaces-api-1.1.2 or myfaces-impl-1.1.2 !

Manfred

Re: [Important] Ugly bug in core pom.xml for 1.1.2 and 1.1.3

Posted by Paul Spencer <pa...@apache.org>.
For what it is worth, I have been using MyFaces 1.1.1 inside a web 
application built via Maven 2.0.4. To upgrade to 1.1.3-SNAPSHOT of 
MyFaces and Tomahawk I made the following changes to pom.xml

1) Removed the MyFaces 1.1.1 dependencies
     <dependency>
       <groupId>myfaces</groupId>
       <artifactId>myfaces-impl</artifactId>
       <version>1.1.1</version>
     </dependency>
     <dependency>
       <groupId>myfaces</groupId>
       <artifactId>tomahawk</artifactId>
       <version>1.1.1</version>
     </dependency>

2) Added MyFaces 1.1.3-SNAPSHOT dependencies. (Notice myfaces-api is a
    new dependency)
     <dependency>
       <groupId>org.apache.myfaces.core</groupId>
       <artifactId>myfaces-api</artifactId>
       <version>1.1.3-SNAPSHOT</version>
     </dependency>
     <dependency>
       <groupId>org.apache.myfaces.core</groupId>
       <artifactId>myfaces-impl</artifactId>
       <version>1.1.3-SNAPSHOT</version>
     </dependency>
     <dependency>
       <groupId>org.apache.myfaces.tomahawk</groupId>
       <artifactId>tomahawk</artifactId>
       <version>1.1.3-SNAPSHOT</version>
     </dependency>

3) Added the Apache snapshot repository.
   <repositories>
      <repository>
          <releases>
            <enabled>false</enabled>
          </releases>
          <snapshots>
            <enabled>true</enabled>
          </snapshots>
          <id>apache-maven-snapshots</id>
          <url>http://cvs.apache.org/maven-snapshot-repository</url>
      </repository>
    </repositories>


The web application built cleanly and ran as expected.

Paul Spencer


Manfred Geiler wrote:
> On 4/24/06, Sean Schofield <se...@gmail.com> wrote:
> 
>>I think this is the wrong way to fix it.  I'm not sure what changing
>>the releases enabled to false does (maybe someone can answer that) but
>>here's the way I see the problem.
> 
> 
> 
> This IS the right way. Believe me.
> The <snapshot> element without content is a syntax error - have a look at
> maven docs!
> 
> What we try to tell Maven is:
> Use the url http://cvs.apache.org/maven-snapshot-repository to download
> snapshots, but do not use this url to seek release artifacts.
> The correct syntax is to explicitly enable this repository for snapshots but
> disable it for releases.
> 
> Actually when you build a custom project with a
> myfaces-impl-1.1.2dependency Maven
> 2.0.4 tries to download the myfaces-master-1.0.1 release(!) from
> http://cvs.apache.org/maven-snapshot-repository, which is subject to fail of
> course.
> Try it out!
> 
> This is the only build problem with the 1.1.2 core release. There is no
> issue regarding myfaces-shared.
> 
> 
> 1.1.2 branch does not build b/c the myfaces-shared stuff is not in
> 
>>ibiblio.  Its ok that these shared artifacts are not in ibiblio
>>(that's what we wanted), they just need to be available in our own
>>MyFaces repository.  (See my earlier post)
> 
> 
> 
> I think you got me wrong here. I did not try to build the 1.1.2 branch. What
> I meant: when you build a project that DEPENDS on 1.1.2 core, then you run
> into problems.
> 
> 
> In the short run to build core-1.1.2 and core-1.1.3 you just need to
> 
>>check out the appropriate shared and maven branches and build on your
>>local machine.
>>
>>For all releases going forward I think we update the master pom stuff
>>and add a reference to a new myfaces repo which contains the shared
>>artifacts.  That's actually why I'm holding off on the vote for the
>>1.1.3 core b/c we really need this going forward.
>>
>>I'm going to revert your change for now.
> 
> 
> 
> Please leave my changes. They are ok.
> We should also try to fix the releases myfaces-core-project-1.1.2.pom ASAP.
> 
> Manfred
> 
> 
> 
> 
> 
>>On 4/24/06, Manfred Geiler <ma...@gmail.com> wrote:
>>
>>>The pom.xml of the myfaces-core-project artifact contains the following
>>>errornous lines:
>>>  <repositories>
>>>    <repository>
>>>      <snapshots />
>>>      <id>apache-maven-snapshots</id>
>>>
>>><url>http://cvs.apache.org/maven-snapshot-repository</url>
>>>    </repository>
>>>  </repositories>
>>>
>>>At least for the newest Maven 2.0.4 these lines make builds fail because
>>>Maven tries to download the released(!) myfaces-master from the apache
>>>snapshot(!) repo.
>>>
>>>Correct syntax would be:
>>>  <repositories>
>>>    <repository>
>>>        <releases>
>>>          <enabled>false</enabled>
>>>        </releases>
>>>        <snapshots>
>>>          <enabled>true</enabled>
>>>        </snapshots>
>>>        <id>apache-maven-snapshots</id>
>>>
>>><url>http://cvs.apache.org/maven-snapshot-repository</url>
>>>    </repository>
>>>  </repositories>
>>>
>>>Just corrected this on the 1.1.3 branch.
>>>Sean, could you please build a new RC?
>>>
>>>What about 1.1.2?
>>>Is it possible to replace the already released
>>>myfaces-core-project-1.1.2.pom? Shall I correct the 1.1.2 core branch?
>>>
>>>Note: Without that correction nobody is able to build Maven projects
>>
>>that
>>
>>>depend on myfaces-api-1.1.2 or myfaces-impl-1.1.2 !
>>>
>>>Manfred
>>>
>>>
>>
> 


Re: [Important] Ugly bug in core pom.xml for 1.1.2 and 1.1.3

Posted by Sean Schofield <se...@gmail.com>.
We'd have to ask the maven people to republish just this artifact. 
Technically it requires a new vote, etc.

Lets concentrate on the new release first.  I'm about to start a
[VOTE] thread once TCK testing is done.  In the meantime, please check
your independent project agains the jars in our new myfaces repo[1].

Sean

[1] http://myfaces.zones.apache.org/dist/maven-repository

On 4/26/06, Manfred Geiler <ma...@gmail.com> wrote:
> On 4/25/06, Sean Schofield <se...@gmail.com> wrote:
>
> > > Actually when you build a custom project with a myfaces-impl-1.1.2
> > > dependency Maven 2.0.4 tries to download the myfaces-master-1.0.1
> release(!)
> > > from http://cvs.apache.org/maven-snapshot-repository,
> which
> > > is subject to fail of course.
> > > Try it out!
> >
> > OK now I see what you are saying.  I didn't realize this was a custom
> > project issue.  Interesting that maven downloads the master-pom.  Its
> > really only a maven-related dependency.  I'm suprised its requiring
> > it.
> >
> > Out of curiousity why doesn't maven just grab the myfaces-master-1.0.1
> > from ibiblio?  Why is it even checking the snapshot repo?
>
>
> Looks like Maven tries to do that because WE coerce Maven to download every
> dependency regarding the myfaces-core-project artifact. We do that by
> mistakenly saying: "Use
> http://cvs.apache.org/maven-snapshot-repository for all
> your downloads."
> Just for remembrance, this is the concerned section:
>   <repositories>
>     <repository>
>       <snapshots />   ------ malformed element !
>
>       <id>apache-maven-snapshots</id>
>
> <url>http://cvs.apache.org/maven-snapshot-repository</url>
>     </repository>
>   </repositories>
>
>
>
> > > We should also try to fix the releases myfaces-core-project-1.1.2.pom
> ASAP.
> >
> > Well I don't think we can go back and fix this release retroactively.
> > I'd say we need to release a whole new core (1.1.3 ) ASAP for this and
> > other reasons.  I'm trying my best but I am only one person and there
> > is a lot of maven b.s. to deal with at the moment.
>
>
> I just patched the myfaces-core-project-1.1.2.pom in my local M2 repo. Now
> Maven build work like a charm.
>
> Since myfaces-core-project-1.1.2.pom is only a POM, there speaks nothing
> against uploading a patched version to ibiblio, although this is not a thing
> one should do every day, of course. Right? So,
> * Is there an easy way to replace an already released POM on ibiblio?
> * Any veto against this?
>
> Manfred
>
>

Re: [Important] Ugly bug in core pom.xml for 1.1.2 and 1.1.3

Posted by Manfred Geiler <ma...@gmail.com>.
On 4/25/06, Sean Schofield <se...@gmail.com> wrote:
>
> > Actually when you build a custom project with a myfaces-impl-1.1.2
> > dependency Maven 2.0.4 tries to download the myfaces-master-1.0.1release(!)
> > from http://cvs.apache.org/maven-snapshot-repository, which
> > is subject to fail of course.
> > Try it out!
>
> OK now I see what you are saying.  I didn't realize this was a custom
> project issue.  Interesting that maven downloads the master-pom.  Its
> really only a maven-related dependency.  I'm suprised its requiring
> it.
>
> Out of curiousity why doesn't maven just grab the myfaces-master-1.0.1
> from ibiblio?  Why is it even checking the snapshot repo?


Looks like Maven tries to do that because WE coerce Maven to download every
dependency regarding the myfaces-core-project artifact. We do that by
mistakenly saying: "Use http://cvs.apache.org/maven-snapshot-repository for
all your downloads."
Just for remembrance, this is the concerned section:
  <repositories>
    <repository>
      <snapshots />   ------ malformed element !
      <id>apache-maven-snapshots</id>
      <url>http://cvs.apache.org/maven-snapshot-repository</url>
    </repository>
  </repositories>



> > We should also try to fix the releases myfaces-core-project-1.1.2.pomASAP.
>
> Well I don't think we can go back and fix this release retroactively.
> I'd say we need to release a whole new core (1.1.3 ) ASAP for this and
> other reasons.  I'm trying my best but I am only one person and there
> is a lot of maven b.s. to deal with at the moment.


I just patched the myfaces-core-project-1.1.2.pom in my local M2 repo. Now
Maven build work like a charm.

Since myfaces-core-project-1.1.2.pom is only a POM, there speaks nothing
against uploading a patched version to ibiblio, although this is not a thing
one should do every day, of course. Right? So,
* Is there an easy way to replace an already released POM on ibiblio?
* Any veto against this?

Manfred

Re: [Important] Ugly bug in core pom.xml for 1.1.2 and 1.1.3

Posted by Sean Schofield <se...@gmail.com>.
> Actually when you build a custom project with a myfaces-impl-1.1.2
> dependency Maven 2.0.4 tries to download the myfaces-master-1.0.1 release(!)
> from http://cvs.apache.org/maven-snapshot-repository, which
> is subject to fail of course.
> Try it out!

OK now I see what you are saying.  I didn't realize this was a custom
project issue.  Interesting that maven downloads the master-pom.  Its
really only a maven-related dependency.  I'm suprised its requiring
it.

Out of curiousity why doesn't maven just grab the myfaces-master-1.0.1
from ibiblio?  Why is it even checking the snapshot repo?

> Please leave my changes. They are ok.

I'll put them back for now but I'm still puzzled as to why this is
happening.  Maybe the maven gurus can help?

> We should also try to fix the releases myfaces-core-project-1.1.2.pom ASAP.

Well I don't think we can go back and fix this release retroactively. 
I'd say we need to release a whole new core (1.1.3 ) ASAP for this and
other reasons.  I'm trying my best but I am only one person and there
is a lot of maven b.s. to deal with at the moment.

> Manfred

Sean

Re: [Important] Ugly bug in core pom.xml for 1.1.2 and 1.1.3

Posted by Manfred Geiler <ma...@gmail.com>.
On 4/24/06, Sean Schofield <se...@gmail.com> wrote:
>
> I think this is the wrong way to fix it.  I'm not sure what changing
> the releases enabled to false does (maybe someone can answer that) but
> here's the way I see the problem.


This IS the right way. Believe me.
The <snapshot> element without content is a syntax error - have a look at
maven docs!

What we try to tell Maven is:
Use the url http://cvs.apache.org/maven-snapshot-repository to download
snapshots, but do not use this url to seek release artifacts.
The correct syntax is to explicitly enable this repository for snapshots but
disable it for releases.

Actually when you build a custom project with a
myfaces-impl-1.1.2dependency Maven
2.0.4 tries to download the myfaces-master-1.0.1 release(!) from
http://cvs.apache.org/maven-snapshot-repository, which is subject to fail of
course.
Try it out!

This is the only build problem with the 1.1.2 core release. There is no
issue regarding myfaces-shared.


1.1.2 branch does not build b/c the myfaces-shared stuff is not in
> ibiblio.  Its ok that these shared artifacts are not in ibiblio
> (that's what we wanted), they just need to be available in our own
> MyFaces repository.  (See my earlier post)


I think you got me wrong here. I did not try to build the 1.1.2 branch. What
I meant: when you build a project that DEPENDS on 1.1.2 core, then you run
into problems.


In the short run to build core-1.1.2 and core-1.1.3 you just need to
> check out the appropriate shared and maven branches and build on your
> local machine.
>
> For all releases going forward I think we update the master pom stuff
> and add a reference to a new myfaces repo which contains the shared
> artifacts.  That's actually why I'm holding off on the vote for the
> 1.1.3 core b/c we really need this going forward.
>
> I'm going to revert your change for now.


Please leave my changes. They are ok.
We should also try to fix the releases myfaces-core-project-1.1.2.pom ASAP.

Manfred




>
> On 4/24/06, Manfred Geiler <ma...@gmail.com> wrote:
> > The pom.xml of the myfaces-core-project artifact contains the following
> > errornous lines:
> >   <repositories>
> >     <repository>
> >       <snapshots />
> >       <id>apache-maven-snapshots</id>
> >
> > <url>http://cvs.apache.org/maven-snapshot-repository</url>
> >     </repository>
> >   </repositories>
> >
> > At least for the newest Maven 2.0.4 these lines make builds fail because
> > Maven tries to download the released(!) myfaces-master from the apache
> > snapshot(!) repo.
> >
> > Correct syntax would be:
> >   <repositories>
> >     <repository>
> >         <releases>
> >           <enabled>false</enabled>
> >         </releases>
> >         <snapshots>
> >           <enabled>true</enabled>
> >         </snapshots>
> >         <id>apache-maven-snapshots</id>
> >
> > <url>http://cvs.apache.org/maven-snapshot-repository</url>
> >     </repository>
> >   </repositories>
> >
> > Just corrected this on the 1.1.3 branch.
> > Sean, could you please build a new RC?
> >
> > What about 1.1.2?
> > Is it possible to replace the already released
> > myfaces-core-project-1.1.2.pom? Shall I correct the 1.1.2 core branch?
> >
> > Note: Without that correction nobody is able to build Maven projects
> that
> > depend on myfaces-api-1.1.2 or myfaces-impl-1.1.2 !
> >
> > Manfred
> >
> >
>

Re: [Important] Ugly bug in core pom.xml for 1.1.2 and 1.1.3

Posted by Sean Schofield <se...@gmail.com>.
I think this is the wrong way to fix it.  I'm not sure what changing
the releases enabled to false does (maybe someone can answer that) but
here's the way I see the problem.

1.1.2 branch does not build b/c the myfaces-shared stuff is not in
ibiblio.  Its ok that these shared artifacts are not in ibiblio
(that's what we wanted), they just need to be available in our own
MyFaces repository.  (See my earlier post)

In the short run to build core-1.1.2 and core-1.1.3 you just need to
check out the appropriate shared and maven branches and build on your
local machine.

For all releases going forward I think we update the master pom stuff
and add a reference to a new myfaces repo which contains the shared
artifacts.  That's actually why I'm holding off on the vote for the
1.1.3 core b/c we really need this going forward.

I'm going to revert your change for now.

Sean

On 4/24/06, Manfred Geiler <ma...@gmail.com> wrote:
> The pom.xml of the myfaces-core-project artifact contains the following
> errornous lines:
>   <repositories>
>     <repository>
>       <snapshots />
>       <id>apache-maven-snapshots</id>
>
> <url>http://cvs.apache.org/maven-snapshot-repository</url>
>     </repository>
>   </repositories>
>
> At least for the newest Maven 2.0.4 these lines make builds fail because
> Maven tries to download the released(!) myfaces-master from the apache
> snapshot(!) repo.
>
> Correct syntax would be:
>   <repositories>
>     <repository>
>         <releases>
>           <enabled>false</enabled>
>         </releases>
>         <snapshots>
>           <enabled>true</enabled>
>         </snapshots>
>         <id>apache-maven-snapshots</id>
>
> <url>http://cvs.apache.org/maven-snapshot-repository</url>
>     </repository>
>   </repositories>
>
> Just corrected this on the 1.1.3 branch.
> Sean, could you please build a new RC?
>
> What about 1.1.2?
> Is it possible to replace the already released
> myfaces-core-project-1.1.2.pom? Shall I correct the 1.1.2 core branch?
>
> Note: Without that correction nobody is able to build Maven projects that
> depend on myfaces-api-1.1.2 or myfaces-impl-1.1.2 !
>
> Manfred
>
>