[EMAIL PROTECTED] wrote:
I am trying to deploy the http://cvs.apache.org/viewcvs.cgi/avalon/fortress/examples/src/java/org/
apache/avalon/fortress/examples/servlet/
Example on tomcat.
Unfortunatly it does not deploy.... Here's the stacktrace (see bottom):
There's a list of jarfile - names, coma separated. In
http://www.mail-archive.com/[EMAIL PROTECTED]/msg01105.html
<quote> Looks like you have built cornerstone using the beta 9 binary download version. You need to patch your jar plugin because its generating a comma delimited extensions list in the manifest insteead of a sspace seperated list </quote>
There's sort of an explanation for this, how can i solve this?
The quick and dirty solution is to unzip the content of the jar file, edit the manifest - remove the commas, save, and rezip. The cleaner solution is to replace the plugin.jelly file in the expanded jar plugin with the attached version. And the even better solution is to upgrade to at least beta-10 of Maven.
Steve.
--
Stephen J. McConnell mailto:[EMAIL PROTECTED]
|------------------------------------------------| | Magic by Merlin | | Production by Avalon | | | | http://avalon.apache.org/merlin | | http://dpml.net/ | |------------------------------------------------|
<?xml version="1.0"?>
<project
xmlns:j="jelly:core"
xmlns:ant="jelly:ant"
xmlns:license="license"
xmlns:maven="jelly:maven"
xmlns:deploy="deploy"
xmlns:resources="resources"
xmlns:util="jelly:util"
xmlns:doc="doc"
xmlns:m="maven">
<!-- ================================================================== -->
<!-- J A R -->
<!-- ================================================================== -->
<goal name="jar" prereqs="jar:jar"
description="Create the deliverable jar file."/>
<goal name="jar:jar"
description="Create the deliverable jar file."
prereqs="test:test">
<ant:available property="maven.jar.manifest.available"
file="${maven.jar.manifest}"/>
<!-- See http://java.sun.com/j2se/1.3/docs/guide/jar/jar.html -->
<!-- See http://java.sun.com/j2se/1.4.1/docs/guide/jar/jar.html -->
<ant:jar
jarfile="${maven.build.dir}/${maven.final.name}.jar"
basedir="${maven.build.dest}"
index="true"
excludes="${maven.jar.excludes}">
<j:if test="${maven.jar.manifest.available}">
<ant:setProperty name="manifest" value="${maven.jar.manifest}" />
</j:if>
<j:set var="licenseFileName"><license:fileName/></j:set>
<util:file name="${licenseFileName}" var="licenseFile"/>
<ant:metainf dir="${licenseFile.canonicalFile.parent}">
<ant:include name="${licenseFile.canonicalFile.name}"/>
</ant:metainf>
<ant:manifest>
<ant:attribute name="Built-By" value="${user.name}"/>
<ant:attribute name="Created-By" value="Apache Jakarta Maven"/>
<ant:attribute name="Package" value="${pom.package}"/>
<ant:attribute name="Build-Jdk" value="${java.version}"/>
<!-- added supplementary entries -->
<ant:attribute name="Extension-Name" value="${pom.artifactId}"/>
<ant:attribute name="Specification-Version" value="${pom.specificationVersion}"/>
<ant:attribute name="Specification-Vendor" value="${pom.organization.name}"/>
<ant:attribute name="Specification-Title" value="${pom.shortDescription}"/>
<ant:attribute name="Implementation-Version" value="${pom.currentVersion}"/>
<ant:attribute name="Implementation-Vendor" value="${pom.organization.name}"/>
<ant:attribute name="Implementation-Vendor-Id" value="${pom.organization.identifier}"/>
<j:set var="mainclass" value="${pom.getPluginContext('maven-java-plugin').getVariable('maven.jar.mainclass')}"/>
<j:if test="${!empty(mainclass)}">
<ant:attribute name="Main-Class" value="${mainclass}"/>
</j:if>
<j:if test="${maven.jar.manifest.extensions.add} == 'true'">
<j:set var="extensionList" value=""/>
<j:forEach var="artifact" items="${pom.artifacts}">
<j:set var="dep" value="${artifact.dependency}"/>
<j:set var="extensionList" value="${extensionList} ${dep.artifactId}"/>
</j:forEach>
<j:if test="${extensionList.length() != 0}">
<j:set var="extensionList" value="${extensionList.substring(1)}"/>
<ant:attribute name="Extension-List" value="${extensionList}"/>
</j:if>
<j:forEach var="artifact" items="${pom.artifacts}">
<j:set var="dep" value="${artifact.dependency}"/>
<ant:attribute name="${dep.artifactId}-Extension-Name" value="${dep.artifactId}"/>
<ant:attribute name="${dep.artifactId}-Implementation-Version" value="${dep.version}"/>
<ant:attribute name="${dep.artifactId}-Implementation-URL" value="http://www.ibiblio.org/maven${artifact.urlPath}"/>
</j:forEach>
</j:if>
</ant:manifest>
</ant:jar>
</goal>
<!-- ================================================================== -->
<!-- S N A P S H O T J A R -->
<!-- ================================================================== -->
<goal
name="jar:snapshot"
description="Create a snapshot jar, ie 'id-YYYYMMDD.hhmmss.jar'">
<maven:snapshot project="${pom}"/>
<j:set var="maven.final.name" value="${snapshotSignature}"/>
<ant:echo>Building snapshot JAR: ${maven.final.name}</ant:echo>
<attainGoal name="jar:jar"/>
</goal>
<!-- ================================================================== -->
<!-- D E P L O Y S N A P S H O T -->
<!-- ================================================================== -->
<goal
name="jar:deploy-snapshot"
description="Deploy a snapshot jar to the remote repository">
<m:user-check user="${maven.username}"/>
<attainGoal name="jar:snapshot"/>
<ant:property name="maven.jar.to.deploy" value="${maven.final.name}.jar"/>
<ant:property name="dir"
value="${maven.repo.central.directory}/${pom.artifactDirectory}/jars"/>
<util:replace var="jarToDeploy" oldChar="\" newChar="/">${maven.build.dir}/${maven.jar.to.deploy}</util:replace>
<util:replace var="forwardSlashBaseDir" oldChar="\" newChar="/" value="${basedir}"/>
<j:if test="${!forwardSlashBaseDir.endsWith('/')}">
<j:set var="base" value="${forwardSlashBaseDir}/" />
</j:if>
<j:set var="relativePath">${jarToDeploy.substring(base.length())}</j:set>
<deploy:artifact
artifact="${relativePath}"
type="jars"
assureDirectoryCommand="mkdir -p"
siteCommand="cd @deployDirectory@; chmod g+w ${maven.jar.to.deploy}; chgrp ${maven.remote.group} ${maven.jar.to.deploy}; ln -sf ${maven.jar.to.deploy} ${pom.artifactId}-SNAPSHOT.jar; echo ${snapshotVersion} > ${pom.artifactId}-snapshot-version"
/>
</goal>
<!-- ================================================================== -->
<!-- D E P L O Y J A R -->
<!-- ================================================================== -->
<goal
name="jar:deploy"
description="Deploy a jar to the remote repository">
<m:user-check user="${maven.username}"/>
<attainGoal name="jar:jar"/>
<ant:property name="maven.jar.to.deploy" value="${maven.final.name}.jar"/>
<j:set var="sl" value="/"/>
<util:replace var="jarToDeploy" oldChar="\" newChar="/">${maven.build.dir}/${maven.jar.to.deploy}</util:replace>
<util:replace var="forwardSlashBaseDir" oldChar="\" newChar="/" value="${basedir}"/>
<j:if test="${!forwardSlashBaseDir.endsWith('/')}">
<j:set var="base" value="${forwardSlashBaseDir}/" />
</j:if>
<j:set var="relativePath">${jarToDeploy.substring(base.length())}</j:set>
<deploy:artifact
artifact="${relativePath}"
type="jars"
assureDirectoryCommand="mkdir -p"
siteCommand="cd @deployDirectory@; chmod g+w ${maven.jar.to.deploy}; chgrp ${maven.remote.group} ${maven.jar.to.deploy}"
/>
</goal>
<!-- ================================================================== -->
<!-- I N S T A L L J A R -->
<!-- ================================================================== -->
<goal name="jar:install" prereqs="jar:jar"
description="Install the jar in the local repository">
<ant:echo>
id = '${pom.artifactId}'
groupId = '${pom.groupId}'
artifactDirectory = '${pom.artifactDirectory}'
</ant:echo>
<ant:property name="jardir__" value="${maven.repo.local}/${pom.artifactDirectory}/jars"/>
<ant:mkdir dir="${jardir__}"/>
<ant:copy
file="${maven.build.dir}/${maven.final.name}.jar"
todir="${jardir__}"
overwrite="true"
/>
</goal>
<!-- ================================================================== -->
<!-- I N S T A L L S N A P S H O T -->
<!-- ================================================================== -->
<goal
name="jar:install-snapshot" prereqs="jar:snapshot"
description="Install a snapshot jar in the local repository">
<ant:property name="jardir__" value="${maven.repo.local}/${pom.artifactDirectory}/jars"/>
<ant:mkdir dir="${jardir__}"/>
<ant:copy
file="${maven.build.dir}/${maven.final.name}.jar"
tofile="${jardir__}/${pom.artifactId}-SNAPSHOT.jar"
overwrite="true"
/>
<ant:copy
file="${maven.build.dir}/${maven.final.name}.jar"
tofile="${jardir__}/${maven.final.name}.jar"
/>
</goal>
</project>
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
