[slf4j-dev] svn commit: r735 - in slf4j/trunk: . slf4j-osgi-test-bundle

John E. Conlon jconlon at verticon.com
Sun Feb 18 20:06:00 CET 2007


There are  two problems with using the spring osgi testing project 
snapshots for slf4j testing.

1. Volatility of spring-osgi snapshots.
 This is the primary reason I at did not initially include the 
spring-osgi testing projects in our parent build. 
   
Ceki, we had similar problems at Apache Directory and I am afraid these 
problems may be related to the changes happening to the spring-osgi apis 
and the intermittent deployment to the repos.  Perhaps I was wrong to 
add the osgi testing project before the spring-osgi stabilized?  I 
thought it best to have some testing visibility at least done somewhere 
regarding the osgi functionality of the bundles.  Allow me to 
investigate further and respond over the next few days with more details 
and recommendations.

For now take a look at the artifacts that you couldn't load from repos. 
They are not only spring-osgi built artifacts they are sl4fj 
implementations too! 

org.springframework.osgi:jcl104-over-slf4j.osgi:jar:1.1.0
org.slf4j:slf4j-log4j-full:jar:1.1.0 

This brings me to the second problem.

2. Spring-OSGi uses slf4j internally, so we are faced with a potential 
problem of mixing slf4j code from the Spring-OSGi testing environment 
with the releases we are testing.  Interesting problem huh?  How can we 
keep different sl4fj versions from mixing in the OSGi runtime and 
invalidating our tests?  Actually this is sort of a good problem to be 
faced with, as it sets a standard for testing and building osgi bundles 
that we should be upholding anyway - the exportation of packages with 
version metadata and the importation of packages with version-range 
metadata.

If you noticed in our binding project poms:
<Export-Package>
                              org.slf4j;version=1.3, 
org.slf4j.spi;version=1.3
</Export-Package>

and in our client project poms:
<Import-Package>
        org.slf4j;version="[1.3,1.4)", org.slf4j.spi;version="[1.3,1.4)"
</Import-Package>
             
These metadata attributes will insure that we only are testing (and 
latter for deployment) utilizing the proper release of slf4j and are not 
picking up the spring-osgi sl4fj. 

cheers,
John

