Third party dependencies

2023-10-06 Thread Mansour Al Akeel
I have a legacy project that requires many third party dependencies. Those
dependencies need to be signed. The resulting dependencies along with the
swing project, are to be served through a JNLP file. The fact that we need
to resign all these dependencies with every build, adds a lot of overhead
to the build time. My first attempt to achieve this is to create an
external POM file with all these dependencies. The dependencies POM signes
them, and when deployed to our internal nexus3, we have them cached.
Subsequent builds for the Swing project do not need to sign them as they
are already signed.

I tried to use the build-helper maven plugin to attach those dependencies.
I was hoping to change their classifiers after signing and retrieve them
with signed. The problem is build-helper attaches
only files, and it does not take coordinates. Additionally, it accepts only
one file, and the whole dependencies list. Basically, I am trying to
accomplish the following steps:

1- Declare the dependencies in the POM/BOM
2- Sign them
3- Assign new classifier "signed"
4- Make them available through an internal repository.

What is the best way to achieve this ?


Re: Why does one of our archetypes work, and the other gets "The defined artifact is not an archetype"

2023-10-06 Thread David Karr
Thanks for the responses. I've gone through this, but I still don't see a
solution.

In our archetype project, I am running the "archetype:create-from-project"
goal and then running "mvn install", and then referencing the installed
archetype in a work directory, which fails with the given error. I'm
thinking that running "c-f-p" in the root of the archetype project is not
exactly what is required, but I have no idea.

I still have no idea why it's saying it's not an archetype, but I imagine
you would conclude the same thing.

On Thu, Oct 5, 2023 at 4:32 PM Herve Boutemy  wrote:

> reading the mini guide
>  https://maven.apache.org/guides/mini/guide-creating-archetypes.html
> I see that it mixes the archetype = the jar that is stored to the
> repository and the archetype project = the Maven project that will create
> the archetype jar
>
> please look at the schema in the plugin page:
> https://maven.apache.org/archetype/maven-archetype-plugin/
> It shows the full lifecycle:
> - from an eventual sample project
> - to an archetype project
> - to the built archetype
> - an finally to the project generated from the archetype
> and it lists the goals of the maven-artifact-plugin to go from one step to
> the next one
>
> The mini guide only covers writing the archetype project by hand, and
> building it to get the archetype jar
>
> I hope this will help understanding the wider logic, before digging into
> eventual bugs or not clear messages when something gets wrong
>
> Regards,
>
> Hervé
>
> On 2023/10/05 23:15:50 Herve Boutemy wrote:
> > documentation probably also needs love:
> > you found the mini-guide, but not the plugin reference documentation
> that explains much more:
> https://maven.apache.org/archetype/maven-archetype-plugin/index.html
> >
> > I'm not sure mini guide was updated as it should
> >
> > Regards,
> >
> > Hervé
> >
> > On 2023/10/05 20:38:20 David Karr wrote:
> > > I support and maintain a platform used by a couple hundred
> > > SpringBoot/JAX-RS/Maven/K8S services.  When new services are created, a
> > > Maven archetype is used to create the service skeleton.  This has
> worked
> > > fine for quite a while.
> > >
> > > We're now working on a variation using SpringMVC instead of JAX-RS, and
> > > eventually making that the default.
> > >
> > > One of my team members took the existing Jersey/JAX-RS archetype
> project,
> > > made a copy, and then changed a bunch of things for SpringMVC instead
> of
> > > JAX-RS.  We installed that archetype in our local maven repo for
> initial
> > > testing, using "mvn install".
> > >
> > > We run a command line like the following:
> > >
> > > mvn archetype:generate -DgroupId=com.org.idp
> -DartifactId=MyApplication
> > > -Dpackage=com.org.idp -DarchetypeGroupId=com.org.idse
> > > -DarchetypeArtifactId=idse-springmvc-archetype
> > > -DarchetypeVersion=2.0.0-SNAPSHOT
> > >
> > > The "archetypeVersion" property value corresponds to the version
> attribute
> > > in the pom.xml of the archetype.
> > >
> > > This produces the following output:
> > > 
> > >  [INFO] Generating project in Batch mode
> > > [WARNING] Archetype not found in any catalog. Falling back to central
> > > repository.
> > > [WARNING] Add a repository with id 'archetype' in your settings.xml if
> > > archetype's repository is elsewhere.
> > > Downloading from nexus:
> > >
> https://repocentral.it.att.com:8443/nexus/content/groups/att-public-group/com/att/idse/idse-springmvc-archetype/2.0.0-SNAPSHOT/maven-metadata.xml
> > > [INFO]
> > >
> 
> > > [INFO] BUILD FAILURE
> > > [INFO]
> > >
> 
> > > [INFO] Total time:  52.232 s
> > > [INFO] Finished at: 2023-10-04T13:33:46-07:00
> > > [INFO]
> > >
> 
> > > [ERROR] Failed to execute goal
> > > org.apache.maven.plugins:maven-archetype-plugin:3.2.1:generate
> > > (default-cli) on project standalone-pom: The defined artifact is not an
> > > archetype -> [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/MojoFailureException
> > > 
> > >
> > > This doesn't tell me WHY it thinks this is not an archetype.
> > >
> > > I find some confusing docs about creating and installing archetypes.
> > >
> > > I found this page:
> > > https://maven.apache.org/guides/mini/guide-creating-archetypes.html .
> > > This example is curious, as the pom.xml for the archetype references
> the
> > > "archetype-packaging" extension, but the text says nothing about this.
> In
> 

[ANN] Maven Site Plugin 4.0.0-M10 released

2023-10-06 Thread Michael Osipov
The Apache Maven team is pleased to announce the release of the Maven 
Site Plugin, version 4.0.0-M10.


https://maven.apache.org/plugins/maven-site-plugin/


Release Notes - Maven Site Plugin - Version 4.0.0-M10

** Bug
* [MSITE-971] - Site generation not resolving git.commit.time

** Improvement
* [MSITE-973] - Have ${project.build.outputTimestamp} injected as 
@Parameter


** Task
* [MSITE-975] - Use injected only properties in additional template 
properties


** Dependency upgrade
* [MSITE-976] - Bump plexus-archiver from 4.7.1 to 4.8.0
* [MSITE-979] - Upgrade to Parent 40
* [MSITE-980] - Upgrade plugins and components (in ITs)


Please also note for this new major version: 
https://cwiki.apache.org/confluence/display/MAVEN/Towards+Doxia+2.0.0+Stack


Enjoy,

-The Apache Maven team

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



[ANN] Apache Maven Reporting Exec 2.0.0-M10 released

2023-10-06 Thread Michael Osipov
The Apache Maven team is pleased to announce the release of the Maven 
Reporting Exec version 2.0.0-M10.


https://maven.apache.org/shared/maven-reporting-exec/


Release Notes - Maven Shared Components - Version 
maven-reporting-exec-2.0.0-M10


** Bug
* [MSHARED-1298] - Missing site report should be detected

** Dependency upgrade
* [MSHARED-1310] - Upgrade to Parent 40
* [MSHARED-1311] - Upgrade plugins and components (in ITs)


Enjoy,

-The Apache Maven team

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