Skip to content

Conversation

@dadoonet
Copy link
Contributor

@dadoonet dadoonet commented May 17, 2016

Follow up for #18396: which is reverted with this change

When you upload any jar artifact you have to provide the jar file, javadocs and sources.

For distribution, we changed from pom artifact to jar in order to be able to run integration tests.
But we never generate any jar, sources or javadoc because they don't exist.

This PR adds a FAKE file in src/main/resources. So Maven is able to generate the JAR file which is uploaded to Sonatype.
Sources are then automatically added.
To generate the javadoc file, we need also to tell maven that javadoc will be based on this src/main/resources dir.
As a file exists in it, javadoc is generated as well.

[INFO] --- maven-install-plugin:2.5.2:install (default-install) @ elasticsearch ---
[INFO] Installing /Users/dpilato/Documents/Elasticsearch/dev/es-2x/elasticsearch/distribution/zip/target/elasticsearch-2.4.0-SNAPSHOT.jar to /Users/dpilato/.m2/repository/org/elasticsearch/distribution/zip/elasticsearch/2.4.0-SNAPSHOT/elasticsearch-2.4.0-SNAPSHOT.jar
[INFO] Installing /Users/dpilato/Documents/Elasticsearch/dev/es-2x/elasticsearch/distribution/zip/pom.xml to /Users/dpilato/.m2/repository/org/elasticsearch/distribution/zip/elasticsearch/2.4.0-SNAPSHOT/elasticsearch-2.4.0-SNAPSHOT.pom
[INFO] Installing /Users/dpilato/Documents/Elasticsearch/dev/es-2x/elasticsearch/distribution/zip/target/elasticsearch-2.4.0-SNAPSHOT-javadoc.jar to /Users/dpilato/.m2/repository/org/elasticsearch/distribution/zip/elasticsearch/2.4.0-SNAPSHOT/elasticsearch-2.4.0-SNAPSHOT-javadoc.jar
[INFO] Installing /Users/dpilato/Documents/Elasticsearch/dev/es-2x/elasticsearch/distribution/zip/target/elasticsearch-2.4.0-SNAPSHOT-sources.jar to /Users/dpilato/.m2/repository/org/elasticsearch/distribution/zip/elasticsearch/2.4.0-SNAPSHOT/elasticsearch-2.4.0-SNAPSHOT-sources.jar
[INFO] Installing /Users/dpilato/Documents/Elasticsearch/dev/es-2x/elasticsearch/distribution/zip/target/releases/elasticsearch-2.4.0-SNAPSHOT.zip to /Users/dpilato/.m2/repository/org/elasticsearch/distribution/zip/elasticsearch/2.4.0-SNAPSHOT/elasticsearch-2.4.0-SNAPSHOT.zip

@dadoonet dadoonet added review :Delivery/Build Build or test infrastructure v2.4.0 v2.3.3 labels May 17, 2016
Follow up for elastic#18396: which is reverted with this change

When you upload any `jar` artifact you have to provide the `jar` file, javadocs and sources.

For distribution, we changed from `pom` artifact to `jar` in order to be able to run integration tests.
But we never generate any jar, sources or javadoc because they don't exist.

This PR adds a FAKE file in `src/main/resources`. So Maven is able to generate the JAR file which is uploaded to Sonatype.
Sources are then automatically added.
To generate the javadoc file, we need also to tell maven that javadoc will be based on this `src/main/resources` dir.
As a file exists in it, javadoc is generated as well.

