Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8230791
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T17:15:00+00:00 2026-06-07T17:15:00+00:00

I have a projectA-parent with the following structure: projectA-parent| —————-|projectA —————-|projectA-core —————-|projectA-api The module

  • 0

I have a projectA-parent with the following structure:

projectA-parent|
----------------|projectA
----------------|projectA-core
----------------|projectA-api

The module projectA simply defines dependencies to core and api [1], so I can just define a dependency to projectA in other projects that need both the core and the api. I deploy the project to Archiva (1.4-M2), to a SNAPSHOT repository.

I have another project X where I define a dependency to projectA, and this afternoon the goal “mvn compile” started failing with unresolved compilation issues. Upon investigation with “mvn dependency:tree” on that project I discovered that, under projectA, the dependency to projectA-core was declared as “runtime”. While this morning it was like this, I performed several mvn installs since where the scope is “compile” (see [1], where the most recent pom definition is listed).

Looking at archiva, I see the following files for this project (abbreviated):

projectA-0.0.7-20120712.084920-61-tests.jar
projectA-0.0.7-20120712.084920-61-tests.jar.md5
projectA-0.0.7-20120712.084920-61-tests.jar.sha1
projectA-0.0.7-20120712.084920-61.jar
projectA-0.0.7-20120712.084920-61.jar.md5
projectA-0.0.7-20120712.084920-61.jar.sha1
projectA-0.0.7-20120712.084920-61.pom
projectA-0.0.7-20120712.084920-61.pom.md5
projectA-0.0.7-20120712.084920-61.pom.sha1
projectA-0.0.7-20120712.172412-87-tests.jar
projectA-0.0.7-20120712.172412-87-tests.jar.md5
projectA-0.0.7-20120712.172412-87-tests.jar.sha1
projectA-0.0.7-20120712.172412-87.pom
projectA-0.0.7-20120712.172412-87.pom.md5
projectA-0.0.7-20120712.172412-87.pom.sha1
projectA-0.0.7-20120712.180733-90.pom
projectA-0.0.7-20120712.180733-90.pom.md5
projectA-0.0.7-20120712.180733-90.pom.sha1

Here’s the interesting part: if I delete projectA from my local .m2/repository, even if I “mvn compile -U” I will get th 08:49 version, not the 18:07 one! This means either maven or archiva are resolving the 1st sNAPSHOT of the day and not the most recent one.
Why is that, and how can one solve this?

[1]:

<dependencies>
        <dependency>
            <groupId>com.projectA</groupId>
            <artifactId>projectA-api</artifactId>
            <version>${project.version}</version>
            <type>jar</type>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>com.projectA</groupId>
            <artifactId>projectA-core</artifactId>
            <version>${project.version}</version>
            <type>jar</type>
            <scope>runtime</scope>
        </dependency>
</dependencies>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T17:15:02+00:00Added an answer on June 7, 2026 at 5:15 pm

    What is the packaging of your projectA (‘jar‘ or ‘pom‘). It only exists a ‘jar‘ artefact for 08:49.

    I suppose you changed the packaging to ‘pom‘. Thus if you declare the library as dependency in other projects you have to set <type>pom</type>.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a multi module project with the following structure: -parent -module1 -module2 -src
Currently, I have the following structure for my project Foo : foo-parent +- pom.xml
I have the following dir structure: parent-proj - child proj1 - pom.xml -child proj2
I have a Maven multi-module project and I need two different parent POMs in
I have the following text: started: Project: ProjectA, Configuration: Release Any CPU ------ I
I have a multi module project with a parent project A, and two childs
I have this project structure where I have a parent pom which include let's
MSBuild 3.5 I have the following project structure: trunk/MainSolution.sln trunk/Build/MyBuild.Proj trunk/Library/... trunk/etc... So far,
Within a child, I have an XML element with the following structure: <position> <startOffset>*NUMBER*</startOffset>
Assume we have following JPA Entities: class Parent { @Id private Long id; }

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.