Re: installation from source rat "too many unapproved licenses"

2021-03-09 Thread Roger Pack
On Mon, Mar 8, 2021 at 12:44 PM Karl Heinz Marbaise  wrote:
>
> Hi Roger,
>
>
> On 08.03.21 20:30, Roger Pack wrote:
> > Hello.
> >
> > After doing a git clonehttps://github.com/apache/maven.git, I try
> > this, following the instructions from the bottom of the README to
> > install from source:
> >
> > $ mvn -DdistributionTargetDir="$HOME/app/maven/apache-maven-3.7.x-SNAPSHOT"
> > clean package
> >
> > It fails with this message:
> >
> > [INFO] Rat check: Summary over all files. Unapproved: 1, unknown: 1,
> > generated: 0, approved: 18 licenses.
> > ...
> > [INFO] Apache Maven ... FAILURE [ 
> > 49.494 s]
> > ...
> > [ERROR] Failed to execute goal
> > org.apache.rat:apache-rat-plugin:0.13:check (rat-check) on project
> > maven: Too many files with unapproved license: 1 See RAT report in:
> > /redacted.../target/rat.txt -> [Help 1]
> >
> > rat.txt file shows this culprit.
> >
> >   !? distro/bin/m2.conf
>
> Can you please describe exactly which branch you are using? Which JDK
> you are using and which Maven version you are using to build?
>
> because I can't reproduce this...
>
>
> Kind regards
> Karl Heinz Marbaise

Certainly.

 https://github.com/apache/maven.git master
ad24f599cecf2cbaa94c0339d9256946f846b173

maven % mvn -v

Apache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f)
Maven home: /usr/local/Cellar/maven/3.6.3_1/libexec
Java version: 1.8.0_265, vendor: Amazon.com Inc., runtime:
/Library/Java/JavaVirtualMachines/amazon-corretto-8.jdk/Contents/Home/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "mac os x", version: "10.15.7", arch: "x86_64", family: "mac"

maven % mvn 
-DdistributionTargetDir="$HOME/app/maven/apache-maven-3.7.x-SNAPSHOT"
clean package 2>&1 | grep RAT
[ERROR] Failed to execute goal
org.apache.rat:apache-rat-plugin:0.13:check (rat-check) on project
maven: Too many files with unapproved license: 1 See RAT report in:
/redacted/maven/target/rat.txt -> [Help 1]

FWIW.  Thanks for your attention.

-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



Re: Maven plugin for source generating

2021-03-09 Thread Mantas Gridinas
Sounds like you want annotation processing
https://docs.oracle.com/javase/8/docs/api/javax/annotation/processing/Processor.html

On Tue, Mar 9, 2021 at 4:12 PM Rimvydas Vaidelis
 wrote:
>
> Hello,
>
> I would like to write a maven plugin that transforms a java source code
> (adds specified annotations to methods). Lets say the source code contains
> java files A.java, B.java and C.java. Lets say only B.java must be
> transformed (transformer decides which java file should be transformed). I
> do not want to modify original sources so I will write the transformed
> class to a separate folder (target/myfolder).
> Compiling should compile A.java and C.java from src/main/java and B.java
> from target/myfolder. I can include the new source root in the plugin but
> the compiler plugin will find 2 classes with the same name and will fire an
> error.
> Is there a way to configure which source files should be excluded from the
> compilation? If so then maybe you can give some example of how to do that?
> Or maybe this path is too complicated?
>
> Thanks in advance for any help.
> --
> Rimvydas

-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



Maven plugin for source generating

2021-03-09 Thread Rimvydas Vaidelis
Hello,

I would like to write a maven plugin that transforms a java source code
(adds specified annotations to methods). Lets say the source code contains
java files A.java, B.java and C.java. Lets say only B.java must be
transformed (transformer decides which java file should be transformed). I
do not want to modify original sources so I will write the transformed
class to a separate folder (target/myfolder).
Compiling should compile A.java and C.java from src/main/java and B.java
from target/myfolder. I can include the new source root in the plugin but
the compiler plugin will find 2 classes with the same name and will fire an
error.
Is there a way to configure which source files should be excluded from the
compilation? If so then maybe you can give some example of how to do that?
Or maybe this path is too complicated?

Thanks in advance for any help.
--
Rimvydas


Re: list of libraries in maven local repository

2021-03-09 Thread Oliver B. Fischer
The directory tree is build out of your groupId. If your groupId is 
a.b.c, it should be a/b/c


I am sure Gradle has a verbose mode (--verbose) or something like this. 
Can you turn it on and check it for helpful messages?


Did you try find to find your artifact? I mean something like find . 
-name "myJar.jar"?


Am 09.03.21 um 12:03 schrieb Nikos Karamolegkos:

I know but in which sub-folder of the repository?

On 9/3/21 12:47 μ.μ., Oliver B. Fischer wrote:
The default configuration of Maven is to have its local repository in 
the directory ./m2/repository. Below this directory you should find 
your artifact.


Am 09.03.21 um 11:25 schrieb Nikos Karamolegkos:
Hello, I am trying to add a library to my maven local repository 
using ./gradlew publishToMavenLocal. How can I check that the 
library is really installed to the repository?


Thank you


--
N Oliver B. Fischer
A Schönhauser Allee 64, 10437 Berlin, Deutschland/Germany
P +49 30 44793251
M +49 178 7903538
E o.b.fisc...@swe-blog.net
S oliver.b.fischer
J oliver.b.fisc...@jabber.org
X http://xing.to/obf


-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



Re: list of libraries in maven local repository

2021-03-09 Thread Nikos Karamolegkos

I know but in which sub-folder of the repository?

On 9/3/21 12:47 μ.μ., Oliver B. Fischer wrote:
The default configuration of Maven is to have its local repository in 
the directory ./m2/repository. Below this directory you should find 
your artifact.


Am 09.03.21 um 11:25 schrieb Nikos Karamolegkos:
Hello, I am trying to add a library to my maven local repository 
using ./gradlew publishToMavenLocal. How can I check that the library 
is really installed to the repository?


Thank you


--
Nikos Karamolegkos
R & D engineer at ICS-FORTH
Telecommunications and Networks Lab (TNL)


-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



Re: list of libraries in maven local repository

2021-03-09 Thread Oliver B. Fischer
The default configuration of Maven is to have its local repository in 
the directory ./m2/repository. Below this directory you should find your 
artifact.


Am 09.03.21 um 11:25 schrieb Nikos Karamolegkos:
Hello, I am trying to add a library to my maven local repository using 
./gradlew publishToMavenLocal. How can I check that the library is 
really installed to the repository?


Thank you


--
N Oliver B. Fischer
A Schönhauser Allee 64, 10437 Berlin, Deutschland/Germany
P +49 30 44793251
M +49 178 7903538
E o.b.fisc...@swe-blog.net
S oliver.b.fischer
J oliver.b.fisc...@jabber.org
X http://xing.to/obf


-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



list of libraries in maven local repository

2021-03-09 Thread Nikos Karamolegkos
Hello, I am trying to add a library to my maven local repository using 
./gradlew publishToMavenLocal. How can I check that the library is 
really installed to the repository?


Thank you

--
Nikos Karamolegkos
R & D engineer at ICS-FORTH
Telecommunications and Networks Lab (TNL)


-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



Re: properties in maven-remote-resources-plugin

2021-03-09 Thread Delany
Ok, no images thank you.
So I was barking up the wrong tree using the properties tag in the plugin.
I still don't know what I did wrong, but it works now.

Now there's another issue. If I bundle resources in a *descriptorgenerator*
directory, the process goal will create an empty
maven-shared-archive-resources/descriptorgenerator directory. Why is it
filtering on this name?

Thanks,


On Sun, 28 Feb 2021 at 12:23, Hervé BOUTEMY  wrote:

