Michal Maczka wrote:

[...]

(or something like that) - jelly should always use artifacts, not
dependencies, to construct paths. It doesnt stop you naming jars
whatever you like, if they are in the local repo. I had a look over the
broken plugins a while back and I think there was only one case where it
wasnt clear that the use of dependency was a bug.
Just to make myself more clear.

I wanted to say that in the most of the cases plugins don't need to know
nothing about existence of local repository. They just can operate on set of
file with absolute path. I think that such assumption (or rather lack of any
assumptions) can result in simpler code.

I think we are in violent agreement...



So I simply don't agree with statement: "jelly should always use artifacts, not dependencies, to construct paths".

But yet you say "Plugin are supposed to work with artifacts" in the other post, which is basically what I am saying too.


dependencies don't know anything about their paths, and most of the plugins[1] were guessing how to reconstruct the path to the artifact. You're obviously agreeing that this is wrong.

When I said jelly should always use artifacts not deps to construct paths, its precisely because these *are* the paths "constructed in maven core (artifact factory)". I just hadn't spotted that I could use getFile() as well as getPath(). You seem not to have noticed the '<include name="${lib.path}"/>' in my code is a jelly call to artifact.getPath()?

Anyway, I was posting because you said "Moreover there is no easy way of determining if artifact was overriden or not (it is in maven-new, but that's different story)" - when as far as I can tell this problem is fixable in the jelly for RC1? You don't need to know in a plugin whether or not a jar is overridden, just the file.

I would rather prefer that jelly uses path constructed in maven core
(artifact factory) and ignore existence of such <<entity>> like "local
repository".

Yup.


[1] A list from b8, posted to this list previously. All of these are probably bugs:
brian [EMAIL PROTECTED] /c/maven/plugins
$ find . -name '*.jelly' | xargs grep pom.dependencies
./maven-ant-plugin-1.2-SNAPSHOT/plugin.jelly: <j:forEach var="dep" items="${pom.dependencies}">
./maven-cactus-plugin-1.2-SNAPSHOT/plugin.jelly: <j:forEach var="lib" items="${pom.dependencies}">
./maven-deploy-plugin-1.0/plugin.jelly: <j:forEach var="dep" items="${pom.dependencies}">
./maven-ear-plugin-1.0/plugin.jelly: <j:forEach var="dep" items="${pom.dependencies}">
./maven-ejb-plugin-1.0-SNAPSHOT/plugin.jelly: <j:forEach var="dep" items="${pom.dependencies}">
./maven-ejb-plugin-1.0-SNAPSHOT/plugin.jelly: <j:forEach var="dep" items="${pom.dependencies}">
./maven-idea-plugin-1.0/plugin.jelly: <j:forEach var="lib" items="${pom.dependencies}">
./maven-j2ee-plugin-1.1-SNAPSHOT/plugin.jelly: <j:forEach var="dep" items="${pom.dependencies}">
./maven-jdeveloper-plugin-1.0-SNAPSHOT/plugin.jelly: <j:forEach var="dep" items="${pom.dependencies}">
./maven-jnlp-plugin-1.0/plugin.jelly: <j:forEach var="lib" items="${pom.dependencies}">
./maven-jnlp-plugin-1.0/plugin.jelly: <j:forEach var="lib" items="${pom.dependencies}">
./maven-release-plugin-1.0/plugin.jelly: <j:forEach var="dependency" items="${pom.dependencies}">
./maven-uberjar-plugin-1.0/plugin.jelly: <j:forEach var="dep" items="${pom.dependencies}">
./maven-war-plugin-1.2-SNAPSHOT/plugin.jelly: <j:forEach var="dep" items="${pom.dependencies}">
./maven-war-plugin-1.2-SNAPSHOT/plugin.jelly: <j:forEach var="dep" items="${pom.dependencies}">


