Skip to content
This repository has been archived by the owner on Apr 14, 2023. It is now read-only.

[JENKINS-48831] Fix core-asset jar generation #4

Merged
merged 13 commits into from Feb 15, 2018

Conversation

tfennelly
Copy link
Member

@tfennelly tfennelly commented Jan 6, 2018

See JENKINS-48831.

Also fixing the version of all plugins to one version. Doing different versions in a multi-module setup was dumb. We might want to split out into individual repos at some point.

@jenkinsci/code-reviewers @reviewbybees

pom.xml Outdated
<parent>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>plugin</artifactId>
<version>2.30</version>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not strictly related, but 2.30 is now 7 months outdated: https://github.com/jenkinsci/plugin-pom/blob/master/CHANGELOG.md

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would prefer to do upgrades in a separate PR. I just wanted to get it working with this.

@@ -80,12 +82,12 @@
<version>1.8</version>
<executions>
<execution>
<phase>initialize</phase>
<phase>package</phase>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this the actual fix?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One of them ... there were multiple issues.

@jglick jglick self-requested a review January 8, 2018 16:40
<configuration>
<target>
<!-- Use the pluginId as the asset namespace. -->
<copy todir="${project.build.directory}/assets-wrapper/assets/${project.artifactId}/jsmodules">
<fileset dir="${project.basedir}/src/main/webapp/jsmodules"/>
<fileset dir="${basedir}/src/main/webapp/jsmodules"/>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why? IIRC you are supposed to use project.basedir, not basedir.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above ... project.basedir didn't work (no files were copied to the expected location) while basedir did work.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So this is the error ....

${project.basedir} expression not supported during profile activation, use ${basedir} instead

@@ -70,7 +72,7 @@
<id>copy-jsmodules</id>
<activation>
<file>
<exists>${project.basedir}/src/main/webapp/jsmodules</exists>
<exists>${basedir}/src/main/webapp/jsmodules</exists>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that's what I originally had but it failed and maven (3.3.9 in my case) logged a warning instructing to change to use just "basedir".

I'll go back and reproduce the error and see if it's a version thing etc.

<groupId>org.jenkins-ci.ui</groupId>
<artifactId>jenkins-js-libs</artifactId>
<version>2.0.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, could this POM material just be moved up into the root POM to simplify things?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was tempted to do that but decided to leave for another PR. Yes, I think it should work all in the top level pom.

@tfennelly
Copy link
Member Author

tfennelly commented Jan 9, 2018

Will address comments once I'm back - out sick atm with flu.

@ghost
Copy link

ghost commented Jan 11, 2018

This pull request originates from a CloudBees employee. At CloudBees, we require that all pull requests be reviewed by other CloudBees employees before we seek to have the change accepted. If you want to learn more about our process please see this explanation.

core using a URL of the form "<resURL>/assets/<namespace>/<resourcePath>".
-->
<profile>
<id>copy-core-assets</id>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This all smells like it would be easier wrapped in a Maven plugin... not to mention a faster build.

In fact this looks like a custom lifecycle would be even better

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah will ya stop mess'n. I'll not be doing that :)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do agree it is ugly, but not worth writing a plugin for it.

@tfennelly
Copy link
Member Author

@jglick @daniel-beck I think this is ok now.

@tfennelly tfennelly merged commit c05a438 into jenkinsci:master Feb 15, 2018
@tfennelly tfennelly deleted the JENKINS-48831 branch February 15, 2018 15:23
tfennelly added a commit that referenced this pull request Jun 5, 2019
[JENKINS-48831] Fix core-asset jar generation
# Conflicts:
#	bootstrap/pom.xml
#	js-module-base/pom.xml
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
4 participants