Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[JENKINS-24064] No more war-for-test #2634

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
40 changes: 40 additions & 0 deletions core/pom.xml
Expand Up @@ -616,6 +616,46 @@ THE SOFTWARE.
<artifactId>jzlib</artifactId>
<version>1.1.3-kohsuke-1</version>
</dependency>
<dependency>
<groupId>org.jenkins-ci.ui</groupId>
<artifactId>jquery-detached</artifactId>
<version>1.2.1</version>
<classifier>core-assets</classifier>
</dependency>
<dependency>
<groupId>org.jenkins-ci.ui</groupId>
<artifactId>bootstrap</artifactId>
<version>1.3.2</version>
<classifier>core-assets</classifier>
</dependency>
<dependency>
<groupId>org.jenkins-ci.ui</groupId>
<artifactId>handlebars</artifactId>
<version>1.1.1</version>
<classifier>core-assets</classifier>
</dependency>
<dependency>
<!--
We bundle slf4j binding since we got some components (sshd for example)
that uses slf4j. acegi-security uses it implicitly via commons-logging.

The problem with not shipping any binding in the war is that if the
servlet container does use slf4j in itself, then we got a classloader
constraint violation (see JENKINS-12334) as we try to load StaticLoggerBinder
which resides in the binding jar (this jar would be from container implementation,
which relies on slf4j api in the container, when we have our own slf4j API jar
statically depending on the binding jar.)

We also get tickets like JENKINS-12650 for not reporting logs at all
(although this is a non-fatal problem.)

The downside of adding a jar is that we can potentially get "multiple binding jar"
warning like http://www.slf4j.org/codes.html, but that's at least non-fatal.
-->
<groupId>org.slf4j</groupId>
<artifactId>slf4j-jdk14</artifactId>
<scope>runtime</scope>
</dependency>
</dependencies>

<build>
Expand Down
5 changes: 5 additions & 0 deletions pom.xml
Expand Up @@ -238,6 +238,11 @@ THE SOFTWARE.
<artifactId>jcifs</artifactId>
<version>1.3.17-kohsuke-1</version>
</dependency>
<dependency>
<groupId>org.jenkins-ci.modules</groupId>
<artifactId>instance-identity</artifactId>
<version>2.1</version>
</dependency>
</dependencies>
</dependencyManagement>

Expand Down
18 changes: 6 additions & 12 deletions test/pom.xml
Expand Up @@ -45,20 +45,9 @@ THE SOFTWARE.

<dependencies>
<dependency>
<!--
put hudson.war in the classpath. we can't pull in the war artifact directly
because Maven excludes all wars from classpath automatically. so we need a jar artifact.
-->
<groupId>${project.groupId}</groupId>
<artifactId>jenkins-war</artifactId>
<artifactId>jenkins-core</artifactId>
<version>${project.version}</version>
<classifier>war-for-test</classifier>
<exclusions>
<exclusion>
<groupId>org.jenkins-ci.modules</groupId>
<artifactId>sshd</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
Expand Down Expand Up @@ -198,6 +187,11 @@ THE SOFTWARE.
<version>4.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jenkins-ci.modules</groupId>
<artifactId>instance-identity</artifactId>
<scope>test</scope>
</dependency>
</dependencies>

<build>
Expand Down
63 changes: 0 additions & 63 deletions war/pom.xml
Expand Up @@ -99,7 +99,6 @@ THE SOFTWARE.
<dependency>
<groupId>org.jenkins-ci.modules</groupId>
<artifactId>instance-identity</artifactId>
<version>2.1</version>
</dependency>
<dependency>
<groupId>org.jenkins-ci.modules</groupId>
Expand Down Expand Up @@ -136,45 +135,6 @@ THE SOFTWARE.
<artifactId>sshd</artifactId>
<version>1.7</version>
</dependency>
<dependency>
<groupId>org.jenkins-ci.ui</groupId>
<artifactId>jquery-detached</artifactId>
<version>1.2.1</version>
<classifier>core-assets</classifier>
</dependency>
<dependency>
<groupId>org.jenkins-ci.ui</groupId>
<artifactId>bootstrap</artifactId>
<version>1.3.2</version>
<classifier>core-assets</classifier>
</dependency>
<dependency>
<groupId>org.jenkins-ci.ui</groupId>
<artifactId>handlebars</artifactId>
<version>1.1.1</version>
<classifier>core-assets</classifier>
</dependency>
<dependency>
<!--
We bundle slf4j binding since we got some components (sshd for example)
that uses slf4j.

The problem with not shipping any binding in the war is that if the
servlet container does use slf4j in itself, then we got a classloader
constraint violation (see JENKINS-12334) as we try to load StaticLoggerBinder
which resides in the binding jar (this jar would be from container implementation,
which relies on slf4j api in the container, when we have our own slf4j API jar
statically depending on the binding jar.)

We also get tickets like JENKINS-12650 for not reporting logs at all
(although this is a non-fatal problem.)

The downside of adding a jar is that we can potentially get "multiple binding jar"
warning like http://www.slf4j.org/codes.html, but that's at least non-fatal.
-->
<groupId>org.slf4j</groupId>
<artifactId>slf4j-jdk14</artifactId>
</dependency>

<!-- offline profiler API when we need it -->

Expand Down Expand Up @@ -409,29 +369,6 @@ THE SOFTWARE.
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<executions>
<execution>
<!-- deploy the war as a jar, so that the tests can pull this into the classpath -->
<id>deploy-war-for-test</id>
<phase>package</phase>
<goals>
<goal>attach-artifact</goal>
</goals>
<configuration>
<artifacts>
<artifact>
<file>${project.build.directory}/${project.build.finalName}.war</file>
<type>jar</type>
<classifier>war-for-test</classifier>
</artifact>
</artifacts>
</configuration>
</execution>
</executions>
</plugin>
<plugin><!-- generate licenses.xml -->
<groupId>com.cloudbees</groupId>
<artifactId>maven-license-plugin</artifactId>
Expand Down