[ImageJ-devel] Fwd: Re: ImageJ maven again
Johannes Schindelin
schindelin at wisc.edu
Thu Jul 3 13:20:18 CDT 2014
Hi,
let's stay open about this project so that nobody can claim to be cut out
from the development, at least not without posing a major fire hazard to
their leg wear.
On Thu, 3 Jul 2014, Curtis Rueden wrote:
> Tobias needs more permissions on our Nexus but I didn't have time to figure
> it out yesterday.
>
> On Jul 3, 2014 10:52 AM, "Tobias Pietzsch" <pietzsch at mpi-cbg.de> wrote:
>
> > I now tried to deploy a (3rd party) jar to imagej.releases using this:
> >
> > pietzsch at tomancak-mac-17:~$ mvn deploy:deploy-file -Durl=
> > http://maven.imagej.net/content/repositories/releases/
> > -Dfile=/Users/pietzsch/Desktop/jhdf5-13.06.2.jar -DgroupId=cisd
> > -DartifactId=jhdf5 -Dpackaging=jar -Dversion=13.06.2
> > -DrepositoryId=imagej.releases
> > [INFO] Scanning for projects...
> > ...
> > [ERROR] Failed to execute goal
> > org.apache.maven.plugins:maven-deploy-plugin:2.5:deploy-file (default-cli)
> > on project standalone-pom: Failed to deploy artifacts: Could not transfer
> > artifact cisd:jhdf5:jar:13.06.2 from/to imagej.releases (
> > http://maven.imagej.net/content/repositories/releases/): Access denied
> > to:
> > http://maven.imagej.net/content/repositories/releases/cisd/jhdf5/13.06.2/jhdf5-13.06.2.jar
>From the logs, it appears that someone from the public IP of the MPI-CBG
tried to put a new jhdf5-13.06.2 at 03/Jul/2014:10:26:04 -0500 which
translates to roughly half past five in the afternoon Dresden time.
The logs also reveal that this PUT request elicited a response code 401
(Access denied). From other, more successful PUT requests it looks as if
that is expected, but needs to be followed up by another request that
succeeds with a 201 (Created) [*1*].
It looks to me as if Maven does not find the proper credentials and
therefore does not even try to upload with authentication.
Please also note that jhdf5 should be in the imagej.thirdparty repository,
not the imagej.releases one (we do not maintain this project, unlike
pretty much everything put into the imagej.releases repository).
> > I have set up my ~/.m2/settings-security.xml and ~/.m2/settings.xml
> > correctly I think.
Could it be that your $HOME/.m2/settings.xml looks like this:
-- snip --
<settings>
<servers>
<server>
<id>imagej.snapshots</id>
<username>pietzsch</username>
<password>{0123456789abcdefghijklmnopqrstuvwxyzABCDEFG=}</password>
</server>
</servers>
</settings>
-- snap --
but should look like this:
-- snip --
<settings>
<servers>
<server>
<id>imagej.releases</id>
<username>pietzsch</username>
<password>{0123456789abcdefghijklmnopqrstuvwxyzABCDEFG=}</password>
</server>
<server>
<id>imagej.snapshots</id>
<username>pietzsch</username>
<password>{0123456789abcdefghijklmnopqrstuvwxyzABCDEFG=}</password>
</server>
<server>
<id>imagej.thirdparty</id>
<username>pietzsch</username>
<password>{0123456789abcdefghijklmnopqrstuvwxyzABCDEFG=}</password>
</server>
</servers>
</settings>
-- snap --
On the other hand, the problem might be a different one altogether: after
staring at the quoted command-line, I cannot fail to note that this
command is launched from your home directory, letting me suspect that
there is no pom.xml file at all.
Please note that Maven needs quite a bit of information for deploying: it
is not enough to say "imagej.releases", it needs a URL and very
specifically a transport helper for uploading (comparable to the uploader
plugins for the ImageJ updater, or the ssh protocol for Git pushing). For
the ImageJ Maven repositories, we use WebDAV to upload, in the form of the
wagon-webdav-jackrabbit extension. In your particular case, I expect none
of this information to be available to Maven.
I would suggest to try almost the same command-line you tried, but from
a directory containing *any* SciJava project. As long as it depends on
pom-scijava >= 1.135, it will have a profile that adds the deploy
information for the ImageJ Maven repositories specifically. So if you run
the following command-line from, say, the imglib2 checkout:
mvn -Pdeploy-to-imagej deploy:deploy-file \
-Dfile=/Users/pietzsch/Desktop/jhdf5-13.06.2.jar \
-DgroupId=cisd -DartifactId=jhdf5 -Dpackaging=jar \
-Dversion=13.06.2 \
-DrepositoryId=imagej.thirdparty
it might do what you want it to do.
Ciao,
Dscho
Footnote *1*:
http://en.wikipedia.org/wiki/List_of_HTTP_status_codes#2xx_Success
More information about the ImageJ-devel
mailing list