> please try to write:
>
>   
> 1.12
>   
>
> in you pom.xml = it defines a custom property with the value you want
>
> this will permit
> "dbs:commondb:${dep.dbs.commondb}" to get
> the value replaced
>
> Notice that images are removed, then we don't understand what you're
> trying to show
>
> Regards,
>
> Hervé
>
> Le samedi 27 février 2021, 08:03:33 CET Delany a écrit :
> > I didn't want to give you all the context, because that complicates the
> > problem which I carefully worded in the initial email:
> >
> > "I don't want to hardcode the version number of the remote project into
> > this plugin config, so I've used a property made available in a parent
> pom."
> >
> > The fact that I don't use that version number property in the project
> that
> > bundles the remote resources is immaterial. The problem is that the
> process
> > goal in this receiving project will recognize one property
> > "project.version" and not another "dep.dbs.commondb". It does that
> because
> > project.version is one of the default properties the plugin passes
> through
> > to its templating logic, I quote
> >
> > "Additional properties to be passed to Velocity. Several properties are
> > automatically added:"
> >
> https://maven.apache.org/plugins/maven-remote-resources-plugin/process-mojo
> .
> > html#properties
> >
> > So has anyone ever successfully passed through a non-default property? Or
> > is this dead code no one ever uses.
> > The example given here
> > <
> https://maven.apache.org/plugins/maven-remote-resources-plugin/examples/sha
> > ring-resources.html> demonstrates using the project.version property. But
> > you don't need to use the properties tag for that. There are no examples
> > showing the use of the properties tag of this goal.
> >
> > [image: image.png]
> >
> > The link at the bottom is to some generic javadoc about properties, and
> it
> > happens to be dead.
> >
> > Thanks,
> >
> > On Sat, 27 Feb 2021 at 05:47, Anthony Whitford 
> wrote:
> > > I’m honestly unclear on your precise scenario.
> > > 1.  If you are expecting a dependency to have a pom with a variable in
> it,
> > > that then you would specify before using it, then Maven doesn’t work
> that
> > > way.  (And if you think about it, it creates a chicken-egg problem.)
> > > 2.  If you are expecting to use a pom property from a dependency, then
> you
> > > can’t do that either.  (And if you think about it, that could be
> dangerous
> > > because children properties could collide or interfere with your own.)
> > >
> > > Note that you can declare a dependency/plugin and override a
> dependency —
> > > sometimes that is useful.
> > >
> > > I highly recommend  `mvn help:effective-pom` to see exactly what a
> > > project’s pom results look like; it can be insightful.
> > >
> > > You can also use  `mvn help:evaluate` to see the value of expressions.
> > >
> > > This is also a good reference:
> > >
> https://books.sonatype.com/mvnref-book/reference/resource-filtering-sect-p
> > > roperties.html <
> > >
> https://books.sonatype.com/mvnref-book/reference/resource-filtering-sect-p
> > > roperties.html
> > >
> > >
> > > Hope this helps,
> > >
> > > Anthony
> > >
> > > > On Feb 23, 2021, at 11:32 PM, Delany 
> wrote:
> > > >
> > > > Thanks I know how to use properties, but this plugin doesn't, it
> seems.
> > >
> > > It has some special way of importing them:
> > >
> > >
> https://maven.apache.org/plugins/maven-remote-resources-plugin/process-moj
> > > o.html <
> > >
> https://maven.apache.org/plugins/maven-remote-resources-plugin/process-moj
> > > o.html>
> > > > It can do this
> > >
> > >
> org.test:shared-resources:${project.version} > > le>>
> > > > But this is the version of this project, not the resource bundle
> > >
> > > org.test:shared-resources. Why would I ever do that? The plugin is
> > > assuming
> > > that all project modules in the reactor have the same version.
> > >
> > > > I need it to do this
> > >
> > >
> org.test:shared-resources:${shared-resources.version} > > ourceBundle>>
> > > > It looks like if I make commondb a dependency, I can use the projects
> > >
> > > property to access the version number. How do I do that?
> > >
> > > > Thanks,
> > > > Delany
> > > >
> > > >
> > > > On Tue, 23 Feb 2021 at 22:46, Anthony Whitford  > >
> > > > wrote:
> > > > The  tag is documented here:
> > >
> https://maven.apache.org/guides/introduction/introduction-to-the-pom.html#
> > > properties <
> > >
> https://maven.apache.org/guides/introduction/introduction-to-the-pom.html#
> > > prop