I'm trying to use maven changes plugin with jira cloud but in vain.
My pom looks like this :
.....
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-changes-plugin</artifactId>
<version>2.11</version>
...
</executions>
<configuration>
<useJql>true</useJql>
<jiraUser>xxxx#gmail.com</jiraUser>
<jiraPassword>******</jiraPassword>
<webUser>xxxxx#gmail.com</webUser>
<webPassword>******</webPassword>
<onlyCurrentVersion>true</onlyCurrentVersion>
<smtpHost>smtp.gmail.com</smtpHost>
<smtpPort implementation="java.lang.Integer">465</smtpPort>
<username>xxxx#gmail.com</username>
<password>*****</password>
<toAddresses>
<toAddress implementation="java.lang.String">xxxxxx#yahoo.fr</toAddress>
</toAddresses>
<mailSender>
<name>Release Notification</name>
<email>xxxx#gmail.com</email>
</mailSender>
<issueManagementSystems>
<issueManagementSystem>JIRA</issueManagementSystem>
</issueManagementSystems>
</configuration>
</plugin>
</plugins>
</build>
<issueManagement>
<system>JIRA</system>
<url>https://xxxxx.atlassian.net/browse/PROJ</url>
</issueManagement>
....
I'm getting a 403 error.
I think that when using jira cloud, I should use a token but I don't know how to configure the plugin with it.
Any help please ?
I was looking for how to configure to token in the plugin declaration. Actually all I should to do is using the field webPassword to set that token :
<webUser>user_email/webUser>
<webPassword>jira_token</webPassword>
and delete fields jiraUser and jiraPassword.
Related
Is anyone out there using OAuth to authenticate GeoServer users? I've been through installing and configuring this extension. I've tried Google and GitHub providers. I end up with a 404 error trying to access the login page. Same issue as here. There are no errors in the log with the debug level elevated as suggested.
Answering my own question here...
For me the 404 problem solved by building from source and accounting for the required dependencies using a maven plugin. Previously, I was attempting to use the prebuilt binaries and lib/ depedencies.
I built the modules from source (2.18.3) and modified the file maven file to copy the dependencies to the target folder, which I then copied to WEB-INF/lib.
Here is the pom file addition I made to get the dependencies.
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.8</version>
<executions>
<execution>
<id>copy-dependencies</id>
<phase>prepare-package</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/classes/lib</outputDirectory>
<includeScope>runtime</includeScope>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
I'm using TomEE microprofile and have defined my rest application path this way:
#ApplicationPath("api")
public class RestConfiguration extends Application {
}
When the application is deployed, tomee log shows the access url to the generated front end resources:
Service URI: http://localhost:8080/api/openapi-ui/
When accesing the url got this message in the swagger-ui web page:
Fetch error undefined /openapi
If I change the application path to empty:
#ApplicationPath("")
Then all works fine and swagger shows all of the service method definitions.
So, what should I do to make it work adding "api" to the ApplicationPath annotation?
Tried with "/api", but doesn't work either.
I made the test here with Tomee-8.0.4, follow the configurations, assumed that you that is using a JAR.
in your pom.xml use the dependency:
<dependency>
<groupId>org.microprofile-ext.openapi-ext</groupId>
<artifactId>openapi-ui</artifactId>
<version>1.1.3</version>
</dependency>
<build>
<finalName>tomee-demo</finalName>
<plugins>
<plugin>
<groupId>org.apache.tomee.maven</groupId>
<artifactId>tomee-maven-plugin</artifactId>
<version>${tomee.version}</version>
<executions>
<execution>
<id>executable-jar</id>
<phase>package</phase>
<goals>
<goal>exec</goal>
</goals>
</execution>
</executions>
<configuration>
<context>ROOT</context>
<tomeeClassifier>microprofile</tomeeClassifier>
</configuration>
</plugin>
</plugins>
</build>
in microprofile-config.properties use:
mp.openapi.servers=http://localhost:8080/api
openapi.ui.yamlUrl=/api/openapi
openapi.ui.serverVisibility=visible
and run your project again.
test performed
reference:
https://github.com/microprofile-extensions/openapi-ext/tree/master/openapi-ui
I want to use Atlassian Bamboo to deploy non-Maven artifacts, that is artifacts created outside of Maven in another Bamboo task. So I created a Maven 3.x task and put it after the task that creates the artifacts and put deploy:deploy-file in the Goal box. The goal configuration requires the full path of the file I want to deploy. So I did this...
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<executions>
<execution>
<id>deploy-my_artifact-tgz</id>
<phase>deploy</phase>
<goals>
<goal>deploy-file</goal>
</goals>
<configuration>
<!-- Will this work??? -->
<file>${bamboo.build.working.directory}/dist/my_artifact.tgz</file>
<url>${project.repoUrl}</url>
<repositoryId>${project.repoId}</repositoryId>
<groupId>${project.groupId}.rtim.garner</groupId>
<version>${project.version}</version>
<artifactId>my_artifact</artifactId>
<packaging>tgz</packaging>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
Can I use the ${bamboo.build.working.directory} to define part of the file path inside the part of the , as I have above? Should I expect Bamboo to substitute this to the correct value?
NOTE: Showing the effective pom in the Bamboo job does not substitute the varables' corresponding value so I can't tell.
I had to pass it the value of the variable. So I have this in my Goal text box of my Bamboo Maven task.
-Dbamboo.build.working.directory=${bamboo.build.working.directory} deploy:deploy-file
I have Googled the following issue but not quite got what exactly to do as I am new to Jenkins. Here is one solution to this on SO itself, I can't comment on answer, due to low reputation.
How to deploy war file to jboss 7.1.1 from jenkins1.573 automatically during build?
It would be really great if somebody provides step by step way out of this:
Caused by: org.codehaus.cargo.util.CargoException: Cannot locate the JBoss connector classes! Make sure the required JBoss JARs (or Maven dependencies) are in CARGO's classpath.
More information on: http://cargo.codehaus.org/JBoss+Remote+Deployer
Edit Updated Pom.xml
<build>
<sourceDirectory>src</sourceDirectory>
<testSourceDirectory>test</testSourceDirectory>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<version>2.4</version>
<configuration>
<warSourceDirectory>WebContent</warSourceDirectory>
<failOnMissingWebXml>false</failOnMissingWebXml>
</configuration>
</plugin>
<plugin>
<groupId>org.jboss.as.plugins</groupId>
<artifactId>jboss-as-maven-plugin</artifactId>
<version>7.4.Final</version>
</plugin>
</plugins>
</build>
If you use maven you can use maven jboss as plugin. Just add
<pluginManagement>
<plugins>
<plugin>
<groupId>org.jboss.as.plugins</groupId>
<artifactId>jboss-as-maven-plugin</artifactId>
<version>7.4.Final</version>
</plugin>
<plugins>
</pluginManagement>
to your project's pom.xml
Then add as post-build step:
cd my-ear-or-war-packaged-project
mvn jboss-as:deploy -Djboss-as.port=9999 -Djboss-as.hostname=localhost
and the code should deploy in the post build step.
You can also add the execution of the plugin to a dedicated maven profile, which would make the artifact deploy already during the build phase, without the need to create additional build step in jenkins.
I have two classes with main method and one loads the security configuration and the other does not. In order to create two artifacts - secure and non secure jars, I am doing something like the following :
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<executions>
<execution>
<id>1</id>
<configuration>
<mainClass>a.b.c.Secured</mainClass>
<finalName>secured</finalName>
<classifier>secured</classifier>
</configuration>
</execution>
<execution>
<id>2</id>
<configuration>
<mainClass>a.b.c.NonSecured</mainClass>
<finalName>non-secured</finalName>
<classifier>nonSecured</classifier>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
And I am seeing the exception -
java.lang.IllegalStateException: Unable to find a single main class from the following candidates.
Can you please let me know, if there is some thing wrong with the above configuration? I may be able to use maven profiles to create different artifacts. However, I wanted to understand the problem with the above configuration. Any help will be greatly appreciated.
I think both those configurations are active at the same time (otherwise how do you tell maven which one to use?). You could put them both in Maven profiles.