On 26 November 2010 13:41, raphael.jolivet <[email protected]>wrote:

>
> Hi,
>
> Thanks for your anwsers.
> I will definitely ask the log4j team.
>
> For now, I have found a workaround by deploying log4j in my local
> repository
> as a "jar" package:
> mvn deploy:deploy-file -Dfile=d:/Download/log4j-1.2.16.jar -DgroupId=log4j
> -DartifactId=log4j -Dversion=2.2.16 -Dpackaging=jar
> -Durl=file:///v:/maven/repositories/third-party
>
> Then, I have changed the dependency in my POM file:
>
> <dependency>
>     <groupId>log4j</groupId>
>     <artifactId>log4j</artifactId>
>      <version>1.2.15</version>
>     <type>jar</type>
>     <scope>compile</scope>
> </dependency>
>
> It works well.
>
> But I have some "maven-related" ideas to clarify:
> I have looked in the JAR and the MANIFEST is full of Bundle-<Something>
> properties.
> So I guess this is actually a OSGI "bundle" package as Michael suggest.
>
> So, if "bundle" is a standard packaging option, as maven guys, would you
> say
> that :
> - The artifact file in the central repository should have a "jar" extension
> or a "bundle" extension.
> - In the later case, this means that the log4j team as been able to put
> something inconsistent in the central repository.
>

No inconsistency - the project packaging is "bundle" (which tells Maven how
to build the artifact) but the final artifact type/extension is "jar".
This "packaging vs. extension" decoupling is necessary, otherwise you
couldn't write custom build lifecycles that generated JAR artifacts.

So when in doubt, use the extension in the repository as your dependency
type and don't worry about the actual pom packaging.

Isn't the central repository a repository server of some kind that should
> have some consistency checks on "upload" ? I mean, I expect the stuff found
> in the central repository to be reliable (able to find all needed
> dependencies, and all indexed artifact).
>
> I don't criticize or something.
>
> I'm quite a newbie in Maven and I want to know how things are supposed to
> work, how much I can rely on the repositories. for example, should I do a
> local "proxy" repository of what I need in case some projects got moved or
> deprecated?
>
> I'm actually migrating all our projects to maven and I want to be sure of
> the durability of the solution I choose.
>
> Thanks in advance for your advice.
>
> Kind regards,
> Raphael
>
> --
> View this message in context:
> http://maven.40175.n5.nabble.com/log4j-log4j-bundle-1-2-16-Bundle-or-JAR-tp3281135p3281297.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>


-- 
Cheers, Stuart

Reply via email to