@Test public void testPublisherShouldCorrectApisWithAbsolutPath() throws MojoExecutionException, AppException { final Publication publication = createPublication() .setApis(Arrays.asList(new Api().setApiSpecification("api1").setApiConfig("config1"))); when(publicationReader.read(any(String.class), any())).thenReturn(publication); sut.execute(); assertThat(publication.getApis().size(), is(1)); assertThat(publication.getApis().get(0).getApiSpecification(), CoreMatchers.not("api1")); assertThat(publication.getApis().get(0).getApiConfig(), CoreMatchers.not("config1")); }
public void execute() throws MojoExecutionException { getLog().info("Starting Axway Publisher"); AxwayPublishingAdapter adapter = getAxwayPublishingAdapter(); PublicationReader publicationReader = getPublicationReader(); try { final Publication publication = publicationReader.read(getStageConfigurationFile(), Publication.class); initApis(publication.getApis()); adapter.initOptionsAndArgs(publication); getLog().info(publication.toString()); publish(publication.getApis(), publication.getStage()); } catch (AbstractPublishingPluginException e) { throw e; } }
Publisher extends AbstractMojo { public void execute() throws MojoExecutionException { getLog().info("Starting Axway Publisher"); AxwayPublishingAdapter adapter = getAxwayPublishingAdapter(); PublicationReader publicationReader = getPublicationReader(); try { final Publication publication = publicationReader.read(getStageConfigurationFile(), Publication.class); initApis(publication.getApis()); adapter.initOptionsAndArgs(publication); getLog().info(publication.toString()); publish(publication.getApis(), publication.getStage()); } catch (AbstractPublishingPluginException e) { throw e; } } }
Publisher extends AbstractMojo { public void execute() throws MojoExecutionException { getLog().info("Starting Axway Publisher"); AxwayPublishingAdapter adapter = getAxwayPublishingAdapter(); PublicationReader publicationReader = getPublicationReader(); try { final Publication publication = publicationReader.read(getStageConfigurationFile(), Publication.class); initApis(publication.getApis()); adapter.initOptionsAndArgs(publication); getLog().info(publication.toString()); publish(publication.getApis(), publication.getStage()); } catch (AbstractPublishingPluginException e) { throw e; } }  }
Publisher extends AbstractMojo { public void execute() throws MojoExecutionException { getLog().info("Starting Axway Publisher"); AxwayPublishingAdapter adapter = getAxwayPublishingAdapter(); PublicationReader publicationReader = getPublicationReader(); try { final Publication publication = publicationReader.read(getStageConfigurationFile(), Publication.class); initApis(publication.getApis()); adapter.initOptionsAndArgs(publication); getLog().info(publication.toString()); publish(publication.getApis(), publication.getStage()); } catch (AbstractPublishingPluginException e) { throw e; } }  void execute(); PublicationReader getPublicationReader(); String getStageConfigurationFile(); void setStageConfigurationFile(final String stageConfiguationFile); MavenProject getProject(); void setProject(final MavenProject project); }
Publisher extends AbstractMojo { public void execute() throws MojoExecutionException { getLog().info("Starting Axway Publisher"); AxwayPublishingAdapter adapter = getAxwayPublishingAdapter(); PublicationReader publicationReader = getPublicationReader(); try { final Publication publication = publicationReader.read(getStageConfigurationFile(), Publication.class); initApis(publication.getApis()); adapter.initOptionsAndArgs(publication); getLog().info(publication.toString()); publish(publication.getApis(), publication.getStage()); } catch (AbstractPublishingPluginException e) { throw e; } }  void execute(); PublicationReader getPublicationReader(); String getStageConfigurationFile(); void setStageConfigurationFile(final String stageConfiguationFile); MavenProject getProject(); void setProject(final MavenProject project);  }