```
[INFO] --- maven-install-plugin:2.5.2:install (default-install) @ elasticsearch ---
[INFO] Installing /Users/dpilato/Documents/Elasticsearch/dev/es-2x/elasticsearch/distribution/zip/target/elasticsearch-2.4.0-SNAPSHOT.jar to /Users/dpilato/.m2/repository/org/elasticsearch/distribution/zip/elasticsearch/2.4.0-SNAPSHOT/elasticsearch-2.4.0-SNAPSHOT.jar
[INFO] Installing /Users/dpilato/Documents/Elasticsearch/dev/es-2x/elasticsearch/distribution/zip/pom.xml to /Users/dpilato/.m2/repository/org/elasticsearch/distribution/zip/elasticsearch/2.4.0-SNAPSHOT/elasticsearch-2.4.0-SNAPSHOT.pom
[INFO] Installing /Users/dpilato/Documents/Elasticsearch/dev/es-2x/elasticsearch/distribution/zip/target/elasticsearch-2.4.0-SNAPSHOT-javadoc.jar to /Users/dpilato/.m2/repository/org/elasticsearch/distribution/zip/elasticsearch/2.4.0-SNAPSHOT/elasticsearch-2.4.0-SNAPSHOT-javadoc.jar
[INFO] Installing /Users/dpilato/Documents/Elasticsearch/dev/es-2x/elasticsearch/distribution/zip/target/elasticsearch-2.4.0-SNAPSHOT-sources.jar to /Users/dpilato/.m2/repository/org/elasticsearch/distribution/zip/elasticsearch/2.4.0-SNAPSHOT/elasticsearch-2.4.0-SNAPSHOT-sources.jar
[INFO] Installing /Users/dpilato/Documents/Elasticsearch/dev/es-2x/elasticsearch/distribution/zip/target/releases/elasticsearch-2.4.0-SNAPSHOT.zip to /Users/dpilato/.m2/repository/org/elasticsearch/distribution/zip/elasticsearch/2.4.0-SNAPSHOT/elasticsearch-2.4.0-SNAPSHOT.zip
```
@dadoonet dadoonet force-pushed the maven/mising-artifacts branch from 11363c9 to f9d1db6 Compare May 17, 2016 13:54
dadoonet added a commit that referenced this pull request May 17, 2016
Follow up for #18396: which is reverted with this change

When you upload any `jar` artifact you have to provide the `jar` file, javadocs and sources.

For distribution, we changed from `pom` artifact to `jar` in order to be able to run integration tests.
But we never generate any jar, sources or javadoc because they don't exist.

This PR adds a FAKE file in `src/main/resources`. So Maven is able to generate the JAR file which is uploaded to Sonatype.
Sources are then automatically added.
To generate the javadoc file, we need also to tell maven that javadoc will be based on this `src/main/resources` dir.
As a file exists in it, javadoc is generated as well.

```
[INFO] --- maven-install-plugin:2.5.2:install (default-install) @ elasticsearch ---
[INFO] Installing /Users/dpilato/Documents/Elasticsearch/dev/es-2x/elasticsearch/distribution/zip/target/elasticsearch-2.4.0-SNAPSHOT.jar to /Users/dpilato/.m2/repository/org/elasticsearch/distribution/zip/elasticsearch/2.4.0-SNAPSHOT/elasticsearch-2.4.0-SNAPSHOT.jar
[INFO] Installing /Users/dpilato/Documents/Elasticsearch/dev/es-2x/elasticsearch/distribution/zip/pom.xml to /Users/dpilato/.m2/repository/org/elasticsearch/distribution/zip/elasticsearch/2.4.0-SNAPSHOT/elasticsearch-2.4.0-SNAPSHOT.pom
[INFO] Installing /Users/dpilato/Documents/Elasticsearch/dev/es-2x/elasticsearch/distribution/zip/target/elasticsearch-2.4.0-SNAPSHOT-javadoc.jar to /Users/dpilato/.m2/repository/org/elasticsearch/distribution/zip/elasticsearch/2.4.0-SNAPSHOT/elasticsearch-2.4.0-SNAPSHOT-javadoc.jar
[INFO] Installing /Users/dpilato/Documents/Elasticsearch/dev/es-2x/elasticsearch/distribution/zip/target/elasticsearch-2.4.0-SNAPSHOT-sources.jar to /Users/dpilato/.m2/repository/org/elasticsearch/distribution/zip/elasticsearch/2.4.0-SNAPSHOT/elasticsearch-2.4.0-SNAPSHOT-sources.jar
[INFO] Installing /Users/dpilato/Documents/Elasticsearch/dev/es-2x/elasticsearch/distribution/zip/target/releases/elasticsearch-2.4.0-SNAPSHOT.zip to /Users/dpilato/.m2/repository/org/elasticsearch/distribution/zip/elasticsearch/2.4.0-SNAPSHOT/elasticsearch-2.4.0-SNAPSHOT.zip
```

Backport of #18404 in 2.3 branch: (cherry picked from commit f9d1db6)
@dadoonet dadoonet merged commit f9d1db6 into elastic:2.x May 17, 2016
@dadoonet dadoonet deleted the maven/mising-artifacts branch May 17, 2016 13:59
@mark-vieira mark-vieira added the Team:Delivery Meta label for Delivery team label Nov 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:Delivery/Build Build or test infrastructure Team:Delivery Meta label for Delivery team v2.3.3 v2.4.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants