@SuppressWarnings("unused") protected void processParameter(String arg, String parameter, PublisherInfo publisherInfo) throws URISyntaxException { try { if (arg.equalsIgnoreCase("-metadataRepository") || arg.equalsIgnoreCase("-mr")) //$NON-NLS-1$ //$NON-NLS-2$ metadataLocation = URIUtil.fromString(parameter); if (arg.equalsIgnoreCase("-artifactRepository") || arg.equalsIgnoreCase("-ar")) //$NON-NLS-1$ //$NON-NLS-2$ artifactLocation = URIUtil.fromString(parameter); } catch (URISyntaxException e) { throw new IllegalArgumentException(NLS.bind(Messages.exception_repoMustBeURL, parameter)); } if (arg.equalsIgnoreCase("-metadataRepositoryName")) //$NON-NLS-1$ metadataRepoName = parameter; if (arg.equalsIgnoreCase("-source")) { //$NON-NLS-1$ // check here to see if the location actually exists so we can fail gracefully now rather than unpredictably later // see bug 272956 where we would fail with an NPE if someone gave us a URL instead of a file-system path if (!new File(parameter).exists()) throw new IllegalArgumentException(NLS.bind(Messages.exception_sourcePath, parameter)); source = parameter; } if (arg.equalsIgnoreCase("-artifactRepositoryName")) //$NON-NLS-1$ artifactRepoName = parameter; if (arg.equalsIgnoreCase("-configs")) //$NON-NLS-1$ publisherInfo.setConfigurations(AbstractPublisherAction.getArrayFromString(parameter, ",")); //$NON-NLS-1$ if (arg.equalsIgnoreCase("-contextMetadata")) //$NON-NLS-1$ setContextRepositories(processRepositoryList(parameter), contextArtifactRepositories); if (arg.equalsIgnoreCase("-contextArtifacts")) //$NON-NLS-1$ setContextRepositories(contextMetadataRepositories, processRepositoryList(parameter)); }
setContextRepositories(processRepositoryList(parameter), contextArtifactRepositories); setContextRepositories(contextMetadataRepositories, processRepositoryList(parameter));
setContextRepositories(processRepositoryList(parameter), contextArtifactRepositories); setContextRepositories(contextMetadataRepositories, processRepositoryList(parameter));
setContextRepositories(processRepositoryList(parameter), contextArtifactRepositories); setContextRepositories(contextMetadataRepositories, processRepositoryList(parameter));