You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Richard S. Hall" <he...@ungoverned.org> on 2007/02/12 16:54:38 UTC
Building the Felix trunk
I have applied a patch from John Conlon to create a new, single pom.xml
file that separates the Felix subprojects into profiles according to
their packaging type. This was necessary to avoid a bug in Maven which
appears when a project has more than one type of packaging plugins
(Felix has three such plugins currently).
To build the trunk with the new plugin, you should do the following:
* "mvn -Dpackaging=osgi-bundle clean install" - this builds all
subprojects that use the old bundle plugin.
* "mvn -Dpackaging=osgi-bundle-mosgi clean install" - this builds
the mosgi subprojects that use the old bundle plugin, but are also
dependent upon JDK 1.5.
* "mvn -Dpackaging=bundle clean install" - this builds all
subprojects that use the new bundle plugin.
* "mvn -Dpackaging=ipojo-bundle clean install" - this builds all
subprojects that use the ipojo plugin.
To simplify building all subprojects, I modified the Ant build.xml file
to use these new profiles. The build.xml file will "clean install"
everything when you type "ant" or you can specify "ant clean" or "ant
install" to only clear or install everything, respectively.
Hopefully this is only a temporary situation that will be returned to
normal once the Maven bug is resolved.
-> richard
Re: Building the Felix trunk
Posted by Tim Moloney <t....@verizon.net>.
I created FELIX-215 (http://issues.apache.org/jira/browse/FELIX-215) and
attached my patch.
Tim
John E. Conlon wrote:
> Hi Tim,
>
> Glad to see you got it. We should take this out of this local
> project pom all together, just like you did. Would you please open a
> jira on this?
>
> Maven 2.0.5 releases tomorrow? Would be great if our multi-project
> bug was fixed in it, but I doubt it as Carlos Sanchez only duplicated
> it a couple of days ago.
> cheers,
> John
> (Latest idea to making money on Open Source software - Offering
> certified maven sacrificial chickens.)
>
> Tim Moloney wrote:
>>
>> After commenting out the <pluginRepositories> section of
>> maven-osgi-plugin's pom.xml (see attached), I was able to
>> successfully build and rebuild, both with and without a populated
>> ~/.m2/repository directory.
>>
>> I'm not sure if this is the proper fix. I do know that no live
>> chickens were required.
>>
>> I apologize for the "maven-resource-plugin" vs.
>> "maven-resources-plugin". I must have botched trimming the error
>> message.
>>
>> Thanks for all of the insight and suggestions. I'll try it all over
>> again when Maven 2.0.5 is released tomorrow.
>>
>> Tim
>>
>>
>> Carlos Sanchez wrote:
>>> I'm not sure you even need it at all.
>>>
>>> On 2/13/07, Steven E. Harris <se...@panix.com> wrote:
>>>> Tim Moloney <t....@verizon.net> writes:
>>>>
>>>> > from the specified remote repositories:
>>>> > apache.snapshots
>>>> (http://people.apache.org/repo/m2-snapshot-repository),
>>>> > snapshots (http://snapshots.maven.codehaus.org/maven2)
>>>> > central (http://repo1.maven.org/maven2)
>>>>
>>>> Where did that middle codehaus.org entry come from? Oh, I see, maybe
>>>> here, according to grep:
>>>>
>>>> tools/maven2/maven-osgi-plugin/pom.xml
>>>>
>>>> It too needs qualification that it's only hosting snapshots, not
>>>> released versions.
>>>>
>>>> --
>>>> Steven E. Harris
>>>>
>>>
>>>
>>
>> ------------------------------------------------------------------------
>>
>> Index: tools/maven2/maven-osgi-plugin/pom.xml
>> ===================================================================
>> --- tools/maven2/maven-osgi-plugin/pom.xml (revision 507328)
>> +++ tools/maven2/maven-osgi-plugin/pom.xml (working copy)
>> @@ -37,6 +37,7 @@
>> </repository>
>> </repositories>
>>
>> +<!--
>> <pluginRepositories>
>> <pluginRepository>
>> <id>snapshots</id>
>> @@ -49,6 +50,7 @@
>> <url>http://people.apache.org/repo/m2-snapshot-repository</url>
>> </pluginRepository>
>> </pluginRepositories>
>> +-->
>>
>> <distributionManagement>
>> <snapshotRepository>
>>
>
>
Re: Building the Felix trunk
Posted by "John E. Conlon" <jc...@verticon.com>.
Hi Tim,
Glad to see you got it. We should take this out of this local project
pom all together, just like you did. Would you please open a jira on this?
Maven 2.0.5 releases tomorrow? Would be great if our multi-project bug
was fixed in it, but I doubt it as Carlos Sanchez only duplicated it a
couple of days ago.
cheers,
John
(Latest idea to making money on Open Source software - Offering
certified maven sacrificial chickens.)
Tim Moloney wrote:
>
> After commenting out the <pluginRepositories> section of
> maven-osgi-plugin's pom.xml (see attached), I was able to successfully
> build and rebuild, both with and without a populated ~/.m2/repository
> directory.
>
> I'm not sure if this is the proper fix. I do know that no live
> chickens were required.
>
> I apologize for the "maven-resource-plugin" vs.
> "maven-resources-plugin". I must have botched trimming the error
> message.
>
> Thanks for all of the insight and suggestions. I'll try it all over
> again when Maven 2.0.5 is released tomorrow.
>
> Tim
>
>
> Carlos Sanchez wrote:
>> I'm not sure you even need it at all.
>>
>> On 2/13/07, Steven E. Harris <se...@panix.com> wrote:
>>> Tim Moloney <t....@verizon.net> writes:
>>>
>>> > from the specified remote repositories:
>>> > apache.snapshots
>>> (http://people.apache.org/repo/m2-snapshot-repository),
>>> > snapshots (http://snapshots.maven.codehaus.org/maven2)
>>> > central (http://repo1.maven.org/maven2)
>>>
>>> Where did that middle codehaus.org entry come from? Oh, I see, maybe
>>> here, according to grep:
>>>
>>> tools/maven2/maven-osgi-plugin/pom.xml
>>>
>>> It too needs qualification that it's only hosting snapshots, not
>>> released versions.
>>>
>>> --
>>> Steven E. Harris
>>>
>>
>>
>
> ------------------------------------------------------------------------
>
> Index: tools/maven2/maven-osgi-plugin/pom.xml
> ===================================================================
> --- tools/maven2/maven-osgi-plugin/pom.xml (revision 507328)
> +++ tools/maven2/maven-osgi-plugin/pom.xml (working copy)
> @@ -37,6 +37,7 @@
> </repository>
> </repositories>
>
> +<!--
> <pluginRepositories>
> <pluginRepository>
> <id>snapshots</id>
> @@ -49,6 +50,7 @@
> <url>http://people.apache.org/repo/m2-snapshot-repository</url>
> </pluginRepository>
> </pluginRepositories>
> +-->
>
> <distributionManagement>
> <snapshotRepository>
>
Re: Building the Felix trunk
Posted by Tim Moloney <t....@verizon.net>.
After commenting out the <pluginRepositories> section of
maven-osgi-plugin's pom.xml (see attached), I was able to successfully
build and rebuild, both with and without a populated ~/.m2/repository
directory.
I'm not sure if this is the proper fix. I do know that no live chickens
were required.
I apologize for the "maven-resource-plugin" vs.
"maven-resources-plugin". I must have botched trimming the error message.
Thanks for all of the insight and suggestions. I'll try it all over
again when Maven 2.0.5 is released tomorrow.
Tim
Carlos Sanchez wrote:
> I'm not sure you even need it at all.
>
> On 2/13/07, Steven E. Harris <se...@panix.com> wrote:
>> Tim Moloney <t....@verizon.net> writes:
>>
>> > from the specified remote repositories:
>> > apache.snapshots
>> (http://people.apache.org/repo/m2-snapshot-repository),
>> > snapshots (http://snapshots.maven.codehaus.org/maven2)
>> > central (http://repo1.maven.org/maven2)
>>
>> Where did that middle codehaus.org entry come from? Oh, I see, maybe
>> here, according to grep:
>>
>> tools/maven2/maven-osgi-plugin/pom.xml
>>
>> It too needs qualification that it's only hosting snapshots, not
>> released versions.
>>
>> --
>> Steven E. Harris
>>
>
>
Re: Building the Felix trunk
Posted by Carlos Sanchez <ca...@apache.org>.
I'm not sure you even need it at all.
On 2/13/07, Steven E. Harris <se...@panix.com> wrote:
> Tim Moloney <t....@verizon.net> writes:
>
> > from the specified remote repositories:
> > apache.snapshots (http://people.apache.org/repo/m2-snapshot-repository),
> > snapshots (http://snapshots.maven.codehaus.org/maven2)
> > central (http://repo1.maven.org/maven2)
>
> Where did that middle codehaus.org entry come from? Oh, I see, maybe
> here, according to grep:
>
> tools/maven2/maven-osgi-plugin/pom.xml
>
> It too needs qualification that it's only hosting snapshots, not
> released versions.
>
> --
> Steven E. Harris
>
--
I could give you my word as a Spaniard.
No good. I've known too many Spaniards.
-- The Princess Bride
Re: Building the Felix trunk
Posted by "Steven E. Harris" <se...@panix.com>.
Tim Moloney <t....@verizon.net> writes:
> from the specified remote repositories:
> apache.snapshots (http://people.apache.org/repo/m2-snapshot-repository),
> snapshots (http://snapshots.maven.codehaus.org/maven2)
> central (http://repo1.maven.org/maven2)
Where did that middle codehaus.org entry come from? Oh, I see, maybe
here, according to grep:
tools/maven2/maven-osgi-plugin/pom.xml
It too needs qualification that it's only hosting snapshots, not
released versions.
--
Steven E. Harris
Re: Building the Felix trunk
Posted by Tim Moloney <t....@verizon.net>.
Not for me, unfortunately.
Building Maven OSGi Plugin
[...]
Reason: Error getting POM for
'org.apache.maven.plugins:maven-resource-plugin' from the repository:
Failed to resolve artifact, possibly due to a repository list that is
not appropriately equipped for this artifact's metadata.
org.apache.maven.plugins:maven-resources-plugin:pom:2.3-SNAPSHOT
from the specified remote repositories:
apache.snapshots (http://people.apache.org/repo/m2-snapshot-repository),
snapshots (http://snapshots.maven.codehaus.org/maven2)
central (http://repo1.maven.org/maven2)
After getting a fresh checkout, I ran 'ant' in the trunk directory. I
tried again after deleting ~/.m2/repository but got the same results.
Tim
Richard S. Hall wrote:
> Steven E. Harris wrote:
>> "Steven E. Harris" <se...@panix.com> writes:
>>
>>
>>> This may be related to the "repository" elements not specifying
>>> whether each repository offers snapshots or releases (I just tried
>>> adding these specifications, but the problem persists)
>>>
>>
>> Adding the following elements to the pluginRepository elements fixes
>> the problem:
>>
>> <releases>
>> <enabled>false</enabled>
>> </releases>
>> <snapshots>
>> <enabled>true</enabled>
>> </snapshots>
>>
>> The point being: Don't look for released plugins in the Apache
>> snapshot repository.
>>
>
> Ok, cool. I have made this mod to the pom file...hopefully this
> updated version will now work for everyone...it worked for me.
>
> Thanks.
>
> -> richard
>
Re: Building the Felix trunk
Posted by "Richard S. Hall" <he...@ungoverned.org>.
Steven E. Harris wrote:
> "Steven E. Harris" <se...@panix.com> writes:
>
>
>> This may be related to the "repository" elements not specifying
>> whether each repository offers snapshots or releases (I just tried
>> adding these specifications, but the problem persists)
>>
>
> Adding the following elements to the pluginRepository elements fixes
> the problem:
>
> <releases>
> <enabled>false</enabled>
> </releases>
> <snapshots>
> <enabled>true</enabled>
> </snapshots>
>
> The point being: Don't look for released plugins in the Apache
> snapshot repository.
>
Ok, cool. I have made this mod to the pom file...hopefully this updated
version will now work for everyone...it worked for me.
Thanks.
-> richard
Re: Building the Felix trunk
Posted by "John E. Conlon" <jc...@verticon.com>.
Hi Steven,
We seem to converge on this problem huh?
cheers,
John
PS - this is Triple weird. :-)
Steven E. Harris wrote:
> "Steven E. Harris" <se...@panix.com> writes:
>
>
>> This may be related to the "repository" elements not specifying
>> whether each repository offers snapshots or releases (I just tried
>> adding these specifications, but the problem persists)
>>
>
> Adding the following elements to the pluginRepository elements fixes
> the problem:
>
> <releases>
> <enabled>false</enabled>
> </releases>
> <snapshots>
> <enabled>true</enabled>
> </snapshots>
>
> The point being: Don't look for released plugins in the Apache
> snapshot repository.
>
>
Re: Building the Felix trunk
Posted by "Steven E. Harris" <se...@panix.com>.
"Steven E. Harris" <se...@panix.com> writes:
> This may be related to the "repository" elements not specifying
> whether each repository offers snapshots or releases (I just tried
> adding these specifications, but the problem persists)
Adding the following elements to the pluginRepository elements fixes
the problem:
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
The point being: Don't look for released plugins in the Apache
snapshot repository.
--
Steven E. Harris
Re: Building the Felix trunk
Posted by "Steven E. Harris" <se...@panix.com>.
"Richard S. Hall" <he...@ungoverned.org> writes:
> Although this sounds like the "something spurious has happened so
> maybe you want to try again later" Maven issue. :-)
Wow, I hope so. I just removed my local repository and tried again,
with the same result. But note that I'm able to compile other projects
of mine just fine, so there's something with this new Felix POM that's
aggravating this behavior.
--
Steven E. Harris
Re: Building the Felix trunk
Posted by "Richard S. Hall" <he...@ungoverned.org>.
Steven E. Harris wrote:
> "Richard S. Hall" <he...@ungoverned.org> writes:
>
>
>> Strange. I just did it and it works for me...
>>
>
> This is where Maven becomes annoying. It's hard to figure out what
> could be wrong here. Maven's equivalent to Windows's "Have you tried
> rebooting?" is "Have you tried removing your local repository?" I'll
> let you know how that goes, unless someone else pipes up with similar
> trouble before I try it.
Agreed.
Although this sounds like the "something spurious has happened so maybe
you want to try again later" Maven issue. :-)
-> richard
Re: Building the Felix trunk
Posted by "Steven E. Harris" <se...@panix.com>.
"Richard S. Hall" <he...@ungoverned.org> writes:
> Strange. I just did it and it works for me...
This is where Maven becomes annoying. It's hard to figure out what
could be wrong here. Maven's equivalent to Windows's "Have you tried
rebooting?" is "Have you tried removing your local repository?" I'll
let you know how that goes, unless someone else pipes up with similar
trouble before I try it.
--
Steven E. Harris
Re: Building the Felix trunk
Posted by "Richard S. Hall" <he...@ungoverned.org>.
Strange. I just did it and it works for me...
mvn -Dpackaging=bundle clean install
...
[INFO] BUILD SUCCESSFUL
-> richard
Steven E. Harris wrote:
> "Richard S. Hall" <he...@ungoverned.org> writes:
>
>
>> * "mvn -Dpackaging=bundle clean install" - this builds all
>> subprojects that use the new bundle plugin.
>>
>
> After updating to the latest along the Subversion trunk, I see this:
>
> $ mvn -Dpackaging=bundle clean install
> [INFO] Scanning for projects...
> [INFO] Reactor build order:
> [INFO] Apache Felix
> [INFO] OSGi R4 Foundation EE
> [INFO] Maven Bundle Plugin
> [INFO] Servlet 2.1 API
> [INFO] OSGi R4 Core Bundle
> [INFO] OSGi R4 Compendium Bundle
> [INFO] Apache Felix Framework
> [INFO] Apache Felix Shell Service
> [INFO] Apache Felix Shell TUI
> [INFO] Apache Felix Bundle Repository
> [INFO] Apache Felix Main
> [INFO] Apache Felix Log Service
> [INFO] Apache Felix EventAdmin
> [INFO] Apache Felix EventAdmin Bridge UPnP
> [INFO] Apache Felix EventAdmin Bridge Configuration
> [INFO] Apache Felix EventAdmin Bridge UserAdmin
> [INFO] Apache Felix EventAdmin Bridge WireAdmin
> [INFO] -------------------------------------------------------------------------
> ---
> [INFO] Building Apache Felix
> [INFO] task-segment: [clean, install]
> [INFO] -------------------------------------------------------------------------
> ---
> [INFO] ------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [INFO] ------------------------------------------------------------------------
> [INFO] Error building POM (may not be this project's POM).
>
>
> Project ID: org.apache.maven.plugins:maven-clean-plugin
>
> Reason: Error getting POM for 'org.apache.maven.plugins:maven-clean-plugin' from
> the repository: Failed to resolve artifact, possibly due to a repository list t
> hat is not appropriately equipped for this artifact's metadata.
> org.apache.maven.plugins:maven-clean-plugin:pom:2.2-SNAPSHOT
>
> from the specified remote repositories:
> apache.snapshots (http://people.apache.org/repo/m2-snapshot-repository),
> central (http://repo1.maven.org/maven2)
>
>
>
> [INFO] ------------------------------------------------------------------------
> [INFO] For more information, run Maven with the -e switch
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 1 second
> [INFO] Finished at: Mon Feb 12 09:39:03 PST 2007
> [INFO] Final Memory: 2M/4M
> [INFO] ------------------------------------------------------------------------
>
>
> If I just try running "mvn -Dpackaging=bundle install", I get a
> similar error report, but about the maven-site-plugin.
>
> This may be related to the "repository" elements not specifying
> whether each repository offers snapshots or releases (I just tried
> adding these specifications, but the problem persists), or maybe not
> specifying versions for the plugins used. We've seen spurious errors
> like these popping up in both the Felix and MINA projects lately.
>
>
Re: Building the Felix trunk
Posted by "Steven E. Harris" <se...@panix.com>.
"Richard S. Hall" <he...@ungoverned.org> writes:
> * "mvn -Dpackaging=bundle clean install" - this builds all
> subprojects that use the new bundle plugin.
After updating to the latest along the Subversion trunk, I see this:
$ mvn -Dpackaging=bundle clean install
[INFO] Scanning for projects...
[INFO] Reactor build order:
[INFO] Apache Felix
[INFO] OSGi R4 Foundation EE
[INFO] Maven Bundle Plugin
[INFO] Servlet 2.1 API
[INFO] OSGi R4 Core Bundle
[INFO] OSGi R4 Compendium Bundle
[INFO] Apache Felix Framework
[INFO] Apache Felix Shell Service
[INFO] Apache Felix Shell TUI
[INFO] Apache Felix Bundle Repository
[INFO] Apache Felix Main
[INFO] Apache Felix Log Service
[INFO] Apache Felix EventAdmin
[INFO] Apache Felix EventAdmin Bridge UPnP
[INFO] Apache Felix EventAdmin Bridge Configuration
[INFO] Apache Felix EventAdmin Bridge UserAdmin
[INFO] Apache Felix EventAdmin Bridge WireAdmin
[INFO] -------------------------------------------------------------------------
---
[INFO] Building Apache Felix
[INFO] task-segment: [clean, install]
[INFO] -------------------------------------------------------------------------
---
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Error building POM (may not be this project's POM).
Project ID: org.apache.maven.plugins:maven-clean-plugin
Reason: Error getting POM for 'org.apache.maven.plugins:maven-clean-plugin' from
the repository: Failed to resolve artifact, possibly due to a repository list t
hat is not appropriately equipped for this artifact's metadata.
org.apache.maven.plugins:maven-clean-plugin:pom:2.2-SNAPSHOT
from the specified remote repositories:
apache.snapshots (http://people.apache.org/repo/m2-snapshot-repository),
central (http://repo1.maven.org/maven2)
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1 second
[INFO] Finished at: Mon Feb 12 09:39:03 PST 2007
[INFO] Final Memory: 2M/4M
[INFO] ------------------------------------------------------------------------
If I just try running "mvn -Dpackaging=bundle install", I get a
similar error report, but about the maven-site-plugin.
This may be related to the "repository" elements not specifying
whether each repository offers snapshots or releases (I just tried
adding these specifications, but the problem persists), or maybe not
specifying versions for the plugins used. We've seen spurious errors
like these popping up in both the Felix and MINA projects lately.
--
Steven E. Harris