as are almost all of these (mostly related to the use above):
$ find . -name '*.jelly' | xargs grep maven.repo.local
./maven-ant-plugin-1.2-SNAPSHOT/plugin.jelly: <!-- know what the user wants for ${maven.home} and ${maven.repo.local} -->
./maven-ant-plugin-1.2-SNAPSHOT/plugin.jelly: ${maven.repo.local}
./maven-cactus-plugin-1.2-SNAPSHOT/plugin.jelly: <pathElement location="${maven.repo.local}/${lib.artifactDirectory}/jars/${lib.artifact}"/>
./maven-deploy-plugin-1.0/plugin.jelly: <j:set var="mavenRepoLocal" value='${context.getVariable("maven.repo.local")}'/>
./maven-ear-plugin-1.0/plugin.jelly: <fileset dir="${maven.repo.local}/${dep.artifactDirectory}/jars/">
./maven-ear-plugin-1.0/plugin.jelly: <fileset dir="${maven.repo.local}/${dep.artifactDirectory}/wars/">
./maven-ear-plugin-1.0/plugin.jelly: <fileset dir="${maven.repo.local}/${dep.artifactDirectory}/ejbs/">
./maven-ear-plugin-1.0/plugin.jelly: value="${maven.repo.local}/${pom.artifactDirectory}/ears"/>
./maven-eclipse-plugin-1.2-SNAPSHOT/plugin.jelly: default="${maven.repo.local}" />
./maven-ejb-plugin-1.0-SNAPSHOT/plugin.jelly: <fileset dir="${maven.repo.local}/${dep.artifactDirectory}/jars/">
./maven-ejb-plugin-1.0-SNAPSHOT/plugin.jelly: value="${maven.repo.local}/${pom.artifactDirectory}/ejbs"/>
./maven-idea-plugin-1.0/plugin.jelly: <root type="simple" url="jar://${maven.repo.local}/${lib.artifactDirectory}/jars/${lib.artifact}!/"/>
./maven-j2ee-plugin-1.1-SNAPSHOT/plugin.jelly: <fileset dir="${maven.repo.local}/${dep.artifactDirectory}/jars/">
./maven-java-plugin-1.2-SNAPSHOT/plugin.jelly: <property name="jardir__" value="${maven.repo.local}/${pom.artifactDirectory}/jars"/>
./maven-java-plugin-1.2-SNAPSHOT/plugin.jelly: <property name="jardir__" value="${maven.repo.local}/${pom.artifactDirectory}/jars"/>
./maven-jbuilder-plugin-1.1-SNAPSHOT/plugin.jelly: <path><j:expr value="[${maven.repo.local}${lib.urlPath}]"/></path>
./maven-jnlp-plugin-1.0/plugin.jelly: jar="${maven.repo.local}/${lib.artifactDirectory}/jars/${lib.artifact}"
./maven-jnlp-plugin-1.0/plugin.jelly: jar="${maven.repo.local}/${lib.artifactDirectory}/jars/${lib.artifact}"
./maven-plexus-plugin-0.2/plugin.jelly: value="${maven.repo.local}/plexus/jars/${plexusPom.artifactId}-${plexusPom.currentVersion}.jar"/>
./maven-plexus-plugin-0.2/plugin.jelly: value="${maven.repo.local}/plexus/poms/${component}.pom"/>
./maven-plexus-plugin-0.2/plugin.jelly: value="${maven.repo.local}/plexus/jars/${depPom.artifactId}-${depPom.currentVersion}.jar"/>
./maven-plugin-plugin-1.0-SNAPSHOT/plugin.jelly: todir="${maven.repo.local}/maven/jars" />
./maven-uberjar-plugin-1.0/plugin.jelly: file="${maven.repo.local}/${dep.artifactDirectory}/jars/${dep.artifact}"/>
./maven-war-plugin-1.2-SNAPSHOT/plugin.jelly: <lib dir="${maven.repo.local}/${dep.artifactDirectory}/jars/">
./maven-war-plugin-1.2-SNAPSHOT/plugin.jelly: file="${maven.repo.local}/${dep.artifactDirectory}/jars/${dep.artifact}"/>
./maven-war-plugin-1.2-SNAPSHOT/plugin.jelly: value="${maven.repo.local}/${pom.artifactDirectory}/wars"/>




Privacy and Confidentiality Notice

------------------------------------------------

The information contained in this E-Mail message is intended only for the person or persons to whom it is addressed. Such information is confidential and privileged and no mistake in transmission is intended to waive or compromise such privilege. If you have received it in error, please destroy it and notify us on the telephone number printed above. If you do not receive complete and legible copies, please telephone us immediately. Any opinions expressed herein including attachments are those of the author only. i-documentsystems Ltd. does not accept responsibility for the accuracy or completeness of the information provided or for any changes to this Email, however made, after it was sent. (Please note that it is your responsibility to scan this message for viruses).


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to