ceki at slf4j.org wrote:
> Author: ceki
> Date: Sun Feb 18 18:50:26 2007
> New Revision: 735
>
> Modified:
>    slf4j/trunk/pom.xml
>    slf4j/trunk/slf4j-osgi-test-bundle/pom.xml
>
> Log:
>
> My personal attempt to get SLF4J to build using the osgi profile, i.e. running the command
>
> mvn package -Posgi
>
> I still  get:
>
> [INFO] Building SLF4J OSGi Integration Test
> [INFO]    task-segment: [package]
> [INFO] ----------------------------------------------------------------------------
> [INFO] [resources:resources]
> [INFO] Using default encoding to copy filtered resources.
> [INFO] snapshot org.springframework.osgi:backport-util-concurrent:3.0-SNAPSHOT: checking for updates from springframework.org
> Downloading: http://static.springframework.org/maven2-snapshots//org/springframework/osgi/backport-util-concurrent/3.0-SNAPSHOT/backport-util-concurrent-3.0-2007
> 0216.105210-78.pom
> 1K downloaded
>
> [snip]
>
> [WARNING] Unable to get resource from repository central (http://repo1.maven.org/maven2)
> [INFO] ------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [INFO] ------------------------------------------------------------------------
> [INFO] Failed to resolve artifact.
>
> Missing:
> ----------
> 1) org.springframework.osgi:jcl104-over-slf4j.osgi:jar:1.1.0
>
>   Try downloading the file manually from the project website.
>
>   Then, install it using the command:
>       mvn install:install-file -DgroupId=org.springframework.osgi -DartifactId=jcl104-over-slf4j.osgi \
>           -Dversion=1.1.0 -Dpackaging=jar -Dfile=/path/to/file
>
>   Path to dependency:
>         1) org.slf4j:slf4j-osgi-integration-test:jar:1.3.0-SNAPSHOT
>         2) org.springframework.osgi:jcl104-over-slf4j.osgi:jar:1.1.0
>
> 2) org.slf4j:slf4j-log4j-full:jar:1.1.0
>
>   Try downloading the file manually from the project website.
>
>   Then, install it using the command:
>       mvn install:install-file -DgroupId=org.slf4j -DartifactId=slf4j-log4j-full \
>           -Dversion=1.1.0 -Dpackaging=jar -Dfile=/path/to/file
>
>   Path to dependency:
>         1) org.slf4j:slf4j-osgi-integration-test:jar:1.3.0-SNAPSHOT
>         2) org.slf4j:slf4j-log4j-full:jar:1.1.0
>
> ----------
> 2 required artifacts are missing.
>
> for artifact:
>   org.slf4j:slf4j-osgi-integration-test:jar:1.3.0-SNAPSHOT
>
> from the specified remote repositories:
>   central (http://repo1.maven.org/maven2),
>   m2apache.snapshots (http://people.apache.org/repo/m2-snapshot-repository),
>   springframework.org (http://static.springframework.org/maven2-snapshots/)
>
>
>
> Modified: slf4j/trunk/pom.xml
> ==============================================================================
> --- slf4j/trunk/pom.xml	(original)
> +++ slf4j/trunk/pom.xml	Sun Feb 18 18:50:26 2007
> @@ -129,9 +129,47 @@
>        <id>osgi</id>
>        <modules>
>           <module>osgi-over-slf4j</module>
> -	 <module>slf4j-osgi-test-bundle</module>
> -	 <module>slf4j-osgi-integration-test</module>
> +         <module>slf4j-osgi-test-bundle</module>
> +         <module>slf4j-osgi-integration-test</module>
>        </modules>
> +
> +      <repositories>
> +        <repository>
> +          <id>m2apache.snapshots</id>
> +          <url>http://people.apache.org/repo/m2-snapshot-repository</url>
> +          <releases>
> +            <enabled>false</enabled>
> +          </releases>
> +          <snapshots>
> +            <enabled>true</enabled>
> +          </snapshots>
> +        </repository>
> +
> +        <repository>
> +          <id>springframework.org</id>
> +          <name>Springframework Maven SNAPSHOT Repository</name>
> +          <url>http://static.springframework.org/maven2-snapshots/</url>
> +          <snapshots>
> +            <enabled>true</enabled>
> +          </snapshots>
> +        </repository>
> +
> +      </repositories>
> +
> +      <pluginRepositories>
> +        <pluginRepository>
> +          <id>apache.snapshots</id>
> +          <name>Apache Snapshot Plugin Repository</name>
> +          <url>http://people.apache.org/repo/m2-snapshot-repository</url>
> +          <releases>
> +            <enabled>false</enabled>
> +          </releases>
> +          <snapshots>
> +            <enabled>true</enabled> 
> +          </snapshots>
> +        </pluginRepository>
> +      </pluginRepositories>
> +
>      </profile>
>    </profiles>
>  
> @@ -144,8 +182,8 @@
>          <enabled>false</enabled>
>        </releases>
>        <snapshots>
> -        <enabled>true</enabled>
> -      </snapshots>
> +        <enabled>true</enabled> 
> +     </snapshots>
>      </pluginRepository>
>    </pluginRepositories>
>    
>
> Modified: slf4j/trunk/slf4j-osgi-test-bundle/pom.xml
> ==============================================================================
> --- slf4j/trunk/slf4j-osgi-test-bundle/pom.xml	(original)
> +++ slf4j/trunk/slf4j-osgi-test-bundle/pom.xml	Sun Feb 18 18:50:26 2007
> @@ -48,7 +48,7 @@
>  		<dependency>
>        		<groupId>org.apache.felix</groupId>
>        		<artifactId>org.osgi.core</artifactId>
> -      		<version>0.8.0-incubator</version>
> +      		<version>0.8.0-SNAPSHOT</version>
>        		<scope>provided</scope>
>      	</dependency>
>  	</dependencies>
> _______________________________________________
> dev mailing list
> dev at slf4j.org
> http://www.slf4j.org/mailman/listinfo/dev
>
>
>   




More information about the slf4j-dev mailing list