Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [udig-devel] Problems with refresh.xml in net.refractions.udig.libs

Hi!

I found out why the org.apache.log4j plugin was not visible in the net.refractions.libs plugin. It seem like the org.apache.log4j plugin project has an different structure than the default one. Instead of following the standard project structure, where the plugin-manifest folder is located at the root of the project folder, the plugin-mainfest folder is located in a subfolder:  

plugins\org.apache.log4j\org.apache.log4j\META-INF (default is plugins\org.apache.log4j\META-INF) 

Since I expected org.apache.log4j to have the default structure, I imported the top folder instead of the nested one. The result is that Eclipse (3.6) does not recognize org.apache.log4j as a plugin project. When I import the nested one instead, everything build without a problem.

Is there any particular reason for the nested project structure of org.apache.log4j? I expect that this is a snag that is going to hit others also. All projects should really have roots at the same level. If not, the projects which do not should be tagged appropriately in the project procedures (which I will do if the suggested change below is not possible). 

Is it possible to rearrange the org.apache.log4j without breaking the configurations already running? If yes, then the patch attached, which removes the inner org.apache.log4j folder and move it's content into plugins\org.apache.log4j\, could be applied to trunk by someone with commit rights.

Kenneth  


2010/8/11 Jody Garnett <jody.garnett@xxxxxxxxx>
> Another issue I hope someone could help me with, is the org.apache.log4j
> dependency in the libs project. Why is this dependency not downloaded by
> refresh.xml into the lib catalog?

The problem is actually the other way around; we are supposed to make
a separate plugin for each jar - and because of a conflict between the
Java plugin system (called factory service provider interface) and the
eclipse plugin system (OSGi) we have been stuck.

Putting all the jars into net.refractions.udig.libs is a workaround -
one we would *really* like to see fixed. There have been a number of
people that have done it themselves - most recently Harald Wellman
made a proposal here
(http://docs.codehaus.org/display/GEOTOOLS/Add+bundle+information+to+jar+manifest).
However the work remains undone at the present time.

The good news is that the OSGi plugin system has become more popular,
adopted by Spring and NetBeans so I hope to see an automated solution
to this one.

> Instead the jar is packaged into the the org.apache.log4j project, which is not visible in the libs project.

This is a case where log4j used to be provided by eclipse; and they
pulled it at some point. In this case we did the correct thing and
made a plugin wrapper for it so we could continue work. The libs
project depends on log4j and should be able to see it; if there is any
problem let me know.

> The question is: how can I add the log4j jar to the runtime dependencies in the
> libs plugin? I could of course just copy it into the lib catalog, but I
> quess this would be cheating.
> Yours,
> Kenneth Gulbrandsøy
>
> _______________________________________________
> User-friendly Desktop Internet GIS (uDig)
> http://udig.refractions.net
> http://lists.refractions.net/mailman/listinfo/udig-devel
>
>
_______________________________________________
User-friendly Desktop Internet GIS (uDig)
http://udig.refractions.net
http://lists.refractions.net/mailman/listinfo/udig-devel

Index: .project
===================================================================
--- .project	(revision 0)
+++ .project	(revision 0)
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>org.apache.log4j</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+	</buildSpec>
+	<natures>
+	</natures>
+</projectDescription>

Property changes on: .project
___________________________________________________________________
Added: svn:mime-type
   + text/xml
Added: svn:eol-style
   + native
Added: svn:keywords
   + Id

Index: org.apache.log4j/.classpath
===================================================================
--- org.apache.log4j/.classpath	(revision 31935)
+++ org.apache.log4j/.classpath	(working copy)
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
-	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
-	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
-	<classpathentry exported="true" kind="lib" path="log4j-1.2.12.jar"/>
-	<classpathentry kind="output" path="bin"/>
-</classpath>
Index: org.apache.log4j/.project
===================================================================
--- org.apache.log4j/.project	(revision 31935)
+++ org.apache.log4j/.project	(working copy)
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
-	<name>org.apache.log4j</name>
-	<comment></comment>
-	<projects>
-	</projects>
-	<buildSpec>
-		<buildCommand>
-			<name>org.eclipse.jdt.core.javabuilder</name>
-			<arguments>
-			</arguments>
-		</buildCommand>
-		<buildCommand>
-			<name>org.eclipse.pde.ManifestBuilder</name>
-			<arguments>
-			</arguments>
-		</buildCommand>
-		<buildCommand>
-			<name>org.eclipse.pde.SchemaBuilder</name>
-			<arguments>
-			</arguments>
-		</buildCommand>
-	</buildSpec>
-	<natures>
-		<nature>org.eclipse.pde.PluginNature</nature>
-		<nature>org.eclipse.jdt.core.javanature</nature>
-	</natures>
-</projectDescription>
Index: org.apache.log4j/build.properties
===================================================================
--- org.apache.log4j/build.properties	(revision 31935)
+++ org.apache.log4j/build.properties	(working copy)
@@ -1,5 +0,0 @@
-bin.includes = META-INF/,\
-               log4j-1.2.12.jar
-src.includes = build.properties,\
-               .project,\
-               .classpath
Index: org.apache.log4j/log4j-1.2.12.jar
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Index: org.apache.log4j/META-INF/MANIFEST.MF
===================================================================
--- org.apache.log4j/META-INF/MANIFEST.MF	(revision 31935)
+++ org.apache.log4j/META-INF/MANIFEST.MF	(working copy)
@@ -1,27 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: Log4j
-Bundle-SymbolicName: org.apache.log4j
-Bundle-Version: 1.2.12
-Bundle-ClassPath: log4j-1.2.12.jar
-Bundle-Vendor: Apache Foundation
-Export-Package: org.apache.log4j,
- org.apache.log4j.chainsaw,
- org.apache.log4j.config,
- org.apache.log4j.helpers,
- org.apache.log4j.jdbc,
- org.apache.log4j.jmx,
- org.apache.log4j.lf5,
- org.apache.log4j.lf5.util,
- org.apache.log4j.lf5.viewer,
- org.apache.log4j.lf5.viewer.categoryexplorer,
- org.apache.log4j.lf5.viewer.configure,
- org.apache.log4j.net,
- org.apache.log4j.nt,
- org.apache.log4j.or,
- org.apache.log4j.or.jms,
- org.apache.log4j.or.sax,
- org.apache.log4j.spi,
- org.apache.log4j.varia,
- org.apache.log4j.xml
-Bundle-RequiredExecutionEnvironment: J2SE-1.4

Back to the top