[ImageJ-devel] ImageJ maven again

Tobias Pietzsch pietzsch at mpi-cbg.de
Thu Jul 3 15:21:06 CDT 2014


Hi Dscho,

thanks for looking into this!


Actually, my ~/.m2/settings.xml did contain a section for 
> 		<server>
> 			<id>imagej.releases</id>
> 			<username>pietzsch</username>
> 			<password>{0123456789abcdefghijklmnopqrstuvwxyzABCDEFG=}</password>
> 		</server>
with the password (passed through mvn -ep) I set at the Nexus webinterface (and which works for logging in there).

I did try to push to imagej.releases before, because that is where the previous version of jhdf5 was
http://maven.imagej.net/content/repositories/releases/cisd/jhdf5/


Now, following your suggestions, what I tried is the following:

1.) I added a section for 
> 		<server>
> 			<id>imagej.thirdparty</id>
> 			<username>pietzsch</username>
> 			<password>{0123456789abcdefghijklmnopqrstuvwxyzABCDEFG=}</password>
> 		</server>
to my settings.xml

2.) I cloned a fresh scijava-common from github. This currently has the parent pom-scijava 2.22.

3.) From that directory I ran the command you suggested. Here is the full output:
pietzsch at tomancak-mac-17:~/workspace/scijava-common (master)$ 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
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building SciJava Common 2.25.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-deploy-plugin:2.8.1:deploy-file (default-cli) @ scijava-common ---
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.042s
[INFO] Finished at: Thu Jul 03 22:12:30 CEST 2014
[INFO] Final Memory: 9M/310M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.8.1:deploy-file (default-cli) on project scijava-common: Execution default-cli of goal org.apache.maven.plugins:maven-deploy-plugin:2.8.1:deploy-file failed. NullPointerException -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException


I did look into the pom-scijava 2.22 and I couldn't find any mention of the "imagej.thirdparty" repository.
Maybe that is the problem?
I didn't try again with the "imagej.releases" repository because I don't want to mess anything up and I wouldn't know how to undo a successful deployment there.


What would you suggest? One thing I think I could try is to mimic the pom-scijava and put this into the pom.xml of my scijava-common clone:
		<!-- This profile enables deployment to the ImageJ Maven repository. -->
		<profile>
			<id>deploy-to-imagej</id>
			<distributionManagement>
				<repository>
					<id>imagej.releases</id>
					<name>ImageJ Releases Repository</name>
					<url>dav:http://maven.imagej.net/content/repositories/releases</url>
				</repository>
				<repository>
					<id>imagej.thirdparty</id>
					<name>ImageJ Thirdparty Repository</name>
					<url>dav:http://maven.imagej.net/content/repositories/thirdparty</url>
				</repository>
				<snapshotRepository>
					<id>imagej.snapshots</id>
					<name>ImageJ Snapshots Repository</name>
					<url>dav:http://maven.imagej.net/content/repositories/snapshots</url>
				</snapshotRepository>
			</distributionManagement>
		</profile>
Do you think that might work? Should I try it?


Thanks,
Tobias


On Jul 3, 2014, at 8:20 PM, Johannes Schindelin <schindelin at wisc.edu> wrote:

> 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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 455 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://imagej.net/pipermail/imagej-devel/attachments/20140703/b94ab20f/attachment.pgp>


More information about the ImageJ-devel mailing list