openzipkin / zipkin

Zipkin is a distributed tracing system
https://zipkin.io/
Apache License 2.0
17.01k stars 3.09k forks source link

How to solve the problem of compile failure #1535

Closed tomgithub2016 closed 4 years ago

tomgithub2016 commented 7 years ago

first I git clone the zipkin project,and modify any one source code,such as zipkin.storage.guava.GuavaSpanStore As long as I modified any source code,and run mvnw -DskipTests --also-make -pl zipkin-server clean install There will be compile failure. The error is: Failed to execute goal com.mycila:license-maven-plugin:3.0:check (default) on project zipkin-guava: Some files do not have the expected license header -> [Help 1]

[INFO] Building Guava support library 1.20.2-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ zipkin-guava ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory C:\zipkin\zipkin-guava\src\main\resources
[INFO]
[INFO] --- maven-compiler-plugin:3.6.0:compile (default-compile) @ zipkin-guava ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- license-maven-plugin:3.0:check (default) @ zipkin-guava ---
[INFO] Checking licenses...
[WARNING] Missing header in: C:/zipkin/zipkin-guava/src/main/java/zipkin/storage/guava/LazyGuavaStorageComponent.java
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.607 s
[INFO] Finished at: 2017-03-09T15:25:31+08:00
[INFO] Final Memory: 19M/309M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.mycila:license-maven-plugin:3.0:check (default) on project zipkin-guava: Some files do not have the expected license header -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
codefromthecrypt commented 7 years ago

can you check to see what your git believes is the last update time on LazyGuavaStorageComponent?

ex.

git log C:/zipkin/zipkin-guava/src/main/java/zipkin/storage/guava/ LazyGuavaStorageComponent.java

