parameterized

maven release plugin with parameterized version

好久不见. 提交于 2019-12-06 23:14:23
问题 is it possible to use the maven release plugin with a multi-module project, where some of the inter-module dependencies are specified using a parameter from the parent pom? When I try to call release:prepare i get the following error: [ERROR] Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.1:prepare (default-cli) on project forest-parent: The version could not be updated: ${some.version} -> [Help 1] Here is my plugin definition: <plugins> <plugin> <groupId>org.apache

Guice SPI: find bindings by wildcard types

笑着哭i 提交于 2019-12-06 08:37:07
问题 Guice provides a means to find all bindings for a given type (Injector#findBindingsByType) and it also provides a TypeLiteral class from which it seems possible to construct a wildcard type. What I would like to do is find all bindings for some type that is parameterised by a wildcard type but I can't figure out how to do it. A look at the guice src suggests I might be barking up the wrong tree but I figured I'd ask around anyway... so for example given a type Foo<E extends Bar> BarImplOne

Jenkins build parameterized with a choice of versions of a Nexus artifact (all GAVs)

谁都会走 提交于 2019-12-06 08:20:18
问题 Is there a Jenkins plugin that can do a group-artifact-version (GAV) search of my Nexus repo and list the results? I would like the results to be available on a parameterized build as a choice (a dropdown). 回答1: I added a groovy script to a Dynamic Choice Parameter (See Jenkins Plugins) Some hurdles were: Our Nexus server issues a basic authentication challenge so I couldn't simply use a groovy "http://blah".toURL().text I didn't want to load in missing groovy jars like httpbuilder so I

Parameterized Query: Check if field is in array of values in SELECT statement

谁都会走 提交于 2019-12-06 07:52:38
问题 I'm trying to configure a parameterized query to the effect of: SELECT field1 FROM myTable WHERE field2 IN (1,2,3,4) The database I'm using is Postgres. This query run successfully unparameterized, but I'd like to use a parameterized query with a JdbcTemplate to fill in the list for valid field2 values (which are integers). Trying various values for var ( "1,2,3,4" , "[1,2,3,4]" , "{1,2,3,4}" , or "(1,2,3,4)" ) I've tried variations on the query: myJdbcTemplate.query("SELECT field1 FROM

Parameterized methods in generic class type

依然范特西╮ 提交于 2019-12-06 03:45:54
问题 I have a rather simple question. I can't find an answer by searching though. Is there a difference in these two code-fragments? And what is the difference? Fragment1: public class BinaryTree<T extends Comparable<? super T>> { ... public <E extends T> void add(E value) { ... } public <E extends T> void add(E value, Node node) { ... } ... } Fragment2: public class BinaryTree<T extends Comparable<? super T>> { ... public void add(T value) { ... } public void add(T value, Node node) { ... } ... }

Passing arrays to Parameterized JUnit

落爺英雄遲暮 提交于 2019-12-05 14:07:26
I am new to parameterized feature of JUnit 4.x and having a problem. My parameterized test consists of 3 integer arrays and I am having difficulty of how to declare them. What I have below generates run-time error: testGeneral[0] caused an ERROR: argument type mismatch argument type mismatch java.lang.IllegalArgumentException at java.lang.reflect.Constructor.newInstance(Constructor.java:526) testGeneral[1] caused an ERROR: argument type mismatch argument type mismatch java.lang.IllegalArgumentException at java.lang.reflect.Constructor.newInstance(Constructor.java:526) Here is my code: @RunWith

[zend][db] fetchAll with multiple variables

冷暖自知 提交于 2019-12-05 10:27:10
I'm trying to use fetchAll on a query that has 2 variables. I can't figure out the syntax. I can manage with only 1 variable: $sql = "SELECT * FROM mytable WHERE field1 = ?"; $this->_db->fetchAll($sql,$value1); # that works However I'm having some issues when query has multiple variables $sql = "SELECT * FROM mytable WHERE field1 = ? AND field2 = ?"; $this->_db->fetchAll($sql,$value1,$value2); # doesn't work $this->_db->fetchAll($sql,array("field1"=>$value1,"field2"=>$value2)); # doesn't work either The reason why I want to use ? instead of placing the variables directly into the query is that

How to pass build artifact into another job in Jenkins

你说的曾经没有我的故事 提交于 2019-12-05 09:47:20
问题 Setup I have two jobs in Jenkins: build master - this builds the code and creates an artifact deploy master - this deploys the artifact Currently, deploy master has "Copy artifacts from another project" build step using "latest successful build". My Goal I want to change this step from "latest successful build" to "specified by a build parameter" so that I can select a specific build when deploying without modifying the configuration of deploy master job each time. What I've tried First, I

passing parameter to jenkins job through curl POST not working?

心不动则不痛 提交于 2019-12-05 09:31:30
I try to launch curl -X POST -u "user:pass" -H Jenkins-Crumb:thecrumbnumber http://myjenkinsserver/jenkins/job/testjob/buildWithParameters?=PARAMETER=somenumber which works by triggering a parametrized build, but the problem is no value is passed to the build (whats weird even when the token is set in the job, I can trigger the job without it). In jenkins, that job has a configured string "PARAMETER" with or without some default value, but never the parameter from the curl launch is passed. What I may be missing? I'm using: curl -X POST -u "user" "http://myjenkins/path/to/my/job

Hudson: how do i use a parameterized build to do svn checkout and svn tag?

笑着哭i 提交于 2019-12-05 01:21:22
问题 I'm setting up a parameterized build in hudson v1.362. the parameter i'm creting is used to determine which branch to checkout in subversion. I can set my svn repository url like this: https://my.svn.server/branches/ ${branch} and it does the checkout and the build just fine. now I want to tag the build after it finishes. i'm using the SVN tagging plugin for hudson to do this. so i go to the bottom of the project config screen for the hudson project and turn on "Perform Subversion tagging on