tomgithub2016 commented 7 years ago
$ git log C:/zipkin/zipkin-guava/src/main/java/zipkin/storage/guava/
commit 7cd7b687aebe52db2923fdd0a7d827df1940ca8d
Author: Adrian Cole <adriancole@users.noreply.github.com>
Date:   Sat Nov 12 12:26:26 2016 +0800

    Supports querying traces with mixed-length trace IDs (#1385)

    Unless you only issue 128-bit traces when all applications support them,
    the process of updating applications from 64 to 128-bit trace IDs results
    in a mixed state. This mixed state is mitigated by the setting
    `STRICT_TRACE_ID=false`, explained below. Once a migration is complete,
    remove the setting `STRICT_TRACE_ID=false` or set it to true.

    Supporting changes are:

    `SpanStore.getTrace(long traceIdHigh, long traceIdLow)`
    `StorageComponent.Builder.strictTraceId(boolean strictTraceId)`

commit 27686c6ec9bed77e254c2b0d527db25897d0e205
Author: Adrian Cole <adriancole@users.noreply.github.com>
Date:   Sun Jul 31 10:39:30 2016 -0700

    Updates versions, most notably spring boot 1.4 (#1211)

commit 0635ffbc848e7ed351055205f21918d7e3bcf860
Author: Adrian Cole <acole@pivotal.io>
Date:   Fri May 13 09:27:13 2016 +0800

    Files storage components under zipkin.storage package

    This moves storage components under the zipkin.storage package.

    By doing so, we clear the main `zipkin` package for classes used by all
    code, including instrumentation. Also, it helps with logging, as storage
    related operations share the same category.
tomgithub2016 commented 7 years ago

I want to download the latest source code to modify and expand using In out project, So,How to operate can Compile successfully

codefromthecrypt commented 7 years ago

windows is not currently a supported build environment (because no-one has gotten a solution together for #1501).

I raised https://github.com/openzipkin/zipkin/pull/1536 which might help (assuming line endings are the reason for the license glitch, which might not be the case). If you can test that, it would be helpful.

tomgithub2016 commented 7 years ago

You mean if with Linux and modify the local source code,there will be compile successfully?

codefromthecrypt commented 7 years ago

Yes most of use linux or osx

On 9 Mar 2017 11:06, "tomgithub2016" notifications@github.com wrote:

You mean if with Linux and modify the local source code,there will be compile successfully?

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/openzipkin/zipkin/issues/1535#issuecomment-285294745, or mute the thread https://github.com/notifications/unsubscribe-auth/AAD615U_3BX2jQAImpEC22H6IfPgkRt5ks5rj8ENgaJpZM4MXvhF .

tomgithub2016 commented 7 years ago

I change to Linux,and git clone "https://github.com/openzipkin/zipkin/git" If I do not modify any file,compile successful If I modify any files compile failed. If I understand is wrong, should be use git checkout?

I only want to download the source code, modify the source code, and compile successful

How to do?

[INFO] ------------------------------------------------------------------------
[INFO] Building Guava support library 1.20.2-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ zipkin-guava ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /root/zipkin/zipkin-guava/src/main/resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.6.0:compile (default-compile) @ zipkin-guava ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 10 source files to /root/zipkin/zipkin-guava/target/classes
注: /root/zipkin/zipkin-guava/src/main/java/zipkin/storage/guava/InternalGuavaToAsyncSpanStoreAdapter.java使用或覆盖了已过时的 API。
注: 有关详细信息, 请使用 -Xlint:deprecation 重新编译。
[INFO] 
[INFO] --- license-maven-plugin:3.0:check (default) @ zipkin-guava ---
[INFO] Checking licenses...
[WARNING] Missing header in: /root/zipkin/zipkin-guava/src/main/java/zipkin/storage/guava/GuavaStorageAdapters.java
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.229 s
[INFO] Finished at: 2017-03-09T21:28:21+08:00
[INFO] Final Memory: 28M/266M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.mycila:license-maven-plugin:3.0:check (default) on project zipkin-guava: Some files do not have the expected license header -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
codefromthecrypt commented 7 years ago

If you modify files it could invalidate the license header (which includes a year of modification) look at CONTRIBUTING.md which shows the command to re-apply license headers (which would change a file you edited from 2016 to 2016-2017)

On 9 Mar 2017 15:50, "tomgithub2016" notifications@github.com wrote:

I change to Linux,and git clone "https://github.com/openzipkin/zipkin/git" If I do not modify any file,compile successful If I modify any files compile failed. If I understand is wrong, should be use git checkout?

I only want to download the source code, modify the source code, and compile successful

How to do?

[INFO] ------------------------------------------------------------------------ [INFO] Building Guava support library 1.20.2-SNAPSHOT [INFO] ------------------------------------------------------------------------ [INFO] [INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ zipkin-guava --- [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] skip non existing resourceDirectory /root/zipkin/zipkin-guava/src/main/resources [INFO] [INFO] --- maven-compiler-plugin:3.6.0:compile (default-compile) @ zipkin-guava --- [INFO] Changes detected - recompiling the module! [INFO] Compiling 10 source files to /root/zipkin/zipkin-guava/target/classes 注: /root/zipkin/zipkin-guava/src/main/java/zipkin/storage/guava/InternalGuavaToAsyncSpanStoreAdapter.java使用或覆盖了已过时的 API。 注: 有关详细信息, 请使用 -Xlint:deprecation 重新编译。 [INFO] [INFO] --- license-maven-plugin:3.0:check (default) @ zipkin-guava --- [INFO] Checking licenses... [WARNING] Missing header in: /root/zipkin/zipkin-guava/src/main/java/zipkin/storage/guava/GuavaStorageAdapters.java [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 2.229 s [INFO] Finished at: 2017-03-09T21:28:21+08:00 [INFO] Final Memory: 28M/266M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal com.mycila:license-maven-plugin:3.0:check (default) on project zipkin-guava: Some files do not have the expected license header -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/openzipkin/zipkin/issues/1535#issuecomment-285355831, or mute the thread https://github.com/notifications/unsubscribe-auth/AAD61zTgffKJHlq8jrHrJx7EJFl3PS1wks5rkAOwgaJpZM4MXvhF .

codefromthecrypt commented 7 years ago

there are no more detailed steps.. you paste the below command, which will reformat the license header of the file you changed.

./mvnw com.mycila:license-maven-plugin:format -pl -:zipkin-ui

see https://github.com/openzipkin/zipkin/blob/master/.github/CONTRIBUTING.md#license for more

On Fri, Mar 10, 2017 at 9:02 AM, tomgithub2016 notifications@github.com wrote:

I probably understand what you mean,but how to edited a file from 2016 to 2016-2017(which file?)

and Is to run this command mvnw com.mycila:license-maven-plugin:format -pl -:zipkin-ui

Can you give me more detail steps? thank you.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/openzipkin/zipkin/issues/1535#issuecomment-285540576, or mute the thread https://github.com/notifications/unsubscribe-auth/AAD61xrkU0rgjhmeEvn57QFnJRWrAVUbks5rkKEhgaJpZM4MXvhF .

tomgithub2016 commented 7 years ago

@adriancole thank you.

codefromthecrypt commented 7 years ago

No problem!

On 10 Mar 2017 11:00, "tomgithub2016" notifications@github.com wrote:

@adriancole https://github.com/adriancole thank you.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/openzipkin/zipkin/issues/1535#issuecomment-285614581, or mute the thread https://github.com/notifications/unsubscribe-auth/AAD611Aqk3Upi0oP3Ztt1NaJek2XO9qLks5rkREygaJpZM4MXvhF .

codefromthecrypt commented 5 years ago

maybe this fixes build? #2669

jorgheymans commented 4 years ago

The instructions for building now work on windows as well : https://github.com/openzipkin/zipkin#running-the-server-from-source